Commit 8adcb961 authored by Carl Erik Friedemann's avatar Carl Erik Friedemann
Browse files

fix duplication bug

parent 785d0367
......@@ -22,16 +22,16 @@
},
{
"compression": 8,
"hash": "d0a42522eaa59cbb8ad41c940f0d7067e75b0f7f",
"hash": "331b440a870b9aa74b17b5a09f67f282a7f1b2a8",
"pkgpath": "Data/Managed/Metadata/global-metadata.dat",
"size": 5950200,
"size": 5950360,
"src": "D:/UnityProjects/ml_3dmanipulation_photon/Temp/StagingArea/Data/Managed/Metadata/global-metadata.dat"
},
{
"compression": 8,
"hash": "11012cb8ad438d3a8ce65191cc69cb7bd178224e",
"hash": "0985d6f382ce91de30d346ddcff63a26e3747433",
"pkgpath": "bin/libil2cpp.so",
"size": 97418952,
"size": 97424112,
"src": "D:/UnityProjects/ml_3dmanipulation_photon/Temp/StagingArea/Data/Native/libil2cpp.so",
"xfrm_flags": {
"signed": {
......@@ -43,9 +43,9 @@
"version": 3
}
},
"xfrm_hash": "efc8086e6d2ffcb74221d34a7362fcbe1e01e4b0",
"xfrm_hash": "f2096df32829432f6ab48f292a26cebfa414f5d1",
"xfrm_path": "D:/UnityProjects/ml_3dmanipulation_photon/.out/.cache/debug_lumin_clang-3.8_aarch64/com.defaultcompany.photontest-0f903ea3c7993835\\libil2cpp.so-2e394ccb7094561f",
"xfrm_size": 97419710
"xfrm_size": 97424870
},
{
"compression": 8,
......@@ -206,9 +206,9 @@
},
{
"compression": 8,
"hash": "dac8195b0384b0ac9f96eb651ecf47bd787c97e6",
"hash": "94d8891baefaf1f5b2046a5ace39140873eab735",
"pkgpath": "Data/StreamingAssets/build_info",
"size": 49,
"size": 50,
"src": "D:/UnityProjects/ml_3dmanipulation_photon/Temp/StagingArea/Data/StreamingAssets/build_info"
},
{
......@@ -227,9 +227,9 @@
},
{
"compression": 8,
"hash": "f74bf82125dedbc4258025102c3e72cf521263ac",
"hash": "5232a70aa6b208e3eac7d2e3e03a48e82d1db4c1",
"pkgpath": "Data/globalgamemanagers",
"size": 169512,
"size": 169608,
"src": "D:/UnityProjects/ml_3dmanipulation_photon/Temp/StagingArea/Data/globalgamemanagers"
},
{
......@@ -255,9 +255,9 @@
},
{
"compression": 8,
"hash": "90e62c90197cf1961c797cb07413d62a839a8699",
"hash": "79433bd58d43e8f2c881fefcf85c065ee3a238b7",
"pkgpath": "Data/level1",
"size": 58556,
"size": 68860,
"src": "D:/UnityProjects/ml_3dmanipulation_photon/Temp/StagingArea/Data/level1"
},
{
......@@ -269,9 +269,9 @@
},
{
"compression": 8,
"hash": "955f6fc9b3bb8460b86dac78d03267fc11d6cc58",
"hash": "ee6553b74ed6db99a822f60ece322abbf9a721a9",
"pkgpath": "Data/resources.assets",
"size": 17051372,
"size": 17052420,
"src": "D:/UnityProjects/ml_3dmanipulation_photon/Temp/StagingArea/Data/resources.assets"
},
{
......@@ -304,9 +304,9 @@
},
{
"compression": 8,
"hash": "fca6f6ee382856deda8cacc25aa7dec260cc4211",
"hash": "c3dff0680f805e68d901d8c760e937e6f9d92572",
"pkgpath": "Data/sharedassets1.assets",
"size": 1324680,
"size": 1325056,
"src": "D:/UnityProjects/ml_3dmanipulation_photon/Temp/StagingArea/Data/sharedassets1.assets"
},
{
......
No preview for this file type
......@@ -40,6 +40,7 @@ MonoBehaviour:
- RPC_let_go
- RPC_dragging
- ChangeColour
- RPC_SetPrefabName
DisableAutoOpenWizard: 1
ShowSettings: 1
DevRegionSetOnce: 0
......@@ -12,6 +12,7 @@ GameObject:
- component: {fileID: 6572955735984239229}
- component: {fileID: 4512608947078302633}
- component: {fileID: 689590874459248569}
- component: {fileID: 4300907436574673263}
m_Layer: 0
m_Name: ObjectSpawner
m_TagString: Untagged
......@@ -86,6 +87,28 @@ Rigidbody:
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &4300907436574673263
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6572955735984239170}
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: 0
OwnershipTransfer: 0
ObservedComponents:
- {fileID: 0}
viewIdField: 0
InstantiationId: 0
isRuntimeInstantiated: 0
--- !u!1001 &1262510503504755317
PrefabInstance:
m_ObjectHideFlags: 0
......
......@@ -295,6 +295,11 @@ PrefabInstance:
propertyPath: _parent
value:
objectReference: {fileID: 1101517837}
- target: {fileID: 4300907436574673263, guid: 29278805e72a44442b710147ef30671d,
type: 3}
propertyPath: viewIdField
value: 7
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 29278805e72a44442b710147ef30671d, type: 3}
--- !u!4 &148203262 stripped
......@@ -479,6 +484,11 @@ PrefabInstance:
propertyPath: _parent
value:
objectReference: {fileID: 1101517837}
- target: {fileID: 4300907436574673263, guid: 29278805e72a44442b710147ef30671d,
type: 3}
propertyPath: viewIdField
value: 9
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 29278805e72a44442b710147ef30671d, type: 3}
--- !u!4 &203251093 stripped
......@@ -926,6 +936,11 @@ PrefabInstance:
propertyPath: _parent
value:
objectReference: {fileID: 1101517837}
- target: {fileID: 4300907436574673263, guid: 29278805e72a44442b710147ef30671d,
type: 3}
propertyPath: viewIdField
value: 10
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 29278805e72a44442b710147ef30671d, type: 3}
--- !u!4 &546959380 stripped
......@@ -1195,6 +1210,11 @@ PrefabInstance:
propertyPath: _parent
value:
objectReference: {fileID: 1101517837}
- target: {fileID: 4300907436574673263, guid: 29278805e72a44442b710147ef30671d,
type: 3}
propertyPath: viewIdField
value: 5
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 29278805e72a44442b710147ef30671d, type: 3}
--- !u!1 &1307808846
......
using UnityEngine;
using Photon.Pun;
public class ObjectSpawner : MonoBehaviour
public class ObjectSpawner : MonoBehaviourPun
{
[SerializeField]
......@@ -43,7 +43,9 @@ public class ObjectSpawner : MonoBehaviour
transform.rotation)
.GetComponent<SelectableObject>();
Debug.Log(photonView);
_spawnedObject.SetPrefabName(prefab_name);
photonView.RPC("RPC_SetPrefabName", RpcTarget.OthersBuffered, _spawnedObject.gameObject.GetPhotonView().ViewID);
//_spawnedObject.transform.parent = _parent;
_spawnedObject.transform.localScale = new Vector3(_scale, _scale, _scale);
_spawnedObject.name = prefab_name + "(" + _objectCount + ")";
......@@ -56,6 +58,12 @@ public class ObjectSpawner : MonoBehaviour
//spawn.motionSource = _spawnedObject.transform;
}
[PunRPC]
void RPC_SetPrefabName(int object_id)
{
PhotonView.Find(object_id).GetComponent<SelectableObject>().SetPrefabName(prefab_name);
}
// Update is called once per frame
void Update()
{
......
Build from DESKTOP-KH1FAPI at 5/18/2020 11:39:11 AM
\ No newline at end of file
Build from DESKTOP-KH1FAPI at 5/19/2020 6:31:10 PM
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment