
Now InputTranslator has its own interface to provide polymorphism in GameSession class Touch input read only if target platform is android
21 lines
452 B
C#
21 lines
452 B
C#
using System.Collections;
|
|
using UnityEngine;
|
|
|
|
public class ApplicationUtil
|
|
{
|
|
public static RuntimePlatform platform
|
|
{
|
|
get
|
|
{
|
|
#if UNITY_ANDROID
|
|
return RuntimePlatform.Android;
|
|
#elif UNITY_IOS
|
|
return RuntimePlatform.IPhonePlayer;
|
|
#elif UNITY_STANDALONE_OSX
|
|
return RuntimePlatform.OSXPlayer;
|
|
#elif UNITY_STANDALONE_WIN
|
|
return RuntimePlatform.WindowsPlayer;
|
|
#endif
|
|
}
|
|
}
|
|
} |