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_sr_b8ee9731c3b3 | unity_docs | editor | What is `Search.ISearchView.AddSelection` in Unity? Explain its purpose and usage. | ISearchView.AddSelection
Declaration
public void
AddSelection
(params int[]
selection
);
Parameters
Parameter
Description
selection
Array of item indices to add to selection.
Description
Adds new items to the current selection.
.
```csharp
using UnityEngine;
using UnityEditor;
using UnityEditor.Search;
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_848c2c99e307 | unity_docs | scripting | What is `Unity.Android.Gradle.Property_1` in Unity? Explain its purpose and usage. | Property<T0>
class in
Unity.Android.Gradle
/
Inherits from:
Unity.Android.Gradle.BaseProperty
Description
Base class for all properties in gradle files.
Public Methods
Method
Description
Clear
Clears the content of this element.
Get
Gets the value of this property.
GetRaw
Gets the raw value of this propert... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_963d8c3d861d | unity_docs | rendering | Show me a Unity C# example demonstrating `Rendering.ScriptableRenderContext.BeginScopedRenderPass`. | er; the attachments cannot be bound
as textures or otherwise accessed until the renderpass has ended
- iOS Metal does not allow reading from the Z-Buffer, so an additional render target is needed to work around that
- The maximum amount of attachments allowed per render pass is currently 8 + depth, but note that vario... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2106a84649d3 | unity_docs | physics | What is `Scripting.GarbageCollector.incrementalTimeSliceNanoseconds` in Unity? Explain its purpose and usage. | GarbageCollector.incrementalTimeSliceNanoseconds
public static ulong
incrementalTimeSliceNanoseconds
;
Description
The target duration of a collection step when performing incremental garbage collection.
When you enable incremental garbage collection, the garbage collector spreads the amount of work required to... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b1a1da98d716 | unity_docs | physics | What is `Unity.Collections.LowLevel.Unsafe.NativeContainerIsAtomicWriteOnlyAttribute` in Unity? Explain its purpose and usage. | NativeContainerIsAtomicWriteOnlyAttribute
class in
Unity.Collections.LowLevel.Unsafe
/
Implemented in:
UnityEngine.CoreModule
Description
Indicates that the native container only allows writing, and can only be written to in safe, parallel contexts.
Use this attribute when defining a concurrent, write-only int... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_73f7e945f9ed | unity_docs | scripting | Explain 'Set up an Audio Source component' in Unity. | Create an audio source to control how an audio clip plays, where it plays and how often.
To create and configure an audio source:
Import your audio files
.
Create an audio source
.
Assign an audio resource to your audio source
.
Alter the settings of your audio source
.
## Import your audio files
To import your audio... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_ce6e16363e87 | unity_docs | rendering | Explain 'Reflective Parallax Diffuse' in Unity. | Note.
Unity 5 introduced the
Standard Shader
which replaces this
shader
.
## Reflective Properties
Note.
Unity 5 introduced the
Standard Shader
which replaces this shader.
This shader will simulate reflective surfaces such as cars, metal objects etc. It requires an environment Cubemap which will define what exactly i... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fd0cbbefad6b | unity_docs | rendering | What is `AssetImporters.SpriteImportData` in Unity? Explain its purpose and usage. | SpriteImportData
struct in
UnityEditor.AssetImporters
Description
Struct that represents how
Sprite
asset should be generated when calling
TextureGenerator.GenerateTexture
.
Properties
Property
Description
alignment
Pivot value represented by SpriteAlignment.
border
Border value for the generated Sprite.
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c97015b2ba1e | unity_docs | animation | Show me a Unity C# example demonstrating `Keyframe.time`. | Keyframe.time
public float
time
;
Description
The time of the keyframe.
In a 2D graph you could think of this as the x-value.
Additional resources:
value
.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
AnimationCurve curve = AnimationCurve.Linear(0, 0, 5, 5);
// Extract... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2b49b66222b2 | unity_docs | audio | Show me a Unity C# example demonstrating `iOS.Xcode.PBXCapabilityType`. | PBXCapabilityType
class in
UnityEditor.iOS.Xcode
Description
Represents the capability types you can configure in a PBXProject.
```csharp
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;publ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2b44fa9f0f3c | unity_docs | ui | What is `AssetSettingsProvider.OnTitleBarGUI` in Unity? Explain its purpose and usage. | AssetSettingsProvider.OnTitleBarGUI
Declaration
public void
OnTitleBarGUI
();
Description
Overrides
SettingsProvider.OnTitleBarGUI
for this AssetSettingsProvider. This draws the button bar that contains the "add to preset" and the "help" buttons. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_09dddd2187f9 | unity_docs | editor | What is `Unity.Profiling.LowLevel.Unsafe.ProfilerRecorderHandle` in Unity? Explain its purpose and usage. | ProfilerRecorderHandle
struct in
Unity.Profiling.LowLevel.Unsafe
/
Implemented in:
UnityEngine.CoreModule
Description
Gets the handle of a Profiler metric.
Gets information about built-in or created Profiler markers or counters that are accessible with
ProfilerRecorder
.
Properties
Property
Description
Val... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_59ff9f708751 | unity_docs | rendering | What is `SceneView.cameraViewport` in Unity? Explain its purpose and usage. | SceneView.cameraViewport
public
Rect
cameraViewport
;
Description
The position and size of the area that the camera renders.
This returns a rect. The rect accounts for any offset that
Overlay
toolbars introduce. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_1f6e51d4ef35 | unity_docs | editor | Explain 'Set up Play Asset Delivery' in Unity. | Play Asset Delivery
is the asset splitting solution for
Android App Bundles
(AAB). To use Play Asset Delivery, set up your project to:
Use the AAB publishing format. For information on how to do this, refer to
Publishing format
.
Split the application binary. For information on how to do this, refer to
Splitting the ap... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_31ca4249b1d2 | unity_docs | scripting | What is `CustomGridBrushAttribute.ctor` in Unity? Explain its purpose and usage. | CustomGridBrushAttribute Constructor
Declaration
public
CustomGridBrushAttribute
();
Declaration
public
CustomGridBrushAttribute
(bool
hideAssetInstances
,
bool
hideDefaultInstance
,
bool
defaultBrush
,
string
defaultName
);
Parameters
Parameter
Description
defaultBrush
If set to true, brush will repl... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a4d6480bd08b | unity_docs | math | What is `Experimental.GraphView.Port.GetGlobalCenter` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
Port.GetGlobalCenter
Declaration
public
Vector3
GetGlobalCenter
();
Returns
Vector3
The center point.
Description
Get the port's center. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_82553fed3259 | unity_docs | editor | What are the parameters of `Build.Profile.BuildProfile.SetActiveBuildProfile` in Unity? | Description Sets the active build profile. This method updates the active build profile in Unity. When you switch to a build profile that targets a non-active platform, this function reimports assets affected by the target platform settings and then returns. All script files will be compiled on the next Editor update. ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_829d59be35c3 | unity_docs | editor | What is `PlayerSettings.WSA.supportStreamingInstall` in Unity? Explain its purpose and usage. | PlayerSettings.WSA.supportStreamingInstall
public static bool
supportStreamingInstall
;
Description
Indicates whether you can launch the Universal Windows Platform application package before installation is complete.
In the Editor, Unity displays this under
Streaming Install
in
UWP Player Settings
.
If you... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3b12d2900e75 | unity_docs | scripting | Show me a Unity C# example demonstrating `Component.GetComponentsInParent`. | t attached to that GameObject). You can then call
GetComponentsInParent
on that reference.
See the
Component
and
GameObject
class reference pages for the other variations of the
GetComponent
family of methods.
The following example gets a reference to all hinge joint components on the same GameObject as the scr... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_182ddff7049e | unity_docs | rendering | What is `SceneView.FrameLastActiveSceneView` in Unity? Explain its purpose and usage. | SceneView.FrameLastActiveSceneView
Declaration
public static bool
FrameLastActiveSceneView
();
Returns
bool
Returns true if the camera frame successfully frames the current selection.
Description
Frames the currently selected object(s) in the last active Scene view. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_55c00d027ff2 | unity_docs | editor | What is `EditorUtility.UnloadUnusedAssetsImmediate` in Unity? Explain its purpose and usage. | EditorUtility.UnloadUnusedAssetsImmediate
Declaration
public static void
UnloadUnusedAssetsImmediate
();
Declaration
public static void
UnloadUnusedAssetsImmediate
(bool
includeMonoReferencesAsRoots
);
Parameters
Parameter
Description
includeMonoReferencesAsRoots
When true, this method does not unload as... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7a4b90c18e24 | unity_docs | audio | What is `Audio.AudioMixer.GetFloat` in Unity? Explain its purpose and usage. | AudioMixer.GetFloat
Declaration
public bool
GetFloat
(string
name
,
out float
value
);
Parameters
Parameter
Description
name
Name of exposed parameter.
value
Return value of exposed parameter.
Returns
bool
Returns false if the exposed parameter specified doesn't exist.
Description
Returns the valu... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e7edad32e4b0 | unity_docs | scripting | What is `Rendering.FoveatedRenderingCaps` in Unity? Explain its purpose and usage. | FoveatedRenderingCaps
enumeration
Description
Capabilities of the foveated rendering implementation.
Properties
Property
Description
None
Foveated rendering is not supported.
FoveationImage
The platform can use a foveation image to control the shading rate per tile in screen-space.
NonUniformRaster
The platfo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_74046ca37a35 | unity_docs | animation | What is `AnimatorStateInfo.normalizedTime` in Unity? Explain its purpose and usage. | AnimatorStateInfo.normalizedTime
public float
normalizedTime
;
Description
Normalized time of the State.
The normalized time is a progression ratio. The integer part is the number of times the State has looped. The fractional part is a percentage (0-1) that represents the progress of the current loop. For examp... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e2c6ea71540a | unity_docs | audio | What is `UnityEngine.VideoModule` in Unity? Explain its purpose and usage. | UnityEngine.VideoModule
Description
The Video module lets you play back video files in your content.
Classes
Class
Description
VideoClip
A container for video data.
VideoPlayer
Plays video content onto a target.
VideoPlayerExtensions
Extension methods for the VideoPlayer class.
Structs
Struct
Description
V... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8a392da3cdf9 | unity_docs | scripting | What is `Experimental.GraphView.PlacematContainer` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
PlacematContainer
class in
UnityEditor.Experimental.GraphView
/
Inherits from:
Experimental.GraphView.GraphView.Layer
Description
The GraphView layer for placemats.
Note: this layer is always the bottom-most GraphView layer.... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_47d477e785d8 | unity_docs | scripting | Show me a Unity C# example demonstrating `Event.penStatus`. | often mixed with pen events in the event stream, and you can't distinguish them by type because mouse and pen events share the same
EventType
. Instead, use
PointerType
to distinguish them. Otherwise, Unity processes all incoming mouse events as pen events, which can lead to unexpected behavior because the mouse eve... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_905014e14c85 | unity_docs | scripting | Show me a Unity C# example demonstrating `ArticulationBody.AddTorque`. | will result in only the Angular Velocity Per Second accumulator being applied.
For more information on how ForceMode affects angular velocity, see
Rigidbody.AddTorque
.
Applying a torque to an ArticulationBody wakes up that body. If the torque size is zero then the ArticulationBody does not wake up.
Unit of measureme... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_b5e52cc64d05 | unity_docs | input | Show me a Unity C# example demonstrating `Input.GetMouseButtonDown`. | that you don't use this API in new projects. For new projects, use the Input System package. To learn more about input, refer to
Input
.
Call this function from the
Update
function, since the state gets reset each frame.
It will not return true until the user has released the mouse button and pressed it again.
butt... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_94b98c1dd8a6 | unity_docs | ui | What is `Canvas.overrideSorting` in Unity? Explain its purpose and usage. | Canvas.overrideSorting
public bool
overrideSorting
;
Description
Allows for nested canvases to override the
Canvas.sortingOrder
from parent canvases.
If set, nested canvases can ignore the parent draw order, and either draw on top of or below the parent draw order. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d83602e2f709 | unity_docs | xr | What is `Experimental.GlobalIllumination.Lightmapping.RequestLightsDelegate` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
Lightmapping.RequestLightsDelegate
Declaration
public delegate void
RequestLightsDelegate
(Light[]
requests
,
NativeArray<LightDataGI>
lightsOutput
);
Parameters
Parameter
Description
requests
The list of lights to be co... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8fd5f0fab53c | unity_docs | editor | Show me a Unity C# example demonstrating `JsonUtility`. | when saving game state.
The functions use the standard Unity serializer, which means they only serialize or deserialize the fields on an object, and only when the fields are of supported types. For more information about the Unity serializer, refer to
Serialization rules
in the Unity manual.
The following example sho... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_91066911ecda | unity_docs | rendering | Show me a Unity C# example demonstrating `AssetPostprocessor.OnPreprocessLightDescription`. | ve a notification when a light is imported from a Model Importer.
Unity only calls this function when ModelImporter.ImportLights is true. This function gives you control over light properties and animations during the model import process. The LightDescription structure contains all the light data from the imported fi... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_7d78fc24ef2b | unity_docs | rendering | What is `Renderer.SetMaterials` in Unity? Explain its purpose and usage. | Renderer.SetMaterials
Declaration
public void
SetMaterials
(List<Material>
materials
);
Parameters
Parameter
Description
materials
A list of materials to assign to this object.
Description
Assigns the shared materials of this object using the list of materials provided.
Use this method to set the material... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_814d4ec08b86 | unity_docs | math | What are the parameters of `Unity.Collections.LowLevel.Unsafe.UnsafeUtility.MemCpyReplicate` in Unity? | Description Copies memory from a source to a destination and replicates it multiple times. The MemCpyReplicate method copies a specified block of memory from a source location and replicates that block multiple times into a destination location. This is useful for quickly initializing a large buffer with repeated value... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_911489d87d2f | unity_docs | ui | What is `UIElements.PointerCaptureHelper.CapturePointer` in Unity? Explain its purpose and usage. | PointerCaptureHelper.CapturePointer
Declaration
public static void
CapturePointer
(
UIElements.IEventHandler
handler
,
int
pointerId
);
Parameters
Parameter
Description
handler
The VisualElement that captures the pointer.
pointerId
The pointer to capture.
Description
Captures the pointer.
When a V... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9abefd2721c7 | unity_docs | editor | What are the parameters of `QualitySettings.IsPlatformIncluded` in Unity? | Returns bool If the platform is included. Description [Editor Only] Returns if the given platform is included by the Quality Level. ```csharp
public bool IsPlatformIcluded(BuildTarget platform, int index)
{
var activeBuildTargetGroup = BuildPipeline.GetBuildTargetGroup(platform);
var namedBuildTarge... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_df6c0b756c83 | unity_docs | xr | What is `Unity.IO.LowLevel.Unsafe.AsyncReadManagerRequestMetric.RequestTimeMicroseconds` in Unity? Explain its purpose and usage. | AsyncReadManagerRequestMetric.RequestTimeMicroseconds
public double
RequestTimeMicroseconds
;
Description
The time at which the read request was made, in microseconds elapsed since application startup. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_665bd0d61b32 | unity_docs | rendering | In Unity's 'Style UI with UI Builder', what is 'Create USS selectors' and how does it work? | You can create any new USS selectors in the StyleSheets window. You can also create a new class selector in the StyleSheets section in the Inspector window. A new selector is always added to the
Active StyleSheet
.
To create a new selector in the StyleSheets window:
In the StyleSheets window, click in the
Add new selec... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_19f48938cca2 | unity_docs | physics | What is `Collider2D.contactCaptureLayers` in Unity? Explain its purpose and usage. | Collider2D.contactCaptureLayers
public
LayerMask
contactCaptureLayers
;
Description
The layers of other
Collider2D
involved in contacts with this
Collider2D
that will be captured.
Contacts are produced by the physics system and are used to calculate behaviours such as collision response. These contacts ar... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_871993776b42 | unity_docs | ui | What is `GUIStyle.name` in Unity? Explain its purpose and usage. | GUIStyle.name
public string
name
;
Description
The name of this GUIStyle. Used for getting them based on name.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
// Prints the name of the style. void OnGUI()
{
Debug.Log(GUI.skin.button.name);
}
}
``` | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0b0112e3ef9e | unity_docs | scripting | What is `UIElements.Vector3Field` in Unity? Explain its purpose and usage. | Vector3Field
class in
UnityEngine.UIElements
/
Inherits from:
UIElements.BaseCompositeField_3
/
Implemented in:
UnityEngine.UIElementsModule
Description
A
Vector3
field. For more information, refer to
UXML element Vector3Field
.
Static Properties
Property
Description
inputUssClassName
USS class nam... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_7cbd54f21f0f | unity_docs | rendering | Explain 'Transparent Diffuse' in Unity. | Note.
Unity 5 introduced the
Standard Shader
which replaces this
shader
.
## Transparent Properties
Note.
Unity 5 introduced the
Standard Shader
which replaces this shader.
This shader can make mesh geometry partially or fully transparent by reading the alpha channel of the main texture. In the alpha, 0 (black) is co... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5dcb09c6d222 | unity_docs | rendering | What is `Shader.GetPropertyDescription` in Unity? Explain its purpose and usage. | Shader.GetPropertyDescription
Declaration
public string
GetPropertyDescription
(int
propertyIndex
);
Parameters
Parameter
Description
propertyIndex
The index of the shader property.
Description
Returns the description string of the shader property at the specified index.
If Unity cannot find a property a... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_16523041ae42 | unity_docs | input | What is `UIElements.IPointerEvent` in Unity? Explain its purpose and usage. | IPointerEvent
interface in
UnityEngine.UIElements
Description
This interface describes properties available to pointer events.
Properties
Property
Description
actionKey
Gets a boolean value that indicates whether the platform-specific action key is pressed. True means the action
key is pressed. False mea... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_f3f1795ceb80 | unity_docs | rendering | What is `CullingGroup` in Unity? Explain its purpose and usage. | CullingGroup
class in
UnityEngine
/
Implemented in:
UnityEngine.CoreModule
Description
Describes a set of bounding spheres that should have their visibility and distances maintained.
Properties
Property
Description
enabled
Pauses culling group execution.
onStateChanged
Sets the callback that will be called ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_19d1e11a5662 | unity_docs | editor | What is `FileUtil` in Unity? Explain its purpose and usage. | FileUtil
class in
UnityEditor
Description
Lets you do
move
,
copy
,
delete
operations over files or directories.
Static Methods
Method
Description
CopyFileOrDirectory
Copies a file or a directory.
CopyFileOrDirectoryFollowSymlinks
Copies the file or directory.
DeleteFileOrDirectory
Deletes a file or a di... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fb7024164e64 | unity_docs | rendering | What is `TerrainTools.PaintContext.Cleanup` in Unity? Explain its purpose and usage. | PaintContext.Cleanup
Declaration
public void
Cleanup
(bool
restoreRenderTexture
);
Parameters
Parameter
Description
restoreRenderTexture
When true, indicates that this function restores RenderTexture.active
Description
Releases the allocated resources of this PaintContext.
This function releases the
sou... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_272a326fdedb | unity_docs | scripting | Show me a Unity C# example demonstrating `Build.Reporting.BuildReport`. | about the Unity build process.
A BuildReport object is returned by
BuildPipeline.BuildPlayer
and can be used to discover information about the files output, the build steps taken, and other platform-specific information such as native code stripping.
For AssetBundle builds the BuildReport is available by calling
Ge... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_974c38c8df94 | unity_docs | rendering | What is `GUIContent.image` in Unity? Explain its purpose and usage. | GUIContent.image
public
Texture
image
;
Description
The icon image contained.
```csharp
using UnityEngine;public class ExampleScript : MonoBehaviour
{
public Texture icon; void OnGUI()
{
if (!icon)
{
Debug.LogError("Add a texture on the inspector first");
return;
}
GUI.Button(new Rect(0, 0, 100, 20), ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_e53771d30d64 | unity_docs | rendering | In Unity's 'Set a shader to require GPU features', what is 'Keywords' and how does it work? | multi-compile keyword
GPU feature
Keyword for conditional shader code UNITY_DEVICE_SUPPORTS_NATIVE_16BIT Supports 16-bit data types. If you use this keyword, the layout of shader buffers might change, because data types such as half and min16float convert to 16-bit.
UNITY_DEVICE_SUPPORTS_NATIVE_16BIT UNITY_DEVICE_SUPPO... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_fb212d48f1fe | unity_docs | rendering | What is `CubemapArray.CopyPixels` in Unity? Explain its purpose and usage. | CubemapArray.CopyPixels
Declaration
public void
CopyPixels
(
Texture
src
);
Declaration
public void
CopyPixels
(
Texture
src
,
int
srcElement
,
int
srcMip
,
int
dstElement
,
int
dstMip
);
Declaration
public void
CopyPixels
(
Texture
src
,
int
srcElement
,
int
srcMip
,
int
srcX
,
int
srcY
,
int... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_212ca065f181 | unity_docs | scripting | What is `LensFlare` in Unity? Explain its purpose and usage. | LensFlare
class in
UnityEngine
/
Inherits from:
Behaviour
/
Implemented in:
UnityEngine.CoreModule
Description
Script interface for a
Lens flare component
.
This allows you to change the brightness and color of lens flares at runtime.
Properties
Property
Description
brightness
The strength of the flare.... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_114d2b3316a8 | unity_docs | rendering | Explain 'Reducing the file size of a build' in Unity. | Keeping the file size of your built application to a minimum is important to ensure that it doesn’t take up too much space on the end device, or to meet size requirements when submitting your application to online stores.
## Suggestions for reducing build size
The following settings and features impact the size of a ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_17a2db63f988 | unity_docs | scripting | What is `Android.AndroidAssetPacks.DownloadAssetPackAsync` in Unity? Explain its purpose and usage. | AndroidAssetPacks.DownloadAssetPackAsync
Declaration
public static
Android.DownloadAssetPackAsyncOperation
DownloadAssetPackAsync
(string[]
assetPackNames
);
Parameters
Parameter
Description
assetPackNames
The array of names of Android asset packs to download.
Returns
DownloadAssetPackAsyncOperation
Re... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_ca10726056d7 | unity_docs | scripting | What is `Experimental.Rendering.GraphicsFormatUtility.IsIntegerFormat` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphicsFormatUtility.IsIntegerFormat
Declaration
public static bool
IsIntegerFormat
(
Experimental.Rendering.GraphicsFormat
format
);
Description
Returns true if the format is an integer format. Returns false otherwise. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a3ec3e4e5731 | unity_docs | math | What is `Mesh.SetVertexBufferData` in Unity? Explain its purpose and usage. | Mesh.SetVertexBufferData
Declaration
public void
SetVertexBufferData
(NativeArray<T>
data
,
int
dataStart
,
int
meshBufferStart
,
int
count
,
int
stream
,
Rendering.MeshUpdateFlags
flags
);
Declaration
public void
SetVertexBufferData
(T[]
data
,
int
dataStart
,
int
meshBufferStart
,
int
count
,
int ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_48045192ba62 | unity_docs | animation | What is `Animations.GenericBindingUtility.GetCurveBindings` in Unity? Explain its purpose and usage. | GenericBindingUtility.GetCurveBindings
Declaration
public static GenericBinding[]
GetCurveBindings
(
AnimationClip
clip
);
Parameters
Parameter
Description
clip
The animation clip.
Returns
GenericBinding[]
Returns an array of
GenericBinding
for the animation curves. Returns an empty array if the anima... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_983b711627d0 | unity_docs | scripting | What is `Tilemaps.TileBase` in Unity? Explain its purpose and usage. | TileBase
class in
UnityEngine.Tilemaps
/
Inherits from:
ScriptableObject
/
Implemented in:
UnityEngine.TilemapModule
Description
Base class for a tile in the
Tilemap
.
Inherit from this to implement your custom tile to be placed in a
Tilemap
component.
Public Methods
Method
Description
GetTileAnimation... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a677c5a0387b | unity_docs | editor | What is `PrefabUtility.InstantiatePrefab` in Unity? Explain its purpose and usage. | PrefabUtility.InstantiatePrefab
Declaration
public static Object
InstantiatePrefab
(
Object
assetComponentOrGameObject
);
Declaration
public static Object
InstantiatePrefab
(
Object
assetComponentOrGameObject
,
SceneManagement.Scene
destinationScene
);
Parameters
Parameter
Description
assetComponent... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1f7847519fa5 | unity_docs | ui | What is `GUIUtility.GetControlID` in Unity? Explain its purpose and usage. | GUIUtility.GetControlID
Declaration
public static int
GetControlID
(
FocusType
focus
);
Declaration
public static int
GetControlID
(
FocusType
focus
,
Rect
position
);
Description
Get a unique ID for a control.
```csharp
using UnityEngine;public class Example : MonoBehaviour
{
// Prints a not used I... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_4b87ec558216 | github | scripting | Write a Unity C# XR/VR script for Action To Haptics | ```csharp
using UnityEngine.InputSystem;
using UnityEngine.XR.OpenXR.Input;
namespace UnityEngine.XR.OpenXR.Samples.ControllerSample
{
public class ActionToHaptics : MonoBehaviour
{
public InputActionReference action;
public InputActionReference hapticAction;
public float _amplitude = 1... | You are a knowledgeable Unity developer. Explain Unity concepts clearly and provide practical, tested code examples. |
local_sr_803bcab18bef | unity_docs | input | What is `WSA.Cursor.SetCustomCursor` in Unity? Explain its purpose and usage. | Cursor.SetCustomCursor
Declaration
public static void
SetCustomCursor
(uint
id
);
Parameters
Parameter
Description
id
The cursor resource id.
Description
Set a custom cursor.
This creates new CoreCursor(CoreCursorType::Custom, id) and assigns it to CoreIndependentInputSource.PointerCursor if independent i... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8af1a6756d12 | unity_docs | math | Show me a Unity C# example demonstrating `MaterialPropertyBlock.Clear`. | MaterialPropertyBlock.Clear
Declaration
public void
Clear
();
Description
Clear material property values.
Graphics.RenderMesh
copies the passed property block, so the most efficient way of using it is
to create one block and reuse it for all DrawMesh calls. Use
Clear
to clear block's values,
and
SetFloat
, ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_01cafc199b8e | unity_docs | performance | Show me a Unity C# example demonstrating `Unity.Profiling.ProfilerMarker.Auto`. | ProfilerMarker.Auto
Declaration
public
Unity.Profiling.ProfilerMarker.AutoScope
Auto
();
Returns
AutoScope
IDisposable struct which calls
Begin
and
End
automatically.
Description
Creates a helper struct for the scoped
using
blocks.
Begin
is called in the constructor and
End
in the
Dispose
met... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_18ff806b71fc | unity_docs | rendering | What is `MaterialPropertyBlock` in Unity? Explain its purpose and usage. | MaterialPropertyBlock
class in
UnityEngine
/
Implemented in:
UnityEngine.CoreModule
Description
A block of material values to apply.
MaterialPropertyBlock is used by
Graphics.RenderMesh
and
Renderer.SetPropertyBlock
. Use
it in situations where you want to draw
multiple objects with the same material, but sl... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_3148fbe384f1 | unity_docs | rendering | What is `PlayerSettings.vulkanEnableSetSRGBWrite` in Unity? Explain its purpose and usage. | PlayerSettings.vulkanEnableSetSRGBWrite
public static bool
vulkanEnableSetSRGBWrite
;
Description
Enables the ability to toggle sRGB write mode on Vulkan framebuffers.
In a Linear Color Space workflow, enabling sRGB write mode allows the GPU to automatically perform linear-to-sRGB conversion and ensures that b... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_07e7e501519a | unity_docs | scripting | Explain 'LayerField' in Unity. | A LayerField allows the users to select a layer from a list of available
layers
.
Note
: To align a LayerField with other fields in an Inspector window, simply apply the.unity-base-field__aligned
USS class to it. For more information, refer to
BaseField
.
## Create a LayerField
You can create a LayerField with UI Bui... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_788469919ce2 | unity_docs | physics | What is `ArticulationBody.solverIterations` in Unity? Explain its purpose and usage. | ArticulationBody.solverIterations
public int
solverIterations
;
Description
The solverIterations determines how accurately articulation body joints and collision contacts are resolved.
If you are having trouble with connected articulation bodies oscillating and behaving erratically, setting
a higher solver it... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_174fa129e714 | unity_docs | performance | What is `Unity.IO.LowLevel.Unsafe.AsyncReadManager.ReadDeferred` in Unity? Explain its purpose and usage. | AsyncReadManager.ReadDeferred
Declaration
public static
Unity.IO.LowLevel.Unsafe.ReadHandle
ReadDeferred
(ref
Unity.IO.LowLevel.Unsafe.FileHandle
fileHandle
,
ReadCommandArray*
readCmdArray
,
Unity.Jobs.JobHandle
dependency
);
Parameters
Parameter
Description
fileHandle
The FileHandle to be read from... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_c6a736bdc4d2 | unity_docs | editor | What is `EditorGUIUtility.DrawColorSwatch` in Unity? Explain its purpose and usage. | EditorGUIUtility.DrawColorSwatch
Declaration
public static void
DrawColorSwatch
(
Rect
position
,
Color
color
);
Parameters
Parameter
Description
position
The rectangle to draw the color swatch within.
color
The color to draw.
Description
Draw a color swatch. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_14ca86f9d1d4 | unity_docs | performance | What is `Unity.Collections.NativeArray_1.ReadOnly.ToArray` in Unity? Explain its purpose and usage. | NativeArray<T0>.ToArray
Declaration
public T[]
ToArray
();
Returns
T[]
A new managed array with the same contents as the given
ReadOnly
.
Description
Convert the data in a
ReadOnly
to a managed array. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_1e9db30f2090 | unity_docs | math | What is `Touch.deltaPosition` in Unity? Explain its purpose and usage. | Touch.deltaPosition
public
Vector2
deltaPosition
;
Description
The position delta since last change in pixel coordinates.
The absolute position of the touch is recorded periodically and available in the
position
property. The deltaPosition value is a Vector2 in pixel coordinates that represents the differen... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a95eb22e5e4c | unity_docs | scripting | Show me a Unity C# example demonstrating `LowLevel.PlayerLoop.SetPlayerLoop`. | add a script that runs immediately before physics, or in other places where scripts are not run by default.
The following example inserts a custom Player loop system that runs after the
PreLateUpdate
system in the Player loop. The custom system's
updateDelegate
is assigned the
CustomUpdate
method, which prints a ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d190a58aef0b | unity_docs | scripting | What are the parameters of `Transform.Rotate` in Unity? | Description Applies a rotation of eulerAngles.z degrees around the z-axis, eulerAngles.x degrees around the x-axis, and eulerAngles.y degrees around the y-axis (in that order). Rotate takes a Vector3 argument as an Euler angle. The second argument is the rotation axes, which can be set to local axis ( Space.Self ) or g... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_27e0084f4494 | unity_docs | rendering | What is `Material.GetInt` in Unity? Explain its purpose and usage. | Material.GetInt
Declaration
public int
GetInt
(string
name
);
Declaration
public int
GetInt
(int
nameID
);
Parameters
Parameter
Description
nameID
The name ID of the property retrieved by
Shader.PropertyToID
.
name
The name of the property.
Description
This method is deprecated. Use
GetFloat
or ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8813db820904 | unity_docs | scripting | What is `Events.UnityEventTools.AddFloatPersistentListener` in Unity? Explain its purpose and usage. | UnityEventTools.AddFloatPersistentListener
Declaration
public static void
AddFloatPersistentListener
(
Events.UnityEventBase
unityEvent
,
UnityAction<float>
call
,
float
argument
);
Parameters
Parameter
Description
unityEvent
Event to modify.
call
Function to call.
argument
Argument to use when invoki... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_75bfd79b691d | unity_docs | editor | What is `PackageManager.UI.IPackageManagerExtension` in Unity? Explain its purpose and usage. | IPackageManagerExtension
interface in
UnityEditor.PackageManager.UI
Description
Interface for Package Manager UI Extension.
Public Methods
Method
Description
CreateExtensionUI
Creates the extension UI visual element.
OnPackageAddedOrUpdated
Called by the Package Manager UI when a package is added or updated.... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_c1611780d7e0 | unity_docs | scripting | In Unity's 'Stop and restart Unity Accelerator', what is 'Windows' and how does it work? | Open the
Services Panel
by searching for the term Services in the Settings menu, or running
services.msc
in the Run dialog (
Win
+
R
).
Locate the
Unity Accelerator
service in the list. The option to
Stop the service or Restart the service
appears on the left panel.
Alternatively you can use the
net stop and net start
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_49b4a51f0e31 | unity_docs | physics | What is `DistanceJoint2D.distance` in Unity? Explain its purpose and usage. | DistanceJoint2D.distance
public float
distance
;
Description
The distance separating the two ends of the joint.
Additional resources:
AnchoredJoint2D.anchor
,
AnchoredJoint2D.connectedAnchor
. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_08d6599c76cd | unity_docs | rendering | In Unity's 'Frame Debugger Event Information reference', what is 'Preview' and how does it work? | The preview section consists of two tabs:
The Output tab displays a preview of the selected event output.
The
Mesh Preview
tab displays the mesh geometry Unity rendered in the event.
Label Description A
Preview
: A preview of the mesh geometry Unity rendered during the event.
B
Mesh name
: The name of the mesh asset in... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_6da3dbc2d088 | unity_docs | scripting | In Unity's 'Package a UWP app in Visual Studio', what is 'Create an app package in Visual Studio' and how does it work? | To create an app package in Visual Studio:
Open your built UWP project in Visual Studio.
In the
Solution Explorer
, right-click on your main project.
Go to
Publish
>
Create App Packages
. The
Create App Packages
wizard appears.
Select
Microsoft Store using a new app name
and then click
Next
.
Note:
If you choose Sidelo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_5541f7f37bf6 | unity_docs | rendering | What is `Texture3D` in Unity? Explain its purpose and usage. | Texture3D
class in
UnityEngine
/
Inherits from:
Texture
/
Implemented in:
UnityEngine.CoreModule
Description
Class for handling 3D Textures, Use this to create
3D texture assets
.
3D textures are commonly used as lookup tables by shaders, or to represent volumetric data.
Typically you'd create a 3D texture,... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_be42b0f0005d | unity_docs | ui | Show me a Unity C# example demonstrating `UIElements.UxmlAttributeAttribute`. | ibute.
When a field or property is associated with a UXML attribute, all of its attributes are transferred over to the serialized version.
This allows for the support of custom property drawers and decorator attributes, such as
HeaderAttribute
,
TextAreaAttribute
,
RangeAttribute
,
TooltipAttribute
, and so on.
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_a29226d412d2 | unity_docs | rendering | Give me an overview of the `TextureMipmapLimitGroups` class in Unity. | TextureMipmapLimitGroups
class in
UnityEngine
/
Implemented in:
UnityEngine.CoreModule
Description
Script interface for texture mipmap limit groups.
Use this class to add, remove or detect texture mipmap limit groups in C#.
Additional resources:
TextureMipmapLimitSettings
,
QualitySettings.globalTextureMipmap... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
gh_e3993c385a7a | github | scripting | Write a Unity C# MonoBehaviour script called Object Pool | ```csharp
using UnityEngine;
using System.Collections.Generic;
using UnityEngine.Pool;
namespace GrimTools.Runtime
{
public class ObjectPool : MonoBehaviour
{
public static ObjectPool Instance
{
get;
private set;
}
private Dictionary<GameObject, ObjectPo... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_9cbc4133c74e | unity_docs | physics | What is `ParticleSystemCollisionMode` in Unity? Explain its purpose and usage. | ParticleSystemCollisionMode
enumeration
Description
Whether to use 2D or 3D colliders for particle collisions.
Properties
Property
Description
Collision3D
Use 3D colliders to collide particles against.
Collision2D
Use 2D colliders to collide particles against. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8e3e2fb193a3 | unity_docs | scripting | What are the parameters of `Debug.LogWarning` in Unity? | Description A variant of Debug.Log that logs a warning message to the console. When you select the message in the Editor's console, the context object to which the message applies is highlighted in the Hierarchy window. You can click the hyperlinks in the stack trace to go directly to the relevant lines of code in your... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_9bcbb9083ecf | unity_docs | scripting | Explain 'Create a custom Inspector' in Unity. | Version
: 2022.3+
Although there is a default Inspector for your MonoBehaviours and ScriptableObjects, you might want to write a custom Inspector for your classes. A custom Inspector can help you do the following:
Create a more user-friendly representation of script properties.
Organize and group properties together.
D... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_8f41754f0f23 | unity_docs | editor | What is `iOS.Xcode.PBXProject` in Unity? Explain its purpose and usage. | PBXProject
class in
UnityEditor.iOS.Xcode
Description
Represents an Xcode project (pbxproj file).
```csharp
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;public class Sample_PBXProject
{
... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_123140c4a88f | unity_docs | input | What is `UIElements.MouseEnterEvent.ctor` in Unity? Explain its purpose and usage. | MouseEnterEvent Constructor
Declaration
public
MouseEnterEvent
();
Description
Constructor. Avoid creating new event instances. Instead, use GetPooled() to get an instance from a pool of reusable event instances. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_71101c6d89b2 | unity_docs | math | What is `GridBrushBase.MoveStart` in Unity? Explain its purpose and usage. | GridBrushBase.MoveStart
Declaration
public void
MoveStart
(
GridLayout
gridLayout
,
GameObject
brushTarget
,
BoundsInt
position
);
Parameters
Parameter
Description
grid
Grid
used for layout.
brushTarget
Target of the move operation. By default the currently selected GameObject.
position
Position ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_61cb303e05e1 | unity_docs | rendering | Show me a Unity code example for 'Use built-in shader functions in the Built-In Render Pipeline'. | OUTPUT_DEPTH(i)
: Deprecated. Returns eye space depth from i (which must be a float2). On platforms with native depth textures this macro always returns zero, because the Z buffer value is rendered implicitly.
Note:
On DX11/12 and Metal, the Z buffer range is 1–0 and UNITY_REVERSED_Z is defined. On other platforms, the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_e1364ecc4a9d | unity_docs | physics | What is `WheelCollider.steerAngle` in Unity? Explain its purpose and usage. | WheelCollider.steerAngle
public float
steerAngle
;
Description
Steering angle in degrees, always around the local y-axis.
At high velocities use only small steer angles; a few degrees should suffice. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_855429b8080f | unity_docs | scripting | Explain 'Custom serialization' in Unity. | When you want to serialize something that Unity’s serializer doesn’t support (for example, a C# Dictionary) you can implement the ISerializationCallbackReceiver interface in your class. This allows you to implement callbacks that Unity invokes at key points during serialization and deserialization.
You can use serializ... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_0ae70b5d698e | unity_docs | scripting | What is `Experimental.Rendering.GraphicsFormat.RGB_PVRTC_2Bpp_SRGB` in Unity? Explain its purpose and usage. | Experimental
: this API is experimental and might be changed or removed in the future.
GraphicsFormat.RGB_PVRTC_2Bpp_SRGB
Description
A three-component, PVRTC compressed format where each 64-bit compressed texel block encodes a 8×4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding. This f... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_2e1a4b32929e | unity_docs | scripting | What is `HDRDisplaySupportFlags` in Unity? Explain its purpose and usage. | HDRDisplaySupportFlags
enumeration
Description
A set of flags that describe the level of HDR display support available on the GPU and driver.
See
SystemInfo.hdrDisplaySupportFlags
for more details.
Properties
Property
Description
None
Denotes that support for HDR displays is not available for the GPU and the... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_3d5aa45f629f | unity_docs | physics | Explain 'Optimize the physics system for memory usage' in Unity. | You can optimize how the Unity physics system uses memory resources by managing collision callback allocations and optimizing various physics queries. Efficient memory usage helps reduce garbage collection overhead and ensures smoother gameplay.
Use the guidance in these pages to maintain your target frame rate and ens... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_man_2bf52d3a71fc | unity_docs | scripting | Show me a Unity code example for 'Customizing new scene creation'. | e script.
You can also use the
SceneTemplateAsset.templatePipeline
method to connect the script to the template via C#.
A Scene Template Pipeline script must derive from the [
ISceneTemplatePipeline
] interface or [
SceneTemplatePipelineAdapter
]. It should implement the events you want to react to; for example,
Before... | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
local_sr_d91829c9cb58 | unity_docs | scripting | What is `Unity.Properties.VisitParameters` in Unity? Explain its purpose and usage. | VisitParameters
struct in
Unity.Properties
/
Implemented in:
UnityEngine.PropertiesModule
Description
Custom parameters to use for visitation.
Properties
Property
Description
IgnoreExceptions
Use this options to ignore specific exceptions during visitation. | You are a Unity game development assistant. Help developers understand Unity APIs, best practices, and solve implementation challenges. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.