Change Maximum Interactables

Change the Maximum Number of Interactable Objects

Responsive Smokes limits the maximum number of interactable objects that can interact with a single smoke object. By default, these limits are set to 10 projectiles and 3 explosions. You can adjust these limits by changing two values in the package files included with Responsive Smokes. This document will walk you through those steps. Responsive Smokes encodes these values in files for both the .hlsl shader file as well as the C# component. You need to change both files and make sure that they have the same number.

Change the Maximum Number of Projectiles

  1. Open the InteractiveSmoke.cs script.
  2. Look for public static int _MAX_PROJECTILES = 10;.
  3. Change the number, then save the file.
  4. Open the ResponsiveSmokePass.hlsl file.
  5. Look for define _MAX_PROJECTILES 10
  6. Change the number, then save the file.
  7. Restart Unity

Change the Maximum Number of Explosions

  1. Open the InteractiveSmoke.cs script.
  2. Look for public static int _MAX_EXPLOSIONS = 3;.
  3. Change the number, then save the file.
  4. Open the ResponsiveSmokePass.hlsl file.
  5. Look for define _MAX_EXPLOSIONS 3
  6. Change the number, then save the file.
  7. Restart Unity