Singularity/Library/PackageCache/com.unity.ugui@1.0.0/Tests/Editor/RectMask2D/RectTransformPosition.cs

19 lines
531 B
C#
Raw Permalink Normal View History

2024-05-06 14:45:45 -04:00
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.");
}
}