Skip to content
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

csharp #76

Closed
DarinBeard opened this issue Mar 31, 2023 · 1 comment
Closed

csharp #76

DarinBeard opened this issue Mar 31, 2023 · 1 comment

Comments

@DarinBeard
Copy link

I am trying to test points from within csharp and I just don't know how to link the two. Everything works so far. I've created polys, I am loading them. I can see them with debug on. But how to test from chsarp is blowing my mind right now. I know this should be something I can figure out but I am really hungry and didn't really sleep last night so it's not working for me. Are there examples that you know of I could look at?

@mkafrin
Copy link
Owner

mkafrin commented Apr 9, 2023

This is a lua resource, so the only way to integrate with it using csharp would be events/exports. Unfortunately, the metatable that contains the methods on a PolyZone (isInside, onPointInOut, etc.) is dropped if you try to send a zone to another resource using exports.

Therefore, most people who want to use PolyZone with a non-lua language generally make use of a PolyZone manager that they make in lua and has exports for adding new zones that all get added to a central ComboZone that emits events when the player enters and leaves a zone. That way you never have to manually interact with zones and can just listen to the enter and leave events. That would be my suggestion personally.

@mkafrin mkafrin closed this as completed Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants