Create UI manager and Hand Menu
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using HurricaneVR.Framework.Core;
|
||||
using HurricaneVR.Framework.Core.Player;
|
||||
using HurricaneVR.Framework.Core.UI;
|
||||
using HurricaneVR.Framework.Core.Utils;
|
||||
using System.Collections;
|
||||
using Unity.Netcode;
|
||||
@@ -26,6 +27,9 @@ public class GlobalInstaller : MonoInstaller
|
||||
[SerializeField]
|
||||
private GameObject playerPrefab;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject uiManagerPrefab;
|
||||
|
||||
public override void Start()
|
||||
{
|
||||
base.Start();
|
||||
@@ -83,5 +87,14 @@ public class GlobalInstaller : MonoInstaller
|
||||
|
||||
Container.BindInstance(playerComponent)
|
||||
.AsSingle();
|
||||
|
||||
Container.Bind<HVRInputModule>()
|
||||
.FromComponentInNewPrefab(uiManagerPrefab)
|
||||
.AsSingle()
|
||||
.OnInstantiated<HVRInputModule>((ctx, obj) =>
|
||||
{
|
||||
obj.name = uiManagerPrefab.name;
|
||||
})
|
||||
.NonLazy();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user