Skip to content

Enum flag operator or is not working #155

@smitdylan2001

Description

@smitdylan2001

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions