private MultiTargetAbstractBehaviour CreateMultiTargetBehaviour(MultiTarget multiTarget) { GameObject gameObject = new GameObject(); MultiTargetAbstractBehaviour multiTargetAbstractBehaviour = BehaviourComponentFactory.Instance.AddMultiTargetBehaviour(gameObject); Debug.Log(string.Concat(new object[] { "Creating Multi Target with values: \n ID: ", multiTarget.ID, "\n Name: ", multiTarget.Name, "\n Path: ", ((MultiTargetImpl)multiTarget).DataSet.Path })); multiTargetAbstractBehaviour.InitializeTarget(multiTarget, true); return(multiTargetAbstractBehaviour); }
private void CreateMissingDataSetTrackableBehaviours(DataSet dataSet) { foreach (Trackable current in dataSet.GetTrackables()) { if (!this.mTrackableBehaviours.ContainsKey(current.ID)) { if (current is ImageTarget) { ImageTargetAbstractBehaviour imageTargetAbstractBehaviour = this.CreateImageTargetBehaviour((ImageTarget)current); imageTargetAbstractBehaviour.CreateMissingVirtualButtonBehaviours(); this.mTrackableBehaviours[current.ID] = imageTargetAbstractBehaviour; this.mAutomaticallyCreatedBehaviours.Add(current.ID); } else if (current is MultiTarget) { MultiTargetAbstractBehaviour value = this.CreateMultiTargetBehaviour((MultiTarget)current); this.mTrackableBehaviours[current.ID] = value; this.mAutomaticallyCreatedBehaviours.Add(current.ID); } else if (current is CylinderTarget) { CylinderTargetAbstractBehaviour value2 = this.CreateCylinderTargetBehaviour((CylinderTarget)current); this.mTrackableBehaviours[current.ID] = value2; this.mAutomaticallyCreatedBehaviours.Add(current.ID); } else if (current is VuMarkTemplate) { if (!this.mVuMarkManager.ContainsVuMarkTemplate(current.ID)) { VuMarkAbstractBehaviour behaviour = this.CreateVuMarkBehaviour((VuMarkTemplate)current); this.mVuMarkManager.AddTemplateBehaviour(behaviour); } } else if (current is ObjectTarget) { DataSetTrackableBehaviour value3 = this.CreateObjectTargetBehaviour((ObjectTarget)current); this.mTrackableBehaviours[current.ID] = value3; this.mAutomaticallyCreatedBehaviours.Add(current.ID); } } } }