I'm trying to implement a custom action and call it in a cutscene.
The action: "ActionInventoryTest.cs"
I placed it in the folder /scripts/actions
I added this line: title = "Inventory: Test";
So I tried to add this action to a cutscene, just to test but nothing appear (I refreshed and I quit and re-open unity just to be sure).
I tried also to select "Custom" from action types, but it raises a warning:
"No Actions found in selected category"
I'm a beginner, so I could be doing a very simple mistake.
What am I doing wrong?
Thank you very much... and sorry if I'm asking too many questions, but I'm trying to learn.
The entire action code is here:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using AC;
using UnityEditor;
[System.Serializable]
public class ActionInventoryTest : Action
{
// Declare variables here
public bool testValue = false;
public ActionInventoryTest ()
{
this.isDisplayed = true;
title = "Inventory: Test";
}
override public float Run ()
{
Debug.Log ("This is a test");
if (!isRunning)
{
isRunning = true;
return defaultPauseTime;
}
else
{
isRunning = false;
return 0f;
}
}
override public void ShowGUI ()
{
// Action-specific Inspector GUI code here
AfterRunningOption ();
}
public override string SetLabel ()
{
// Return a string used to describe the specific action's job.
string labelAdd = "";
return labelAdd;
}
}
Comments