Jump to content
Aveyond Studios Community

Change Enum & If Enum actions

Recommended Posts

This comes with two actions:

  • Change Enum
  • If Enum

These are just templates. If you want to use them, you will need to customize them for your enums. To install:

  1. Download file attached below. (Enum Actions.unitypackage)
  2. Open Unity.
  3. Click Assets > Import Package > Custom Package > and select Enum Actions.unitypackage.

To modify the Change Enum action:

  1. Rename Change Enum (action), ChangeEnum.cs, and ChangeEnumFields.cs. The new name should reflect the name of your enum.
    • Change Coin Face Enum 
    • ChangeCoinFaceEnum.cs
    • ChangeCoinFaceEnumFields.cs
  2. Open ChangeCoinFaceEnum.cs and:
    • Replace all instances of ChangeEnum with ChangeCoinFaceEnum. (3)
  3. Open ChangeCoinFaceEnumFields.cs and:
    • Replace all instances of ChangeEnumFields with ChangeCoinFaceEnumFields. (1)
    • On line 31, replace the sample enum values with your own.
  4. Open Change Coin Face Enum in HeroKit Editor.
    • Drag ChangeCoinFaceEnum.cs into the Action (this is used for gameplay) field.
    • Drag ChangeCoinFaceEnumFields.cs into the Action (this is used to create editor fields for the action) field.

Repeat these steps for If Enum.

If you run into problems, let me know.

Enum Actions.unitypackage

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now