Ejemplo n.º 1
0
 protected virtual void OnEnable()
 {
     _layoutSwap     = (LayoutSwap)target;
     _transitionType = serializedObject.FindProperty("_transitionType");
     _swapTime       = serializedObject.FindProperty("_swapTime");
     _curItemIdx     = serializedObject.FindProperty("_curItemIdx");
     _rectChildren   = serializedObject.FindProperty("_rectChildren");
 }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        if (LayoutSwap == null)
        {
            LayoutSwap = GetComponentInChildren <LayoutSwap>();
        }
        if (LayoutKenBurns == null)
        {
            LayoutKenBurns = GetComponentInChildren <LayoutKenBurns>();
        }
        if (LayoutAssetFlow == null)
        {
            LayoutAssetFlow = GameObject.FindObjectOfType <LayoutAssetFlow>();
        }
        if (LayoutAssetFlow != null)
        {
            if (LayoutAssetFlow.AssetFlowType == AssetFlowEnum.Loop)
            {
                AsseFlowSlider.minValue = 0;
                AsseFlowSlider.maxValue = 1;
            }
            else if (LayoutAssetFlow.AssetFlowType == AssetFlowEnum.Clamp)
            {
                AsseFlowSlider.minValue = -1;
                AsseFlowSlider.maxValue = 1;
            }
        }

        if (LayoutHelix == null)
        {
            LayoutHelix = FindObjectOfType <LayoutHelix>();
        }
        if (LayoutCarousel == null)
        {
            LayoutCarousel = FindObjectOfType <LayoutCarousel>();
        }
    }