Unity android 读取文件,读取APK包文件

#if UNITY_ANDROID
	IEnumerator Start()
	{
		string fullName = "jar:file://" + Application.dataPath + "!/assets/test.txt";	
		WWW www = new WWW(fullName);
		yield return www;
		//加载完成后处理,有点delay
		print(www.text)
	}
#else
	void Start ()
	{
		//Windows处理
	}
#endif


前提是需要把test.txt需要放在 Assets\StreamingAssets\test.txt 

你可能感兴趣的:(Unity3D,Android)