Beispiel #1
0
    private void ValidateAnimation(ChromaSDKBaseAnimation animation)
    {
        List <EffectResponseId> effects = animation.GetEffects();

        if (effects == null || effects.Count == 0)
        {
            Debug.LogError("Animation failed to create effects!");
        }
        else
        {
            for (int i = 0; i < effects.Count; i++)
            {
                EffectResponseId effectResponseId = effects[i];
                if (effectResponseId == null || effectResponseId.Result != 0)
                {
                    Debug.LogError("Failed to create effect!");
                }
            }
        }
    }
Beispiel #2
0
    /// <summary>
    /// Verify the animation loaded,
    /// failure indicates the device was not connected
    /// </summary>
    /// <param name="animation"></param>
    void ValidateAnimation(ChromaSDKBaseAnimation animation)
    {
        // validate animation loaded
        List <EffectResponseId> effects = animation.GetEffects();

        if (null == effects ||
            effects.Count == 0)
        {
            Debug.LogError("Animation failed to create effects!");
        }
        else
        {
            for (int i = 0; i < effects.Count; ++i)
            {
                EffectResponseId effect = effects[i];
                if (null == effect ||
                    effect.Result != 0)
                {
                    Debug.LogError("Failed to create effect!");
                }
            }
        }
    }