Bolt can automatically call methods, fields and properties from any custom script in your project. For example, you can create a node from a custom Player class with a TakeDamage method: 

using UnityEngine;
public class Player : MonoBehaviour
{
    public void TakeDamage(int damage)
    {
        // ...
    }
}

In a flow graph, it would look like:


However, there is a problem if you change your script and rename or remove the TakeDamage method or the Player class. For example:

using UnityEngine;
public class Player : MonoBehaviour
{
    public void InflictDamage(int damage)
    {
        // ...
    }
}

Bolt will no longer be able to find the matching method in your code and will display an error node like this instead:


If you reinstate the TakeDamage method and the Player type, the node will come back to normal. Unfortunately, the connections and inline values for this node will have been lost.

Since there is not yet any Bolt refactoring tool provided, you should take special care when designing your class and member names, because renaming them at a later time will likely break every graph in which they were used.

This article was helpful for 5 people. Is this article helpful for you?