Hello everyone,
I am using some methods from the UnityEditor.ProBuilder-Assembly in my code, namely
Optimize and RebuildColliders because I am doing some mesh-manipulation on runtime:
using UnityEditor.ProBuilder;
...
public void Awake()
{
pb = GetComponent<ProBuilderMesh>();
}
and later on:
protected void FinishMesh()
{
pb.ToMesh();
pb.Refresh();
pb.Optimize();
pb.RebuildColliders();
Collider collider = GetComponent<Collider>();
collider.enabled = false;
collider.enabled = true;
}
This works when I am in editor-mode, so the game compiles and I can start it.
But if I try to build the game, it fails with the following error:
error CS0234: The type or namespace name ‘ProBuilder’ does not exist in the namespace ‘UnityEditor’ (are you missing an assembly reference?)
Is there any hint you can give to build it successfully?
Thank you very much
Ricky