Skip to content

Commit f8193fa

Browse files
committed
No longer need the tag for finding clientkit.
1 parent fb1b815 commit f8193fa

5 files changed

Lines changed: 25 additions & 139 deletions

File tree

OSVR-Unity/Assets/OSVRUnity/Prefabs/ClientKit.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GameObject:
1111
- 114: {fileID: 11436198}
1212
m_Layer: 0
1313
m_Name: ClientKit
14-
m_TagString: OSVRClientKit
14+
m_TagString: Untagged
1515
m_Icon: {fileID: 0}
1616
m_NavMeshLayer: 0
1717
m_StaticEditorFlags: 4294967295

OSVR-Unity/Assets/OSVRUnity/src/ClientKit.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@ public class ClientKit : MonoBehaviour
2525
/// <returns>The instance, or null in case of error</returns>
2626
public static ClientKit Get()
2727
{
28-
GameObject candidate = GameObject.FindGameObjectWithTag("OSVRClientKit");
28+
ClientKit candidate = GameObject.FindObjectOfType<ClientKit>();
2929
if (null == candidate)
3030
{
31-
Debug.LogError("You need a game object with the OSVRClientKit tag and the OSVRUnity/ClientKit.cs script attached!");
32-
return null;
31+
Debug.LogError("You need the ClientKit prefab!");
3332
}
34-
return candidate.GetComponent<ClientKit>();
33+
return candidate;
3534
}
3635

3736
public OSVR.ClientKit.ClientContext GetContext()

OSVR-Unity/Assets/devscene.unity

Lines changed: 20 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,22 @@ NavMeshSettings:
7474
widthInaccuracy: 16.666666
7575
heightInaccuracy: 10
7676
m_NavMesh: {fileID: 0}
77+
--- !u!1001 &203365637
78+
Prefab:
79+
m_ObjectHideFlags: 0
80+
serializedVersion: 2
81+
m_Modification:
82+
m_TransformParent: {fileID: 0}
83+
m_Modifications:
84+
- target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
85+
propertyPath: m_RootOrder
86+
value: 4
87+
objectReference: {fileID: 0}
88+
m_RemovedComponents: []
89+
m_ParentPrefab: {fileID: 100100000, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
90+
m_RootGameObject: {fileID: 738728245}
91+
m_IsPrefabParent: 0
92+
m_IsExploded: 1
7793
--- !u!1 &308720490
7894
GameObject:
7995
m_ObjectHideFlags: 0
@@ -242,14 +258,14 @@ Transform:
242258
GameObject:
243259
m_ObjectHideFlags: 0
244260
m_PrefabParentObject: {fileID: 136198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
245-
m_PrefabInternal: {fileID: 1428718201}
261+
m_PrefabInternal: {fileID: 203365637}
246262
serializedVersion: 4
247263
m_Component:
248264
- 4: {fileID: 738728247}
249265
- 114: {fileID: 738728246}
250266
m_Layer: 0
251267
m_Name: ClientKit
252-
m_TagString: OSVRClientKit
268+
m_TagString: Untagged
253269
m_Icon: {fileID: 0}
254270
m_NavMeshLayer: 0
255271
m_StaticEditorFlags: 4294967295
@@ -259,7 +275,7 @@ MonoBehaviour:
259275
m_ObjectHideFlags: 0
260276
m_PrefabParentObject: {fileID: 11436198, guid: 0b82dd794175b304a87805e4b38fbe84,
261277
type: 2}
262-
m_PrefabInternal: {fileID: 1428718201}
278+
m_PrefabInternal: {fileID: 203365637}
263279
m_GameObject: {fileID: 738728245}
264280
m_Enabled: 1
265281
m_EditorHideFlags: 0
@@ -271,7 +287,7 @@ MonoBehaviour:
271287
Transform:
272288
m_ObjectHideFlags: 0
273289
m_PrefabParentObject: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
274-
m_PrefabInternal: {fileID: 1428718201}
290+
m_PrefabInternal: {fileID: 203365637}
275291
m_GameObject: {fileID: 738728245}
276292
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
277293
m_LocalPosition: {x: 0, y: 0, z: 0}
@@ -370,34 +386,6 @@ Prefab:
370386
m_Modification:
371387
m_TransformParent: {fileID: 0}
372388
m_Modifications:
373-
- target: {fileID: 480420, guid: 396506e8c7868164997bdac3366862c9, type: 2}
374-
propertyPath: m_LocalPosition.x
375-
value: 0
376-
objectReference: {fileID: 0}
377-
- target: {fileID: 480420, guid: 396506e8c7868164997bdac3366862c9, type: 2}
378-
propertyPath: m_LocalPosition.y
379-
value: 0
380-
objectReference: {fileID: 0}
381-
- target: {fileID: 480420, guid: 396506e8c7868164997bdac3366862c9, type: 2}
382-
propertyPath: m_LocalPosition.z
383-
value: 0
384-
objectReference: {fileID: 0}
385-
- target: {fileID: 480420, guid: 396506e8c7868164997bdac3366862c9, type: 2}
386-
propertyPath: m_LocalRotation.x
387-
value: 0
388-
objectReference: {fileID: 0}
389-
- target: {fileID: 480420, guid: 396506e8c7868164997bdac3366862c9, type: 2}
390-
propertyPath: m_LocalRotation.y
391-
value: 0
392-
objectReference: {fileID: 0}
393-
- target: {fileID: 480420, guid: 396506e8c7868164997bdac3366862c9, type: 2}
394-
propertyPath: m_LocalRotation.z
395-
value: 0
396-
objectReference: {fileID: 0}
397-
- target: {fileID: 480420, guid: 396506e8c7868164997bdac3366862c9, type: 2}
398-
propertyPath: m_LocalRotation.w
399-
value: 1
400-
objectReference: {fileID: 0}
401389
- target: {fileID: 480420, guid: 396506e8c7868164997bdac3366862c9, type: 2}
402390
propertyPath: m_RootOrder
403391
value: 5
@@ -414,34 +402,6 @@ Prefab:
414402
m_Modification:
415403
m_TransformParent: {fileID: 0}
416404
m_Modifications:
417-
- target: {fileID: 428418, guid: 250ba0eb2e8ad9f4ba43a22f6e68b3b4, type: 2}
418-
propertyPath: m_LocalPosition.x
419-
value: 0
420-
objectReference: {fileID: 0}
421-
- target: {fileID: 428418, guid: 250ba0eb2e8ad9f4ba43a22f6e68b3b4, type: 2}
422-
propertyPath: m_LocalPosition.y
423-
value: 0
424-
objectReference: {fileID: 0}
425-
- target: {fileID: 428418, guid: 250ba0eb2e8ad9f4ba43a22f6e68b3b4, type: 2}
426-
propertyPath: m_LocalPosition.z
427-
value: 0
428-
objectReference: {fileID: 0}
429-
- target: {fileID: 428418, guid: 250ba0eb2e8ad9f4ba43a22f6e68b3b4, type: 2}
430-
propertyPath: m_LocalRotation.x
431-
value: 0
432-
objectReference: {fileID: 0}
433-
- target: {fileID: 428418, guid: 250ba0eb2e8ad9f4ba43a22f6e68b3b4, type: 2}
434-
propertyPath: m_LocalRotation.y
435-
value: 0
436-
objectReference: {fileID: 0}
437-
- target: {fileID: 428418, guid: 250ba0eb2e8ad9f4ba43a22f6e68b3b4, type: 2}
438-
propertyPath: m_LocalRotation.z
439-
value: 0
440-
objectReference: {fileID: 0}
441-
- target: {fileID: 428418, guid: 250ba0eb2e8ad9f4ba43a22f6e68b3b4, type: 2}
442-
propertyPath: m_LocalRotation.w
443-
value: 1
444-
objectReference: {fileID: 0}
445405
- target: {fileID: 428418, guid: 250ba0eb2e8ad9f4ba43a22f6e68b3b4, type: 2}
446406
propertyPath: m_RootOrder
447407
value: 6
@@ -569,34 +529,6 @@ Prefab:
569529
m_Modification:
570530
m_TransformParent: {fileID: 0}
571531
m_Modifications:
572-
- target: {fileID: 417736, guid: cca9de0a0e7a680459fca00f3b377768, type: 2}
573-
propertyPath: m_LocalPosition.x
574-
value: 0
575-
objectReference: {fileID: 0}
576-
- target: {fileID: 417736, guid: cca9de0a0e7a680459fca00f3b377768, type: 2}
577-
propertyPath: m_LocalPosition.y
578-
value: 0
579-
objectReference: {fileID: 0}
580-
- target: {fileID: 417736, guid: cca9de0a0e7a680459fca00f3b377768, type: 2}
581-
propertyPath: m_LocalPosition.z
582-
value: 0
583-
objectReference: {fileID: 0}
584-
- target: {fileID: 417736, guid: cca9de0a0e7a680459fca00f3b377768, type: 2}
585-
propertyPath: m_LocalRotation.x
586-
value: 0
587-
objectReference: {fileID: 0}
588-
- target: {fileID: 417736, guid: cca9de0a0e7a680459fca00f3b377768, type: 2}
589-
propertyPath: m_LocalRotation.y
590-
value: 0
591-
objectReference: {fileID: 0}
592-
- target: {fileID: 417736, guid: cca9de0a0e7a680459fca00f3b377768, type: 2}
593-
propertyPath: m_LocalRotation.z
594-
value: 0
595-
objectReference: {fileID: 0}
596-
- target: {fileID: 417736, guid: cca9de0a0e7a680459fca00f3b377768, type: 2}
597-
propertyPath: m_LocalRotation.w
598-
value: 1
599-
objectReference: {fileID: 0}
600532
- target: {fileID: 417736, guid: cca9de0a0e7a680459fca00f3b377768, type: 2}
601533
propertyPath: m_RootOrder
602534
value: 7
@@ -669,50 +601,6 @@ Light:
669601
m_ShadowAngle: 0
670602
m_IndirectIntensity: 1
671603
m_AreaSize: {x: 1, y: 1}
672-
--- !u!1001 &1428718201
673-
Prefab:
674-
m_ObjectHideFlags: 0
675-
serializedVersion: 2
676-
m_Modification:
677-
m_TransformParent: {fileID: 0}
678-
m_Modifications:
679-
- target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
680-
propertyPath: m_LocalPosition.x
681-
value: 0
682-
objectReference: {fileID: 0}
683-
- target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
684-
propertyPath: m_LocalPosition.y
685-
value: 0
686-
objectReference: {fileID: 0}
687-
- target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
688-
propertyPath: m_LocalPosition.z
689-
value: 0
690-
objectReference: {fileID: 0}
691-
- target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
692-
propertyPath: m_LocalRotation.x
693-
value: 0
694-
objectReference: {fileID: 0}
695-
- target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
696-
propertyPath: m_LocalRotation.y
697-
value: 0
698-
objectReference: {fileID: 0}
699-
- target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
700-
propertyPath: m_LocalRotation.z
701-
value: 0
702-
objectReference: {fileID: 0}
703-
- target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
704-
propertyPath: m_LocalRotation.w
705-
value: 1
706-
objectReference: {fileID: 0}
707-
- target: {fileID: 436198, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
708-
propertyPath: m_RootOrder
709-
value: 4
710-
objectReference: {fileID: 0}
711-
m_RemovedComponents: []
712-
m_ParentPrefab: {fileID: 100100000, guid: 0b82dd794175b304a87805e4b38fbe84, type: 2}
713-
m_RootGameObject: {fileID: 738728245}
714-
m_IsPrefabParent: 0
715-
m_IsExploded: 1
716604
--- !u!1 &1475023767
717605
GameObject:
718606
m_ObjectHideFlags: 0

OSVR-Unity/ProjectSettings/TagManager.asset

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
--- !u!78 &1
44
TagManager:
55
tags:
6-
- OSVRClientKit
76
-
87
Builtin Layer 0: Default
98
Builtin Layer 1: TransparentFX

OSVR-Unity/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The `OSVR-Unity.unitypackage` package should contain the x86 binary plugins, the
1010
There is also a few sample/demo application included (that is also used for development of the code/prefabs).
1111

1212
### ClientKit object
13-
You need exactly one instance of `OSVR.Unity.ClientKit` on an object tagged `OSVRClientKit` in your project: get one using the `ClientKit` prefab. You need to set the app ID: use a reversed DNS name as seen elsewhere (Java, Android, etc). This just uniquely identifies your application to the OSVR software. If you fail to do this, you'll see an error in the Unity console.
13+
You need exactly one instance of `OSVR.Unity.ClientKit` in your project: get one using the `ClientKit` prefab. You need to set the app ID: use a reversed DNS name as seen elsewhere (Java, Android, etc). This just uniquely identifies your application to the OSVR software. If you fail to do this, you'll see an error in the Unity console.
1414

1515
### Tracking
1616
For trackers (Pose, Position, Orientation), there are prefabs of nodes that update their transform accordingly. You'll need to set the path you want to use. Please see the C/C++ documentation for client apps to find valid interface paths. (Note that the OSVR-Unity package handles normalization of the coordinate system to the Unity standard: ignore the one seen in the C++ documentation.)

0 commit comments

Comments
 (0)