Search Issue Tracker
Active
Under Consideration for 2021.3.X, 2022.3.X, 6000.0.X, 6000.1.X, 6000.2.X
Votes
0
Found in
2021.3.52f1
2022.3.63f1
6000.0.51f1
6000.1.7f1
6000.2.0b5
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
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
Add comment