- Home /
static material & draw calls (Detonator unity package)
Hi,
in the Detonator package on Unity website all the scripts are old and probably uncomplete. Cause in some scripts there is a lot of scary comments :).
One of them is this one :
//Default Materials
//The statics are so that even if there are multiple Detonators in the world, they
//don't each create their own default materials. Theoretically this will reduce draw calls, but I haven't really
//tested that.
public static Color defaultColorSmokeA;
public static Color defaultColorSmokeB;
public static Material defaultFireballAMaterial;
public static Material defaultFireballBMaterial;
public static Material defaultSmokeAMaterial;
public static Material defaultSmokeBMaterial;
public static Material defaultShockwaveMaterial;
public static Material defaultSparksMaterial;
public static Material defaultGlowMaterial;
public static Material defaultHeatwaveMaterial;
Someone can confirm me that but put a static in front of a Material declaration don't reduce draw calls ? Unity crate 1 draw calls per explosion sprite in the perfHUD debugger (from NVidia for Tegra device).
I suppose there is no solution to batch dynamic explosion to display only one draw call for all non simultaneous explosions ?
If someone know an alternative to those detonators for mobile devices (and on PC/MAC). I can maybe redo some part of those classes for mobile but this will probably take me lot of time :(.
Your answer
Follow this Question
Related Questions
Should sprites in the same layer but different order incur additional draw calls? 0 Answers
Sprites performance issue 0 Answers
C# making an optimized UI 1 Answer
Sprite batching 1 Answer
Unity sprite packer not reducing draw calls in the UI 2 Answers