示例#1
0
    //    private SerializedProperty _zPos;
    //    private SerializedProperty _spacing;

    protected virtual void OnEnable()
    {
        if (target != null)
        {
            _layoutAssetFlow = (LayoutAssetFlow)target;
        }
        _assetFlowEnum   = serializedObject.FindProperty("_assetFlowEnum");
        _posCurveFactorX = serializedObject.FindProperty("_posCurveFactorX");
        _posCurveFactorZ = serializedObject.FindProperty("_posCurveFactorZ");
        _yPos            = serializedObject.FindProperty("_yPos");
        _uiDepth         = serializedObject.FindProperty("_uiDepth");
        _autoPlay        = serializedObject.FindProperty("_autoPlay");
        _startValue      = serializedObject.FindProperty("_startValue");
        _endValue        = serializedObject.FindProperty("_endValue");
        _duration        = serializedObject.FindProperty("_duration");
        _alphaCurve      = serializedObject.FindProperty("_alphaCurve");
//        _spacing = serializedObject.FindProperty("_spacing");
    }
示例#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>();
        }
    }