multiplayer stuff
This commit is contained in:
@@ -5,7 +5,7 @@ using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
|
||||
namespace RebootKit.Engine.Services.Input {
|
||||
namespace RebootKit.Engine.Input {
|
||||
public class InputService : IService {
|
||||
readonly Config m_Config;
|
||||
|
||||
@@ -15,14 +15,14 @@ namespace RebootKit.Engine.Services.Input {
|
||||
public InputService(Config config) {
|
||||
m_Config = config;
|
||||
|
||||
m_Handle = Addressables.LoadAssetAsync<InputActionAsset>(m_Config.inputAssetReference);
|
||||
m_InputActionAsset = m_Handle.WaitForCompletion();
|
||||
// m_Handle = Addressables.LoadAssetAsync<InputActionAsset>(m_Config.inputAssetReference);
|
||||
m_InputActionAsset = config.inputActionAsset;
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
m_InputActionAsset = null;
|
||||
|
||||
Addressables.Release(m_Handle);
|
||||
// Addressables.Release(m_Handle);
|
||||
m_Handle = default;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ namespace RebootKit.Engine.Services.Input {
|
||||
[Serializable]
|
||||
public class Config {
|
||||
public AssetReferenceT<InputActionAsset> inputAssetReference;
|
||||
public InputActionAsset inputActionAsset;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user