for (let i = 0; i < this.hotspots.length; i++)
{
if(i != currHotspot)
{
this.hotspots[i].getComponent(Hotspot).animCtrl.SetTrigger("Close");
}
}
by user 103054507105067008
for (let i = 0; i < this.hotspots.length; i++)
{
if(i != currHotspot)
{
this.hotspots[i].getComponent(Hotspot).animCtrl.SetTrigger("Close");
}
}
by user 103054507105067008
A hotspot entry is a component?
Rewrote as
let animT = this.hotspots[i].getComponent(Hotspot);
animT.animCtrl.SetTrigger("Close");
Still not playing ball
by user 103054507105067008
Hotspot is a script import { Hotspot } from "./Hotspot";
by user 103054507105067008
Yep
by user 103054507105067008
Then [i].gameObject.getComponent
ah actually my array got cleared out, the other issue about an array of components before this is the main issue
by user 103054507105067008