Exemple #1
0
 public void GameObjectComponentRemovalValidators()
 {
     Transform t = new Transform();
     GameObject gameObject = new GameObject(t);
     Assert.IsFalse(gameObject.Remove(t), "Component was successfully removed, this is not the expected behaviour.");
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new <see cref="Transform"/> the parent, position, rotation and scaling.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="localPosition">
 /// The <see cref="GameObject"/>s local position in relation to the parent's position.
 /// </param>
 /// <param name="localRotation">
 /// The <see cref="GameObject"/>s local rotation in relation to the parent's rotation.
 /// </param>
 /// <param name="localScale">The <see cref="GameObject"/>s scaling relative to the parent's scaling.</param>
 public Transform(Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
     : this()
 {
     this.LocalPosition = localPosition;
     this.LocalRotation = localRotation;
     this.LocalScaling = localScale;
     this.Parent = parent;
 }