cppscript's People
cppscript's Issues
English Text
Can't find option for english localization.
Use CppScript on iOS with IL2CPP?
Is it possible to use this on iOS with IL2CPP enabled?
Since I guess you might be a Unity staff, I want to report a bug of Unity 5, which leads me here:
In Unity 5.2~5.3, the property UnityEngine.Cloth.solverFrequency
is defined as bool
but actually it should be a uint
.
That makes no one can use this property in their code --- we can only set it at the Editor, which use SerializedObject to avoid this problem. But sometimes we need to set it dynamically.
I have tried many ways to make a workaround and I can simply use a little trick to convert an uint
to bool
to set the value. But this workaround just works for a byte length --- it can only be set from 1 to 255 and 256 would turn back to 1.
After some research I think it has something to do with the Unity build process. Apparently Unity mapped the bool
in C# (32bits Int32
) to the bool
in C++ (8bits ushort
). After looking into the disassembly of the WindowsStandalone Player.exe
we could see the parameter we passed in was shortened by a movzx edx , dl
. And we seems managed to patch it eventually, though the get
method is still broken.
But when comes to iOS platform this issue is more complex since I don't know much about the ARM assembly. I can not find it shorten the parameter like what PC versions would do, but I can still only set it between 1 to 255.
I don't know if it would work correctly by directly calling the "set_solverFrequency" function in C++ side. And I don't know if this repo can be used on iOS so I could have a try. Thanks --- and please tell me if you know any way to "hotfix" this issue since we are blocked by it now and waiting for a solution.
And I think a Unity staff might be able to fix this issue by : (All things below are ONLY based on my little research and imagination, so don't take it seriously!!)
- Open the source code folder.
- Search for
DynamicsBindings.txt
and open it. - Search for
AUTO_PROP bool solverFrequency
and replace it byAUTO_PROP uint solverFrequency
orAUTO_PROP int solverFrequency
. - Re-compile the project.
ありがとうございました! o(////▽////)q
CppScript usage example in Unity
Hello and thanks for this interesting project.
I managed to build both CppScriptCore and CppScriptAssembly in x86 and x86_64 and put them into a Unity project, at Assets/Plugins/x86
, respectively at Assets/Plugins/x86_64
. So far, no problem until here.
Where I'm blocking is how to use the Behavior
classes implemented inside the CppScriptAssembly, i.e. how to assign such a Behavior to a GameObject in Unity Editor.
Could you please provide some insight or example code to explain this next step?
Also, is this project viable to be used in production for a greater project (for which a C++ codebase already exists), or should I rather depend on P/invoke wrapping?
Cheers.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.