Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enum flag operator or is not working #155

Open
smitdylan2001 opened this issue Jan 21, 2024 · 0 comments
Open

Enum flag operator or is not working #155

smitdylan2001 opened this issue Jan 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@smitdylan2001
Copy link

Describe the bug in detail:
When using flags on enums like the camera depth I cannot use the '|' operator to set the flags.
I get an error
An exception occurred during Udon execution, this UdonBehaviour will be halted.
VRC.Udon.VM.UdonVMException: The VM encountered an error!
Exception Message:
An exception occurred during EXTERN to 'UnityEngineCamera.__set_depthTextureMode__UnityEngineDepthTextureMode__SystemVoid'.
Parameter Addresses: 0x00000007, 0x0000000B

Provide steps/code to reproduce the bug:
Make project
Add the following lines of code to a script on the reference camera on Start or OnEnabled
Camera cam = GetComponent();
cam.depthTextureMode = cam.depthTextureMode | DepthTextureMode.Depth;
Press play
Get error

Expected behavior:
It should not error and set the enum accordingly

@smitdylan2001 smitdylan2001 added the bug Something isn't working label Jan 21, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant