Cool 3d scoll view for Unity(NGUI 3D UGUI support)
Cool 3d scoll view for Unity(NGUI 3D UGUI support)
Cool "3d" scoll view for Unity3D 4.x and 5.x version NGUI and UGUI support
Using Unity3d's AnimationCurve to finish this EnhancedScrollView.AnimationCurve is very powerful and useful tools in developing game,the player's jumping, camera's path and so on.
Easy to make your own Enhance Item
Easy way to make better Curve: Copy EnhancedScrollView Component in example and paste it to your own TargetScrollView
/// /// NGUI Enhance item example /// public class MyNGUIEnhanceItem : EnhanceItem { private UITexture mTexture; ...... // Set the item "depth" 2d or 3d protected override void SetItemDepth(float depthCurveValue, int depthFactor, float itemCount) { if (mTexture.depth != (int)Mathf.Abs(depthCurveValue * depthFactor)) mTexture.depth = (int)Mathf.Abs(depthCurveValue * depthFactor); }
// Item is centered
public override void SetSelectState(bool isCenter)
{
if (mTexture == null)
mTexture = this.GetComponent();
if (mTexture != null)
mTexture.color = isCenter ? Color.white : Color.gray;
}
......
}
/// /// UGUI Enhance item example /// public class MyUGUIEnhanceItem : EnhanceItem { private Button uButton; private RawImage rawImage; ...... private void OnClickUGUIButton() { OnClickEnhanceItem(); }
// Set the item "depth" 2d or 3d
protected override void SetItemDepth(float depthCurveValue, int depthFactor, float itemCount)
{
curDepth = (int)(depthCurveValue * itemCount);
this.transform.SetSiblingIndex(curDepth);
}
public override void SetSelectState(bool isCenter)
{
if (rawImage == null)
rawImage = GetComponent();
rawImage.color = isCenter ? Color.white : Color.gray;
}
......
}
If you have some cool ideas or bugs just share with us or open issues
MIT
No open issues yet, or sync has not completed.