PlayMaker Help & Tips > PlayMaker Help

Photon Failed To Network Remove Gameobject[SOLVED]

(1/4) > >>

KillerCreeper:
I have an item pickup script that, when hovering over on an item with your cursor at a certain distance and press F, it will delete the item and add it into the inventory. I keep getting this error when testing it with the second client that joined. Is there any solution to this?



--- Code: ---Failed to 'network-remove' GameObject. Client is neither owner nor masterClient taking over for owner who left: View (0)1 on M16 Carbine (scene)
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
NetworkingPeer:RemoveInstantiatedGO(GameObject, Boolean) (at D:\Unity\Survival Inc\Assets\Photon Unity Networking\Plugins\PhotonNetwork\NetworkingPeer.cs:3463)
PhotonNetwork:Destroy(GameObject) (at D:\Unity\Survival Inc\Assets\Photon Unity Networking\Plugins\PhotonNetwork\PhotonNetwork.cs:2746)
HutongGames.PlayMaker.Actions.PhotonNetworkDestroy:doDestroy() (at D:\Unity\Survival Inc\Assets\PlayMaker PUN\Actions\PhotonNetworkDestroy.cs:37)
HutongGames.PlayMaker.Actions.PhotonNetworkDestroy:OnEnter() (at D:\Unity\Survival Inc\Assets\PlayMaker PUN\Actions\PhotonNetworkDestroy.cs:24)
HutongGames.PlayMaker.FsmState:ActivateActions(Int32) (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\FsmState.cs:205)
HutongGames.PlayMaker.FsmState:OnEnter() (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\FsmState.cs:175)
HutongGames.PlayMaker.Fsm:EnterState(FsmState) (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:2771)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState) (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:2718)
HutongGames.PlayMaker.Fsm:UpdateStateChanges() (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:2643)
HutongGames.PlayMaker.Fsm:DoTransition(FsmTransition, Boolean) (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:2685)
HutongGames.PlayMaker.Fsm:ProcessEvent(FsmEvent, FsmEventData) (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:2253)
HutongGames.PlayMaker.Fsm:SendEventToFsmOnGameObject(GameObject, String, FsmEvent) (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:2622)
HutongGames.PlayMaker.Fsm:Event(FsmEventTarget, FsmEvent) (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:2389)
HutongGames.PlayMaker.Actions.SendEvent:OnEnter() (at D:\Unity\Survival Inc\Assets\PlayMaker\Actions\StateMachine\SendEvent.cs:42)
HutongGames.PlayMaker.FsmState:ActivateActions(Int32) (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\FsmState.cs:205)
HutongGames.PlayMaker.FsmState:OnEnter() (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\FsmState.cs:175)
HutongGames.PlayMaker.Fsm:EnterState(FsmState) (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:2771)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState) (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:2718)
HutongGames.PlayMaker.Fsm:UpdateStateChanges() (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:2643)
HutongGames.PlayMaker.Fsm:UpdateState(FsmState) (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:2787)
HutongGames.PlayMaker.Fsm:Update() (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:1995)
PlayMakerFSM:Update() (at C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\PlayMakerFSM.cs:586)
--- End code ---

djaydino:
Hi.
I have edited you post, that yellow hurts to the eye and makes it unreadable :)

You can use the # to place something like this :)

I have no Experience with Photon, but i think you will need to give some more information on how you are deleting and what are you sending thru Photon.

The more information, the easier it is for others to find a solution :)

KillerCreeper:

--- Quote from: djaydino on June 11, 2019, 09:34:14 AM ---Hi.
I have edited you post, that yellow hurts to the eye and makes it unreadable :)

You can use the # to place something like this :)

I have no Experience with Photon, but i think you will need to give some more information on how you are deleting and what are you sending thru Photon.

The more information, the easier it is for others to find a solution :)

--- End quote ---

Sorry about that, I have a dark mode addon for chrome, so the yellow doesn't look bad for me.

But each player has an "Inventory Manager." It's a simple empty game object just to group up the inventory. I'm using a raycast on the main camera. Whenever the player picks up an object, the item that was picked up gets sent into the inventory manager and it sends an event to the inventory manager called "Add item" which gets all of the variables attached to the item, finds an empty array, and stores the variables in the array. The problem is destroying the game object, which I am using "Photon Network Destroy" for that. As I said before, it works for the first client that joined but not the second.

jeanfabre:
Hi,

 the error says: Client is neither owner nor masterClient taking over for owner who left:

 in order to remove a network gameobject, you must be the owner, or you must be the masterClient.

Bye,

 Jean

KillerCreeper:

--- Quote from: jeanfabre on June 12, 2019, 07:21:20 AM ---Hi,

 the error says: Client is neither owner nor masterClient taking over for owner who left:

 in order to remove a network gameobject, you must be the owner, or you must be the masterClient.

Bye,

 Jean

--- End quote ---

How would I fix this, though? I need it so when a player picks up an item, it removes the item for all players. The network remove gameobject action was the only way I found that does that.

Navigation

[0] Message Index

[#] Next page

Go to full version