using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Gaia
{
///
/// Use this interface to implement a Gaia Spawn extension that can be run by a spawner to execute your own code whenever the spawner finds a fit location.
///
public interface ISpawnExtension
{
///
/// The name to identify the Extension
///
string Name { get; }
///
/// Whether or not this extension impacts Terrain heights.
/// If it does, Gaia will trigger the necessary terrain updates after running this extension so things like the terrain collider are updated according to your changes.
///
bool AffectsHeights { get; }
///
/// Whether or not this extension impacts Terrain textures.
/// If it does, Gaia will trigger the necessary splatmap updates after running this extension
/// ///
bool AffectsTextures { get; }
///
/// Initialise the extension - To avoid some actions to happen at every instance of this
/// Extension spawning. All the spawner settings from the UI can be accessed via spawner.m_settings.
/// Resource Information is in spawner.m_settings.m_resources
///
/// The Gaia spawner that is running this extension.
void Init(Spawner spawner);
///
/// This is the core function that will be called when spawning.
///
/// The Gaia spawner that is spawning this. All the spawner settings from the UI can be accessed via spawner.m_settings.
/// The target transform for Game Object spawns
/// The index of the spawn rule this extension is running in.
/// The index of the instance inside the rule.
/// Class containing details of the spawn.
void Spawn(Spawner spawner, Transform target, int ruleIndex, int instanceIndex, SpawnExtensionInfo spawnInfo);
///
/// This is the function that the spawner calls when trying to remove the content produced by this spawn extension.
///
void Delete();
///
/// This will be called when the Spawn Extension is finished spawning. Do all cleanup operations in here.
///
void Close();
}
}