In most versions of Mutable, some changes in the Unreal Engine codebase are required in order to improve the performance. These are modifications that cannot be implemented through plugins. In some platforms like Windows, Mutable will still work without the engine changes, but it may have lower performance and some editor features may be disabled, like automatic compilation of models when packaging.
The engine modifications are distributed through a patch file that you can find with every release of the plugin. In order to apply the patch you can use standard tools like TODO.
The patch with engine changes includes some helpers to try to detect if any modification is missing. If these warnings are visible it is a sign that some of the changes have not been applied, or may have been overwritten by other changes or merges.
These are for the runtime:
#define ANTICTO_MUTABLE_ENGINE_PATCH_TEXTURESTREAMING #define ANTICTO_MUTABLE_ENGINE_PATCH_VERTEXBUFFERS #define ANTICTO_MUTABLE_ENGINE_PATCH_MORPHTARGETVERTEX
These are for the editor:
You don't have to manually use these defines but if they are not present, the plugin will show warnings at compile time.
Please note that these are just simple preprocessor defines, so they do not guarantee that the actual changes are present, but capture most error cases.
A good starting point to see the performance of Mutable in your game, is to use the provided statistics UMG widget. You can find it in the plugin Content folder with the name UI/MutableStats.
If your project is not using UMG you can access these statistics and log them or display them from the central singleton object UCustomizableObjectSystem. These are some of the relevant methods:
// Get the singleton object. It will be created if it doesn't exist yet. UFUNCTION(BlueprintCallable, BlueprintPure, Category = Status) static UCustomizableObjectSystem* GetInstance(); // Find out if the performance engine patches have been applied UFUNCTION(BlueprintCallable, Category = Status) bool AreEnginePatchesPresent() const; // Find out the version of the plugin UFUNCTION(BlueprintCallable, Category = Status) FString GetPluginVersion() const; // Get the number of instances built and alive. UFUNCTION(BlueprintCallable, Category = Status) int32 GetNumInstances() const; // Get the number of instances waiting to be updated. UFUNCTION(BlueprintCallable, Category = Status) int32 GetNumPendingInstances() const; // Get the total number of instances includingbuilt and not built. UFUNCTION(BlueprintCallable, Category = Status) int32 GetTotalInstances() const; // Get the amount of memory in use for textures generated by mutable. UFUNCTION(BlueprintCallable, Category = Status) int64 GetTextureMemoryUsed() const; // Return the average build/update time of an instance in ms. UFUNCTION(BlueprintCallable, Category = Status) int32 GetAverageBuildTime() const;