using UnityEngine;
using ORKFramework;
using ORKFramework.Behaviours;
public class AssignStatus : MonoBehaviour
{
public void InitSPECIALS()
{
Combatant playerCombatant = ComponentHelper.GetCombatant(GameObject.FindGameObjectWithTag("Player"));
for (int i = 0; i < SPECIALS.specialValues.Length; i++)
{
playerCombatant.Status[i].InitValue(SPECIALS.specialValues[i]);
}
Debug.Log("Called!");
}
}
Parent of RectTransform is being set with parent property. Consider using the SetParent method instead, with the worldPositionStays argument set to false. This will retain local orientation and scale rather than world orientation and scale, which can prevent common UI scaling issues.
UnityEngine.Transform:set_parent(Transform)
ORKFramework.Behaviours.EventInteraction:DontDestroy()
ORKFramework.Events.BaseEvent:DontDestroy()
ORKFramework.Events.GameEvent:ChangeScene(SceneChanger, Int32)
ORKFramework.Events.Steps.LoadSceneStep:Execute(BaseEvent)
ORKFramework.Events.GameEvent:ExecuteNextStep()
ORKFramework.Events.BaseEvent:StartEvent()
ORKFramework.Events.GameEvent:StartEvent(IEventStarter, Object)
ORKFramework.Behaviours.d__29:MoveNext()
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
ORKFramework.Behaviours.EventInteraction:StartEvent(GameObject)
ORKFramework.Behaviours.BaseInteraction:UIStart(GameObject)
ORKFramework.Behaviours.BaseInteraction:UIStart()
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
ORKFramework.Behaviours.ORKInputModule:ProcessMousePress(MouseButtonEventData)
ORKFramework.Behaviours.ORKInputModule:ProcessMouseEvent(Int32)
ORKFramework.Behaviours.ORKInputModule:ProcessMouseEvent()
ORKFramework.Behaviours.ORKInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()
It looks like you're new here. If you want to get involved, click one of these buttons!
If the function you call doesn't need any settings on the component itself, you can just make it a static function and call that :)
You can ignore the warning for now. Your use case (calling a game event on a new UI game object) wasn't even there when this was written - will update it in the next update, but it doesn't do any harm.
Status values of combatants in your player group are naturally preserved between scenes. Wouldn't make much of a game if they wheren't :)
Other combatants (e.g. enemies spawned in the field) will only be stored when you set them to be in their combatant spawners.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!