SimplePath Pathfinding Sistemi için internette pek kaynak yok malesef bildiğim bazı özelliklerini paylaşıcam blog sayfasından.
Bütün class’larının olduğu sayfa
http://www.alexkring.com/SimplePath/Doxygen/html/index.html
Grid Sisteminin temel yapısı gösterdiğim şekilde
İlk Örnek olarak bir grid üzerine üstte gördüğünüz grid numaralarını bularak object instantiate etmeyi yapıcaz C# kullanacağız. using UnityEngine; using System.Collections; public class gridObje : MonoBehaviour { public PathGridComponent m_pathGridComponent; // Get Grid Component public Vector3 spawnPos; public int gridNum=5; // Grid Number public GameObject wall; //Instantiate wall object to grid void Start () { } void Update () { if (Input.GetKeyDown(KeyCode.Mouse1)){ spawnPos=m_pathGridComponent.PathGrid.GetCellCenter(gridNum); // Get Grid Number and selection grid x y z position. GameObject.Instantiate(wall,spawnPos,Quaternion.identity); // Instantiate object spawnPos position } } }