Tools.GetOS C# (CSharp) 메소드

GetOS() 공개 정적인 메소드

public static GetOS ( ) : string
리턴 string
    public static string GetOS()
    {
#if UNITY_STANDALONE
        return "Win";
#elif UNITY_ANDROID
        return "Android";
#elif UNITY_IPHONE
        return "iOS";
#endif
    }

Usage Example

예제 #1
0
    private string GetRealAssetPath(string abName)
    {
        if (abName.Equals(Tools.GetOS()))
        {
            return(abName);
        }
        abName = abName.ToLower();
        if (!abName.EndsWith(GameSetting.ExtName))
        {
            abName += GameSetting.ExtName;
        }
        if (abName.Contains("/"))
        {
            return(abName);
        }

        if (mAssetBundleManifest == null)
        {
            return(null);
        }

        string[] paths = mAssetBundleManifest.GetAllAssetBundles();
        for (int i = 0; i < paths.Length; i++)
        {
            int    index = paths[i].LastIndexOf('/');
            string path  = paths[i].Remove(0, index + 1);

            if (path.Equals(abName))
            {
                return(paths[i]);
            }
        }
        Debug.LogError("GetRealAssetPath Error:>>" + abName);
        return(null);
    }
All Usage Examples Of Tools::GetOS