Search Issue Tracker

By Design

Votes

0

Found in

2020.3.38f1

2021.3.8f1

2022.1.14f1

2022.2.0a10

Issue ID

UUM-12223

Regression

No

Class Properties get overwritten when using IL2CPP

--

-

Reproduction steps:
1. Open the attached project "AttributeTest.zip"
2. Make sure the Scripting Backend is IL2CPP
3. Build and Run the "boot" Scene
4. Open the Player.log (Console tab > context menu > open Player Log)
5. Search for "Added DerivedTest" and check the "[dbg] Prop: IntTest Attribute IntTest, accessor type: Replicate.AccessorInt32`1[METHOD_NAME]" under it

Expected result: The METHOD_NAME is "ReplicantTest"
Actual result: The METHOD_NAME is "DerivedTest"

Reproducible with: 2020.3.38f1, 2021.3.8f1, 2022.1.14f1, 2022.2.0a10
Not reproducible with: 2022.2.0a11, 2022.2.0b5, 2023.1.0a8

Reproducible on: macOS 12.4

  1. Resolution Note:

    Prior to 2022.2, unlike Mono, IL2CPP cached the attribute instances returned by GetCustomAttributes. This was only noticeable if a custom attribute class was mutable, which is the case here. This change relied on a larger refactor of custom attribute support and we don't plan on back porting it.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.