/// <summary> /// Updates the variation values for the given array for the specified prototype and buffer. /// </summary> /// <typeparam name="T">The type of variation buffer. Must be defined in the instance prototype's shader</typeparam> /// <param name="manager">The manager that defines the prototypes you want to GPU instance.</param> /// <param name="prototype">The GPU Instancer prototype to define variations.</param> /// <param name="bufferName">The name of the variation buffer in the prototype's shader.</param> /// <param name="variationArray">The array that stores the variation information.</param> /// <param name="arrayStartIndex">Start index of the given array that the data will be uploaded to the buffer</param> /// <param name="bufferStartIndex">Start index of the buffer to set the data from the array</param> /// <param name="count">Total number of variation data to set to the buffer from the array</param> public static void UpdateVariationFromArray <T>(GPUInstancerPrefabManager manager, GPUInstancerPrefabPrototype prototype, string bufferName, T[] variationArray, int arrayStartIndex = 0, int bufferStartIndex = 0, int count = 0) { manager.UpdateVariationsFromArray <T>(prototype, bufferName, variationArray, arrayStartIndex, bufferStartIndex, count); }
/// <summary> /// Updates the variation values for the given array for the specified prototype and buffer. /// </summary> /// <typeparam name="T">The type of variation buffer. Must be defined in the instance prototype's shader</typeparam> /// <param name="manager">The manager that defines the prototypes you want to GPU instance.</param> /// <param name="prototype">The GPU Instancer prototype to define variations.</param> /// <param name="bufferName">The name of the variation buffer in the prototype's shader.</param> /// <param name="variationArray">The array that stores the variation information.</param> public static void UpdateVariationFromArray <T>(GPUInstancerPrefabManager manager, GPUInstancerPrefabPrototype prototype, string bufferName, T[] variationArray) { manager.UpdateVariationsFromArray <T>(prototype, bufferName, variationArray); }