playMaker

Author Topic: uNet Spawning Help  (Read 4063 times)

OmegaDEV

  • Playmaker Newbie
  • *
  • Posts: 8
uNet Spawning Help
« on: January 19, 2016, 11:54:00 AM »
I was reading a discussion at with another user and he went down the path of using photon. However i do not wish to do that.
Pre-Release Discussion Question:
http://hutonggames.com/playmakerforum/index.php?topic=12060.msg56238#msg56238

I have got everything working in my game, u can join match making, get in a game, run around and see other clients. Everything is working however i dont have a way to spawn the objects on the network.

I was hoping someone could help me in regards to spawning objects.
I want the player to be able to 'pick up, 'drop and 'spawn objects / prefabs.
Below is a link from unity wiki and an exert that explains what i need.

"With the server authoritative system of the Unity Network System, networked objects with NetworkIdentities must be “spawned” by the server using NetworkServer.Spawn(). This causes them to be assigned a NetworkInstanceId and be created on clients that are connected to the server"


http://docs.unity3d.com/Manual/class-NetworkIdentity.html


Here is a Request for a "NetworkServer.Spawn()" Action.
http://hutonggames.com/playmakerforum/index.php?topic=12061.msg56239#msg56239


Thank you :)
« Last Edit: January 19, 2016, 01:30:44 PM by OmegaDEV »

OmegaDEV

  • Playmaker Newbie
  • *
  • Posts: 8
Re: uNet Spawning Help
« Reply #1 on: January 20, 2016, 02:33:17 PM »
Hi i have compiled a test example of a Unity Network Spawn Script, however i require hep turning it into a custom action for play maker.

in this 12.mb example u will find a local player and a client, once connected each window will see a red man, he is a client, if u look down at ur feet u will see blue for local authority. this was achieved with the following custom actions listed below without them this would not work.

Along with this if u press space the player will jump and in doing so also triggers the "NetworkBulletSpawn" script attached to the player creating a object on the network server and all clients.

If you could i would very much appreciate it if the attached scrip could be edited into a custom action.

uUet Custom Actions
https://github.com/jeanfabre/PlayMakerEcosystemPackagesRep_U5/blob/master/PlayMaker/Ecosystem/Custom%20Packages/Unity/PlayMakerUnet.unitypackage

https://github.com/jeanfabre/PlayMakerEcosystemPackagesRep_U5/blob/master/PlayMaker/Ecosystem/Custom%20Packages/Unity/PlayMakerSAN.unitypackage


MY SCRIPT: NetowrkBulletSpawn
« Last Edit: November 14, 2016, 03:25:25 AM by OmegaDEV »