load .unity3d assetbundle from resource folder
I have text asset bundle in resource folder which i am able to load at run time. Now i converted text assets in .Unity3d format and trying to load it from resources folder but this time i am not able to get it.
// Code for Load Asset bundle from text
{
AssetBundlePath="Path from resources folder of text asset";
TextAsset tempBundle = Resources.Load(AssetBundlePath) as TextAsset;
if (tempBundle == null || tempBundle.text == "")
{
Logger.Trace(this, "Asset Not Present " + AssetBundlePath);
return string.Empty;
}
return tempBundle.text;
}
@sandesh salunke You can get this through the following code.
TextAsset textFile;
private List<string> eachLine;
void Start()
{
textFile = Resources.Load<TextAsset>("TextFileName");
string wholeText = textFile.text;
eachLine = new List<string>();
eachLine.AddRange(wholeText.Split("\n"[0]) );
}
Thanks for reply. This is not what i required. I want to load assets from zip file. (.unity3d files are also one kind of compressed files).
@sandesh salunke Are you getting this zip file from server??
Your answer
Follow this Question
Related Questions
How to load a Unity GameObject during runtime? 0 Answers
How to address JavaScript erro in UnityLoader.ja 1 Answer
Needed objects destroyed after deserialization 0 Answers
Loading asset bundle from sql server 0 Answers
It is possible to load an addressable asset bundle like a regular asset bundle? 0 Answers