This code used to work in older versions of Needle for Unity, I had a videoplayer on a mesh set to material override, in a script on the gameobject I used this code to grab the .map of the material on the object and assign it to the alpha slot of the material but this.mainMaterial.map
is now null in newer Needle versions and the video still plays on the gameobject, Iāve tried looking at the slots on this.mainMaterial but there is nothing there to grab as a map anymore, does the video texture get assigned somewhere else now?
awake() {
this.meshTarget = this.gameObject as unknown as Mesh;
this.mainMaterial = this.meshTarget.material as MeshStandardMaterial;
this.mainMaterial.alphaMap = this.mainMaterial.map;
this.mainMaterial.map = null;
}
by user 103054507105067008