@@ -79,11 +79,11 @@
|
|
79
79
|
@serializable()
|
80
80
|
useDepthSensing: boolean = false;
|
81
81
|
|
82
|
-
|
83
82
|
/** This avatar representation will be spawned when you enter a webxr session */
|
84
83
|
@serializable(AssetReference)
|
85
84
|
defaultAvatar?: AssetReference;
|
86
85
|
|
86
|
+
|
87
87
|
private _playerSync?: PlayerSync;
|
88
88
|
/** these components were created by the WebXR component on session start and will be cleaned up again in session end */
|
89
89
|
private readonly _createdComponentsInSession: Behaviour[] = [];
|
@@ -115,6 +115,11 @@
|
|
115
115
|
this.handleCreatingHTML();
|
116
116
|
this.handleOfferSession();
|
117
117
|
|
118
|
+
if (!this.defaultAvatar) {
|
119
|
+
if (debug) console.warn("WebXR: No default avatar set, using static default avatar")
|
120
|
+
this.defaultAvatar = new AssetReference("https://cdn.needle.tools/static/avatars/DefaultAvatar.glb")
|
121
|
+
}
|
122
|
+
|
118
123
|
if (this.defaultAvatar) {
|
119
124
|
this._playerSync = this.gameObject.getOrAddComponent(PlayerSync);
|
120
125
|
this._playerSync.autoSync = false;
|