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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Add comment