Create UI manager and Hand Menu

This commit is contained in:
2024-08-31 16:16:46 +02:00
parent c9ee891dc6
commit fb7da37a5a
11 changed files with 4836 additions and 18 deletions

View File

@@ -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();
}
}