Hi,
I am creating a scene in Unity3d and exporting its asset budle as .unity3d file. Further i downloading the assetbudle from my server to my android app.
The scene gets loaded but rotaion script i have written for cube is missing. I can see the object in my android app from where i start UnityPlayerActivity but object is not rotating as i can see in Unity
Can u please help.
This is reference script i use to load asset in android
IEnumerator receive(string message)
{
// Download compressed scene. If version 5 of the file named "Streamed-Level1.unity3d" was previously downloaded and cached.
// Then Unity will completely skip the download and load the decompressed scene directly from disk.
var download = WWW.LoadFromCacheOrDownload(message,19);
yield return download;
// Handle error
if (download.error != null)
{
Debug.LogError(download.error);
yield break;
}
// In order to make the scene available from LoadLevel, we have to load the asset bundle.
// The AssetBundle class also lets you force unload all assets and file storage once it is no longer needed.
var bundle = download.assetBundle;
sceneNames = bundle.GetAllScenePaths ();
// Load the level we have just downloaded
SceneManager.LoadScene(sceneNames[0]);
}
}
And from my activity i use method to send message to UnityPlayerActivity
UnityPlayer.UnitySendMessage(“Main Camera”, “receive”, “https://MyServer/Level5.unity3d”);