ScriptLib and C# to TSDef Converter Without OneJS

Thanks for the other day! I am planning to use only the ScriptLib and C# to TSDef Converter features of OneJS and directly use Jint for the other parts. The objectives are to: - Test the operation on a specific platform in a Jint environment without going through OneJS - Customize the Jint environment as desired In such a case, which files should be excluded from OneJS, and which files should be retained?
5 Replies
はどはど/HADHAD
I initially attempted to retain only the 'Editor' directory from 'OneJS' and delete everything else, but it didn't work. It seems that it is tightly coupled with some parts of the 'Runtime', which is why it doesn't function properly. However, I haven't fully read through the source code yet.
Singtaa
Singtaa5mo ago
So the TSDef Converter's source is all under OneJS/Editor/TSDefinitions PuerTS has an "automatic" typings generation: https://github.com/Tencent/puerts/blob/master/unity/Assets/core/upm/Editor/Resources/puerts/templates/dts.tpl.mjs It's actually pretty thorough/powerful. But you'll need to read through their source a bit before using it. OneJS V2 has some helper methods for using PuerTS's dts generation: https://github.com/CreepGin/OneJS/blob/onejs-v2/Editor/Generation/DTSGenerator.cs
はどはど/HADHAD
Got it, thank you. I will check. By the way, I can't access the second link. Do I need to be a contributor?
Singtaa
Singtaa5mo ago
yup, you can use the /collab cmd
はどはど/HADHAD
I can view it now!
Want results from more Discord servers?
Add your server