Fixed HumanoidPlayer singleton not working with Photon PUN

This commit is contained in:
Pascal Serrarens 2022-02-18 17:58:23 +01:00
parent 45cd4a16ef
commit 18735e37e2

View File

@ -73,8 +73,8 @@ namespace Passer.Humanoid {
DebugLog("Send Instantiate Humanoid " + humanoid.humanoidId); DebugLog("Send Instantiate Humanoid " + humanoid.humanoidId);
HumanoidNetworking.InstantiateHumanoid instantiateHumanoid = new HumanoidNetworking.InstantiateHumanoid(humanoid); HumanoidNetworking.InstantiateHumanoid instantiateHumanoid = new HumanoidNetworking.InstantiateHumanoid(humanoid);
if (createLocalRemotes) if (createLocalRemotes)
this.Receive(instantiateHumanoid); this.Receive(instantiateHumanoid);
} }
public void DestroyHumanoid(HumanoidControl humanoid) { } public void DestroyHumanoid(HumanoidControl humanoid) { }
public void UpdateHumanoidPose(HumanoidControl humanoid) { } public void UpdateHumanoidPose(HumanoidControl humanoid) { }
@ -142,6 +142,13 @@ namespace Passer.Humanoid {
} }
} }
#endif
[SerializeField]
protected HumanoidNetworking.DebugLevel _debug = HumanoidNetworking.DebugLevel.Error;
public HumanoidNetworking.DebugLevel debug {
get { return _debug; }
}
static HumanoidPlayer mInstance; static HumanoidPlayer mInstance;
public static HumanoidPlayer instance { public static HumanoidPlayer instance {
get { get {
@ -153,16 +160,6 @@ namespace Passer.Humanoid {
return mInstance; return mInstance;
} }
} }
//public static void StartStaticCoroutine(IEnumerator coroutineMethod) {
// StartCoroutine(coroutineMethod);
//}
#endif
[SerializeField]
protected HumanoidNetworking.DebugLevel _debug = HumanoidNetworking.DebugLevel.Error;
public HumanoidNetworking.DebugLevel debug {
get { return _debug; }
}
} }