Синтаксис:
Используется csharp
using UnityEngine;
using System.Collections;
public GameObject prefab;
void Start()
{
Profit();
}
void Profit()
{
var newObject = (GameObject)Instantiate(prefab);
var position = newObject.transform.position;
Debug.Log(position);
}
using System.Collections;
public GameObject prefab;
void Start()
{
Profit();
}
void Profit()
{
var newObject = (GameObject)Instantiate(prefab);
var position = newObject.transform.position;
Debug.Log(position);
}