Vector3.operator !=

Unity · Версия 2020.3 LTS · Scripting · Vector3

Vector3.operator !=

public static bool operator !=(Vector3 lhs, Vector3 rhs);

Описание

Возвращает true, если векторы разные.

Очень близкие векторы считаются равными.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
    public Transform other;

    void Example()
    {
        if (other && transform.position != other.position)
        {
            print("I'm at the different place than the other transform!");
        }
    }
}

Обновлено 17 ноября 2026 г.