AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
SyncSpawnedObject.cs
Go to the documentation of this file.
1
// Copyright (c) Microsoft Corporation. All rights reserved.
2
// Licensed under the MIT License. See LICENSE in the project root for license information.
3
4
using
UnityEngine
;
5
using
HoloToolkit
.
Sharing
.
SyncModel
;
6
7
namespace
HoloToolkit
.Sharing.Spawning
8
{
13
[SyncDataClass]
14
public
class
SyncSpawnedObject
:
SyncObject
15
{
19
[SyncData]
public
SyncTransform
Transform
;
20
24
[SyncData]
public
SyncString
Name
;
25
29
[SyncData]
public
SyncString
ParentPath
;
30
34
[SyncData]
public
SyncString
ObjectPath
;
35
36
37
public
GameObject GameObject {
get
;
set
; }
38
39
public
virtual
void
Initialize
(
string
name,
string
parentPath)
40
{
41
Name.
Value
= name;
42
ParentPath.
Value
= parentPath;
43
44
ObjectPath.
Value
=
string
.Empty;
45
if
(!
string
.IsNullOrEmpty(ParentPath.
Value
))
46
{
47
ObjectPath.
Value
= ParentPath.
Value
+
"/"
;
48
}
49
50
ObjectPath.
Value
+= Name.
Value
;
51
}
52
}
53
}
HoloToolkit.Sharing.Spawning.SyncSpawnedObject.Initialize
virtual void Initialize(string name, string parentPath)
Definition:
SyncSpawnedObject.cs:39
HoloToolkit.Sharing.Spawning.SyncSpawnedObject.Transform
SyncTransform Transform
Transform (position, rotation, and scale) for the object.
Definition:
SyncSpawnedObject.cs:19
HoloToolkit.Sharing.SyncModel.SyncTransform
This class implements the Transform object primitive for the syncing system. It does the heavy liftin...
Definition:
SyncTransform.cs:14
HoloToolkit.Sharing.SyncModel.SyncString
This class implements the string primitive for the syncing system. It does the heavy lifting to make ...
Definition:
SyncString.cs:10
HoloToolkit.Sharing.Spawning.SyncSpawnedObject
A SpawnedObject contains all the information needed for another device to spawn an object in the same...
Definition:
SyncSpawnedObject.cs:14
HoloToolkit.Sharing.Spawning.SyncSpawnedObject.Name
SyncString Name
Name of the object.
Definition:
SyncSpawnedObject.cs:24
HoloToolkit.Sharing.SyncModel
Definition:
SyncArray.cs:9
HoloToolkit.Sharing.SyncModel.SyncObject
The SyncObject class is a container object that can hold multiple SyncPrimitives. ...
Definition:
SyncObject.cs:21
HoloToolkit.Sharing
Definition:
SharingMenu.cs:9
HoloToolkit.Sharing.SyncModel.SyncString.Value
string Value
Definition:
SyncString.cs:23
HoloToolkit.Sharing.Spawning.SyncSpawnedObject.ObjectPath
SyncString ObjectPath
Path to the object
Definition:
SyncSpawnedObject.cs:34
HoloToolkit
HoloToolkit.Sharing.Spawning.SyncSpawnedObject.ParentPath
SyncString ParentPath
Path to the parent object in the game object.
Definition:
SyncSpawnedObject.cs:29
UnityEngine
Assets
HoloToolkit
Sharing
Scripts
Spawning
SyncSpawnedObject.cs
Generated by
1.8.12