User Interface

Todas las interfaces llevan un nesting q no acabo de entender pero aver n general

pa hacer un elemento nuevo n la UI:

AC Game Editor> Menu> Create new menú

ahí ya marcas tus asuntos y lo tienes q linkear a un nuevo prefab q crees n Unity

Canvas
    -Panel
    -Boton

(en teoría, a mi solo m funciona si pongo el panel bajo el botón)

En el Canvas:

Scaler con la resolución del proyecto (1920*1080 n mi caso)

Raycaster, Autocorrect, Group y ConstantID por defecto

el Panel Rect Transform q lo ancle, en la UI x defecto parece q lo mejor es anclarlo abajo izq

los Dialogos son un tema aparte, por lo que veo lo mejor es tenerlos anclados al centro

En el ConversationUI, los DialogueText ponerlos en overflow y marcar min y max para que no haya conflictos con las resoluciones

STEAM ACHIEVEMENTS

-Bajar el Steamworks.NET de GitHub. Ejecutar desde el proyecto de unity. Se creara la carpeta Com.rlabeque.noseq.

-En Assets/AdventureCreator/Scripts seleccionaer el archivo AC.asmdef y en el editor: Assembly Definition References pulsar + para añadir una nueva, el com.rlabeque.steamworks.net.asmdef que esta dentro de Assets/com.rlabeque…/Runtime

-En Assets/Scripts/Steamworks.NET, mover el SteamManager a la misma carpeta Runtime de antes

En la carpeta raiz del proyecto de ha debido crear un .txt llamado steam_appid, aqui se escribe el ID que te da Steam pa tu juego. Para llamar los logros, isar el script de ActionSteamAchievement de abajo

Personajes

SPRITES

•Spritesheet de la animación se pasa x laighter para mapa de normales. El spritesheet tendrá 1000 de altura el canvas, q es mas o menos la altura completa de 1920*1080, la resolución origional del juego, asi el pj puede ocupar toda la altura sin perder resolución
El largo del spritesheetno debería superar los 16k o el unity lo empieza a comrimir. mejor mienteras mas cuadrado y size multiplo de 2 pa ahorrar recursos de alguna manera q no entendo

Aplanar color n Photoshop seleccionar x color con umbral en 45

Si hay Linea de Borde Blanca entre el color y el lineart x compresion o ctrlc+v chapucero, se puede hacer una capa encima y en krita ponerla en Color HSV, esa capa sobreescribe bastante bien el blanco pero deja el resto de tonos de color y negro de linea igual

•Una vez n Unity:

Nomenclatura pa 4 direcciones _D_U_R_L
Meter Spritesheet y mapa normal.
En el spritesheet cambiar Pixels per Unit a 180 (Solo Jesus), Max Size a tope y Compression a none. Hit Apply
En el mapa normal, cambiar Texture Type por Normal Map y Compression a none. Hit Apply

Abrir el Sprite Editor del spritesheet, dividir y colocar el Pivot en Bottom Center. En el dropdown menú del editor seleccionar Secondary Textures, arrastrar el mapa normal a la casilla Texture y en el dropdown de Name, seleccionar _NormalMap

En las luces hay una casilla de Use Normal Map q se debe activar con una Distance de 0 por alguna razón

ANIMACION

Pilla un frame inicial, arrastra a la hierarchy de la escena y renombra *Character*Sprite. En la pestaña del Adventure Creator hay un Character Wizard, úsalo y usa este Sprite como base, todo x defecto

El Sonido de andar se pone desde el inspector del Character, no desde el de Sound que se crea x defecto

Crear un child vacio a una altura aprox de 7.5 y en el inspector de diálogos, marcarlo como speech placement

Character

       -Sprite
       -FootSound
       -Empty(Speech Placement)

preparar las animaciones, al crear personajes el Adventure Creator detecta automáticamente las básicas si siguen una nomenclatura especifica asiq vamo a preparar NombreIdle_D_U_R_L, NombreWalk, NombreTalk… como Standard 2D Animations del Player

Selecciona el Sprite en la hyerarchy y crea todas las animaciones con su nomenclatura en el popup de Animation de la pestaña Componentes

cambiar player
set the Settings Manager’s Player Switching field to Allow, you can assign two separate Player prefabs. Then use the Player: Switch Action to swap them at runtime, checking its Replace old Player’s position? option.

Escenas

