Пример #1
0
		bool IsIsoObjectVisible(IsoObject iso_object) {
			iso_object.GetComponentsInChildren<Renderer>(_tmpRenderers);
			for ( var i = 0; i < _tmpRenderers.Count; ++i ) {
				if ( _tmpRenderers[i].isVisible ) {
					return true;
				}
			}
			return false;
		}
Пример #2
0
		Bounds IsoObject3DBounds(IsoObject iso_object) {
			var bounds = new Bounds();
			iso_object.GetComponentsInChildren<Renderer>(_tmpRenderers);
			if ( _tmpRenderers.Count > 0 ) {
				bounds = _tmpRenderers[0].bounds;
				for ( var i = 1; i < _tmpRenderers.Count; ++i ) {
					bounds.Encapsulate(_tmpRenderers[i].bounds);
				}
			}
			return bounds;
		}