Coder Social home page Coder Social logo

Comments (12)

pangweiwei avatar pangweiwei commented on July 30, 2024

嗯,该了目录结构,这到是个问题了:(

from slua.

pangweiwei avatar pangweiwei commented on July 30, 2024

我刚才看到5.2.3发布了,貌似修复UNetWeaver的bug

from slua.

pangweiwei avatar pangweiwei commented on July 30, 2024

你可以考虑revert之前的目录结构,就不存在这个问题了

from slua.

wlgys8 avatar wlgys8 commented on July 30, 2024

我把generate code path改回到了之前的目录。
其他的还是遵循现在新的目录结构吧。

5.2.3 的release note里好像没看到关于UNetWeaver那个问题的说明?
只看到了(none) - Networking: Fix for UNetWeaver exception when making Metro builds这个,针对metro的

from slua.

pangweiwei avatar pangweiwei commented on July 30, 2024

Networking: Fixed code generation execption when using certain build-in unity types ...

这个估计是个fix,猜的

from slua.

wlgys8 avatar wlgys8 commented on July 30, 2024

还有一个问题:
Plugins/SLua_Managed/Editor 这个目录下的文件似乎会被编译到Assembly-CSharp-firstpass中 而不是Assembly-CSharp-Editor-firstpass,
build的时候会报错,引用了UnityEditor

Plugins/Editor 应该只能识别这个一级目录?

from slua.

Salada avatar Salada commented on July 30, 2024

@wlgys8 I think this document is good reference
http://docs.unity3d.com/Manual/ScriptCompileOrderFolders.html

Phase 1 is compiled to Assembly-CSharp-firstpass.dll
Phase 2 is compiled to Assembly-CSharp-Editor-firstpass.dll ( depends Assembly-CSharp-firstpass.dll )
Phase 3 is compiled to Assembly-CSharp.dll ( depends Assembly-CSharp-firstpass.dll )
Phase 4 is compiled to Assembly-CSharp-Editor.dll ( depends above all )

this files is possibly checked in specific folder {UNITY_PROJECT}/Library/ScriptAssemblies/

from slua.

wlgys8 avatar wlgys8 commented on July 30, 2024

@Salada
I'v read this document. The issue is:
If we define some extension methods for UnityEngine.Sprite in SpriteExt.cs,
1.SpriteExt.cs will be compiled into Assembly-CSharp.dll
2.Lua_UnityEngine_Sprite.cs will be compiled into Assembly-CSharp-firstpass.dll

We can not access SpriteExt.cs in Lua_UnityEngine_Sprite.cs.
This will cause a compile error.

from slua.

Salada avatar Salada commented on July 30, 2024

If want to use method extensions by class in UnityEngine.dll, I think need to 2 bind load phase and codegen phase. but changelist expect too many. and i have just idea. not attempt to implement this feature yet.

I turn off feature about extensions method in SLuaSetting.asset, couldn't catch this problem :(

I think Editor folder need to be located in /Editor not in /Plugins/Editor, Assembly-CSharp-Editor-firstpass.dll cannot access Assembly-CSharp.dll. then your needs is accomplished.

from slua.

wlgys8 avatar wlgys8 commented on July 30, 2024

@Salada
I agree with you

from slua.

wlgys8 avatar wlgys8 commented on July 30, 2024

If put folder Editor under Plugins
LuaCodeGen.InvokeEditorMethod will throw error below:

    System.IO.FileNotFoundException: Could not load file or assembly 'Assembly-CSharp-Editor' or one of its dependencies. The system cannot find the file specified.
    File name: 'Assembly-CSharp-Editor'

Should move folder editor back to Assets/Slua/Editor ?

from slua.

pangweiwei avatar pangweiwei commented on July 30, 2024

ok

from slua.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.