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
Asked
Active
Viewed 299 times
-1

Sebastián García
- 37
- 1
- 9
-
Why not add it to a prefab? – Swift Nov 24 '18 at 05:35
1 Answers
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