Пример #1
0
 /// <summary>
 /// Use this method to update transform data of all prefab instances with a float4x4 native array. By default all the data from the array will be
 /// uploaded to the GPU. You can make partial uploads by setting the arrayStartIndex, bufferStartIndex, and count parameters.
 /// </summary>
 /// <param name="prefabManager">The GPUI Prefab Manager that the prefab prototype is defined on</param>
 /// <param name="prototype">GPUI Prefab Prototype</param>
 /// <param name="float4x4Array">Array of float4x4 that store the transform data of prefab instances. Struct reference is not forced so you can use any float4x4 struct (e.g. Matrix4x4 or float4x4 from Mathematics package)</param>
 /// <param name="arrayStartIndex">(Optional) Start index of the given array that the data will be uploaded to the buffer</param>
 /// <param name="bufferStartIndex">(Optional) Start index of the buffer to set the data from the array</param>
 /// <param name="count">(Optional) Total number of matrices to set to the buffer from the array</param>
 public static void UpdateVisibilityBufferWithNativeArray <T>(GPUInstancerPrefabManager prefabManager, GPUInstancerPrefabPrototype prototype, NativeArray <T> float4x4Array,
                                                              int arrayStartIndex = 0, int bufferStartIndex = 0, int count = 0) where T : struct
 {
     GPUInstancerUtility.UpdateVisibilityBufferWithNativeArray(prefabManager, prototype, float4x4Array, arrayStartIndex, bufferStartIndex, count);
 }