Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Animating rod rest position
#32
(11-06-2021, 04:18 PM)Hakazaba Wrote: Sorry, new problem. The event rod.Onblueprintloaded is never being triggered

It is for me, tested using this script:

Code:
using UnityEngine;
using Obi;

[RequireComponent(typeof(ObiRod))]
public class OnBlueprint : MonoBehaviour
{
    void Awake()
    {
        GetComponent<ObiRod>().OnBlueprintLoaded += OnBlueprint_OnBlueprintLoaded;
    }

    private void OnBlueprint_OnBlueprintLoaded(ObiActor actor, ObiActorBlueprint blueprint)
    {
        Debug.Log("Loaded!");
    }
}

Make sure you subscribe to it in Awake(). Blueprints are initially loaded in OnEnable(): if you subscribe to the event later, the blueprint will be already loaded (and hence, the event will not be triggered until the blueprint is re-loaded).
Reply


Messages In This Thread
Animating rod rest position - by Hakazaba - 02-05-2021, 02:47 PM
RE: Animating rod rest position - by josemendez - 03-05-2021, 11:05 AM
RE: Animating rod rest position - by Hakazaba - 04-05-2021, 06:12 AM
RE: Animating rod rest position - by josemendez - 04-05-2021, 08:12 AM
RE: Animating rod rest position - by Hakazaba - 04-05-2021, 12:55 PM
RE: Animating rod rest position - by Hakazaba - 05-05-2021, 12:53 AM
RE: Animating rod rest position - by josemendez - 05-05-2021, 09:08 AM
RE: Animating rod rest position - by Hakazaba - 05-05-2021, 06:28 AM
RE: Animating rod rest position - by josemendez - 05-05-2021, 08:10 AM
RE: Animating rod rest position - by Hakazaba - 05-05-2021, 11:54 AM
RE: Animating rod rest position - by josemendez - 05-05-2021, 02:06 PM
RE: Animating rod rest position - by Hakazaba - 05-05-2021, 04:01 PM
RE: Animating rod rest position - by josemendez - 05-05-2021, 05:18 PM
RE: Animating rod rest position - by Hakazaba - 06-05-2021, 04:53 AM
RE: Animating rod rest position - by josemendez - 06-05-2021, 07:38 AM
RE: Animating rod rest position - by Hakazaba - 06-05-2021, 09:12 AM
RE: Animating rod rest position - by josemendez - 06-05-2021, 09:46 AM
RE: Animating rod rest position - by Hakazaba - 06-05-2021, 02:55 PM
RE: Animating rod rest position - by Hakazaba - 08-05-2021, 01:04 AM
RE: Animating rod rest position - by josemendez - 10-05-2021, 09:11 AM
RE: Animating rod rest position - by Hakazaba - 23-05-2021, 04:27 AM
RE: Animating rod rest position - by josemendez - 24-05-2021, 07:37 AM
RE: Animating rod rest position - by Hakazaba - 31-05-2021, 06:53 AM
RE: Animating rod rest position - by josemendez - 31-05-2021, 07:45 AM
RE: Animating rod rest position - by Hakazaba - 01-06-2021, 03:30 AM
RE: Animating rod rest position - by josemendez - 01-06-2021, 07:50 AM
RE: Animating rod rest position - by Hakazaba - 02-06-2021, 05:55 AM
RE: Animating rod rest position - by josemendez - 02-06-2021, 08:00 AM
RE: Animating rod rest position - by Hakazaba - 10-06-2021, 11:38 AM
RE: Animating rod rest position - by josemendez - 10-06-2021, 11:46 AM
RE: Animating rod rest position - by Hakazaba - 11-06-2021, 04:18 PM
RE: Animating rod rest position - by josemendez - 11-06-2021, 04:35 PM
RE: Animating rod rest position - by Hakazaba - 11-06-2021, 06:54 PM
RE: Animating rod rest position - by josemendez - 14-06-2021, 02:15 PM
RE: Animating rod rest position - by Hakazaba - 16-06-2021, 03:33 PM
RE: Animating rod rest position - by josemendez - 16-06-2021, 04:54 PM
RE: Animating rod rest position - by Hakazaba - 16-06-2021, 11:43 PM
RE: Animating rod rest position - by josemendez - 17-06-2021, 08:14 AM
RE: Animating rod rest position - by Hakazaba - 17-06-2021, 02:08 PM
RE: Animating rod rest position - by Hakazaba - 19-06-2021, 03:30 AM
RE: Animating rod rest position - by josemendez - 20-06-2021, 06:24 PM
RE: Animating rod rest position - by Hakazaba - 21-06-2021, 12:00 AM