Version: 1.4
LanguageEnglish
  • C#

Object.operator !=

Switch to Manual
public static bool operator !=(Object x, Object y);

Description

Compares if two objects refer to a different object.

using UnityEngine;

public class Example : MonoBehaviour { Transform target; void Update() { // the target object does not refer to the same object as our transform if (target != transform) { print("Another object"); } } }

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答