public void Save(EditableTerrain terrain, Guid sceneGuid) { var data = terrain.GetData(); var path = PathHelper.GetTerrainBinPath(data.Guid, sceneGuid); Loader.SaveObj(path, data); }
// triggers if a collider enters this object private void OnTriggerStay(Collider other) { // if the other object is tagged with ice if (other.tag == "Ice") { // store the other game object's editable terrain component iceTerrain = other.GetComponent <EditableTerrain>(); // store the point on the collider to the centre of the ice creator as the collision point collisionPoint = other.ClosestPoint(transform.position); // store that the ice creator is ready to store ice ready = true; } // if the other object is the player else if (other.gameObject == player) { // store that the ice creator is not ready to store ice ready = false; } }