Skip to content

Commit 9a4ff0e

Browse files
committed
Merge branch 'new_version_tolua'
2 parents 3577380 + 9d1abb6 commit 9a4ff0e

File tree

365 files changed

+324
-65025
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

365 files changed

+324
-65025
lines changed

Demo/ToLua_WebGL/Assets/Editor.meta

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Demo/ToLua_WebGL/Assets/Editor/Custom/CustomSettings.cs

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using UnityEngine;
1+

2+
using UnityEngine;
23
using System;
34
using System.Collections.Generic;
45
using LuaInterface;
@@ -9,15 +10,15 @@
910

1011
public static class CustomSettings
1112
{
12-
public static string saveDir = Application.dataPath + "/Source/Generate/";
13+
public static string saveDir = Application.dataPath + "/Source/Generate/";
1314
public static string toluaBaseType = Application.dataPath + "/ToLua/BaseType/";
1415
public static string baseLuaDir = Application.dataPath + "/ToLua/Lua/";
1516
public static string injectionFilesPath = Application.dataPath + "/ToLua/Injection/";
1617

1718
//导出时强制做为静态类的类型(注意customTypeList 还要添加这个类型才能导出)
1819
//unity 有些类作为sealed class, 其实完全等价于静态类
1920
public static List<Type> staticClassTypes = new List<Type>
20-
{
21+
{
2122
typeof(UnityEngine.Application),
2223
typeof(UnityEngine.Time),
2324
typeof(UnityEngine.Screen),
@@ -32,9 +33,9 @@ public static class CustomSettings
3233
};
3334

3435
//附加导出委托类型(在导出委托时, customTypeList 中牵扯的委托类型都会导出, 无需写在这里)
35-
public static DelegateType[] customDelegateList =
36-
{
37-
_DT(typeof(Action)),
36+
public static DelegateType[] customDelegateList =
37+
{
38+
_DT(typeof(Action)),
3839
_DT(typeof(UnityEngine.Events.UnityAction)),
3940
_DT(typeof(System.Predicate<int>)),
4041
_DT(typeof(System.Action<int>)),
@@ -93,24 +94,24 @@ public static class CustomSettings
9394
#endif
9495

9596
_GT(typeof(Behaviour)),
96-
_GT(typeof(MonoBehaviour)),
97+
_GT(typeof(MonoBehaviour)),
9798
_GT(typeof(GameObject)),
9899
_GT(typeof(TrackedReference)),
99100
_GT(typeof(Application)),
100101
_GT(typeof(Physics)),
101102
_GT(typeof(Collider)),
102-
_GT(typeof(Time)),
103+
_GT(typeof(Time)),
103104
_GT(typeof(Texture)),
104105
_GT(typeof(Texture2D)),
105-
_GT(typeof(Shader)),
106+
_GT(typeof(Shader)),
106107
_GT(typeof(Renderer)),
107108
_GT(typeof(WWW)),
108-
_GT(typeof(Screen)),
109+
_GT(typeof(Screen)),
109110
_GT(typeof(CameraClearFlags)),
110-
_GT(typeof(AudioClip)),
111+
_GT(typeof(AudioClip)),
111112
_GT(typeof(AssetBundle)),
112113
_GT(typeof(ParticleSystem)),
113-
_GT(typeof(AsyncOperation)).SetBaseType(typeof(System.Object)),
114+
_GT(typeof(AsyncOperation)).SetBaseType(typeof(System.Object)),
114115
_GT(typeof(LightType)),
115116
_GT(typeof(SleepTimeout)),
116117
#if UNITY_5_3_OR_NEWER && !UNITY_5_6_OR_NEWER
@@ -132,23 +133,23 @@ public static class CustomSettings
132133

133134
_GT(typeof(BoxCollider)),
134135
_GT(typeof(MeshCollider)),
135-
_GT(typeof(SphereCollider)),
136+
_GT(typeof(SphereCollider)),
136137
_GT(typeof(CharacterController)),
137138
_GT(typeof(CapsuleCollider)),
138-
139-
_GT(typeof(Animation)),
140-
_GT(typeof(AnimationClip)).SetBaseType(typeof(UnityEngine.Object)),
139+
140+
_GT(typeof(Animation)),
141+
_GT(typeof(AnimationClip)).SetBaseType(typeof(UnityEngine.Object)),
141142
_GT(typeof(AnimationState)),
142143
_GT(typeof(AnimationBlendMode)),
143-
_GT(typeof(QueueMode)),
144+
_GT(typeof(QueueMode)),
144145
_GT(typeof(PlayMode)),
145146
_GT(typeof(WrapMode)),
146147

147148
_GT(typeof(QualitySettings)),
148-
_GT(typeof(RenderSettings)),
149-
_GT(typeof(SkinWeights)),
149+
_GT(typeof(RenderSettings)),
150+
_GT(typeof(SkinWeights)),
150151
_GT(typeof(RenderTexture)),
151-
_GT(typeof(Resources)),
152+
_GT(typeof(Resources)),
152153
_GT(typeof(LuaProfiler)),
153154
};
154155

@@ -180,9 +181,9 @@ public static class CustomSettings
180181
//使用方法参见例子14
181182
public static List<Type> outList = new List<Type>()
182183
{
183-
184+
184185
};
185-
186+
186187
//ngui优化,下面的类没有派生类,可以作为sealed class
187188
public static List<Type> sealedList = new List<Type>()
188189
{
@@ -232,7 +233,7 @@ public static BindType _GT(Type t)
232233
public static DelegateType _DT(Type t)
233234
{
234235
return new DelegateType(t);
235-
}
236+
}
236237

237238

238239
[MenuItem("Lua/Attach Profiler", false, 151)]
@@ -251,7 +252,7 @@ static void AttachProfiler()
251252
static void DetachProfiler()
252253
{
253254
if (!Application.isPlaying)
254-
{
255+
{
255256
return;
256257
}
257258

Demo/ToLua_WebGL/Assets/Lua.meta

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Demo/ToLua_WebGL/Assets/Plugins.meta

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Demo/ToLua_WebGL/Assets/Plugins/CString.dll.meta

Lines changed: 4 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Demo/ToLua_WebGL/Assets/Plugins/Debugger.dll.meta

Lines changed: 4 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Demo/ToLua_WebGL/Assets/Plugins/tolua.bundle.meta

Lines changed: 22 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Demo/ToLua_WebGL/Assets/Source.meta

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)