### Quick Start Guide Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/MANIFEST.txt Getting started guide with basic setup examples, NDMF setup, common tasks, and optimization checklists. ```APIDOC ## Quick Start ### Description This guide provides essential information to get started with VRCQuestTools, covering setup, common workflows, and optimization tips. ### Basic Setup Examples Illustrates the fundamental steps to integrate and use the tools. ### Modern NDMF Setup Details on setting up VRCQuestTools within a modern NDMF (Nishimura's Dynamic Model Framework) pipeline. ### Common Tasks with Code Provides code examples for 6 frequently performed tasks, such as avatar conversion and material swapping. ### Optimization Checklist A list of recommended practices for optimizing avatars after using VRCQuestTools. ``` -------------------------------- ### Quick Start Guide Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/MANIFEST.txt A guide to help users get started with VRCQuestTools, covering minimal setup, common tasks, configuration patterns, and common mistakes. ```APIDOC ## Quick Start Guide (12-quick-start.md) ### Description Facilitates rapid adoption of VRCQuestTools by providing essential setup instructions, common task examples, and configuration best practices. ### Usage Follow the steps in `12-quick-start.md` for initial setup and common operations. ### Key Features - Minimal setup instructions - Common task examples - Configuration patterns - Common mistakes and solutions ``` -------------------------------- ### Start Local Development Server Source: https://github.com/kurotu/vrcquesttools/blob/master/Website/README.md Starts a local development server for live preview and development. Changes are reflected without server restart. ```bash yarn start ``` -------------------------------- ### Minimal Material Conversion Setup Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/09-other-components.md Sets up basic material conversion with default ToonLit settings. Use this for a quick setup when only material conversion is needed. ```csharp var settings = avatarRoot.AddComponent(); settings.defaultMaterialConvertSettings = new ToonLitConvertSettings(); ``` -------------------------------- ### Setup Material Conversion for Android Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/02-material-conversion-settings.md Add and configure MaterialConversionSettings to an avatar GameObject for Android builds. This example sets up ToonLit conversion with specific texture settings and enables editor preview. ```csharp using KRT.VRCQuestTools.Components; using KRT.VRCQuestTools.Models; using UnityEngine; using VRC.SDKBase; public class NdmfAvatarSetup : MonoBehaviour { public void SetupMaterialConversionForAndroid(GameObject avatar) { var descriptor = avatar.GetComponent(); if (descriptor == null) return; var settings = avatar.AddComponent(); // Use ToonLit conversion for main materials settings.defaultMaterialConvertSettings = new ToonLitConvertSettings { generateQuestTextures = true, maxTextureSize = TextureSizeLimit.Max512x512, }; // Enable editor preview for development settings.enableMaterialPreview = true; // Run after polygon reduction tools settings.ndmfPhase = AvatarConverterNdmfPhase.Optimizing; // Remove extra material slots that aren't used settings.removeExtraMaterialSlots = true; } } ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/kurotu/vrcquesttools/blob/master/Website/README.md Installs project dependencies using Yarn. This is the first step before running other commands. ```bash yarn ``` -------------------------------- ### Using PlatformComponentRemover to Update Settings Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/05-platform-component-remover.md Example of how to get or add a PlatformComponentRemover component and then update its settings to reflect the current GameObject's components. This is useful for initial setup or after modifying components. ```csharp var remover = gameObject.GetComponent(); if (remover == null) { remover = gameObject.AddComponent(); } // Initially empty remover.UpdateComponentSettings(); // Scans and populates // Now componentSettings contains entries for all components on this GameObject foreach (var item in remover.componentSettings) { Debug.Log($ ``` -------------------------------- ### ToonStandardConvertSettings Usage Examples Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/10-material-conversion-types.md Examples demonstrating how to instantiate and configure ToonStandardConvertSettings. ```APIDOC ### Usage ```csharp // All features enabled (Opt-out mode) var settings = new ToonStandardConvertSettings { featureMode = ToonStandardFeaturesMode.OptOut, useNormalMap = true, useEmission = true, }; // Minimal features (Opt-in mode) var minimalSettings = ToonStandardConvertSettings.SimpleFeatures; minimalSettings.useNormalMap = true; minimalSettings.useEmission = true; // Or via method var settings2 = new ToonStandardConvertSettings(); settings2.SetAllFeatures(false); // Disable all settings2.useNormalMap = true; // Enable just normal maps ``` ``` -------------------------------- ### Example: Using VertexColorRemover to Remove Colors Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/07-vertex-color-remover.md This example demonstrates how to get a VertexColorRemover component attached to a GameObject and call its RemoveVertexColor method if the component is enabled. ```csharp var remover = gameObject.GetComponent(); if (remover != null && remover.enabled) { remover.RemoveVertexColor(); } ``` -------------------------------- ### Component References Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/MANIFEST.txt Detailed API documentation for individual runtime components. These include copy-paste code examples, integration notes, and troubleshooting guides. ```APIDOC ## Component References (01-09) ### Description Provides detailed API documentation for each runtime component of VRCQuestTools. Includes full type signatures, property tables, and usage examples. ### Usage Refer to individual files (e.g., `01-avatar-converter-settings.md`) for specific component details. ### Key Features - Copy-paste code examples - Integration notes - Troubleshooting guides ``` -------------------------------- ### Initialize Material Conversion Settings Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/12-quick-start.md Use factory methods to create default settings for material conversion. 'SimpleFeatures' is recommended for a basic setup. ```csharp var settings = ToonStandardConvertSettings.SimpleFeatures; ``` ```csharp var toonLit = new ToonLitConvertSettings(); ``` ```csharp var matCapLit = new MatCapLitConvertSettings(); ``` -------------------------------- ### Usage Example: Setting up Material Swap Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/03-material-swap.md Demonstrates how to add a MaterialSwap component to a GameObject and configure a material mapping programmatically. This is useful for automating material optimization during development. ```csharp using KRT.VRCQuestTools.Components; using UnityEngine; public class MaterialOptimization : MonoBehaviour { public Material originalMaterial; public Material optimizedMaterial; public void SetupMaterialSwap() { var swapper = gameObject.AddComponent(); // Add a mapping swapper.materialMappings.Add(new MaterialSwap.MaterialMapping { originalMaterial = originalMaterial, replacementMaterial = optimizedMaterial, }); // Apply the swap swapper.ApplyMaterialSwaps(); } } ``` -------------------------------- ### Setting Build Target Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/11-model-types.md Example of how to set the build target for PlatformTargetSettings. Can be set to a specific platform or Auto. ```csharp var platformSettings = avatarRoot.AddComponent(); platformSettings.buildTarget = BuildTarget.Android; // Or auto-detect platformSettings.buildTarget = BuildTarget.Auto; // Reads EditorUserBuildSettings.activeBuildTarget ``` -------------------------------- ### Conversion Pipeline Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/10-material-conversion-types.md Illustrates the flow of material conversion, starting from an avatar with materials and detailing the settings involved. ```APIDOC ## Conversion Pipeline ``` Avatar with Materials ↓ AvatarConverterSettings/MaterialConversionSettings ├─ defaultMaterialConvertSettings (IMaterialConvertSettings) │ ├─ ToonLitConvertSettings │ ├─ ToonStandardConvertSettings │ ├─ MatCapLitConvertSettings │ └─ Custom implementations │ └─ additionalMaterialConvertSettings[] └─ AdditionalMaterialConvertSettings └─ materialConvertSettings (IMaterialConvertSettings) ``` ``` -------------------------------- ### Install VRCQuestTools via UPM Source: https://github.com/kurotu/vrcquesttools/blob/master/Website/docs/tutorial/set-up-environment.mdx Install VRCQuestTools into your Unity project using the Unity Package Manager (UPM) by providing the Git repository URL. This method is suitable for projects managed with UPM. ```git https://github.com/kurotu/VRCQuestTools.git?path=Packages/com.github.kurotu.vrc-quest-tools ``` -------------------------------- ### Cross-Platform Build Setup Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/09-other-components.md Configures avatar for cross-platform builds by setting the target platform, enabling material conversion, and preparing for conditional component and game object removals. This setup is useful for managing platform-specific assets and components. ```csharp // Target settings var platformSettings = avatarRoot.AddComponent(); platformSettings.buildTarget = BuildTarget.Android; // Material conversion var matSettings = avatarRoot.AddComponent(); // Conditional removals var compRemover = avatarRoot.AddComponent(); var objRemover = avatarRoot.AddComponent(); ``` -------------------------------- ### Minimal Material Conversion Setup Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/README.md Add MaterialConversionSettings to an avatar root to configure material conversion. Specify texture generation, size limits, and mobile texture format. ```csharp using KRT.VRCQuestTools.Components; using KRT.VRCQuestTools.Models; // Add to avatar root var settings = avatarRoot.AddComponent(); settings.defaultMaterialConvertSettings = new ToonLitConvertSettings { generateQuestTextures = true, maxTextureSize = TextureSizeLimit.Max1024x1024, mobileTextureFormat = MobileTextureFormat.ASTC_8x8, }; ``` -------------------------------- ### Full Mobile Optimization Setup Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/09-other-components.md Combines material conversion, icon resizing, vertex color cleanup, and platform-specific component removal for comprehensive mobile optimization. Ensure all necessary components are added and configured as needed for your target platform. ```csharp // Material conversion avatarRoot.AddComponent(); // Icon resizing var resizer = avatarRoot.AddComponent(); resizer.resizeModeAndroid = MenuIconResizer.TextureResizeMode.Max128x128; // Vertex color cleanup var vertexCleaner = avatarRoot.AddComponent(); vertexCleaner.includeChildren = true; // Platform-specific removals var remover = avatarRoot.AddComponent(); remover.UpdateComponentSettings(); ``` -------------------------------- ### Setting Maximum Texture Size Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/10-material-conversion-types.md Example of how to set the maximum texture size limit in settings. This caps textures to the specified resolution. ```csharp settings.maxTextureSize = TextureSizeLimit.Max512x512; // Cap at 512x512 ``` -------------------------------- ### ToonLitConvertSettings Usage Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/10-material-conversion-types.md Example of how to create and use ToonLitConvertSettings to configure material conversion for a GameObject. ```APIDOC ## ToonLitConvertSettings Usage ### Description This example demonstrates how to instantiate `ToonLitConvertSettings` with specific configurations and assign it to a `MaterialConversionSettings` component on a GameObject. ### Method Not applicable (Code Example) ### Endpoint Not applicable (Code Example) ### Parameters Not applicable (Code Example) ### Request Example ```csharp var settings = new ToonLitConvertSettings { generateQuestTextures = true, maxTextureSize = TextureSizeLimit.Max512x512, mobileTextureFormat = MobileTextureFormat.ASTC_8x8, mainTextureBrightness = 0.83f, generateShadowFromNormalMap = true, }; var materialConversion = gameObject.AddComponent(); materialConversion.defaultMaterialConvertSettings = settings; ``` ### Response Not applicable (Code Example) ### Notes - `generateQuestTextures`: Enables generation of optimized textures for Android. - `maxTextureSize`: Sets the maximum texture dimensions. - `mobileTextureFormat`: Specifies the compression format for mobile. - `mainTextureBrightness`: Adjusts the brightness of the main texture. - `generateShadowFromNormalMap`: Controls the generation of shadow maps from normal map data. ``` -------------------------------- ### ToonLitConvertSettings Usage Example Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/10-material-conversion-types.md Demonstrates how to create and configure ToonLitConvertSettings for material conversion, including texture optimization and brightness adjustments. This is useful for optimizing Toon Lit shader materials for mobile platforms. ```csharp var settings = new ToonLitConvertSettings { generateQuestTextures = true, maxTextureSize = TextureSizeLimit.Max512x512, mobileTextureFormat = MobileTextureFormat.ASTC_8x8, mainTextureBrightness = 0.83f, generateShadowFromNormalMap = true, }; var materialConversion = gameObject.AddComponent(); materialConversion.defaultMaterialConvertSettings = settings; ``` -------------------------------- ### Modern Avatar Conversion Setup (NDMF-Based) Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/12-quick-start.md This snippet demonstrates how to add the MaterialConversionSettings component for NDMF-compatible avatar conversion, including material and NDMF phase configuration. ```csharp using KRT.VRCQuestTools.Components; using KRT.VRCQuestTools.Models; public class SetupAvatarModern : MonoBehaviour { public void ConvertAvatarForQuest(GameObject avatarRoot) { // Add modern component (NDMF-compatible) var settings = avatarRoot.AddComponent(); // Configure material conversion settings.defaultMaterialConvertSettings = new ToonLitConvertSettings { generateQuestTextures = true, maxTextureSize = TextureSizeLimit.Max512x512, }; // Configure NDMF phase settings.ndmfPhase = AvatarConverterNdmfPhase.Optimizing; // Enable editor preview settings.enableMaterialPreview = true; } } ``` -------------------------------- ### Setting Mobile Texture Format in ToonLitConvertSettings Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/11-model-types.md Example of how to set the mobile texture format for general use and high-quality avatars. ```csharp var settings = new ToonLitConvertSettings { mobileTextureFormat = MobileTextureFormat.ASTC_8x8, // Most compatible }; // Or for high-quality avatars var highQuality = new ToonLitConvertSettings { mobileTextureFormat = MobileTextureFormat.ASTC_6x6, // Balanced quality }; ``` -------------------------------- ### Minimal Avatar Conversion Setup (Non-NDMF) Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/12-quick-start.md Use this snippet to add the AvatarConverterSettings component and configure basic material conversion for Quest avatars without using NDMF. ```csharp using KRT.VRCQuestTools.Components; using KRT.VRCQuestTools.Models; using UnityEngine; public class SetupAvatar : MonoBehaviour { public void ConvertAvatarForQuest(GameObject avatarRoot) { // Add configuration component var settings = avatarRoot.AddComponent(); // Set material conversion (default: ToonStandardConvertSettings.SimpleFeatures) settings.defaultMaterialConvertSettings = new ToonLitConvertSettings { generateQuestTextures = true, maxTextureSize = TextureSizeLimit.Max1024x1024, mobileTextureFormat = MobileTextureFormat.ASTC_8x8, }; // Optionally optimize settings.removeVertexColor = true; settings.resizeExpressionsMenuIcons = true; } } ``` -------------------------------- ### MaterialSwap Component Usage Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/03-material-swap.md Example of how to add and configure the MaterialSwap component programmatically in Unity. This includes adding the component to a GameObject, creating material mappings, and then applying the swaps. ```APIDOC ## Usage Example ```csharp using KRT.VRCQuestTools.Components; using UnityEngine; public class MaterialOptimization : MonoBehaviour { public Material originalMaterial; public Material optimizedMaterial; public void SetupMaterialSwap() { var swapper = gameObject.AddComponent(); // Add a mapping swapper.materialMappings.Add(new MaterialSwap.MaterialMapping { originalMaterial = originalMaterial, replacementMaterial = optimizedMaterial, }); // Apply the swap swapper.ApplyMaterialSwaps(); } } ``` ``` -------------------------------- ### Logger Usage Example Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/11-model-types.md Demonstrates how to use the Logger utility to log different types of messages during VRCQuestTools operations. Ensure the KRT.VRCQuestTools namespace is imported. ```csharp using KRT.VRCQuestTools; Logger.Log("Avatar conversion started", avatar); Logger.LogWarning("Missing material slots", renderer); Logger.LogError("Cannot remove component", component); ``` -------------------------------- ### Basic Menu Icon Resizer Setup Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/08-menu-icon-resizer.md Sets up the MenuIconResizer to not resize PC icons while resizing Android icons to a maximum of 128x128 and compressing them using ASTC_8x8. ```csharp using KRT.VRCQuestTools.Components; using KRT.VRCQuestTools.Models; using UnityEngine; using VRC.SDKBase; public class MenuOptimization : MonoBehaviour { public void SetupIconResizing(GameObject avatarRoot) { var descriptor = avatarRoot.GetComponent(); if (descriptor == null) return; var resizer = avatarRoot.AddComponent(); // Keep PC icons at full size resizer.resizeModePC = MenuIconResizer.TextureResizeMode.DoNotResize; // Resize Android icons to 128x128 resizer.resizeModeAndroid = MenuIconResizer.TextureResizeMode.Max128x128; // Compress textures using ASTC_8x8 resizer.compressTextures = true; resizer.mobileTextureFormat = MobileTextureFormat.ASTC_8x8; } } ``` -------------------------------- ### Setup Basic Flipping with MeshFlipper Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/04-mesh-flipper.md Adds a MeshFlipper component to a GameObject and configures it for basic double-sided flipping. Ensure the component is enabled on Android if targeting that platform. ```csharp using KRT.VRCQuestTools.Components; using UnityEngine; public class MeshOptimization : MonoBehaviour { public void SetupMeshFlipping() { // Setup basic flipping var flipper = gameObject.AddComponent(); flipper.direction = MeshFlipperMeshDirection.BothSides; flipper.enabledOnAndroid = true; flipper.processingPhase = MeshFlipperProcessingPhase.AfterPolygonReduction; } public void SetupMaskBasedFlipping(Texture2D mask) { var flipper = gameObject.AddComponent(); // Enable mask-based flipping flipper.useMask = true; flipper.maskTexture = mask; flipper.maskMode = MeshFlipperMaskMode.FlipWhite; // Flip only areas where mask is white flipper.direction = MeshFlipperMeshDirection.Flip; flipper.enabledOnAndroid = true; } public void TestFlippedMesh() { var flipper = GetComponent(); if (flipper != null) { var flippedMesh = flipper.CreateMesh(); GetComponent().mesh = flippedMesh; } } } ``` -------------------------------- ### Developer Usage Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/MANIFEST.txt Guidelines for developers integrating or extending VRCQuestTools, focusing on import paths, type naming, method signatures, and example code. ```APIDOC ## For Developers ### Description Provides specific instructions for developers on how to use VRCQuestTools in their projects, including namespace conventions, type usage, and method invocation. ### Usage - **Import Paths**: Use full namespace `KRT.VRCQuestTools.*`. - **Type Names**: Use exact names as documented. - **Methods**: All signatures are shown with parameters. - **Examples**: Copy patterns from quick-start or individual component docs. ### Key Features - Namespace hierarchy - Type and method signatures - Code example patterns ``` -------------------------------- ### Initialize AvatarConverterSettings Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/01-avatar-converter-settings.md Adds or gets the AvatarConverterSettings component and configures default material conversion settings, including texture generation, size limits, and mobile texture format. ```csharp var avatar = GetComponent().gameObject; var settings = avatar.GetComponent(); if (settings == null) { settings = avatar.AddComponent(); } // Configure material conversion settings.defaultMaterialConvertSettings = new ToonLitConvertSettings { generateQuestTextures = true, maxTextureSize = TextureSizeLimit.Max1024x1024, mobileTextureFormat = MobileTextureFormat.ASTC_8x8, }; // Add per-material override var additionalSettings = new AdditionalMaterialConvertSettings { targetMaterial = myCustomMaterial, materialConvertSettings = new ToonStandardConvertSettings { useNormalMap = true, useEmission = true, } }; settings.additionalMaterialConvertSettings = new[] { additionalSettings }; ``` -------------------------------- ### Platform-Specific Icon Setup Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/08-menu-icon-resizer.md Configures the MenuIconResizer for different platforms, keeping PC icons at full quality and aggressively reducing Android icon size to 64x64 with ASTC_8x8 compression. ```csharp public void SetupPlatformSpecificIcons(GameObject avatar) { var resizer = avatar.AddComponent(); // PC: Keep full quality resizer.resizeModePC = MenuIconResizer.TextureResizeMode.DoNotResize; resizer.compressTextures = false; // Android: Aggressive size reduction resizer.resizeModeAndroid = MenuIconResizer.TextureResizeMode.Max64x64; resizer.compressTextures = true; resizer.mobileTextureFormat = MobileTextureFormat.ASTC_8x8; } ``` -------------------------------- ### Initialization: Creating and Configuring MaterialSwap Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/03-material-swap.md Shows how to create a MaterialSwap component and populate its material mappings list, either by initializing the list with multiple mappings or by adding them one by one. ```csharp // On the avatar root or a specific GameObject var materialSwap = gameObject.AddComponent(); // Create mappings programmatically materialSwap.materialMappings = new System.Collections.Generic.List { new MaterialSwap.MaterialMapping { originalMaterial = pcMaterial, replacementMaterial = androidMaterial, }, new MaterialSwap.MaterialMapping { originalMaterial = anotherPcMaterial, replacementMaterial = anotherAndroidMaterial, } }; // Or add mappings one at a time materialSwap.materialMappings.Add(new MaterialSwap.MaterialMapping { originalMaterial = myMaterial, replacementMaterial = myOptimizedMaterial, }); ``` -------------------------------- ### Configure Per-Material Conversion Settings Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/10-material-conversion-types.md Demonstrates how to set up custom conversion settings for specific materials using AdditionalMaterialConvertSettings. This allows for fine-grained control over texture size and shader properties for individual materials. ```csharp var materialSettings = new MaterialConversionSettings(); materialSettings.additionalMaterialConvertSettings = new[] { new AdditionalMaterialConvertSettings { targetMaterial = mySpecialMaterial, materialConvertSettings = new ToonLitConvertSettings { maxTextureSize = TextureSizeLimit.Max256x256, // Smaller for this material } }, new AdditionalMaterialConvertSettings { targetMaterial = myEmissiveMaterial, materialConvertSettings = new ToonStandardConvertSettings { useEmission = true, useNormalMap = false, } } }; ``` -------------------------------- ### MaterialConversionSettings Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/MANIFEST.txt Settings for material conversion, including NDMF integration details and configuration examples. ```APIDOC ## MaterialConversionSettings ### Description Manages settings for material conversion processes, with specific notes on NDMF integration and example configurations. ### Class MaterialConversionSettings ### Properties - **enableMaterialConversion** (bool) - Default: true - Enables or disables material conversion. - **materialSettings** (List) - Default: null - List of specific material conversion settings. ### Usage Examples ```csharp // Example of configuring material conversion var matSettings = new MaterialConversionSettings(); matSettings.enableMaterialConversion = true; ``` ### NDMF Integration Information on how this component integrates with the NDMF pipeline. ``` -------------------------------- ### PlatformGameObjectRemover Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/MANIFEST.txt Removes GameObjects based on platform, including LOD management examples and hierarchy impacts. ```APIDOC ## PlatformGameObjectRemover ### Description Handles the removal of entire GameObjects from an avatar hierarchy, considering platform-specific requirements. ### Component PlatformGameObjectRemover ### Platform Removal Behavior Details on how GameObjects are targeted for removal based on the active platform. ### LOD Management Examples Illustrates how this component can be used in conjunction with Level of Detail (LOD) systems. ### Hierarchy Impacts Discusses the effects of GameObject removal on the avatar's scene hierarchy. ``` -------------------------------- ### Build Static Website Content Source: https://github.com/kurotu/vrcquesttools/blob/master/Website/README.md Generates the static content for the website into the 'build' directory, ready for hosting. ```bash yarn build ``` -------------------------------- ### AvatarConverterSettings Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/MANIFEST.txt Configuration settings for the Avatar Converter component, including properties, defaults, and usage examples. ```APIDOC ## AvatarConverterSettings ### Description Provides configuration options for converting avatars, including various properties with default values. ### Class AvatarConverterSettings ### Properties - **someProperty** (Type) - Default: Value - Description - **anotherProperty** (Type) - Default: Value - Description ### Usage Examples ```csharp // Example usage of AvatarConverterSettings var settings = new AvatarConverterSettings(); settings.someProperty = "someValue"; ``` ### Integration Notes Details on how to integrate AvatarConverterSettings with other components or systems. ``` -------------------------------- ### Setting Up a Mask Texture Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/04-mesh-flipper.md This snippet demonstrates how to load a texture, enable read/write access, and assign it to the Mesh Flipper component. Ensure the texture meets the specified format, size, and pixel value requirements. ```csharp var maskTexture = AssetDatabase.LoadAssetAtPath("Assets/mask.png"); var importer = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(maskTexture)) as TextureImporter; importer.isReadable = true; importer.SaveAndReimport(); flipper.maskTexture = maskTexture; ``` -------------------------------- ### Initialize ToonStandardConvertSettings with Features Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/10-material-conversion-types.md Demonstrates how to initialize ToonStandardConvertSettings, either by setting the feature mode and specific features or by using the SimpleFeatures static property. ```csharp // All features enabled (Opt-out mode) var settings = new ToonStandardConvertSettings { featureMode = ToonStandardFeaturesMode.OptOut, useNormalMap = true, useEmission = true, }; // Minimal features (Opt-in mode) var minimalSettings = ToonStandardConvertSettings.SimpleFeatures; minimalSettings.useNormalMap = true; minimalSettings.useEmission = true; // Or via method var settings2 = new ToonStandardConvertSettings(); settings2.SetAllFeatures(false); // Disable all settings2.useNormalMap = true; // Enable just normal maps ``` -------------------------------- ### Get libpng Copyright Source: https://github.com/kurotu/vrcquesttools/blob/master/Packages/com.github.kurotu.vrc-quest-tools/NOTICE.txt A utility function to retrieve the libpng copyright string, useful for 'about' boxes. ```c printf("%s",png_get_copyright(NULL)); ``` -------------------------------- ### Creating a PlatformComponentRemoverItem Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/11-model-types.md Instantiate `PlatformComponentRemoverItem` to specify which component to remove and on which platform. This example removes a Rigidbody component when building for Android. ```csharp var item = new PlatformComponentRemoverItem { component = GetComponent(), removeOnPC = false, removeOnAndroid = true, }; ``` -------------------------------- ### Configure Aggressive Optimization Material Settings Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/12-quick-start.md Set texture format to ASTC_8x8 and maximum texture size to 256x256 for aggressive optimization of material conversion. ```csharp mobileTextureFormat = MobileTextureFormat.ASTC_8x8; maxTextureSize = TextureSizeLimit.Max256x256; ``` -------------------------------- ### Configure Balanced Material Settings Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/12-quick-start.md Set texture format to ASTC_8x8 and maximum texture size to 512x512 for a balanced approach to material conversion. ```csharp mobileTextureFormat = MobileTextureFormat.ASTC_8x8; maxTextureSize = TextureSizeLimit.Max512x512; ``` -------------------------------- ### ToonStandardConvertSettings Static Properties Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/10-material-conversion-types.md Offers a static property for a default instance of ToonStandardConvertSettings with all features disabled, serving as a simple starting point. ```csharp /// Default instance with all features disabled. public static ToonStandardConvertSettings SimpleFeatures ``` -------------------------------- ### Add and Configure Platform-Aware Components Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/12-quick-start.md Add platform-aware components like MaterialSwap, MeshFlipper, and MenuIconResizer to an avatar. Configure their platform-specific enabled states and resize modes. ```csharp // These respect the PlatformTargetSettings var swapper = avatar.AddComponent(); var flipper = avatar.AddComponent(); var resizer = avatar.AddComponent(); // Configure platform-specific behavior flipper.enabledOnPC = false; flipper.enabledOnAndroid = true; resizer.resizeModePC = TextureResizeMode.DoNotResize; resizer.resizeModeAndroid = TextureResizeMode.Max128x128; ``` -------------------------------- ### Configure High Quality Material Settings Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/12-quick-start.md Set texture format to ASTC_6x6 and maximum texture size to 1024x1024 for high-quality material conversion. ```csharp mobileTextureFormat = MobileTextureFormat.ASTC_6x6; maxTextureSize = TextureSizeLimit.Max1024x1024; ``` -------------------------------- ### Get Shared Mesh - C# Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/04-mesh-flipper.md Retrieves the shared mesh from the attached SkinnedMeshRenderer or MeshFilter. Returns null if neither component is found. ```csharp public Mesh GetSharedMesh() ``` -------------------------------- ### Instantiate MatCapLitConvertSettings Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/10-material-conversion-types.md Create an instance of MatCapLitConvertSettings and configure its properties for material conversion. This includes settings for generating quest textures, maximum texture size, mobile texture format, main texture brightness, and specifying a custom MatCap texture. ```csharp var settings = new MatCapLitConvertSettings { generateQuestTextures = true, maxTextureSize = TextureSizeLimit.Max512x512, mobileTextureFormat = MobileTextureFormat.ASTC_8x8, mainTextureBrightness = 0.83f, matCapTexture = myMatCapTexture, // Custom matcap }; ``` -------------------------------- ### Get Cache Key for Material Conversion Settings Source: https://github.com/kurotu/vrcquesttools/blob/master/_autodocs/10-material-conversion-types.md Retrieves a unique cache key for the additional material convert settings. This is useful for caching and identification purposes. ```csharp /// Gets the cache key for the additional material convert settings. public string GetCacheKey() ```