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
- Package Manager throws ScriptableSingleton related errors after a package was installed while there were pending package manifest changes
- Default Branch name does not change when changing the Default Branch name for a project that was disconnected from a repository
- Repository description does not have a character limit even though the repository will fail to create if there are over 350 characters when creating a new project in the Hub
- Crash on WalkTypeTreeInternal when the mesh of a specific model is selected
- Personal Access Token tooltip can open cut-off/outside of bounds when creating a new project in Unity Hub
Add comment