Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


implicit operator Vector4

Colors can be implicitly converted to and from Vector4.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Operator
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

implicit operator Vector4(Vector)

Colors can be implicitly converted to and from Vector4.
public static implicit operator Vector4(Color c)

Parameters

Returns

Type

Description

Vector4

Examples

using UnityEngine;public class Example : MonoBehaviour{ void Start() { Vector4 newV4 = new Color(0.3f, 0.4f, 0.6f); }}

implicit operator Color(Colo)

Colors can be implicitly converted to and from Vector4.
public static implicit operator Color(Vector4 v)

Parameters

Returns

Type

Description

Color

Examples

using UnityEngine;public class Example : MonoBehaviour{ void Start() { Color newColor = new Vector4(0.3f, 0.4f, 0.6f); }}