Compare commits

..
3 Commits
Author SHA1 Message Date
david f53b8fa854 refactor: cleaned object instantiation 2026-08-23 14:25:45 +02:00
david 3c623afb79 feat: reveries window #4 2026-08-23 14:11:46 +02:00
david e4205b59bd feat: prefab asset 2026-08-23 14:10:24 +02:00
2 changed files with 19 additions and 9 deletions
+14 -4
View File
@@ -18,7 +18,7 @@ namespace IngameReveries
private void Awake()
{
// Metadata of your mod is stored in this.about
Debug.Log("Hola! I'm loaded! " + mod.metadata.id);
Debug.Log("Xin Chao! I'm loaded! " + mod.metadata.id);
// If you need to patch with Harmony, you can use this.harmony to access the Harmony instance for your mod.
// It will be created with your mod's id automatically, the first time you access the property.
@@ -51,9 +51,18 @@ namespace IngameReveries
return;
}
_ingameReveriesUI = new GameObject("IngameReveriesUI");
_ingameReveriesUI.transform.parent = menuViewGO.transform;
Instantiate(DewGUI.widgetWindow, _ingameReveriesUI.transform);
_ingameReveriesUI = Instantiate(_reveriesPrefab, menuViewGO.transform);
_ingameReveriesUI.SetActive(true);
_ingameReveriesUI.name = "IngameReveriesUI";
_ingameReveriesUI.transform.SetAsFirstSibling();
var reveries = _ingameReveriesUI.GetComponent<UI_Reveries>();
var rect = _ingameReveriesUI.GetComponent<RectTransform>();
rect.anchorMin = new Vector2(0f, 1f);
rect.anchorMax = new Vector2(0f, 1f);
rect.pivot = new Vector2(0f, 1f);
rect.anchoredPosition = new Vector2(+70f, -70f);
}
};
}
@@ -110,6 +119,7 @@ namespace IngameReveries
{
Debug.Log($" - {name}");
}
return;
}
Binary file not shown.