How do I create BillboardAssets ?

So there is that BillboarRenderer I could be interested in using, but it requires BillboardAssets, and even going through the manual, I don’t find it all clear on how to make one.
Unable to find a tool to make said BillboardAssets, I tried making a monobehaviour that would let me programatically set the renderer’s asset, and tried to tweak the different available properties… to no avail. The code doesn’t seem to throw any error, but the game object remains desperately invisible with any configuration.
What I feel I am missing are means to properly set the texture atlas and the mesh.

This is the component I’ve been using to trying setting the renderer’s BillboardAsset :

using UnityEngine;
using UnityEditor;

[CustomEditor(typeof(BillboardBuilder))]
public class BillboardBuilderEditor : Editor {
    public override void OnInspectorGUI(){
        if (GUILayout.Button ("Update Now"))
            ((BillboardBuilder)target).Build ();
        DrawDefaultInspector ();
    }
}
   
public class BillboardBuilder : MonoBehaviour {
    public Material _material;
    public float _Bottom, _height, _width;
    public Vector4[] _ImageCoordinates;
    public Vector2[] _vertices;
    public ushort[] _ushorts;

    public void Build (){
        var renderer = this.GetComponent<BillboardRenderer> ();
        var bill = new BillboardAsset ();

        bill.bottom = _Bottom;
        bill.height = _height;
        bill.width = _width;
        bill.material = _material;
        bill.SetImageTexCoords (_ImageCoordinates);
        bill.SetVertices (_vertices);
        bill.SetIndices (_ushorts);

        renderer.billboard = bill;
        Debug.Log ("Done");
    }
}
1 Like

Hey guys, any progress on this?
Seems like no one until now can handle with this! :face_with_spiral_eyes:

same here, seems like they expect us to only use speedtree. this sucks

up+4294967295

I’d like to take a moment to thank the doc people who phone-it-in and make our daily use, grimy.
This should be a handled subject with various details… yet it’s half arsed and left to us banging our heads against the keyboard to solve what the docs are supposed to relay.

Never have I ever seen a documentation staff member at any company anywhere…point to a 3rd party tool that covers 15% of the use case scenarios and then feel that they did their job well.

1 Like

this is frustrating, i cant believe no one has an answer

2 Likes