Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0d98ffe

Browse files
committed
remove lua resource and put them to lua folder
1 parent22bff80 commit0d98ffe

40 files changed

+38
-907
lines changed
-4 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

‎Assets/Plugins/Slua_Managed/LuaState.cs‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -997,21 +997,21 @@ internal static byte[] loadFile(string fn)
997997
bytes=loaderDelegate(fn);
998998
else
999999
{
1000+
stringluapath="";
10001001
#if!SLUA_STANDALONE
1001-
fn=fn.Replace(".","/");
1002-
TextAssetasset=(TextAsset)Resources.Load(fn);
1003-
if(asset==null)
1004-
returnnull;
1005-
bytes=asset.bytes;
1006-
#else
1007-
bytes=File.ReadAllBytes(fn);
1002+
luapath=SLuaSetting.Instance.LuaScriptPath;
10081003
#endif
1004+
fn=fn.Replace(".","/");
1005+
stringluafn=string.Format("{0}/{1}.lua",luapath,fn);
1006+
if(!File.Exists(luafn))
1007+
luafn=string.Format("{0}/{1}.luac",luapath,fn);
1008+
bytes=File.ReadAllBytes(luafn);
10091009
}
10101010
returnbytes;
10111011
}
10121012
catch(Exceptione)
10131013
{
1014-
thrownewException(e.Message);
1014+
thrownewException(String.Format("Can't find {0} or open failed",fn));
10151015
}
10161016
}
10171017

‎Assets/Plugins/Slua_Managed/SLuaSetting.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public class SLuaSetting
4545
publicEOLeol=EOL.Native;
4646
publicboolexportExtensionMethod=true;
4747
publicstringUnityEngineGeneratePath="Assets/Slua/LuaObject/";
48+
publicstringLuaScriptPath="Assets/Lua";
4849

4950
// public int debugPort=10240;
5051
// public string debugIP="0.0.0.0"; // no longer debugger built-in

‎Assets/Plugins/iOS/libslua.a‎

13.5 KB
Binary file not shown.

‎Assets/Slua/Editor/LuaCodeGen.cs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ static void Update(){
104104
}
105105

106106
}
107+
108+
[MenuItem("SLua/Compile lua to luac")]
109+
staticpublicvoidCompileAll()
110+
{
111+
112+
}
107113

108114
[MenuItem("SLua/All/Make")]
109115
staticpublicvoidGenerateAll()

‎Assets/Slua/Editor/LuaConsole.cs‎

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
1-
usingSystem.Collections.Generic;
1+
// The MIT License (MIT)
2+
3+
// Copyright 2015 Siney/Pangweiwei siney@yeah.net / jiangzhhhh jiangzhhhh@gmail.com
4+
//
5+
// Permission is hereby granted, free of charge, to any person obtaining a copy
6+
// of this software and associated documentation files (the "Software"), to deal
7+
// in the Software without restriction, including without limitation the rights
8+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
// copies of the Software, and to permit persons to whom the Software is
10+
// furnished to do so, subject to the following conditions:
11+
//
12+
// The above copyright notice and this permission notice shall be included in
13+
// all copies or substantial portions of the Software.
14+
//
15+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
// THE SOFTWARE.
22+
23+
usingSystem.Collections.Generic;
224
usingUnityEditor;
325
usingUnityEngine;
426
usingSystem.Text;

‎Assets/Slua/Resources/circle.meta‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎Assets/Slua/Resources/circle/circle.txt‎

Lines changed: 0 additions & 94 deletions
This file was deleted.

‎Assets/Slua/Resources/circle/circle.txt.meta‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp