File size: 531 Bytes
18a519f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using UnityEngine;
using NUnit.Framework;

public class RectTransformPosition
{
    [Test]
    public void SettingPositionBeforeGameObjectIsActivatedWorks_953409()
    {
        var positionToSet = new Vector3(1, 2, 3);
        var go = new GameObject("RectTransform", typeof(RectTransform));

        go.SetActive(false);
        go.transform.position = positionToSet;
        go.SetActive(true);

        Assert.AreEqual(positionToSet, go.transform.position, "Expected RectTransform position to be set but it was not.");
    }
}