Search Issue Tracker
Fixed
Fixed in 6000.3.0a5
Votes
0
Found in
2021.3.52f1
2022.3.63f1
6000.0.51f1
6000.1.7f1
6000.2.0b5
6000.3.0a1
Issue ID
UUM-108860
Regression
No
Multiplication and division operators do not work with Vector3 and Vector4 types when multiplied by the same type
How to reproduce:
1. Create and open a new project
2. Import the Script “Test.cs“ into the project
3. Attach the Script to any GameObject in the Scene
4. Observe the Console
Expected result: No errors are thrown
Actual result: 4 errors are thrown
Reproducible in: 2021.3.52f1, 2022.1.0a1, 2022.3.63f1, 6000.0.51f1, 6000.1.7f1, 6000.2.0b5
Reproduced on: Windows 11 Pro (24H2)
Not reproduced on: No other environment tested
Workaround:
- Use the “Vector3.Scale” method to scale elements component-wise
- Calculate the answer by hand
Notes:
- Operators work with Vector2, but not with Vector3 or Vector4
- Thrown errors read:
- “Assets\Test.cs(18,43): error CS0019: Operator '' cannot be applied to operands of type 'Vector4' and 'Vector4'“
- “Assets\Test.cs(19,37): error CS0019: Operator '/' cannot be applied to operands of type 'Vector4' and 'Vector4'“
- “Assets\Test.cs(21,43): error CS0019: Operator '' cannot be applied to operands of type 'Vector3' and 'Vector3'“
- “Assets\Test.cs(22,37): error CS0019: Operator '/' cannot be applied to operands of type 'Vector3' and 'Vector3'“
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Reflection Probe “Probe Scene Editing Mode:” text is barely visible
- [HDRP] Game view doesn’t refresh after changing Camera Background Type until mouse moves over it
- Some Shaders appear twice in Material Shader selection menu
- Editor freezes with a StackOverflowException when certain asset types are assigned to a managed component in a SubScene via AddComponentObject
- Scale Snapping with Gizmos does not work in the Scene view when Snapping and Absolute Grid Snapping are toggled off
Add comment