Initial commit
This commit is contained in:
1 parent
ee9615239e
commit
16feac691f
4093 files changed
+1030491
No files matched your search
@@ -0,0 +1,63 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Gaia;
|
||||
|
||||
public class APITest : MonoBehaviour
|
||||
{
|
||||
[Header("World Creation Settings")]
|
||||
public int xTiles = 1;
|
||||
public int zTiles = 1;
|
||||
public int tileSize = 1024;
|
||||
public float tileHeight = 1000;
|
||||
public int seaLevel = 50;
|
||||
public bool createTerrainsInScenes = false;
|
||||
public bool autoUnloadScenes = false;
|
||||
public bool applyFloatingPointFix = false;
|
||||
|
||||
public bool executeWorldCreation = true;
|
||||
|
||||
[Header("Stamper Settings")]
|
||||
public Texture2D stamperTestTexture;
|
||||
public bool executeStamp = true;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void CreateTerrainButton()
|
||||
{
|
||||
WorldCreationSettings worldCreationSettings = ScriptableObject.CreateInstance<WorldCreationSettings>();
|
||||
worldCreationSettings.m_xTiles = xTiles;
|
||||
worldCreationSettings.m_zTiles = zTiles;
|
||||
worldCreationSettings.m_tileSize = tileSize;
|
||||
worldCreationSettings.m_tileHeight = tileHeight;
|
||||
worldCreationSettings.m_seaLevel = seaLevel;
|
||||
worldCreationSettings.m_createInScene = createTerrainsInScenes;
|
||||
worldCreationSettings.m_autoUnloadScenes = autoUnloadScenes;
|
||||
worldCreationSettings.m_applyFloatingPointFix = applyFloatingPointFix;
|
||||
//worldCreationSettings.m_gaiaDefaults = new GaiaDefaults();
|
||||
//worldCreationSettings.m_spawnerPresetList = new List<BiomeSpawnerListEntry>() { }
|
||||
GaiaSessionManager.CreateWorld(worldCreationSettings, executeWorldCreation);
|
||||
}
|
||||
|
||||
public void StampButton()
|
||||
{
|
||||
StamperSettings stamperSettings = ScriptableObject.CreateInstance<StamperSettings>();
|
||||
stamperSettings.m_width = 150;
|
||||
stamperSettings.m_imageMasks = new ImageMask[1] { new ImageMask() {
|
||||
m_operation = ImageMaskOperation.ImageMask,
|
||||
ImageMaskTexture = stamperTestTexture
|
||||
}};
|
||||
stamperSettings.m_y = 25;
|
||||
GaiaSessionManager.Stamp(stamperSettings, executeStamp, null, true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a1e47280ede6fa741b16070ca9367bef
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5f63ba63fa4444444843d6798e55f94d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,23 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
[CustomEditor(typeof(APITest))]
|
||||
public class APITestEditor : Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
APITest apiTest = (APITest)target;
|
||||
DrawDefaultInspector();
|
||||
if (GUILayout.Button("Create Terrain"))
|
||||
{
|
||||
apiTest.CreateTerrainButton();
|
||||
}
|
||||
if (GUILayout.Button("Stamp"))
|
||||
{
|
||||
apiTest.StampButton();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0adae855843e1a746a2cf71adcbdee9d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in new issue
Block a user