Changes

Line 427: Line 427:     
==Advanced==
 
==Advanced==
 +
===IRawTextureData and performance===
 +
 +
Since the move to Monogame, the creation of Texture2Ds has become quite slow. To sidestep this issue, avoid creating Texture2Ds when not necessary. You can use SMAPI's <samp>IRawTextureData</samp> instead, which you can also pass to other SMAPI functions, like [[Modding:Modder_Guide/APIs/Content#Edit_an_image|<samp>PatchImage</samp>]].
 +
 
===Compare asset names===
 
===Compare asset names===
 
You can't use normal string comparison with asset names. For example, <samp>Characters/Abigail</samp> and <samp>CHARACTERS\ABIGAIL</samp> are the same asset name, but comparing them with C#'s <code>==</code> operator will return false.
 
You can't use normal string comparison with asset names. For example, <samp>Characters/Abigail</samp> and <samp>CHARACTERS\ABIGAIL</samp> are the same asset name, but comparing them with C#'s <code>==</code> operator will return false.
528

edits