private TerrainObjectInstance CreateEmptyObjectInstance(Vector3 vertexPos, Transform parent, TerrainObjectAsset asset) { var item = new TerrainObjectInstance(); item.SetPos(vertexPos); item.SetRot(GetRandomObjectRotation(asset, parent.rotation)); item.SetScale(asset.GetRandomScale()); item.SetAsset(asset); return(item); }
public void SetAsset(TerrainObjectAsset asset) { m_asset = asset; }
private Vector3 GetRandomObjectRotation(TerrainObjectAsset asset, Quaternion baseRotation) { return(asset.GetRandomRot(baseRotation.eulerAngles)); }