Lens Scripting API
    Preparing search index...

    Class MaterialPropertyOverrides

    Overrides a material's property. Used with MaterialMeshVisual.

    // Gets the first pass of a material on a sprite and plays the animation from its texture
    var sprite = script.getSceneObject().getFirstComponent("Component.SpriteVisual");
    var material = sprite.getMaterial(0);
    material.getPass(0).baseTex.control.play(-1,0.0);

    // Print number of passes
    print("Pass count = " + material.getPassCount().toString());

    Hierarchy (View Summary)

    Index

    Methods

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean