id
stringlengths
15
22
source
stringclasses
2 values
category
stringclasses
12 values
instruction
stringlengths
22
180
response
stringlengths
100
46.1k
system
stringclasses
5 values
local_man_a5780c4e349b
unity_docs
audio
Explain 'Audio Pitch Shifter Effect' in Unity.
The Audio Pitch Shifter Effect is used to shift a signal up or down in pitch. ## Properties Property: Function: Pitch The pitch multiplier (range 0.5 x to 2.0 x, default 1.0 x). FFT Size The size of the FFT window used to analyze the audio signal during pitch shifting (range 256.0 to 4096.0, default = 1024.0). Higher...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f10a60b4b121
unity_docs
performance
What is `Unity.Collections.NativeArrayOptions.UninitializedMemory` in Unity? Explain its purpose and usage.
NativeArrayOptions.UninitializedMemory Description Leaves NativeArray<T0> memory uninitialized. Uninitialized memory can improve performance, but means that the contents of the NativeArray elements are undefined. In performance sensitive code you might use NativeArrayOptions.Uninitialized if you want to write to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5002545ec27c
unity_docs
scripting
What is `UIElements.UQueryState_1.Last` in Unity? Explain its purpose and usage.
UQueryState<T0>.Last Declaration public T Last (); Returns T The last element matching all the criteria, or null if none was found. Description The last element matching all the criteria, or null if none was found.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_641e538edc41
unity_docs
physics
Explain 'Optimize performance of moving elements at runtime' in Unity.
When you move a large amount of elements at runtime, performance optimization is crucial, especially for applications requiring smooth and responsive interactions. Certain CSS properties, such as top, left, width, height, or flex, can trigger layout recalculations when updated. These recalculations dirty the layout and...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_b7e633b6c26e
github
scripting
Write a Unity C# script called Web P Decoder Wrapper
```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using unity.libwebp; using unity.libwebp.Interop; using UnityEngine; namespace WebP.Experiment.Animation { /// <summary> /// The decod logic before and after decoding. /// </summary> public static class WebPDecoder...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4c7600553b2e
unity_docs
ui
What is `UIElements.VisualElement.dataSourceType` in Unity? Explain its purpose and usage.
VisualElement.dataSourceType public Type dataSourceType ; Description The possible type of data source assignable to this VisualElement. This information is only used by the UI Builder as a hint to provide some completion to the data source path field when the effective data source cannot be specified at des...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_daaad590c9db
unity_docs
scripting
Show me a Unity C# example demonstrating `Gizmos.DrawIcon`.
icon in world space. name The file name of the image relative to the Assets/Gizmos folder. allowScaling Whether the icon is permitted to be scaled. tint A tint applied to the icon. (Optional). Description Draw an icon at a position in the Scene view. Place the image file in the Assets/Gizmos folder. DrawIc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d16f6fcbfc47
unity_docs
physics
What is `Assertions.Assert.AreNotApproximatelyEqual` in Unity? Explain its purpose and usage.
Assert.AreNotApproximatelyEqual Declaration public static void AreNotApproximatelyEqual (float expected , float actual ); Declaration public static void AreNotApproximatelyEqual (float expected , float actual , string message ); Declaration public static void AreNotApproximatelyEqual (float expected , ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e05b2c621abe
unity_docs
rendering
What is `LightTransport.PostProcessing.IProbePostProcessor.ConvertToUnityFormat` in Unity? Explain its purpose and usage.
IProbePostProcessor.ConvertToUnityFormat Declaration public bool ConvertToUnityFormat ( LightTransport.IDeviceContext context , BufferSlice<SphericalHarmonicsL2> irradianceIn , BufferSlice<SphericalHarmonicsL2> irradianceOut , int probeCount ); Parameters Parameter Description context Device context. ir...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c6162fcafa1a
unity_docs
scripting
What is `Rendering.GraphicsFenceType` in Unity? Explain its purpose and usage.
GraphicsFenceType enumeration Description The type of GraphicFence. Properties Property Description AsyncQueueSynchronisation You can use the graphics fence to synchronize different GPU queues, or the GPU and the CPU. CPUSynchronisation You can use the graphics fence to synchronize the GPU and the CPU. This va...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d0db8b098589
unity_docs
scripting
What is `XR.MeshInfo` in Unity? Explain its purpose and usage.
MeshInfo struct in UnityEngine.XR / Implemented in: UnityEngine.XRModule Description Contains state information related to a tracked mesh. This struct is used by the XRMeshSubsystem to determine which meshes have been added, updated, or removed. Additional resources: XRMeshSubsystem.TryGetMeshInfos Proper...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_15570ff5fa4b
unity_docs
rendering
What are the parameters of `EditorGUI.ColorField` in Unity?
Returns Color The color selected by the user. Description Makes a field for selecting a Color . Color field in an Editor Window. ```csharp using UnityEngine; using UnityEditor;// Change The color of the selected Game Objects class EditorGUIColorField : EditorWindow { Color matColor = Color.white; [MenuItem("Exa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_ecac194c16fb_doc_10
github
scripting
What does `this member` do in this Unity script? Explain its purpose and signature.
Allows access of the indoor map API endpoints to interact with indoor maps. Signature: ```csharp public IndoorMapsApi IndoorMapsApi ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_84b962380dd8
unity_docs
physics
What is `ConfigurableJoint.angularYZLimitSpring` in Unity? Explain its purpose and usage.
ConfigurableJoint.angularYZLimitSpring public SoftJointLimitSpring angularYZLimitSpring ; Description The configuration of the spring attached to the angular Y and angular Z limits of the joint.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_0b67f22819ce
unity_docs
editor
In Unity's 'Package states and lifecycle', what is 'Death (E)' and how does it work?
Packages that reach their end of life are no longer supported in Editors where they’re marked Deprecated . Avoid using packages in a Deprecated state because they might be nonfunctional or unsafe. For more information, refer to Deprecated packages . Some experimental packages go directly to the deprecated state without...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_52bc562dd3f6
unity_docs
scripting
Show me a Unity C# example demonstrating `ObjectFactory.AddComponent`.
aration public static T AddComponent ( GameObject gameObject ); Parameters Parameter Description gameObject The GameObject to add the new component to. type The type of component to create and add to the GameObject. Returns Component Returns the component that was created and added to the GameObject. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6507b98446b0
unity_docs
rendering
What is `Camera.barrelClipping` in Unity? Explain its purpose and usage.
Camera.barrelClipping public float barrelClipping ; Description The camera barrel clipping. To use this property, enable UsePhysicalProperties. The strength of the "cat eye" effect on bokeh (optical vignetting).
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_086addea2f27
unity_docs
scripting
What is `ImageEffectTransformsToLDR` in Unity? Explain its purpose and usage.
ImageEffectTransformsToLDR class in UnityEngine / Implemented in: UnityEngine.CoreModule Description When using HDR rendering it can sometime be desirable to switch to LDR rendering during ImageEffect rendering. Using this Attribute on an image effect will cause the destination buffer to be an LDR buffer, and s...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_2c158ba62c0c
unity_docs
xr
Explain 'Device features and permissions' in Unity.
For an application to access private data on the device, use device features like an in-built microphone or camera , or generally interact with the device outside of the application sandbox, it must have permission from the device’s user. For more information about permissions on Android devices, see Permissions on And...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_b8517bc5c74d
unity_docs
physics
Explain 'Add collision to trees' in Unity.
Colliders define the shape of an object and are used to calculate physical collisions . You can add a collider to a tree asset in the Tree Editor or to a SpeedTree asset in the SpeedTree Modeler. ## Set up the terrain to support tree colliders On the Terrain tile’s Inspector window, go to Terrain Collider and make su...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a431e5038f5d_doc_16
github
scripting
What does `SetGraphicsApi` do in this Unity script? Explain its purpose and signature.
Adds the graphics device to the desired build target at a given index.returns true of the new graphics device is used by the editor Signature: ```csharp public static bool SetGraphicsApi(BuildTarget buildTarget, GraphicsDeviceType graphicsDeviceType, int index = 9999) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_sr_6d50814f9f5f
unity_docs
scripting
What is `TerrainTools.PaintDetailsToolUtility.GetMaxDetailInstancesPerPatch` in Unity? Explain its purpose and usage.
PaintDetailsToolUtility.GetMaxDetailInstancesPerPatch Declaration public static int GetMaxDetailInstancesPerPatch ( TerrainData terrainData ); Parameters Parameter Description terrainData The terrain data object. Returns int Returns the max number of detail instances. Description Gets the max am...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_31bbee0516c8
unity_docs
scripting
What is `WSA.SecondaryTileData.arguments` in Unity? Explain its purpose and usage.
SecondaryTileData.arguments public string arguments ; Description Arguments to be passed for application when secondary tile is activated. Passed arguments can be accessed via Application.arguments . Note, that arguments are only supported in XAML builds.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_368bebe02efc
unity_docs
animation
What is `Animator.recorderStopTime` in Unity? Explain its purpose and usage.
Animator.recorderStopTime public float recorderStopTime ; Description End time of the recorded clip relative to when StartRecording was called. For example, if we started recording at second 10, and ended recording at second 15, then this will have a value of 5. If the buffer is not initialized ( StartRecord...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_b44c68bec749
unity_docs
xr
Show me a Unity C# example demonstrating `LightTransport.BakeProgressState.WasCancelled`.
ogress state. This method can be used by both the implementation and user code to check if cancellation was requested. Usage Patterns: Check cancellation status after operations complete. Poll during long-running custom operations. Determine final operation result (success vs cancelled). Note: A cancelled operatio...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_094291f51a26
unity_docs
input
What is `Playables.PlayableExtensions.ConnectInput` in Unity? Explain its purpose and usage.
PlayableExtensions.ConnectInput Declaration public static void ConnectInput (U playable , int inputIndex , V sourcePlayable , int sourceOutputIndex ); Declaration public static void ConnectInput (U playable , int inputIndex , V sourcePlayable , int sourceOutputIndex , float weight ); Parameters Para...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_aef1cfc1859f
unity_docs
scripting
What is `Search.IQueryEngineFilter.parameterType` in Unity? Explain its purpose and usage.
IQueryEngineFilter.parameterType public Type parameterType ; Description The type of the constant parameter passed to the filter, if used. This represents the type of the object that will be passed to the filter callback, if the filter was created with the parameter option. See AddFilter .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f8bb966b313d
unity_docs
physics
What is `Collider2D.attachedRigidbody` in Unity? Explain its purpose and usage.
Collider2D.attachedRigidbody public Rigidbody2D attachedRigidbody ; Description The Rigidbody2D attached to the Collider2D . Collider2D are automatically attached to a Rigidbody2D on the same GameObject as the Collider2D or if none is present then on a Rigidbody2D on the nearest parent GameObject...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_404ea3809f42
github
scripting
Write a Unity C# MonoBehaviour script called T On View Wait For Init Event Component
```csharp using TinyECS.Interfaces; using TinyECSUnityIntegration.Interfaces; using UnityEngine; namespace TinyECSUnityIntegration.Impls { /// <summary> /// struct TOnViewWaitForInitEventComponent /// /// The structure describes a parameters of an event which is generated with BaseView /// when ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_21381a180ef6
unity_docs
physics
What is `Rigidbody2D.SlideMovement.layerMask` in Unity? Explain its purpose and usage.
Rigidbody2D.SlideMovement.layerMask public LayerMask layerMask ; Description A LayerMask that will be used when determining what Collider2D should be detected. This Layer will only be used when Rigidbody2D.SlideMovement.useLayerMask is true in which case, the specified LayerMask will be used to dete...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9f09ae5880b7
unity_docs
scripting
Show me a Unity C# example demonstrating `Camera.layerCullDistances`.
This is very useful to cull small objects early on, if you put them into appropriate layers. When assigning layerCullDistances, you need to assign float array that has 32 values. Zero values in cull distances means "use far plane distance". By default, per-layer culling will use a plane aligned with the camera. You can...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_8eba0a6273d9
unity_docs
editor
What is `EditorWindow.wantsMouseEnterLeaveWindow` in Unity? Explain its purpose and usage.
EditorWindow.wantsMouseEnterLeaveWindow public bool wantsMouseEnterLeaveWindow ; Description Checks whether MouseEnterWindow and MouseLeaveWindow events are received in the GUI in this Editor window. If set to true, the window recieves an OnGUI call whenever the mouse enters or leaves a window. Note: This func...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1151f59136b1
unity_docs
physics
What is `PhysicsShape2D.vertexCount` in Unity? Explain its purpose and usage.
PhysicsShape2D.vertexCount public int vertexCount ; Description The total number of vertices used to represent the shape type . See PhysicsShapeType2D for details on how each type uses different quantities of vertices to represent itself. ```csharp using UnityEngine; using UnityEngine.Assertions;public clas...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_a431e5038f5d_doc_4
github
scripting
What does `SetActiveInputHandler` do in this Unity script? Explain its purpose and signature.
Sets the activeInputHandler in the Player Settings. If successful, editor requires restart for input to take effect.0-30 - Input Manager (Old)1 - Input System Package (New)2 - Both true if successful Signature: ```csharp public static bool SetActiveInputHandler(int value) ```
You are an expert Unity game developer. Provide clear, accurate, and practical answers about Unity development.
local_man_9d0422f8da16
unity_docs
scripting
In Unity's 'Deep linking for macOS', what is 'URL schemes' and how does it work?
A URL scheme specifies a link structure that your macOS application refers to. The device opens the application when the user clicks a deep link that matches the URL scheme structure. To add a URL scheme, use the following: Go to Edit > Project Settings > Player > Other Settings . In the Mac Configuration section, set ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_429933f7d2cb
unity_docs
editor
What are the parameters of `Build.IPreprocessBuildWithReport.OnPreprocessBuild` in Unity?
Description Implement this function to receive a callback before the build is started. This callback is invoked during Player builds, but not during AssetBundle builds. Additional resources: IPostprocessBuildWithReport , BuildPlayerProcessor , BuildPipeline.BuildPlayer ```csharp using UnityEditor; using UnityEditor.Bui...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e01e7e6dc9e8
unity_docs
audio
What is `AudioImporter.SetOverrideSampleSettings` in Unity? Explain its purpose and usage.
AudioImporter.SetOverrideSampleSettings Declaration public bool SetOverrideSampleSettings ( BuildTargetGroup platformGroup , AudioImporterSampleSettings settings ); Declaration public bool SetOverrideSampleSettings (string platform , AudioImporterSampleSettings settings ); Parameters Parameter Desc...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2c6072419527
unity_docs
rendering
Give me an overview of the `ScreenCapture` class in Unity.
ScreenCapture class in UnityEngine / Implemented in: UnityEngine.ScreenCaptureModule Description Provides methods to take screenshots. Static Methods Method Description CaptureScreenshot Captures a screenshot and saves it as a .png file to a specified path. CaptureScreenshotAsTexture Captures a screenshot o...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_97474d0a70a9
unity_docs
rendering
In Unity's 'Troubleshooting shadows', what is 'Reduce shadow flickering' and how does it work?
Shadows might flicker if they’re far away from the camera . Refer to Understanding the View Frustum for more information. If shadows are closer to the camera than the world space origin, enable camera-relative culling. Unity uses the camera as the relative position for shadow calculations instead of the world space ori...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_019b994157a3
unity_docs
editor
What is `PlayerSettings.defaultWebScreenHeight` in Unity? Explain its purpose and usage.
PlayerSettings.defaultWebScreenHeight public static int defaultWebScreenHeight ; Description Default vertical dimension of web player window. Custom player settings. ```csharp using UnityEngine; using UnityEditor; // Simple Script that saves and loads custom // Stand-alone/Web player screen settings among // ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_614bc8b3d39e
unity_docs
scripting
What is `Experimental.Rendering.GraphicsFormat.R8G8B8_UInt` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsFormat.R8G8B8_UInt Description A three-component, 24-bit unsigned integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c19cc468e4b4
unity_docs
animation
What is `Animations.AimConstraint.upVector` in Unity? Explain its purpose and usage.
AimConstraint.upVector public Vector3 upVector ; Description The up vector. The up vector controls the rotation of the constrained object about the aim vector. It is defined in the constrained object local space.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_c8a7bdc329ee
unity_docs
rendering
What is `Material.shaderKeywords` in Unity? Explain its purpose and usage.
Material.shaderKeywords public string[] shaderKeywords ; Description An array containing names of the local shader keywords that are currently enabled for this material. Shader keywords determine which shader variants Unity uses. For information on working with local shader keywords and global shader keywor...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_ca8dc07c50d4
unity_docs
scripting
Show me a Unity C# example demonstrating `ParticleSystem.MainModule.stopAction`.
ParticleSystem.MainModule.stopAction public ParticleSystemStopAction stopAction ; Description Select whether to Disable or Destroy the GameObject, or to call the MonoBehaviour.OnParticleSystemStopped script Callback, when the Particle System stops and all particles have died. ```csharp using UnityEngine; u...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4fcc94323cd6
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PlistDocument`.
PlistDocument class in UnityEditor.iOS.Xcode Description Represents an Apple property list document. For more information on property lists, refer to Apple's documentation . ```csharp using System; using UnityEditor; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode;public class PlistDocumentExample { [P...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_a56dadd81cc3
unity_docs
math
Show me a Unity C# example demonstrating `Mesh.MeshData.GetVertexData`.
he one from Mesh.SetVertexBufferData . If the MeshData is writeable, and you have set the vertex buffer size and layout using Mesh.MeshData.SetVertexBufferParams , you can write vertex data directly to the array. If the MeshData is read-only, the array is read-only. Additional resources: Mesh.AllocateWritableMes...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_d3d1dab5c6f5
unity_docs
math
What is `SerializedProperty.ClearArray` in Unity? Explain its purpose and usage.
SerializedProperty.ClearArray Declaration public void ClearArray (); Description Remove all elements from the array. This is equivalent to setting arraySize to 0. Additional resources: isArray .
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_7b39731409e4
unity_docs
animation
What is `Animations.AnimatorState.writeDefaultValues` in Unity? Explain its purpose and usage.
AnimatorState.writeDefaultValues public bool writeDefaultValues ; Description Whether or not the AnimatorStates writes back the default values for properties that are not animated by its Motion.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_4357088cdc2e
unity_docs
editor
What is `Editor.targets` in Unity? Explain its purpose and usage.
Editor.targets public Object[] targets ; Description An array of all the object being inspected. For editors that support multi-object editing, you can use the targets property in OnInspectorGUI . However, it is better to use the serializedObject , as described on the page about the Editor class. Additional...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_30fddf164a1e
unity_docs
rendering
What is `Rendering.RayTracingAccelerationStructure.Settings.rayTracingModeMask` in Unity? Explain its purpose and usage.
RayTracingAccelerationStructure.Settings.rayTracingModeMask public Rendering.RayTracingAccelerationStructure.RayTracingModeMask rayTracingModeMask ; Description An enum that determines the RayTracingMode s a Renderer must have in order to add it to the RayTracingAccelerationStructure. Additional resources:...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_22bd5d43ee23
unity_docs
scripting
What are the parameters of `Experimental.Rendering.GraphicsStateCollection.WarmUp` in Unity?
Returns JobHandle Handle to prewarming job. Description Prewarms all shader variants in this collection using associated graphics states. This will result in the GPU representation of the stored shader variants being created. The JobHandle returned by this method can be used to control if the creation of GPU representa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fb52f6098c91
unity_docs
scripting
What is `GUI.matrix` in Unity? Explain its purpose and usage.
GUI.matrix public static Matrix4x4 matrix ; Description The GUI transform matrix. ```csharp using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Example() { print(GUI.matrix); } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_6910d9d9a9ea_doc_1
github
scripting
What does `OnAnimatorMoveAsObservable` do in this Unity script? Explain its purpose and signature.
Callback for processing animation movements for modifying root motion. Signature: ```csharp public static IObservable<Unit> OnAnimatorMoveAsObservable(this Component component) ```
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_95605ee814e9
unity_docs
animation
What is `AvatarTarget` in Unity? Explain its purpose and usage.
AvatarTarget enumeration Description Target. Additional resources: Animator.SetTarget and Animator.MatchTarget . Properties Property Description Root The root, the position of the game object. Body The body, center of mass. LeftFoot The left foot. RightFoot The right foot. LeftHand The left hand. Right...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_afed7a399895
unity_docs
math
What is `Tilemaps.Tilemap.GetEditorPreviewTransformMatrix` in Unity? Explain its purpose and usage.
Tilemap.GetEditorPreviewTransformMatrix Declaration public Matrix4x4 GetEditorPreviewTransformMatrix ( Vector3Int position ); Parameters Parameter Description position Position of the editor preview Tile on the Tilemap . Returns Matrix4x4 The transform matrix. Description Gets the transform mat...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d63b3b3fa0e3
unity_docs
rendering
Explain 'Lighting' in Unity.
With Unity, you can achieve realistic lighting that is suitable for a range of art styles. Page Description Introduction to lighting Resources for learning about lighting and choosing a lighting setup. Lighting configuration workflow Resources for selecting a render pipeline , configuring global lighting settings, and ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_a16b7eb7cccc
unity_docs
scripting
In Unity's 'Use Unity through web proxies', what is '1) Prepare your environment so Unity applications can use your web proxy' and how does it work?
The automatic proxy configuration feature lets you use Unity applications seamlessly when they need to communicate through a web proxy. Unity applications can communicate with the web proxy without interruption and without installing additional software. The amount of configuration required depends on the following fac...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_20ecb9455f9e
unity_docs
scripting
Show me a Unity C# example demonstrating `Bounds.max`.
Bounds.max public Vector3 max ; Description The maximal point of the box. This is always equal to center+extents . ```csharp using UnityEngine;public class ColliderBounds : MonoBehaviour { Collider m_Collider; Vector3 m_Center; Vector3 m_Size, m_Min, m_Max; void Start() { //Fetch the Collider from the G...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f66005998bbd
unity_docs
editor
What is `SerializationUtility.ClearAllManagedReferencesWithMissingTypes` in Unity? Explain its purpose and usage.
SerializationUtility.ClearAllManagedReferencesWithMissingTypes Declaration public static bool ClearAllManagedReferencesWithMissingTypes ( Object obj ); Description Removes all managed references that are missing their type. This method removes all serialized data associated with managed reference fields that ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_2602cb98d337
unity_docs
scripting
What is `WaitForSeconds.ctor` in Unity? Explain its purpose and usage.
WaitForSeconds Constructor Declaration public WaitForSeconds (float seconds ); Parameters Parameter Description seconds Delay execution by the amount of time in seconds. Description Suspends the coroutine execution for the given amount of seconds using scaled time. Create a yield instruction. Wait for ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_61b185e1f05c
unity_docs
scripting
What is `ForceMode.VelocityChange` in Unity? Explain its purpose and usage.
ForceMode.VelocityChange Description Add an instant velocity change to the rigidbody, ignoring its mass. Apply the velocity change instantly with a single function call. In contrast to ForceMode.Impulse , VelocityChange will change the velocity of every rigidbody the same way regardless of differences in mass. Thi...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_007bbd24890b
unity_docs
scripting
In Unity's 'GradientField', what is 'Create a GradientField' and how does it work?
You can create a GradientField with UI Builder, UXML, or C#. The following C# example creates a GradientField with a default value: ``` var gradient = new GradientField(); gradient.value = new Gradient(); gradient.value.colorKeys = new GradientColorKey[] { new GradientColorKey(Color.red, 0), new GradientColorKey(Colo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_580302597a69
unity_docs
networking
Show me a Unity code example for 'Mirror multiple Unity Accelerator instances'.
to A. You don’t need to worry about circular chains because items are time stamped so a receiving cache server ignores any incoming items that aren’t newer than what it already has. ## Mirror example In the following example, server A has an ip:port of 1.1.1.1:1111 and server B is 2.2.2.2:2222 . Both have no data to ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
gh_0a212619fc54
github
scripting
Write a Unity C# MonoBehaviour script called Pool Service Utilities
```csharp using System; using UnityEngine; namespace Pool.Runtime { /// <summary> /// The PoolServiceUtilities class provides static methods for interacting with the PoolService. /// It allows easy access to MonoBehaviour and non-MonoBehaviour pools, including getting, releasing, and destroying objects. /// </sum...
You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples.
local_sr_ac896e4d4230
unity_docs
editor
What are the parameters of `Handles.DrawOutline` in Unity?
Description Draws an outline around the specified GameObjects in the Scene View. This only applies to GameObjects that have Renderer components. You can only use this during a EventType.Repaint event. Instead of passing in GameObjects or Renderers, you can also use Renderer instance IDs . This improves performance beca...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_107401e0a7d3
unity_docs
networking
What is `Android.AndroidKeyboardHidden` in Unity? Explain its purpose and usage.
AndroidKeyboardHidden enumeration Description Options to indicate whether any keyboard is available for use on the device. Additional resources: AndroidConfiguration.keyboardHidden Properties Property Description Undefined Mirrors the Android property value KEYBOARDHIDDEN_UNDEFINED. No Mirrors the Android pr...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_990e0d46db7f
unity_docs
audio
Give me an overview of the `AudioReverbPreset` class in Unity.
AudioReverbPreset enumeration Description Reverb presets used by the Reverb Zone class and the audio reverb filter. Component for audio sources. Properties Property Description Off No reverb preset selected. Generic Generic preset. PaddedCell Padded cell preset. Room Room preset. Bathroom Bathroom preset. ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9eb0a452c0dc
unity_docs
math
Show me a Unity C# example demonstrating `Bounds.IntersectRay`.
Bounds.IntersectRay Declaration public bool IntersectRay ( Ray ray ); Description Does ray intersect this bounding box? ```csharp using UnityEngine;public class Example : MonoBehaviour { // Function to detect if a ray (representing a beam weapon, say) // makes contact with the collider's bounds. Collider ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_315789fe07c5
unity_docs
scripting
What is `Progress.TimeDisplayMode` in Unity? Explain its purpose and usage.
TimeDisplayMode enumeration Description Specifies what kind of time information the progress indicator displays. Additional resources: Progress.GetTimeDisplayMode , Progress.SetTimeDisplayMode . Properties Property Description NoTimeShown The progress indicator does not display any time information. ShowRun...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_9e27c38c798d
unity_docs
rendering
What is `Experimental.Rendering.GraphicsStateCollection.GetGraphicsStatesForVariant` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. GraphicsStateCollection.GetGraphicsStatesForVariant Declaration public void GetGraphicsStatesForVariant ( Shader shader , Rendering.PassIdentifier passId , LocalKeyword[] keywords , List<GraphicsState> results ); Declar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fbd23a172b72
unity_docs
rendering
What is `TextureImporterSettings.Equal` in Unity? Explain its purpose and usage.
TextureImporterSettings.Equal Declaration public static bool Equal ( TextureImporterSettings a , TextureImporterSettings b ); Description Test texture importer settings for equality. Objects are reported equal if either the references or the values are equal.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e67b5d26fdbd
unity_docs
scripting
Show me a Unity C# example demonstrating `GUILayout.MaxWidth`.
GUILayout.MaxWidth Declaration public static GUILayoutOption MaxWidth (float maxWidth ); Description Option passed to a control to specify a maximum width. Maximum allowed width for a window. ```csharp using UnityEngine;public class ExampleScript : MonoBehaviour { // Draws a window you can resize between 8...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_6e34ed4e8a42
unity_docs
physics
What is `FontRenderingMode.HintedSmooth` in Unity? Explain its purpose and usage.
FontRenderingMode.HintedSmooth Description Use Anti-Aliased Font rendering with hinting. This forces character lines to run along pixel boundaries. Generally produces a crisper output than FontRenderingMode.Smooth , more similar to the font rendering used on Windows. It is slower to render textures then when using...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_f77cafc1cfee
unity_docs
scripting
Show me a Unity C# example demonstrating `Vector3.MoveTowards`.
object speed is independent of frame rate, multiply the maxDistanceDelta value by Time.deltaTime (or Time.fixedDeltaTime in a FixedUpdate loop). If the current position is already closer to the target than maxDistanceDelta , the value returned is equal to target . This method doesn't overshoot target . Y...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0dd6e854bb03
unity_docs
scripting
Show me a Unity C# example demonstrating `TerrainChangedFlags`.
TerrainChangedFlags enumeration Description Indicate the types of changes to the terrain in OnTerrainChanged callback. Use bitwise AND to detect multiple changes. ```csharp using UnityEngine;[ExecuteInEditMode] public class DetectTerrainChanges : MonoBehaviour { void OnTerrainChanged(TerrainChangedFlags flags) ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_27ed8f5a2d04
unity_docs
editor
What is `EditorGUILayout.HorizontalScope.ctor` in Unity? Explain its purpose and usage.
EditorGUILayout.HorizontalScope Constructor Declaration public EditorGUILayout.HorizontalScope (params GUILayoutOption[] options ); Declaration public EditorGUILayout.HorizontalScope ( GUIStyle style , params GUILayoutOption[] options ); Parameters Parameter Description style The style to use for back...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1b579ed2e51f
unity_docs
rendering
What is `Renderer.OnBecameVisible` in Unity? Explain its purpose and usage.
Renderer.OnBecameVisible() Description OnBecameVisible is called when the object became visible by any camera. This message is sent to all scripts attached to the renderer. OnBecameVisible and OnBecameInvisible are useful to avoid computations that are only necessary when the object is visible. ```csharp usin...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_bde6dfcdbe29
unity_docs
scripting
What is `Experimental.GraphView.SelectionDragger.ctor` in Unity? Explain its purpose and usage.
Experimental : this API is experimental and might be changed or removed in the future. SelectionDragger Constructor Declaration public SelectionDragger (); Description SelectionDragger's constructor.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e51ab60adab1
unity_docs
scripting
What is `ConvertToPrefabInstanceSettings.objectMatchMode` in Unity? Explain its purpose and usage.
ConvertToPrefabInstanceSettings.objectMatchMode public ObjectMatchMode objectMatchMode ; Description Use this property to control how GameObjects and Components are matched up or not when converting a plain GameObject to a Prefab instance. The root GameObject and its components will always be matched up regar...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_74027d1efb74
unity_docs
physics
In Unity's 'Introduction to meshes', what is 'Deformable meshes' and how does it work?
In addition to regular meshes, Unity also supports deformable meshes. Deformable meshes fall into the following categories: Skinned meshes: These meshes work with additional data called bones. Bones form a structure called a skeleton (also called a rig, or joint hierarchy), and the skinned mesh contains data that allow...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_68464776daf7
unity_docs
editor
Show me a Unity C# example demonstrating `Application.IsPlaying`.
ption Returns true if the given object is part of the playing world either in any kind of built Player or in Play Mode. In a built Player, this method will always return true. In the Editor, it will return true if the Editor is in Play Mode and the provided object is part of the playing world and not, for example, pa...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_22d6804466b8
unity_docs
scripting
What is `Event.PopEvent` in Unity? Explain its purpose and usage.
Event.PopEvent Declaration public static bool PopEvent ( Event outEvent ); Parameters Parameter Description outEvent Next Event. Description Get the next queued [Event] from the event system.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_3c3106bb7f08
unity_docs
rendering
What is `PlayerSettings.GetDefaultShaderChunkSizeInMB` in Unity? Explain its purpose and usage.
PlayerSettings.GetDefaultShaderChunkSizeInMB Declaration public static int GetDefaultShaderChunkSizeInMB (); Description Gets the default size for compressed shader variant chunks. Additional resources: PlayerSettings.SetDefaultShaderChunkSizeInMB , PlayerSettings.SetDefaultShaderChunkCount , PlayerSettings...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_944997915e49
unity_docs
physics
Show me a Unity C# example demonstrating `BoxcastCommand`.
and at index N in the command buffer are stored at index N * maxHits in the results buffer. Boxcast command also allows you to control whether or not Trigger colliders and back-face triangles generate a hit. Use QueryParameters to control hit flags. Note: Only BatchQuery.ExecuteBoxcastJob is logged into the profiler....
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_0cc93fa476c9
unity_docs
rendering
Show me a Unity C# example demonstrating `ParticleSystem.RotationOverLifetimeModule.enabled`.
ParticleSystem.RotationOverLifetimeModule.enabled public bool enabled ; Description Specifies whether the RotationOverLifetimeModule is enabled or disabled. Additional resources: ParticleSystem.rotationOverLifetime . ```csharp using UnityEngine; using System.Collections;[RequireComponent(typeof(ParticleSyste...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_df4e6c73da78
unity_docs
editor
What is `DragAndDropWindowTarget` in Unity? Explain its purpose and usage.
DragAndDropWindowTarget struct in UnityEditor Description IDs for core windows. These are used by the DragAndDrop.RemoveHandler API. Static Properties Property Description hierarchy ID to target the Hierarchy. inspector ID to target the Inspector. projectBrowser ID to target the Project browser. sceneView I...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_665f15e683b0
unity_docs
scripting
What is `Unity.Hierarchy.Hierarchy.GetChildrenCount` in Unity? Explain its purpose and usage.
Hierarchy.GetChildrenCount Declaration public int GetChildrenCount (ref Unity.Hierarchy.HierarchyNode node ); Parameters Parameter Description node The hierarchy node. Returns int The number of child nodes. Description Gets the number of child nodes that a hierarchy node has.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_307000817682
unity_docs
scripting
What is `Rendering.CommandBuffer.SetInvertCulling` in Unity? Explain its purpose and usage.
CommandBuffer.SetInvertCulling Declaration public void SetInvertCulling (bool invertCulling ); Parameters Parameter Description invertCulling A boolean indicating whether to invert the backface culling (true) or not (false). Description Add a "set invert culling" command to the buffer. When the command bu...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_eb81804c040f
unity_docs
scripting
What is `Search.QueryEngine_1.RemoveOperator` in Unity? Explain its purpose and usage.
QueryEngine<T0>.RemoveOperator Declaration public void RemoveOperator (string op ); Parameters Parameter Description op The operator identifier. Description Removes a custom operator that was added on the QueryEngine . ``` // Remove an operator based on its token var operatorToken = "%"; queryEngine.Remo...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fe85a3c6ec6c
unity_docs
scripting
What is `Serialization.ManagedReferenceUtility.RefIdNull` in Unity? Explain its purpose and usage.
ManagedReferenceUtility.RefIdNull public static long RefIdNull ; Description Special value, -2, used as the managed reference Id of any field decorated with SerializeReference that has no object assigned to it.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_10372a365808
unity_docs
scripting
What is `SceneVisibilityManager.IsCurrentStageIsolated` in Unity? Explain its purpose and usage.
SceneVisibilityManager.IsCurrentStageIsolated Declaration public bool IsCurrentStageIsolated (); Returns bool Returns true if current stage is in Isolation mode. Otherwise, returns false. Description Checks whether the current stage is in Isolation mode.
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_5ea1533db782
unity_docs
ui
Show me a Unity C# example demonstrating `GUIStyle.focused`.
GUIStyle.focused public GUIStyleState focused ; Description Rendering settings for when the element has keyboard focus. ```csharp using UnityEngine;public class Example : MonoBehaviour { void OnGUI() { GUI.skin.button.focused.textColor = Color.blue; } } ```
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_cc4ed5714a36
unity_docs
rendering
What is `MeshTopology.Quads` in Unity? Explain its purpose and usage.
MeshTopology.Quads Description Mesh is made from quads. Each four indices in the mesh index buffer form a quadrangular face. Note that quad topology is emulated on many platforms, so it's more efficient to use a triangular mesh. Unless you really need quads, for example if using DirectX 11 tessellation shaders that...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_49ebe94ff775
unity_docs
scripting
What is `Android.AndroidGame.Automatic.SetGameState` in Unity? Explain its purpose and usage.
AndroidGame.Automatic.SetGameState Declaration public static void SetGameState ( Android.AndroidGameState mode ); Parameters Parameter Description mode AndroidGameState value. Description Sets the current AndroidGameState to be used for Automated game state hinting in Unity . Requires API level 33 (An...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_1561a891cc3f
unity_docs
scripting
Give me an overview of the `TextAnchor` class in Unity.
TextAnchor enumeration Description Where the anchor of the text is placed. This is used by Text.anchor property. Additional resources: GUI Text component . Properties Property Description UpperLeft Text is anchored in upper left corner. UpperCenter Text is anchored in upper side, centered horizontally. Uppe...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_d5954aafb9dc
unity_docs
editor
Explain 'Project window reference' in Unity.
The Project window displays all the files related to your Project and is the main way you can navigate and find assets and other project files in your application. When you start a new project, by default this window is open. However, if you can’t find it, or it’s closed, you can open it from the main menu > Window > G...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_fdaf29385fb0
unity_docs
animation
What is `Animations.TransformSceneHandle.GetLocalPosition` in Unity? Explain its purpose and usage.
TransformSceneHandle.GetLocalPosition Declaration public Vector3 GetLocalPosition ( Animations.AnimationStream stream ); Parameters Parameter Description stream The AnimationStream that manages this handle. Returns Vector3 The position of the transform relative to the parent. Description Gets the ...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_man_8eb18db1fd6b
unity_docs
rendering
In Unity's 'HLSL pragma directives reference', what is 'Surface Shaders' and how does it work?
If you are writing a Surface Shader , use this directive to tell the compiler which function to use as the surface function , and pass data to that function. Statement Function #pragma surface <surface function> <lighting model> <optional parameters> Compile the function with the given name as the surface shader, so th...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_e7fe244af38b
unity_docs
editor
Show me a Unity C# example demonstrating `iOS.Xcode.PBXProject.AddBuildProperty`.
meworkTargetGuid . name The name of the build property. value The value of the build property. targetGuids An array of target GUIDs. Description Adds a value to the build property list in all the build configurations for the specified target(s). Duplicate build properties are ignored. Values for names LIBRARY...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.
local_sr_dad6d0293b5d
unity_docs
scripting
What is `Device.Application` in Unity? Explain its purpose and usage.
Application class in UnityEngine.Device / Implemented in: UnityEngine.CoreModule Description Access to platform-specific application runtime data. This class has the same functionality as Application and also mimics platform-specific behavior in the Unity Editor. Use it together with the Device Simulator to t...
You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges.