コード例 #1
0
    private static object WWWLoadUserImportAsset(string assetUsageIdx, string path, UserImportAssetType type)
    {
        Debug.Log("WWW fild load try : " + path);
        WWW www = new WWW("file://" + path);

        switch (type)
        {
        case UserImportAssetType.Texture2D: return(www.texture);

        case UserImportAssetType.AudioClip: return(www.GetAudioClip());

        default: Debug.LogError("WWWLoadUserImportAsset Error. type is unknown."); return(null);
        }
    }
コード例 #2
0
 public UserImportAssetInfo(string name, AudioClip audioClip)
 {
     this.assetName = name;
     this.asset     = audioClip;
     this.type      = UserImportAssetType.AudioClip;
 }
コード例 #3
0
 public UserImportAssetInfo(string name, Texture2D texture)
 {
     this.assetName = name;
     this.asset     = texture;
     this.type      = UserImportAssetType.Texture2D;
 }