GRAFICOS

Plantar PNG background en la Hierarchy, los JPG pueden hacer artefactos rarunos con la compresion y las cosas

En Adventure Editor pestaña escena crearla without folders.

En Camara pulsar + pa hacer una, y en su correspondiente inspector position eje Z en negativo, 5 o 6 basta, uncheck lock vertical y lock horizontal, marcar constrain y arrastrar el background, marcar Auto-set Ortographic Size pa cuadrar la cámara al jhpg de fondo

En NavMesh pulsar + para crear la walkzone, en inspector Edit Polygon Collider 2D y hacer la zona

Sorting Map para q el pj se haga chico al alejarse y grande al acercarse. Poner todos los visibles q si no no hay forma, + y en el inspector mover el gizmo a lo mas alto de la walkzone, darle a Add area y sale un segundo gizmo q se pone en la de mas abajo. Jugar con las escalas como sea y las marcas po al reves no se xq están asi, marcar affect size y desmarcar affect speed. Desmarcar sorting tb q es una movida obsoleta y la lia q te cagas

Cualquier obstáculo q se quiera poder se añade como Sprite a la hierarchy, marcar el Sort Point en Pivot y ajustar este a donde toca el suelo, es la referencia pa poner al pj adelante o atrás

Project Settings>Graphics>Universal Render Pipeline>General>Transpoarency Sort Mode>Custom Axis

Crea un Polygon Collider hijo del obstáculo pa delimitar la zona prohibida de la walkzone, marca Is Trigger y luego dentro de la NavMesh, busca NavMesh holes y añade el collider

Con el Sprite marcado dentro del menú del Adventure Creator podemos convertirlo directamente en hotspot pulsando n el botón, asi es interactuable

Si 2 Hotspots se solapan, el mas lejano a cámara queda x debajo, pero recuerda q la cámara esta en Z negativo, por lo que el de abajo debe tener Z positivo

File-build profiles-scene list


MUSICA 

Hay q usar el menú superior buscar Editor>soundtrack>music strorage y meter la bso de la escena nueva
Luego en el menú del editor Scene Cutscene + nueva on start y en el actionlist editor Sound:play music

En settings al acabar auto-add Save components to game objects

Sombras en el editor de cada Sprite añadir un Shadow Caster 2D


CONVERSACIONES

Desde el AC Game Editor creas Conversation, en ella solo pones las opciones q dira el prota, las activas, inactivas, de 1 solo uso, etc…
Ya en la escena, la opción del NPC de Talk to la linkeas a Dialogue: Start Conversation, arrastras la conversación creada antes y marcas Override Options. Ya puedes manejar el dialogo desde el menú visual


VIDEO

El video hay q proyectarlo sobre un Sprite a modo de pantalla, una vezx hecha la escena crear Sprite 2d cuadrao q cubra la pantalla. En las acciones Engine:Play Movie Clip y en el inspector derl video Update: DSP Time, Render Mode: Material Override y de Renderer el Sprite 2D de pantalla creado


PARTICULAS

añadir al inspector el Script ParticleSwitch y cuando lo quieras activar desde el ActionList usas Object: Send message con el mensaje de Turn On/Turn Off


ANIMACIONES

Para q no se reproduzcan automáticamente, crear un estado empty x defecto y luego llamar la animación desde la Actionlist

C# Scripts

GRAFICOS

En un Hotspot, llamar a un Action distinto según hagas mouseover In u Out (el action puede ser una animacion para que se hinche y se desinfle, un cambio de cursor, etc…).

Añadir al propio Hostspot

Cono de visión, con ángulo y distancia ajustables. Target, obstáculos y un Action que correr cuando trigueree.

Meter en un empty dentro del personaje

Marquesina, el texto del Character se desplaza cuando es demasiado largo para caber en el Panel de la ConversationUI.

En la jerarquia de la ConversationUI, crea un empty (marquesina)dentro de cada boton, arrastra para que ocupe el espacio total del boton. Pulsa en los presets del RectTransform con Shift y Alt en Left Middle para marcar ahi tanto los Anchor como los Pivot, deben quedar las position en 0,0; los anchor en 0, 0.5 y los pivot en 0, 0.5. Añade Rect Mask2D.

Las txtOptions se meten dentro del empty, haciendo lo mismo en el RectTransform para que se ajusten a la mascara de la marquesina. Añade Content Size Fitter y cambia las opciones de Fit a Preferred Size.

