24

One of the amazing things you can do with Unity.
Seems legit.

Comments
  • 7
    What the flying fck is that :D
  • 1
    @Christian1998 exactly
  • 0
    It's beautiful... Chaotically beautiful
  • 1
    Not sure here (I'm not a Unity person), but it just looks like you're walking up the scene graph.
  • 4
    "And that's not even my final form"
  • 0
    Yes it can get this bad in Unity.
  • 3
    @Vake93 I did... to show it.

    Every gameObject in Unity can access itself or its transform, and every transform can access itself or its gameObject, so you can chain them together forever
  • 4
    @RememberMe Nope, you walk up the scene graph by calling transform.parent.

    gameObject.gameObject.gameObject is "just access myself again, and again, and again"
  • 3
    I see, thanks.
    Is there any particular reason why a GameObject references itself?
    I can get how weapon.transform.gameObject.transform... is a thing, because it (sort of?) makes sense for a transform to contain a reference to its GameObject (at least it's not outlandishly weird)
    But why would a GameObject need that?
  • 2
    @RememberMe it doesn't, but since everything in Unity extends the MonoBehaviour God object, shit like this happens.

    That's why they're thinking of actually cutting this God object into separate parts in future versions
Add Comment