Fix adf error

This commit is contained in:
ousttrue
2019-02-05 17:01:04 +09:00
parent 99a150a146
commit 722a98d466
4 changed files with 12 additions and 12 deletions

View File

@@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
#if UNITY_EDITOR
using UnityEditor;
using UnityEngine;
#endif
@@ -14,7 +15,7 @@ namespace UniJSON
#if UNITY_EDITOR && VRM_DEVELOP
const int NET35MAX = 4;
const int ARGS = 6;
const string GENERATE_PATH = "Assets/VRM/UniJSON/Scripts/GenericCallUtility/GenericExpressionCallFactory.g.cs";
const string GENERATE_PATH = "/VRM/UniJSON/Scripts/GenericCallUtility/GenericExpressionCallFactory.g.cs";
static System.Collections.Generic.IEnumerable<string> GetArgs(string prefix, int n)
{
@@ -24,7 +25,7 @@ namespace UniJSON
}
}
[MenuItem(VRM.VRMVersion.MENU + "/Generate GenericExpressionCallFactory")]
[MenuItem("VRM/UniJSON/Generate GenericExpressionCallFactory")]
static void Generate()
{
var sb = new StringBuilder();
@@ -110,9 +111,8 @@ namespace UniJSON
");
}
var path = UniGLTF.UnityPath.FromUnityPath(GENERATE_PATH);
File.WriteAllText(path.FullPath, sb.ToString().Replace("\r\n", "\n"));
path.ImportAsset();
var path = Path.GetFullPath(Application.dataPath + GENERATE_PATH).Replace("\\", "/");
File.WriteAllText(path, sb.ToString().Replace("\r\n", "\n"));
}
#endif
}

View File

@@ -1,5 +1,6 @@
using System;
using System.Reflection;
using UnityEngine;
#if UNITY_EDITOR && VRM_DEVELOP
using System.IO;
using System.Linq;
@@ -23,7 +24,7 @@ namespace UniJSON
#if UNITY_EDITOR && VRM_DEVELOP
const int NET35MAX = 4;
const int ARGS = 6;
const string GENERATE_PATH = "Assets/VRM/UniJSON/Scripts/GenericCallUtility/GenericInvokeCallFactory.g.cs";
const string GENERATE_PATH = "/VRM/UniJSON/Scripts/GenericCallUtility/GenericInvokeCallFactory.g.cs";
static System.Collections.Generic.IEnumerable<string> GetArgs(string prefix, int n)
{
@@ -33,7 +34,7 @@ namespace UniJSON
}
}
[MenuItem(VRM.VRMVersion.MENU + "/Generate GenericInvokeCallFactory")]
[MenuItem("VRM/UniJSON/Generate GenericInvokeCallFactory")]
static void Generate()
{
var sb = new StringBuilder();
@@ -195,9 +196,8 @@ namespace UniJSON
");
}
var path = UniGLTF.UnityPath.FromUnityPath(GENERATE_PATH);
File.WriteAllText(path.FullPath, sb.ToString().Replace("\r\n", "\n"));
path.ImportAsset();
var path = Path.GetFullPath(Application.dataPath + GENERATE_PATH).Replace("\\", "/");
File.WriteAllText(path, sb.ToString().Replace("\r\n", "\n"));
}
#endif