Ejemplo n.º 1
0
    private bool CheckValidLayers()
    {
        if (m_Layers == null)
        {
            enabled = false;
            return(false);
        }

        for (int index = 0; index < m_Layers.Length; ++index)
        {
            LayerInfo layer = m_Layers[index];
            if (layer.m_ObjectToRender != null)
            {
                if (!layer.AcquireParallaxObject())
                {
                    DebugUtil.LogError("GameObjects of ParallaxScene must have ParallaxObject script as components!");
                    enabled = false;
                    return(false);
                }
            }
        }

        return(true);
    }