Search Issue Tracker
By Design
Votes
0
Found in
5.5.0a6
Issue ID
825483
Regression
Yes
Methods with Conditional attributes aren't fired if preprocessor identifier isn't defined in the class that calls that method
Steps to reproduce:
1. Open attached project "825483.zip"
2. Open scene "repro"
3. Open script Definer and notice that class defines two methods. One has Conditional attribute, another is defined between #if/#endif block. Class Test call both of these methods
4. Run scene repro and notice that only method defined in #id/#endif block is called - method with Conditional attribute is skipped
Reproduced with: 5.5.0a4, 5.5.0a6
Not reproducible: 5.4.0p2, 5.5.0a3
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- GameObjects with a material derived from a Custom Lighting Surface Shader are displayed as skewed on quads when the Camera's Width and Height properties of the Viewport Rect are lower than 1
- Warning 'Unable to find player assmebly' is thrown when building some Project Templates
- ArgumentOutOfRangeException when manipulating the Project Settings search bar
- [Linux] Touch freezes in Player when any mouse button is clicked
- UnityEngine.Rendering.Volume.OnEnable() is called twice before OnDisable() creating multiple copies of the same volume when a volume is enabled right after Domain Reload when entering Play Mode
andymads
Dec 20, 2016 17:04
I don't understand. You can't #define identifiers in the class because they have to be before the first token in the file.