-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C# wrapper #286
Comments
This was also mentioned in this issue, so am exploring adding that in. |
Having a C# wrapper that's similar to the one provided in BetterTerrain would be amazing. The way I see it, it's similar to shipping a TypeScript definition file (aka |
+1 to this idea! The sample implementations provided by other users seems fine to me, it sounds much nicer than using I'm following along, so I'll be around to help test the new feature when it's ready! |
@ramokz I have already started implementing something similar to this for my use case and I'd be willing to try contributing this feature if you're open to PRs. The criteria I've followed for my implementation so far:
|
@sircodemane If you've started making a C# implementation, and happy to make a PR, then you're more than welcome to! Your criteria all sound sensible to me. Was meaning to start looking at this proper after finishing up another feature, but it is taking longer than I had hoped… So any help with getting this in would be greatly appreciated. |
@ramokz I've opened a draft PR with the start of my efforts so you can take a look. I'll probably aim for 90% case for now and keep things fairly simple for this first pass. It's only the start of PCam3D currently but should give a good idea of the direction I'm taking it, let me know if I need to re-align. |
- added Engine singleton registration to PhantomCameraManager - fixed incorrect LookAtMode signal (not available in 2d) - added c# project files - created basic test runner and added some tests (wip)
- fix several bugs from invalid getter/setters, properties, and types - added more tests - added LimitTarget query result type for working with TileMaps and CollisionShape2Ds - reorganized scripts since main script file had become quite large
- added missing shared camera properties - added missing phantom camera 2d properties - added missing phantom camera 3d properties
Project Type
2D, 3D
Feature Description
It would be nice if phantom camera included a C# wrapper to ease use with C#.
Use Cases
Currently to call phantom camera methods in C# you have to do something like this:
This is prone to causing runtime issues, for example if phantom camera changed the
is_active
method toactive
this would still compile but cause runtime issues.(Optional) Proposed Solution
Better terrain could ship a C# wrapper that would prevent the above from happening.
One such example:
https://github.com/Portponky/better-terrain/blob/main/addons/better-terrain/BetterTerrain.cs
The above example could then be changed to:
Upon such an update where
is_active
is changed toactive
this would then cause a compile error, this also integrates better with IDE.The text was updated successfully, but these errors were encountered: