You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Testing GoKit on my game I deployed to an Android phone and found that the Assets where not loading . I made some modifications to the original method in charge of handling the loading process and managed to get it working.
Since I don't use Git here is the solution: (replace the current method with the code bellow)
Class: GoSpline.cs
/// <summary>
/// helper to get a node list from an asset created with the visual editor
/// </summary>
private static List<Vector3> nodeListFromAsset( string pathAssetName )
{
if UNITY_WEBPLAYER
Debug.LogError( "The Web Player does not support loading files from disk." );
return null;
else
var path = string.Empty;
if( !pathAssetName.EndsWith( ".asset" ) )
pathAssetName += ".asset";
byte[] bytes = null;
if (Application.platform == RuntimePlatform.Android)
{
path = Path.Combine("jar:file://" + Application.dataPath + "!/assets/", pathAssetName);
WWW loadAsset = new WWW(path);
while (loadAsset.isDone) { } // maybe make a safety check here
bytes = loadAsset.bytes;
}
else
{
if (Application.platform == RuntimePlatform.IPhonePlayer)
{
// on iOS at runtime, we load from the dataPath
path = Path.Combine(Path.Combine(Application.dataPath, "Raw"), pathAssetName);
}
else
{
// default to looking in the StreamingAssets folder
path = Path.Combine(Path.Combine(Application.dataPath, "StreamingAssets"), pathAssetName);
}
bytes = File.ReadAllBytes(path);
}
return bytesToVector3List( bytes );
endif
}
The text was updated successfully, but these errors were encountered:
Testing GoKit on my game I deployed to an Android phone and found that the Assets where not loading . I made some modifications to the original method in charge of handling the loading process and managed to get it working.
Since I don't use Git here is the solution: (replace the current method with the code bellow)
Class: GoSpline.cs
if UNITY_WEBPLAYER
else
endif
The text was updated successfully, but these errors were encountered: