Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| wiki:how_to_create_new_buildings [2022/07/25 12:12] – admin | wiki:how_to_create_new_buildings [2022/07/27 16:48] (current) – admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | --- // | ||
| ====== 1 - Pick Building GameObject ====== | ====== 1 - Pick Building GameObject ====== | ||
| {{: | {{: | ||
| You can use any game object, import it from OBJ, FBX or create it your own! I suggest your create it using UModeler!. | You can use any game object, import it from OBJ, FBX or create it your own! I suggest your create it using UModeler!. | ||
| + | |||
| + | ====== 2 - Pick ScriptableObject ====== | ||
| + | :!: This scriptable object is used for determine the information | ||
| + | |||
| + | Go to Folder < | ||
| + | Pick scriptable object | ||
| + | |||
| + | :!: Create your own scriptableObject if it's not exist | ||
| + | < | ||
| + | '' | ||
| + | Drag new created ScriptableObject into SearchSystemController (Canvas > Building_List) List | ||
| + | </ | ||
| + | |||
| + | Now you can fill up Scriptable Object Information! | ||
| + | :!: Make sure to fill up x and y axis base on your building center pivot point. | ||
| + | |||
| + | |||
| + | <code csharp | Side Info!Bangunan Class Script> public class Bangunan : ScriptableObject | ||
| + | { | ||
| + | [BoxGroup(" | ||
| + | public string namaBangunan; | ||
| + | [BoxGroup(" | ||
| + | [TextArea] | ||
| + | public string namaPenuhBangunan; | ||
| + | [BoxGroup(" | ||
| + | [TextArea(15, | ||
| + | public string maklumatPertama; | ||
| + | [BoxGroup(" | ||
| + | [TextArea(15, | ||
| + | public string maklumatKedua; | ||
| + | |||
| + | public float xLocation; | ||
| + | public float zLocation; | ||
| + | } | ||
| + | </ | ||
| + | ====== 3 - Apply building interact script ====== | ||
| + | Drag BuildingInteract Scrip into your BUILDING gameObject | ||
| + | * Setup Input Field ( For Search ) | ||
| + | * Setup Holo Material | ||
| + | * Select Senarai Bangunan Enum | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | <code csharp | ||
| + | public enum SenaraiBangunan | ||
| + | { | ||
| + | _1_pusat_islam = 0, | ||
| + | _2_anjung_premier = 1, | ||
| + | _3_cisec = 2, | ||
| + | _4_dewan_jka = 3, | ||
| + | _5_hep = 4, | ||
| + | _6_JKM_D_JKA = 5, | ||
| + | _7_PEJABAT_PENTADBIRAN = 6, | ||
| + | _8_JMSK = 7, | ||
| + | _9_DEWAN_WARISAN = 8, | ||
| + | _10_STUDENT_CENTRE = 9, | ||
| + | _11_GALERI_PUO = 10, | ||
| + | _12_FUTSAL_CAMPUS_A = 11, | ||
| + | _13_BENGKEL_MEKANIKAL = 12, | ||
| + | _14_BENGKEL_AWAM = 13, | ||
| + | _15_PERPUSTAKAAN = 14, | ||
| + | _16_DEWAN_JUBLI = 15, | ||
| + | _17_JMSK_D_JKM = 16, | ||
| + | _18_BENGKKEL_AKM = 17, | ||
| + | _19_JKP = 18, | ||
| + | _20_CAFE_JKE = 19, | ||
| + | _21_JTMK = 20, | ||
| + | _22_JKE = 21 | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ====== 3 - Set Building GameObject Layer = Building ====== | ||
| + | {{ : | ||
| + | |||
| + | ====== 4 - Good To Go! ====== | ||
| + | {{ : | ||
| + | |||