|
|
|
|
|
|
using System; |
|
|
|
using Object = UnityEngine.Object; |
|
|
|
|
|
|
|
namespace EditorTests |
|
|
|
{ |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
[Serializable] |
|
|
|
[AddRandomizerMenu("Test Randomizers/Errors OnCreate Test Randomizer")] |
|
|
|
class ErrorsOnCreateTestRandomizer : Randomizer |
|
|
|
{ |
|
|
|
|
|
|
{ |
|
|
|
// This line should throw a NullReferenceException
|
|
|
|
testGameObject.transform.position = Vector3.zero; |
|
|
|
} |
|
|
|
|
|
|
|
protected override void OnIterationStart() |
|
|
|
{ |
|
|
|
testGameObject = new GameObject("Test"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |