0
Answered

Hide public method/properties

PereKastor 7 months ago updated by Lazlo Bonin (Lead Developer) 6 months ago 1

Hello! 

I asked this question on discord without receiving answers so i try here :)

I want to know if it's possible to hide some public methods or properties from bolt graph.

public class BaseCharacter : MonoBehaviour
{
    public Vector3 DesiredDirection { get; set; } = Vector3.zero;
    //...
}

If I take this code, for example, in the graph I can see this :



I want this property to be public to have access through code, but I don't want to give access within the graph :/ Is it possible to hide it with an attribute for example ? Try to ignore it from the Bolt generation.

Thanks
Bolt Version:
1.4.3
Unity Version:
2019.1.4
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Answered

Hi PereKastor!

Unfortunately, there is no way of doing that in Bolt 1. All classes derived from MonoBehaviour are included by default. In Bolt 2, this setting will be configurable and you'll even be able to blacklist specific types in the new Extractor window. Sorry for the inconvenience in the mean time!