public void Init() { if (!ObjectLayout) return; Cache = new ClustersCache(ObjectLayout.SummaryInstanceCount()); Cache.matProperty = new MaterialPropertyBlock(); ObjectLayout.Init(Cache); }
public void CopyFrom(ClustersCache cache, int index, int length) { /* * Array.Copy(cache.TRSmatrices, 0, this.TRSmatrices, index, length); * Array.Copy(cache.BoundingBuffer, 0, this.BoundingBuffer, index, length); * Array.Copy(cache.Visible, 0, this.Visible, index, length); */ }
// Use this for initialization public virtual void Init(ClustersCache renderCache) { this.renderCache = renderCache; InitCullBound(); //force update object Transform ResetObjectTransform(); Changed = false; }
public override void Init(ClustersCache renderCache) { if (SummaryInstanceCount() > 1022) { Debug.LogError("Instance count >1022"); return; } this.renderCache = renderCache; foreach (var layout in Layouts) { ClustersCache cache = new ClustersCache(layout.InstanceCount); cache.matProperty = renderCache.matProperty; layout.Init(cache); } Changed = false; }
public override void Init(ClustersCache renderCache) { base.Init(renderCache); }