/// <summary> /// 플랫폼 코드는 차후 static library로 이전 고려필요 /// </summary> /// <returns></returns> private Def.Platform RuntimePlatform() { Def.Platform platform = Def.Platform.NULL; if (Application.platform == UnityEngine.RuntimePlatform.WebGLPlayer) { if (Application.isMobilePlatform) { platform = Def.Platform.MOBILE; } else { platform = Def.Platform.PC; } } else if (Application.platform == UnityEngine.RuntimePlatform.WindowsEditor) { platform = Def.Platform.PC; } else if (Application.platform == UnityEngine.RuntimePlatform.WindowsPlayer) { platform = Def.Platform.PC; } else if (Application.platform == UnityEngine.RuntimePlatform.Android) { platform = Def.Platform.MOBILE; } else if (Application.platform == UnityEngine.RuntimePlatform.IPhonePlayer) { platform = Def.Platform.MOBILE; } return(platform); }
public void ImportModule() { Def.Platform runtimePlatform = RuntimePlatform(); Def.DeviceParams param = new Def.DeviceParams(); if (runtimePlatform == Def.Platform.PC) { param.Init(runtimePlatform, Def.Device.MOUSE); InputDevice <Mouse> .Module.Init(param); } else if (runtimePlatform == Def.Platform.MOBILE) { param.Init(runtimePlatform, Def.Device.TOUCHSCREEN); InputDevice <TouchScreen> .Module.Init(param); } }