Añade el Script al Button, referencia el Viewport a la marquesina y el Text a la opcion de cada boton. Desmarca el Center when Fit que no se que pinta

BtnOption # 

  └── Marquesina (Viewport) 

              └── txtOption#

using UnityEngine; using AC; public class HotspotEvent : MonoBehaviour { public Hotspot targetHotspot; public ActionList actionListEnable; public ActionList actionListDisable; private void OnEnable() { EventManager.OnHotspotSelect += OnSelect; EventManager.OnHotspotDeselect += OnDeselect; } private void OnDisable() { EventManager.OnHotspotSelect -= OnSelect; EventManager.OnHotspotDeselect -= OnDeselect; } private void OnSelect(Hotspot hotspot) { if (hotspot != targetHotspot) return; actionListEnable.Interact(); } private void OnDeselect(Hotspot hotspot) { if (hotspot != targetHotspot) return; actionListDisable.Interact(); } }
using System.Collections.Generic; using UnityEngine; using AC; // namespace de Adventure Creator /// /// Cono de visión 2D para NPCs con integración de Adventure Creator. /// Llama a Interact() en una ActionList de AC cuando detecta al jugador. /// public class VisionCone2D : MonoBehaviour { [Header("Parámetros del cono")] [Tooltip("Radio máximo de visión")] public float viewRadius = 8f; [Range(0f, 360f)] [Tooltip("Ángulo total del cono de visión en grados")] public float viewAngle = 90f; [Header("Capas")] [Tooltip("Capa donde está el jugador")] public LayerMask targetMask; [Tooltip("Capa de obstáculos que bloquean la visión")] public LayerMask obstacleMask; [Header("Raycasts")] [Range(4, 60)] public int rayCount = 20; [Header("Adventure Creator")] [Tooltip("ActionList de escena a ejecutar al detectar al jugador (ej. 'Mono')")] public ActionList actionListOnDetect; [Tooltip("Si es true, solo se ejecuta la ActionList una vez hasta que el jugador se pierda de vista")] public bool triggerOnce = true; [Header("Debug")] public bool drawGizmos = true; public Color coneColor = new Color(1f, 0.8f, 0f, 0.2f); public Color rayColor = Color.yellow; public Color detectionColor = Color.green; // ─── Estado interno ──────────────────────────────────────────────────── public List visibleTargets { get; private set; } = new List(); public System.Action OnTargetDetected; public System.Action OnTargetLost; private List previousTargets = new List(); private bool hasTriggered = false; // controla el triggerOnce // ─── Ciclo de Unity ──────────────────────────────────────────────────── private void Update() { FindVisibleTargets(); NotifyTargetChanges(); } // ─── Lógica principal ────────────────────────────────────────────────── private void FindVisibleTargets() { visibleTargets.Clear(); Collider2D[] targetsInRadius = Physics2D.OverlapCircleAll( transform.position, viewRadius, targetMask ); foreach (Collider2D col in targetsInRadius) { Transform target = col.transform; Vector2 dirToTarget = (target.position - transform.position).normalized; float angleToTarget = Vector2.Angle(transform.right, dirToTarget); if (angleToTarget > viewAngle / 2f) continue; float distToTarget = Vector2.Distance(transform.position, target.position); RaycastHit2D hit = Physics2D.Raycast( transform.position, dirToTarget, distToTarget, obstacleMask ); if (!hit) visibleTargets.Add(target); } } private void NotifyTargetChanges() { // Objetivos nuevos detectados este frame foreach (Transform t in visibleTargets) { if (!previousTargets.Contains(t)) { OnTargetDetected?.Invoke(t); TryRunActionList(); } } // Objetivos que se han perdido de vista foreach (Transform t in previousTargets) { if (!visibleTargets.Contains(t)) { OnTargetLost?.Invoke(t); // Resetear para poder disparar de nuevo la próxima vez if (triggerOnce) hasTriggered = false; } } previousTargets.Clear(); previousTargets.AddRange(visibleTargets); } /// /// Llama a Interact() en la ActionList de AC asignada. /// Respeta triggerOnce para no ejecutarla en bucle cada frame. /// private void TryRunActionList() { if (actionListOnDetect == null) { Debug.LogWarning("[VisionCone2D] No hay ActionList asignada en 'Action List On Detect'.", this); return; } if (triggerOnce && hasTriggered) return; actionListOnDetect.Interact(); hasTriggered = true; Debug.Log($"[VisionCone2D] ActionList '{actionListOnDetect.name}' ejecutada.", this); } // ─── API pública ─────────────────────────────────────────────────────── /// /// Convierte un ángulo en grados a dirección en espacio mundo. /// public Vector2 DirectionFromAngle(float angleDegrees, bool isGlobal = false) { if (!isGlobal) angleDegrees += transform.eulerAngles.z; return new Vector2( Mathf.Cos(angleDegrees * Mathf.Deg2Rad), Mathf.Sin(angleDegrees * Mathf.Deg2Rad) ); } public bool IsVisible(Transform target) => visibleTargets.Contains(target); // ─── Gizmos (editor) ────────────────────────────────────────────────── private void OnDrawGizmos() { if (!drawGizmos) return; Vector3 origin = transform.position; float halfAngle = viewAngle / 2f; float npcAngle = transform.eulerAngles.z; int steps = Mathf.Max(rayCount, 10); float stepAngle = viewAngle / steps; Gizmos.color = coneColor; for (int i = 1; i <= steps; i++) { float angle = (npcAngle - halfAngle) + stepAngle * i; Gizmos.DrawLine(origin, origin + (Vector3)DirectionFromAngle(angle, true) * viewRadius); } Gizmos.color = rayColor; Gizmos.DrawLine(origin, origin + (Vector3)DirectionFromAngle(npcAngle + halfAngle, true) * viewRadius); Gizmos.DrawLine(origin, origin + (Vector3)DirectionFromAngle(npcAngle - halfAngle, true) * viewRadius); Gizmos.DrawWireSphere(origin, viewRadius); Gizmos.color = new Color(rayColor.r, rayColor.g, rayColor.b, 0.3f); for (int i = 0; i <= rayCount; i++) { float angle = (npcAngle - halfAngle) + (viewAngle / rayCount) * i; Gizmos.DrawLine(origin, origin + (Vector3)(DirectionFromAngle(angle, true) * viewRadius)); } Gizmos.color = detectionColor; foreach (Transform t in visibleTargets) { Gizmos.DrawLine(origin, t.position); Gizmos.DrawWireSphere(t.position, 0.3f); } } }
using UnityEngine; using UnityEngine.EventSystems; public class UIMarquee : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler { [Header("Referencias")] [SerializeField] RectTransform viewport; // el objeto con RectMask2D [SerializeField] RectTransform text; // el Text/TMP hijo del Viewport [Header("Ajustes")] [SerializeField] float speed = 40f; // píxeles por segundo [SerializeField] float startDelay = 0.3f; // espera antes de empezar a moverse [SerializeField] float endPause = 0.8f; // pausa al llegar al final [SerializeField] bool loop = true; // si false, se queda al final hasta salir [SerializeField] bool centerWhenFits = true; [SerializeField] bool alsoOnSelect = true; // mando/teclado float offset, timer, lastWidth; int state; // 0 = espera, 1 = moviendo, 2 = pausa final bool hovered, selected; bool Active => hovered || selected; void OnEnable() { hovered = selected = false; lastWidth = -1f; ResetScroll(); } void OnDisable() { hovered = selected = false; } public void OnPointerEnter(PointerEventData e) { hovered = true; } public void OnPointerExit(PointerEventData e) { hovered = false; if (!Active) ResetScroll(); } void ResetScroll() { offset = 0f; timer = 0f; state = 0; SetX(0f); } void SetX(float x) { if (text == null) return; var p = text.anchoredPosition; p.x = x; text.anchoredPosition = p; } void Update() { if (viewport == null || text == null) return; // Selección con mando/teclado (opcional) if (alsoOnSelect) { bool nowSelected = EventSystem.current != null && EventSystem.current.currentSelectedGameObject == gameObject; if (selected && !nowSelected && !hovered) ResetScroll(); selected = nowSelected; } float textW = text.rect.width; float viewW = viewport.rect.width; // Si AC cambió el texto, reinicia if (!Mathf.Approximately(textW, lastWidth)) { lastWidth = textW; ResetScroll(); } float overflow = textW - viewW; if (overflow = startDelay) { state = 1; timer = 0f; } break; case 1: offset += speed * dt; if (offset >= overflow) { offset = overflow; state = 2; timer = 0f; } break; case 2: if (loop) { timer += dt; if (timer >= endPause) ResetScroll(); } break; } SetX(-offset); } }

Once. 

«Automatizar» que un Action solo se ejecute una vez.

Se ejecuta como Variable: Add Once, y básicamente crea el solo las 2 variables que evitarían el loop en vez de hacerlas tu manualmente, una integer que marca la acción como hecha, y una Boolean que evita que la anterior se repita.

Meter en: 

Assets/AdventureCreator/Scripts/Actions

Teleport by Tag. 

Mover objetos en bulk. Solo tienen que tener todos el mismo Tag, justo abajo del nombre en el inspector, este no afecta a nada mas. Util para  multiples objetos que pertenezcan a un puzzle o zona especifica.

Se ejecuta como Object: Teleport object by tag, solo hay que marcar que Tag buscar y un Marker de destino

Meter en: 

Assets/AdventureCreator/Scripts/Actions

Steam Achievements. 

Primero movilizar las carpetas y cosas del github (ver arriba) y haber creado los logros en el Steamworks del juego.

Se ejecuta como Custom: Unlock Steam Achievement, solo hay que escribir el ID del logro, el nombre puesto en Steamworks

Meter en: 

Assets/AdventureCreator/Scripts/Actions

using UnityEngine; using AC; public class HotspotEvent : MonoBehaviour { public Hotspot targetHotspot; public ActionList actionListEnable; public ActionList actionListDisable; private void OnEnable() { EventManager.OnHotspotSelect += OnSelect; EventManager.OnHotspotDeselect += OnDeselect; } private void OnDisable() { EventManager.OnHotspotSelect -= OnSelect; EventManager.OnHotspotDeselect -= OnDeselect; } private void OnSelect(Hotspot hotspot) { if (hotspot != targetHotspot) return; actionListEnable.Interact(); } private void OnDeselect(Hotspot hotspot) { if (hotspot != targetHotspot) return; actionListDisable.Interact(); } }
using System.Collections.Generic; using UnityEngine; using AC; // namespace de Adventure Creator /// /// Cono de visión 2D para NPCs con integración de Adventure Creator. /// Llama a Interact() en una ActionList de AC cuando detecta al jugador. /// public class VisionCone2D : MonoBehaviour { [Header("Parámetros del cono")] [Tooltip("Radio máximo de visión")] public float viewRadius = 8f; [Range(0f, 360f)] [Tooltip("Ángulo total del cono de visión en grados")] public float viewAngle = 90f; [Header("Capas")] [Tooltip("Capa donde está el jugador")] public LayerMask targetMask; [Tooltip("Capa de obstáculos que bloquean la visión")] public LayerMask obstacleMask; [Header("Raycasts")] [Range(4, 60)] public int rayCount = 20; [Header("Adventure Creator")] [Tooltip("ActionList de escena a ejecutar al detectar al jugador (ej. 'Mono')")] public ActionList actionListOnDetect; [Tooltip("Si es true, solo se ejecuta la ActionList una vez hasta que el jugador se pierda de vista")] public bool triggerOnce = true; [Header("Debug")] public bool drawGizmos = true; public Color coneColor = new Color(1f, 0.8f, 0f, 0.2f); public Color rayColor = Color.yellow; public Color detectionColor = Color.green; // ─── Estado interno ──────────────────────────────────────────────────── public List visibleTargets { get; private set; } = new List(); public System.Action OnTargetDetected; public System.Action OnTargetLost; private List previousTargets = new List(); private bool hasTriggered = false; // controla el triggerOnce // ─── Ciclo de Unity ──────────────────────────────────────────────────── private void Update() { FindVisibleTargets(); NotifyTargetChanges(); } // ─── Lógica principal ────────────────────────────────────────────────── private void FindVisibleTargets() { visibleTargets.Clear(); Collider2D[] targetsInRadius = Physics2D.OverlapCircleAll( transform.position, viewRadius, targetMask ); foreach (Collider2D col in targetsInRadius) { Transform target = col.transform; Vector2 dirToTarget = (target.position - transform.position).normalized; float angleToTarget = Vector2.Angle(transform.right, dirToTarget); if (angleToTarget > viewAngle / 2f) continue; float distToTarget = Vector2.Distance(transform.position, target.position); RaycastHit2D hit = Physics2D.Raycast( transform.position, dirToTarget, distToTarget, obstacleMask ); if (!hit) visibleTargets.Add(target); } } private void NotifyTargetChanges() { // Objetivos nuevos detectados este frame foreach (Transform t in visibleTargets) { if (!previousTargets.Contains(t)) { OnTargetDetected?.Invoke(t); TryRunActionList(); } } // Objetivos que se han perdido de vista foreach (Transform t in previousTargets) { if (!visibleTargets.Contains(t)) { OnTargetLost?.Invoke(t); // Resetear para poder disparar de nuevo la próxima vez if (triggerOnce) hasTriggered = false; } } previousTargets.Clear(); previousTargets.AddRange(visibleTargets); } /// /// Llama a Interact() en la ActionList de AC asignada. /// Respeta triggerOnce para no ejecutarla en bucle cada frame. /// private void TryRunActionList() { if (actionListOnDetect == null) { Debug.LogWarning("[VisionCone2D] No hay ActionList asignada en 'Action List On Detect'.", this); return; } if (triggerOnce && hasTriggered) return; actionListOnDetect.Interact(); hasTriggered = true; Debug.Log($"[VisionCone2D] ActionList '{actionListOnDetect.name}' ejecutada.", this); } // ─── API pública ─────────────────────────────────────────────────────── /// /// Convierte un ángulo en grados a dirección en espacio mundo. /// public Vector2 DirectionFromAngle(float angleDegrees, bool isGlobal = false) { if (!isGlobal) angleDegrees += transform.eulerAngles.z; return new Vector2( Mathf.Cos(angleDegrees * Mathf.Deg2Rad), Mathf.Sin(angleDegrees * Mathf.Deg2Rad) ); } public bool IsVisible(Transform target) => visibleTargets.Contains(target); // ─── Gizmos (editor) ────────────────────────────────────────────────── private void OnDrawGizmos() { if (!drawGizmos) return; Vector3 origin = transform.position; float halfAngle = viewAngle / 2f; float npcAngle = transform.eulerAngles.z; int steps = Mathf.Max(rayCount, 10); float stepAngle = viewAngle / steps; Gizmos.color = coneColor; for (int i = 1; i <= steps; i++) { float angle = (npcAngle - halfAngle) + stepAngle * i; Gizmos.DrawLine(origin, origin + (Vector3)DirectionFromAngle(angle, true) * viewRadius); } Gizmos.color = rayColor; Gizmos.DrawLine(origin, origin + (Vector3)DirectionFromAngle(npcAngle + halfAngle, true) * viewRadius); Gizmos.DrawLine(origin, origin + (Vector3)DirectionFromAngle(npcAngle - halfAngle, true) * viewRadius); Gizmos.DrawWireSphere(origin, viewRadius); Gizmos.color = new Color(rayColor.r, rayColor.g, rayColor.b, 0.3f); for (int i = 0; i <= rayCount; i++) { float angle = (npcAngle - halfAngle) + (viewAngle / rayCount) * i; Gizmos.DrawLine(origin, origin + (Vector3)(DirectionFromAngle(angle, true) * viewRadius)); } Gizmos.color = detectionColor; foreach (Transform t in visibleTargets) { Gizmos.DrawLine(origin, t.position); Gizmos.DrawWireSphere(t.position, 0.3f); } } }
using UnityEngine; using System; using Steamworks; #if UNITY_EDITOR using UnityEditor; #endif /* By Alvaro Urrutia Luna (Alverik) * Custom action to * Unlock Steam achievements. */ namespace AC { [System.Serializable] public class ActionUnlockAchievement : Action { public string AchievementID = ""; public override ActionCategory Category { get { return ActionCategory.Custom; }} public override string Title { get { return "Unlock Steam Achievement."; }} public override string Description { get { return "Unlocks an steam Achievement."; }} override public float Run () { if (SteamManager.Initialized) { if (!string.IsNullOrEmpty (AchievementID)) { try { SteamUserStats.SetAchievement(AchievementID); SteamUserStats.StoreStats(); } catch(Exception e) { Debug.LogWarning("Error while setting steam achievements... " + e); } } } return 0f; } #if UNITY_EDITOR override public void ShowGUI () { AchievementID = EditorGUILayout.TextField("Achievement ID: ", AchievementID , GUILayout.ExpandWidth(true)); } #endif } }