How to distinguish between multiple components of same type (C#)

Updated on April 17, 2017 in [A] C# .Net
Share on Facebook0Tweet about this on Twitter0Share on Google+0Share on Reddit0
1 on April 15, 2017

I was trying to use (GetComponent) in C# but my game object has 2 components from the same type (Wheel Joint 2D) so please how can distinguish between them?
i can’t use the drag and drop thing because i use instantiate function.

  • Liked by
Reply
0 on April 17, 2017

well getting the name of the wheel joint 2D is one way the other that i can think of is with tags either give them seperate names or tags and search for that with GetComponent

  • Liked by
Reply
Cancel