Ok. Here's small update: http://www.jostavo.net/NShader.rar (it's a new fork for 2013 by SilentSouls that uses embedded coloring, the one Nims mentioned before)
I've added support of .shader, .compute, .cginc (sorry just handling not native support, see attach)
*optional* - in VisualStudio go Tools > Extensions and Updates find NShader and uninstall it, reboot studio (it need to be restarted to remove files) Make sure Visual Studio is closed
Who afraid to download my file, install one from jostavo.net and then create and add .reg: For future updates: {af99cc5c-2a8a-3547-b255-896525bc39d1} - is UUID for current build only!
To find one You needed - open NShader.pkgdef and look for: Or after install go There will be yours.
"Infinite Scrolling" for Unity3D Using NGUI's UIScrollView (1st attempt)
For latest update please check this post instead I've been using NGUI for UI related work on my Unity project for the past few weeks and it is a breath of fresh air when compared to the stock UnityGUI (OnGUI()).
Part of my project relate to display a relatively large amount of data dynamically (well not very large but in thousands) and instantiating a prefab for each data element didn't seem like a good idea to me :-)
So instead I decided to add some logic to do a scroll view with fixed pool of items that I reuse and position according to the direction of the scroll and get it fed with the correct data.
Although I am sure that there are existing solutions I decided to do my own.
The logic so far is built using UIGrid with fixed cell height for the moment (not well suited for UITable with different cell height) and the panel is using soft clip. the Scroll view is using momentum only (Spring physics breaks my current logic for some reason)
Initialization steps:
Pool size is calculated using the cell height against the panel height plus some buffer (currently I am using a buffer of 4 list items)
List items' pool is instantiated with corresponding data from the data list
A map is maintained to keep track of which data item are used in which list items
While Scrolling:
Any item that turns a visible from an invisible state will notify the main controller
We check the direction of the scroll based on which item is visible (e.g. if the next item is visible means that we are dragging upwards)
based on the direction we reuse the items at the top or the bottom of the list accordingly (e.g. if direction is up the top item moves to the bottom and get populated with data from the corresponding data element)
This is a first attempt and further posts will follow as the logic evolve. ==UPDATE== I am in the process of making this component available as open source. Meanwhile we've launched a free app on Android that uses it called Avatar Messenger ==UPDATE 2== The component is available as open source https://github.com/OrangeLabsUK/InfiniteList_NGUI
By now I need a timeScale Lerp and this need to be Time.deltaTime independent so, for anyone who needs this too, here’s what I’ve got (C#). You can also use it to create slow motion effects and control the play /pause of your game (assuming that you are using a Time.timeScale dependent approach):