hi can someone explain what i am doing wrong i know its in the instantiate it marks red and says no overload for method takes 3 arguments so i know i an forgetting a few things in my instantiate but dont know how to fix this.
PhotonNetwork.Instantiate("hitDecal", hitPoint, Quaternion.FromToRotation(Vector3.forward, hitPoint.normalized));
I have never used Photon, however a 2 sec google search brought me to this page. I have to admit, even though the documentation is quite well made, I’m a bit disappointed that they don’t seem to have a proper API documentation which specifies what each argument does and what exact overloads exist.
Anyways, usually you do not need the documentation anyways since you should have intellisense when you use VisualStudio. So it should give you a list of the possible overloads and you can see what the argument names are and how many there are. From the example given in the documentation you can see that there’s a fourth argument at the end which is simply a “0”. You only pass 3 arguments.
As I said, at this point the documentation is lacking as the last argument is not explained anywhere on that page. Though as I said, you should have intellisense and see that:
- There is another argument required
- you would also see what this argument is named which should help to figure out what the method may expect.
Another quick google search revealed that the fourth parameter is actually a group ID. So if you don’t seperate out your objects into specific groups, using 0 is probably ok.
I don’t want to sound mean or anything. However such “problems” are so trivial that they should not require a question on UA ^^.