How Do I Refer the origin point in C#?

i want to refer the origin point of a cloned prefab, so i can compare the distance between the actual point, and the origin point, so if it is more than the range, it will be destroyed…

do i need to create a null gameObject?

i’m thinkng of something like

if (DeltaDistance >= range)

You’ll have to store the original position as a global variable using the Vector3 type.

Something like this in your Start function should work:

Vector3 origin;

void Start() {
origin = transform.position;