Skip to main content
6 events
when toggle format what by license comment
May 31, 2014 at 23:32 comment added House @jhocking That's true. The Transform class and the MonoBehaviour class (the this in this instance) are both extensions of the Component class. Which is where the gameObject variable is stored. But you're right, it's unnecessary, and makes the assumption (which is a pretty good assumption, but an assumption nevertheless) that both components are referencing the same gameObject.
May 31, 2014 at 23:23 comment added jhocking tiny note: You don't have have to write this.transform.gameObject, you could just do this.gameObject I mean, technically that works fine, but it's unnecessary indirection that can sometimes lead to code that says something like this.transform.gameObject.collider.gameObject.tranform (only through several variables, so you don't notice it happening :P)
May 31, 2014 at 14:03 comment added House Use the ChangeScene method to handle all your scene changes, instead of whatever you're using now. That means load the scene manager before changing any scenes, so I assume before the first level.
May 31, 2014 at 13:58 comment added Ssiro Hey,thanks for your fast response but I got some questions : When you say "make sure that scene manager game object is created in the first scene" do you actualy mean the main menu or the first level ? And what exactly do you mean by "just use the scene manager to handle all your scene changes" ? Thank you.
May 31, 2014 at 13:52 history edited House CC BY-SA 3.0
deleted 2 characters in body
May 31, 2014 at 13:18 history answered House CC BY-SA 3.0