Search Issue Tracker
Duplicate
Votes
0
Found in
5.0.0f3
Issue ID
676492
Regression
Yes
Type.GetType() in WebGL does not match the output given in the editor
How to reproduce:
1. Open a new project
2. Create a script called "testGetType.cs" with the following code:
using UnityEngine;
using System;
public class RequestedClass {
}
public class testGetType : MonoBehaviour {
Type operatorType;
void Start () {
operatorType = Type.GetType("RequestedClass");
}
void OnGUI() {
GUILayout.Label ("Is the operator null? " + (operatorType == null));
GUILayout.Label ("What is the operator? " + operatorType);
}
}
3. Attach the script to any game object in the scene
4. Play the scene
- Note how the text shows that the operator type is not null, and that it is of the type RequestedClass.
5. Build to WebGL and run
- The text now shows that the operator type is null and does not return anything for the type.
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
- Shader Graph Asset icon is not shown on creation unless you confirm the name
- APV Sky occlusion doesn't consider the terrain
- [iOS] "EXC_BAD_ACCESS" Player crash when Script Debugging is enabled
- Cursor skips input fields when tabbing between two sets of input fields
- "Shader error redefinition of 'Varyings'" error appears when selecting the shader
This is a duplicate of issue #664765