Unity 高亮设置

 highlighter = gameObject.AddComponent<Highlighter>();

        //highlighter.ConstantOn(Color.red, 3f);//红色高亮 3秒到最亮
        highlighter.tweenDuration = 1;
        highlighter.tweenRepeatCount = -1; //闪烁次数
        highlighter.tween = true;
        highlighter.tweenGradient.SetKeys(new GradientColorKey[] {
                new GradientColorKey { color=new Color(0,0.6581135f,0.9264706f),time=0.5f},
                new GradientColorKey { color=new Color(0.5724139f,0,1),time=1f}},
            new GradientAlphaKey[] {new GradientAlphaKey{alpha=255},
                new GradientAlphaKey{alpha=255,time=1.5f}
        });

 

posted on 2024-03-11 17:59  zqiang0803  阅读(56)  评论(0编辑  收藏  举报

导航