-1

I want to add a PhotonView script to my gameobject, I have tried with this.gameObject.AddComponent(); , but when I use it, it throws null. What Am I doing wrong? Thanks

1 Answers1

0

You should be passing the component type when calling the method. take a look at GameObject.AddComponent. passing as string to this method is now obsolete.

Hope it helps!

Itay Podhajcer
  • 2,616
  • 2
  • 9
  • 14