Tuesday, October 08, 2019

Notes on Hierarchy Window. GUI interactions are... complex.

If nothing is selected, mouse down selects a new item.

If one item is selected, mouse down on a differet item selects that item.

If one item is selected, mouse up on that item will rename the item.

If one or no items are selected, mouse down + ctrl can select multiple items.

Mouse down and shift will select all items between the first selected item and the mouse down item.

If more than one item is selected, mouse up on a selected item will isolate and select that item.

If more than one item is selected, mouse down on a unselected item will select that item.

If one or more items are selected, mouse down on a selected item will start a drag operation after mouse movement.

- Unless ctrl is held, which will remove the selected item from the selection.

Monday, May 20, 2019

Building large worlds in Unity.


I made something which lets you render very large worlds with a small farClipPlane.

https://github.com/simonwittber/scaled-origin

The demo shows an earth sized planet viewed from about 1000km altitude. It's great for Space Games, like this one I've been working on recently.

Thursday, September 06, 2018

.Net reflection is expensive in more ways than I thought...

Enter statements below.
csharp> var t = typeof(int);
csharp> Object.ReferenceEquals(t.AssemblyQualifiedName, t.AssemblyQualifiedName);
false
Every access to the AssemblyQualifiedName property does some lookup work… and returns a NEW copy of the string.

It’s _almost_ as if one might recommend caching every property, because you never know what it might be doing, and avoid creating auto properties (in place of public fields), so that you know when there is no need to cache the value.

Popular Posts