- Home /
Unity - How to instantiate a gameobject from the scene without a prefab in the resources folder ?
Hello, I'm new in photon,
I have a problem, but before I’ll explain a little bit what my game looks like : it's a 2d game where there is a single player mode where you can farm rarer weapons than others have armor, improve hit points, have passive or active artifacts ... A kind of solo "rpg"
So this is my problem now, I have instigated a "pvp" system in 1v1, for the moment the room system works but the problem is that I would like our characters with all their characteristics to be instantiated with the opposing player, (he doesn’t there will be no movement, it's just a question of look) the problem is when we do a prefab in the resources folder we can not have all the mesh of the solo mode, the 2 players are identical with the basic skin and equivalent characteristics. So I would like to find a way to instantiate your own character without passing the prefabs in the resources folder!
I inquired and saw things like" viewID" or "RPC" but it did not work for me, or simply I did it wrong maybe?
Any help would be welcome !!!
Thank you for your help,
Cordially.
Answer by RedNivar · May 19, 2020 at 05:31 AM
@unity_KONFA0LDbFIXOQ , RPC can solve your problem. Tell me how you are calling the RPC.
Your answer
![](https://koobas.hobune.stream/wayback/20220612234626im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Weapon switching not registering across players 1 Answer
Instantiating player when creating a new room in photon not working. 0 Answers
Material color changing in Photon Multiplayer scenes 0 Answers
Is it possible to select one scene out of given option and make it public for others to join ? 0 Answers
Photon OnPhotonPlayerDisconnected Works For Only Master Client 0 Answers