Skip to content

Commit

Permalink
Added support for game object in active set component.
Browse files Browse the repository at this point in the history
  • Loading branch information
neogeek committed Dec 22, 2018
1 parent e1cdb0a commit f4555dc
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 25 deletions.

This file was deleted.

@@ -0,0 +1,36 @@
using UnityEngine;

namespace CandyCoded.ARFoundationComponents
{

public class SetEnabledStateOfObjectsOnEvent : MonoBehaviour
{

public Object[] objects;

public void SetEnabledStateOfObjects(bool enabledState)
{

foreach (var obj in objects)
{

if (obj is MonoBehaviour)
{

((MonoBehaviour)obj).enabled = enabledState;

}
else if (obj is GameObject)
{

((GameObject)obj).SetActive(enabledState);

}

}

}

}

}

0 comments on commit f4555dc

Please sign in to comment.