In kind of user-defined target sample i'd want to show just some 3d objects which are childs of UserDefinedTarget prefab by clicking some button. For example,suppose I have 3 objects childs of UserDefinedTarget prefab and 3 button on the screen. To do these i'd wand to send indexes to DefaultTrackableEventHandler. Suppose the first child are made of objects that have indexes from 0 to 17. In the OnTrackingFound method i will need to render in this way:
[code]
beginIndex = 0;
endIndex = 18;
for(int i = beginIndex; i < endIndex; i++)
{
rendererComponents[i].enabled =true;
}
[/code]
So i'dd want to send this indexes from UserDefinedTargetEventHandler.cs after detecting which button has been clicked in ScanModeUILogic. How can i do this?
Or maybe i'm doing it in a bad place?
There are a few ways to do
There are a few ways to do this. You can set a public variable on the UDT Event Handler using GetComponent as such..
using UnityEngine;
using System.Collections;