Coder Social home page Coder Social logo

avatarchik / unity3d-rectmask2dculling Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mitay-walle/unity3d-rectmask2dculling

1.0 1.0 0.0 153 KB

Custom RectMask2D, that allow to disable Culling / Softness for better performance

License: MIT License

C# 100.00%

unity3d-rectmask2dculling's Introduction

RectMask2DCulling

Unity3d | uGUI custom RectMask2D script, that allow to disable Culling / Softness for better performance

Problem

Built-in RectMask2D has overhead, that grow linearly with count of active Child UI.Graphic, main reason for this - Culling. When all this UI.Graphic is always visible (Pooled ScrollRectList or Optimized ScrollView Adapter used, for example) - Culling is useless

And you can't disable it

Solution

Inherite from RectMask2D and add flags to disable Culling

Performance

  • Profiled at Honor 10X Lite

  • 50 child TextMeshPro

  • 400 child other various UI.Graphic (UI.Image, UI.RawImage, UI.Text)

  • RectMask2D

  • RectMask2DCulling , Culling and Softness disabled

  • RectMask2DCulling use reflection to get private properties of parent RectMask2D class, and it add performance overhead

unity3d-rectmask2dculling's People

Contributors

mitay-walle avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.