mirror of https://github.com/tuyoogame/YooAsset
update samples
parent
e38d0bc6d0
commit
cdaf6f0dca
|
@ -34,10 +34,22 @@ internal class AndroidPost : UnityEditor.Android.IPostGenerateGradleAndroidProje
|
||||||
" return false; \n" +
|
" return false; \n" +
|
||||||
" } \n" +
|
" } \n" +
|
||||||
"}";
|
"}";
|
||||||
if (!readContent[readContent.Length - 18].Contains("CheckAssetExist"))
|
|
||||||
|
if (CheckFunctionExist(readContent) == false)
|
||||||
readContent[readContent.Length - 1] = postContent;
|
readContent[readContent.Length - 1] = postContent;
|
||||||
System.IO.File.WriteAllLines(untityActivityFilePath, readContent);
|
System.IO.File.WriteAllLines(untityActivityFilePath, readContent);
|
||||||
}
|
}
|
||||||
|
private bool CheckFunctionExist(string[] contents)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < contents.Length; i++)
|
||||||
|
{
|
||||||
|
if (contents[i].Contains("CheckAssetExist"))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue