Commit ac5b322f authored by Tania Rubach Holst's avatar Tania Rubach Holst
Browse files

merge player objects

parent 1c7c2c5c
......@@ -22,16 +22,16 @@
},
{
"compression": 8,
"hash": "dec68825e5c9cef8dfde2f8e802f928a3944549f",
"hash": "d48364a013afd846ab8a996961e3d7b9fe354bb0",
"pkgpath": "Data/Managed/Metadata/global-metadata.dat",
"size": 5187416,
"size": 5188204,
"src": "E:/Carl/Photon_Test/Temp/StagingArea/Data/Managed/Metadata/global-metadata.dat"
},
{
"compression": 8,
"hash": "6415741896b0ba47038946a89443816595933676",
"hash": "5117615e462f8e6cd964277998487fb676728893",
"pkgpath": "bin/libil2cpp.so",
"size": 82748096,
"size": 82756664,
"src": "E:/Carl/Photon_Test/Temp/StagingArea/Data/Native/libil2cpp.so",
"xfrm_flags": {
"signed": {
......@@ -43,9 +43,9 @@
"version": 3
}
},
"xfrm_hash": "150015f8d071e592a53b75af65ce5dd7e2c279e7",
"xfrm_hash": "46111785a3048204e77be74e82188ecde043e1e2",
"xfrm_path": "E:/Carl/Photon_Test/.out/.cache/debug_lumin_clang-3.8_aarch64/com.defaultcompany.photontest-a2f6d5b7bf33184e\\libil2cpp.so-ad00a98fde674295",
"xfrm_size": 82748854
"xfrm_size": 82757422
},
{
"compression": 8,
......@@ -199,21 +199,21 @@
},
{
"compression": 8,
"hash": "da9305db14cf19aa6834bedfd480bd2a28569cc5",
"hash": "31b5ee3f4f0dbbee1c685ecd9ba93b357e6e3677",
"pkgpath": "Data/globalgamemanagers",
"size": 104896,
"size": 111504,
"src": "E:/Carl/Photon_Test/Temp/StagingArea/Data/globalgamemanagers"
},
{
"compression": 8,
"hash": "e2b22307936f08d831cb822a17127f93a36cc4b8",
"hash": "814689abfb2d77113c67f14755fe3c3d0fdd3a3c",
"pkgpath": "Data/globalgamemanagers.assets",
"size": 128296,
"size": 128520,
"src": "E:/Carl/Photon_Test/Temp/StagingArea/Data/globalgamemanagers.assets"
},
{
"compression": 8,
"hash": "834028122149b6520b0737f8a12c3b03a9f1ef18",
"hash": "e2d52d4a64ae442d03c83f18d603a50527fbe7d2",
"pkgpath": "Data/level0",
"size": 9244,
"src": "E:/Carl/Photon_Test/Temp/StagingArea/Data/level0"
......@@ -227,9 +227,9 @@
},
{
"compression": 8,
"hash": "68a766d6156e49b808f38f92b327030364f2a652",
"hash": "c95299fece124e00a478936306a9c4dbf68becde",
"pkgpath": "Data/level1",
"size": 21264,
"size": 21784,
"src": "E:/Carl/Photon_Test/Temp/StagingArea/Data/level1"
},
{
......@@ -241,9 +241,9 @@
},
{
"compression": 8,
"hash": "b9fdb737112fb497eacf3387e53308d9772106f5",
"hash": "35d96b46bc35733d1560a21fb965fbde71ff9107",
"pkgpath": "Data/level2",
"size": 9700,
"size": 9652,
"src": "E:/Carl/Photon_Test/Temp/StagingArea/Data/level2"
},
{
......@@ -255,9 +255,9 @@
},
{
"compression": 8,
"hash": "fb9b9a1da054e44a12b5932367434d807cc0b6a6",
"hash": "702a1857a8a9aa180efc965ae97a3cab195007d2",
"pkgpath": "Data/resources.assets",
"size": 3563608,
"size": 3577408,
"src": "E:/Carl/Photon_Test/Temp/StagingArea/Data/resources.assets"
},
{
......@@ -276,7 +276,7 @@
},
{
"compression": 8,
"hash": "228f5b069d132a2c0b3cad79db8388e92b5289e4",
"hash": "f15ffbd2140d3abb05be8a2893b5a8fe62a9a730",
"pkgpath": "Data/sharedassets0.assets",
"size": 26648,
"src": "E:/Carl/Photon_Test/Temp/StagingArea/Data/sharedassets0.assets"
......@@ -290,9 +290,9 @@
},
{
"compression": 8,
"hash": "9f0e1c299af38778765af33dfd56f42640b618ae",
"hash": "0340845172a2e9dde6d1f83b2532238e6905e395",
"pkgpath": "Data/sharedassets1.assets",
"size": 29016,
"size": 27320,
"src": "E:/Carl/Photon_Test/Temp/StagingArea/Data/sharedassets1.assets"
},
{
......@@ -304,9 +304,9 @@
},
{
"compression": 8,
"hash": "118bda66be2c63f277167bdc3bbe5e0a9ef8f647",
"hash": "43c5a59834fd12261095c35a7475b325a32f651f",
"pkgpath": "Data/sharedassets2.assets",
"size": 23272,
"size": 22976,
"src": "E:/Carl/Photon_Test/Temp/StagingArea/Data/sharedassets2.assets"
},
{
......
No preview for this file type
......@@ -5,10 +5,10 @@ using Photon.Pun;
public class CameraAvatarManager : MonoBehaviourPunCallbacks
{
[SerializeField]
private GameObject _camera;
//[SerializeField]
//private GameObject _camera;
public static GameObject LocalCameraInstance;
//public static GameObject LocalCameraInstance;
void Awake()
{
......@@ -16,7 +16,7 @@ public class CameraAvatarManager : MonoBehaviourPunCallbacks
// used in GameManager.cs: we keep track of the localPlayer instance to prevent instantiation when levels are synchronized
if (photonView.IsMine)
{
LocalCameraInstance = this.gameObject;
//LocalCameraInstance = this.gameObject;
}
// #Critical
// we flag as don't destroy on load so that instance survives level synchronization, thus giving a seamless experience when levels load.
......@@ -35,10 +35,5 @@ public class CameraAvatarManager : MonoBehaviourPunCallbacks
// Update is called once per frame
void Update()
{
if (photonView.IsMine)
{
transform.position = _camera.transform.position;
transform.rotation = _camera.transform.rotation;
}
}
}
using UnityEngine;
using UnityEngine.EventSystems;
using System.Collections;
using Photon.Pun;
using UnityEngine.UI;
using UnityEngine.XR.MagicLeap;
namespace com.defaultcompany.photontest
{
/// <summary>
/// Player manager.
/// Handles controller input.
/// </summary>
public class PlayerManager : MonoBehaviourPunCallbacks, IPunObservable
{
#region Private Fields
#endregion
#region Public Fields
[Tooltip("The local player instance. Use this to know if the local player is represented in the Scene")]
public static GameObject LocalPlayerInstance;
#endregion
#region IPunObservable implementation
public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{
if (stream.IsWriting)
{
// We own this player: send the others our data
//stream.SendNext(_bumper);
//stream.SendNext(_bumper_time);
}
else
{
// Network player, receive data
//_bumper = (bool)stream.ReceiveNext();
//_bumper_time = (int)stream.ReceiveNext();
}
}
#endregion
#region MonoBehaviour CallBacks
/// <summary>
/// MonoBehaviour method called on GameObject by Unity during early initialization phase.
/// </summary>
void Awake()
{
// #Important
// used in GameManager.cs: we keep track of the localPlayer instance to prevent instantiation when levels are synchronized
if (photonView.IsMine)
{
LocalPlayerInstance = this.gameObject;
}
// #Critical
// we flag as don't destroy on load so that instance survives level synchronization, thus giving a seamless experience when levels load.
//DontDestroyOnLoad(gameObject);
}
public override void OnDisable()
{
// Always call the base to remove callbacks
base.OnDisable();
}
void OnDestroy()
{
if (photonView.IsMine == false && PhotonNetwork.IsConnected)
{
return;
}
}
#endregion
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 0df376feb9f38064ab90a802f2064668
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -28,7 +28,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3056296962758725215}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.19297567, y: -0.43762782, z: 0.28543264}
m_LocalPosition: {x: -0.1, y: 1.92, z: 0.75}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4382629214593057919}
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1206643105948387902
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2119272327274482700}
- component: {fileID: 640120980332189191}
- component: {fileID: 2463608668628140409}
- component: {fileID: 2463608668628140390}
m_Layer: 0
m_Name: Player
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2119272327274482700
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1206643105948387902}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 7243670819446795781}
- {fileID: 4996177119336169725}
- {fileID: 2467557068273794660}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &640120980332189191
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1206643105948387902}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0df376feb9f38064ab90a802f2064668, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2463608668628140409
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1206643105948387902}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8efc6b1d64977384eb3405357896c656, type: 3}
m_Name:
m_EditorClassIdentifier:
m_PositionModel:
SynchronizeEnabled: 1
TeleportEnabled: 1
TeleportIfDistanceGreaterThan: 3
InterpolateOption: 2
InterpolateMoveTowardsSpeed: 1
InterpolateLerpSpeed: 1
ExtrapolateOption: 0
ExtrapolateSpeed: 1
ExtrapolateIncludingRoundTripTime: 1
ExtrapolateNumberOfStoredPositions: 1
m_RotationModel:
SynchronizeEnabled: 1
InterpolateOption: 1
InterpolateRotateTowardsSpeed: 180
InterpolateLerpSpeed: 5
m_ScaleModel:
SynchronizeEnabled: 0
InterpolateOption: 0
InterpolateMoveTowardsSpeed: 1
InterpolateLerpSpeed: 0
--- !u!114 &2463608668628140390
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1206643105948387902}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: aa584fbee541324448dd18d8409c7a41, type: 3}
m_Name:
m_EditorClassIdentifier:
ObservedComponentsFoldoutOpen: 1
Group: 0
prefixField: -1
Synchronization: 3
OwnershipTransfer: 0
ObservedComponents:
- {fileID: 2463608668628140409}
viewIdField: 0
InstantiationId: 0
isRuntimeInstantiated: 0
--- !u!1001 &285615490137244854
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2119272327274482700}
m_Modifications:
- target: {fileID: 5089992650041148486, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: m_Name
value: Pointer
objectReference: {fileID: 0}
- target: {fileID: 5089992650041148486, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5089992650041148491, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5089992650041148491, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5089992650041148491, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5089992650041148491, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5089992650041148491, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5089992650041148491, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5089992650041148491, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5089992650041148491, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5089992650041148491, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5089992650041148491, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5089992650041148491, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5089992650041148484, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: viewIdField
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5358416978365588103, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: _gizmo
value:
objectReference: {fileID: 4100479217875147501}
- target: {fileID: 2433855636702044362, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: m_Camera
value:
objectReference: {fileID: 2483848131698262168}
- target: {fileID: 6226535670859130952, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: viewIdField
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2025311955887049639, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
propertyPath: viewIdField
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: b9c6fe3e6f9257e4ab48f54a65490d7b, type: 3}
--- !u!4 &4996177119336169725 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5089992650041148491, guid: b9c6fe3e6f9257e4ab48f54a65490d7b,
type: 3}
m_PrefabInstance: {fileID: 285615490137244854}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &2463608668567233358
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2119272327274482700}
m_Modifications:
- target: {fileID: 1011244501761250, guid: 24158fb1437dc8e418d893939758764d, type: 3}
propertyPath: m_Name
value: Main Camera
objectReference: {fileID: 0}
- target: {fileID: 4214550324010282, guid: 24158fb1437dc8e418d893939758764d, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4214550324010282, guid: 24158fb1437dc8e418d893939758764d, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4214550324010282, guid: 24158fb1437dc8e418d893939758764d, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4214550324010282, guid: 24158fb1437dc8e418d893939758764d, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4214550324010282, guid: 24158fb1437dc8e418d893939758764d, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4214550324010282, guid: 24158fb1437dc8e418d893939758764d, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4214550324010282, guid: 24158fb1437dc8e418d893939758764d, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4214550324010282, guid: 24158fb1437dc8e418d893939758764d, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 4214550324010282, guid: 24158fb1437dc8e418d893939758764d, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4214550324010282, guid: 24158fb1437dc8e418d893939758764d, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4214550324010282, guid: 24158fb1437dc8e418d893939758764d, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 24158fb1437dc8e418d893939758764d, type: 3}
--- !u!4 &2467557068273794660 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4214550324010282, guid: 24158fb1437dc8e418d893939758764d,
type: 3}
m_PrefabInstance: {fileID: 2463608668567233358}
m_PrefabAsset: {fileID: 0}
--- !u!20 &2483848131698262168 stripped
Camera:
m_CorrespondingSourceObject: {fileID: 20294507499185110, guid: 24158fb1437dc8e418d893939758764d,
type: 3}
m_PrefabInstance: {fileID: 2463608668567233358}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &2463608669478571618
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2119272327274482700}
m_Modifications:
- target: {fileID: 3056296962758725215, guid: 94c52ced4e2bdbd4c92b6b693c04022a,
type: 3}
propertyPath: m_Name
value: Gizmo
objectReference: {fileID: 0}
- target: {fileID: 5095487848365875303, guid: 94c52ced4e2bdbd4c92b6b693c04022a,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5095487848365875303, guid: 94c52ced4e2bdbd4c92b6b693c04022a,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5095487848365875303, guid: 94c52ced4e2bdbd4c92b6b693c04022a,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5095487848365875303, guid: 94c52ced4e2bdbd4c92b6b693c04022a,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5095487848365875303, guid: 94c52ced4e2bdbd4c92b6b693c04022a,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5095487848365875303, guid: 94c52ced4e2bdbd4c92b6b693c04022a,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5095487848365875303, guid: 94c52ced4e2bdbd4c92b6b693c04022a,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5095487848365875303, guid: 94c52ced4e2bdbd4c92b6b693c04022a,
type: 3}
propertyPath: m_RootOrder