forked from sin365/AxibugEmuOnline
采集
This commit is contained in:
parent
4fdd142c13
commit
de1d81536b
@ -92,6 +92,14 @@ public class AxiProjectTools : EditorWindow
|
|||||||
for (int i = 0; i < comCount; i++)
|
for (int i = 0; i < comCount; i++)
|
||||||
{
|
{
|
||||||
var com = prefabRoot.GetComponentAtIndex(i);
|
var com = prefabRoot.GetComponentAtIndex(i);
|
||||||
|
if (com == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (com.name.Contains("VideoPlayer"))
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
MonoBehaviour monoCom = com as MonoBehaviour;
|
MonoBehaviour monoCom = com as MonoBehaviour;
|
||||||
if (monoCom == null)
|
if (monoCom == null)
|
||||||
continue;
|
continue;
|
||||||
@ -127,15 +135,15 @@ public class AxiProjectTools : EditorWindow
|
|||||||
[MenuItem("Axibug移植工具/[2]生成中间脚本代码")]
|
[MenuItem("Axibug移植工具/[2]生成中间脚本代码")]
|
||||||
public static void Part2()
|
public static void Part2()
|
||||||
{
|
{
|
||||||
if (Directory.Exists(outCsDir))
|
if (UnityEngine.Windows.Directory.Exists(outCsDir))
|
||||||
Directory.Delete(outCsDir);
|
UnityEngine.Windows.Directory.Delete(outCsDir);
|
||||||
Directory.CreateDirectory(outCsDir);
|
Directory.CreateDirectory(outCsDir);
|
||||||
AxiPrefabCache cache = AssetDatabase.LoadAssetAtPath<AxiPrefabCache>(cachecfgPath);
|
AxiPrefabCache cache = AssetDatabase.LoadAssetAtPath<AxiPrefabCache>(cachecfgPath);
|
||||||
foreach (var data in cache.caches)
|
foreach (var data in cache.caches)
|
||||||
{
|
{
|
||||||
string toName = "Axi" + data.SrcName;
|
string toName = "Axi" + data.SrcName;
|
||||||
string toPath = outCsDir + toName + ".cs";
|
string toPath = outCsDir + toName + ".cs";
|
||||||
string codeStr = "using UnityEngine.UI; public class " + toName + " : " + data.SrcName + " {}";
|
string codeStr = "namespace AxibugCom { public class " + toName + " : " + data.SrcFullName + " {} }";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
System.IO.File.WriteAllText(toPath, codeStr);
|
System.IO.File.WriteAllText(toPath, codeStr);
|
||||||
|
Loading…
Reference in New Issue
Block a user