Releases: cldougherty/SubstanceTween
SubstanceTween2.5
Changelog:
2.5 – 10/20/17 – Unity 5.6.0f3 / 2017.1.1p4 /2017.2.0f3
• Feature: Added Toolbar to use for all main functions
• Feature: Tool can now animate Enum and Boolean values
• Feature: Tool can now animate texture offset(_MainTex)
• Feature: Added ability to change substance settings for performance(ProceduralCacheSize/ProceduralProcessorUsage)
• Feature: Ability for animation to follow an Animation Curve.
• Feature: Write all keyframes to XML files.
• Feature: Create keyframes from multiple XML files.
• Feature: Flicker can make all parameter types to flicker randomly.
• Feature. Undo/Redo now supported
• Feature: Randomize all types of values (Shortcut:R)
• Feature: Repeat last Action (Shortcut G:)
• Feature: Emission Color now supports HDR colors.
• Feature: Added ‘About’ button that displays
• Feature: Added ‘Rewrite All Keyframes’ Toggle.
• Feature: Added ‘Animation Delay’ to prefab. You can now have the material load before it animates
• Feature: you can now use some functions of the tool when it is paused
• Material: Made a new sample material called ‘Geometry’
• Optimization: Use Dictionaries to store most animation data instead of lists for better performance.
• Optimization: On the prefab I now delete any variables that are not being animated and cache the variables that are being animated.
• Optimization: Changed if/else chain in Update() to switch statements
• Optimized several substance materials
• Warning appears on top of the screen if you use tool for a prefab that already has procedural Animation
• Fixed Bug: When animating backwards the animation would follow the graph but it would repeat the curve between the first 2 curve points.
• Fixed Bug: When the BackAndForth animation reaches the end the texture would flash for a second.
• Fixed Bug: overwriting a keyframe would overwrite the wrong keyframe
• Fixed Bug: Changed window type to utility to stop errors when dragging the window.
• Fixed Bug: Removed empty path errors when canceling any dialog box (Write/read xml,prefabs,Debug Text)
• Fixed Bug: Emission Color would always reset to whatever is in the Color field
• Fixed Bug: Unity 2017.2 changed when OnValidate() is called. onValidate will now only trigger on the prefab when you are not using the tool
• Fixed Bug: Unity 2017.1 and Unity 2017.2 had diffrences when selecting objects with no Procedural Materials or renderers
• Removed FPS counter (use built in stats or profiler window instead)
Bugs/Possible Bugs/Other Notes:
• If you use this tool on an animated prefab in the asset folder and overwrite the prefab you are working on unity can crash.
• If you use this tool on an animated prefab in the asset folder and create a new prefab the animation can glitch.
• My material is Pink after I create Prefabs? – This should never happen, if it does manually reapply your ProceduralMaterial on your object and everything should work again.
• My material is completely black/white - This should never happen, if it does reset the material (Right click material in inspector view > reset).
• The tool is blank! - Select a Procedural material and then select the tool window. If that does not work restart unity or the current scene.
• In rare cases the Reset button on the tool will not work - try selecting a second object, then the first and try again. if that doesn’t work try setting the value to minimum/maximum and then press reset. If all else fails restart the tool or exit/enter playmode again. The tool saves the material when the tool is first opened in play mode or a material is selected for the first time in play mode.
• If your XML file is somehow corrupt (0kb file) and you try to read it unity will give you an error saying something like "XmlException: Document element did not appear. Line 1, position 1". If you read a Xml file that is not corrupt after that without restarting the tool your material might look blurry - To fix this, as soon as you read a corrupt xml file restart the tool and read a file that is not corrupt.
• If a prefab in the scene has any errors or missing data try right clicking the PrefabProperties script and select ‘Revert to prefab’
• For v2.5 - The animation curve values/keys are not supposed to be manipulated in the editor curve window. Only the tangents are supposed to be manipulated
• Unity 2017.1 might crash when displaying dialog boxes after a lon period of time. I noticed this was fixed in 2017.1.1p4
Substance Tween 2.4
• Added Support for Multiple Keyframes!
• Now supports two types of animation, “Loop” and “Back and Forth”. If your animation type is Loop your Animation will play until it hits the last keyFrame, afterwards it will restart and go to the first keyframe.(example: 1-2-3, 1-2-3, 1-2-3)
• If you have Back and forth selected your animation will go until the last keyframe and then start animating backwards (example: 1-2-3-2-1, 1-2-3-2-1)
• Fixed bug: The tool would allow you to make keyframes with negative animationTime or no animationTime at all, if you do this now a dialogue box will pop up and tell you that you cannot have an animation Time that is 0 or negative.
• Fixed bug: In 2.3 and 2.2 every frame I checked each variable for transition One and transition Two to check for a difference. If there was no difference it wouldn’t change, I did this to hopefully increase performance but if those variables do change later on and the animation restarts, those values will not revert back. To fix this I removed the check and every value will attempt to animate even if they don’t change between keyframes. I have not noticed a performance drop.
SubstanceTween 2.3
• Upgraded Unity to 5.5
• Removed old/useless code
• Made new functions called AddProceduralVariablesToList and SetProceduralVariablesFromList so I don’t have to keep writing the same code every time I want to add or set Procedural variables to or from a list.
• Changed "Lerp Time" label/variable to "Animation time" to make it less confusing to users.
• Made it so creating a second transition would not animate automatically, you now have to create 2 transitions and then click on the "Toggle Animation on/off" button.
• Added colors to the transition and animation buttons. When you create a first or second transition the font color will turn green to indicate you have created a keyframe. When you create two transitions the "Toggle Animation on/off" button will change from red to green. When the button is green it means that you can create an animation from the two keyframes you made.
• Fixed bug where setting Animation Time to 0 or making it have no value would crash unity (It would try to divide by 0) The animation time field also supports basic operations (5*2, 10/2, 10%4).
• When creating a debug log if two lines right next to each other are the same it will only write one of them.
• Fixed bug where creating or reading XML file it would tell you the amount of float properties is the same as the amount of total properties.
• Added a Header for the tool
• When you Create a transition or a XML file it will now add the name of the material as “PropertyMaterialName”.
• Fixed bug when creating an animation and selecting another object, the new object would try to animate based on values of the last selected object. Now when you select “Toggle Animation” it will compare the name of the substance material and PropertyMaterialName(you save this when you create a transition) if the values are different it will give you a chance to rename it
• Added “Rebuild Textures Immediately” Button to Tool and Created Prefab. Having this on will Trigger an immediate rebuild of this ProceduralMaterial and will Cause FPS to drop.
• Fixed bugs when pausing the game and selecting other objects.
• Fixed bug where you couldn’t create a second transition before the first.
• I created myKeys and myValues list so that I can set the parameters based on the parameter name. This allows the user to switch the order of the parameters in substance designer and bring it back in Unity to make changes without messing up the values, The PropertyName, PropertyFloat, PropertyColor, PropertyVector lists will now only be used for keeping track of the different types and amounts of variables. At the moment this does not work with variables that have been renamed, you will have to manually rename the variables in the XML file.
• Added fps counter near sun controller (worldGUI script) (http://wiki.unity3d.com/index.php?title=FramesPerSecond)
• Fixed bug where I was accidently updating Procedural Material twice per frame.
• Added buttons to select the transitions you have created as well as a button to delete them.
• When you create a prefab it saves the animation time.
• Added Feature/ Fixed bug: When Writing xml files it would add parameter types with no range ($outputSize, $pixelSize, $RandomSeed) this could slow down your animation and make it choppy (loading a 4096x4096 animation on a material that is meant to be 1024x1024 ) Saving these parameters could be useful so I made a toggle button called ‘Save Output Parameters’
• Added support for Unity 5.3. In 5.4 and 5.5 I use RebuildTextures() instead of RebuildTexturesImmediately() when updating materials because it is faster.
RebuildTextures() is not supported in 5.3 when I use it in Update() so I made a conditional statement that detects what version of Unity you are using.
SubstanceTween 2.2
• Added a button for debug information (lists changes for materials, saves information about written/read Xml files and created prefabs).
• Fixed bug where the created prefab would not have any saved values unless you selected it before exiting play mode.
• Fixed bug when resetting vectors or trying to set vectors to the minimum/maximum would do nothing.
• Fixed bug where if you select objects with no renderer or procedural material in a specific order it would crash the tool.
• Fixed bug where if you selected objects, restarted the tool and created a prefab it would make the material pink (Unity material error).
• Made it so you cannot open the tool from Window>SubstanceTween if you have nothing selected or if the object does not have the required component(Renderer/ProceduralMaterial).