banner



How To Make A Player Run From The Camera C#

PC, Mac & Linux Standalone build settings

Standalone Player settings

This page details the Player settings specific to standalone platforms (Mac OSX, Windows and Linux). For a description of the general Role player settings, see Histrion Settings.

Standalone Player settings
Standalone Player settings

You tin find documentation for the properties in the post-obit sections:

  • Icon
  • Resolution and Presentation
  • Splash Image
  • Other Settings

Icon

Enable the Override for Standalone setting to assign a custom icon for your standalone game. You can upload dissimilar sizes of the icon to fit each of the squares provided.

Icon settings for the Standalone Player platforms
Icon settings for the Standalone Player platforms

Resolution and Presentation

Use the Resolution and Presentation section to customize aspects of the screen's appearance in the Resolution and Standalone Thespian Options sections.

Resolution department

This section allows you to customize the screen mode and default size.

Resolution section for the Standalone Player platforms
Resolution section for the Standalone Player platforms
Holding Function
Fullscreen Mode Cull the full-screen mode. This defines the default window mode at startup.
Fullscreen Window Ready your app window to the full-screen native resolution of the display. Unity renders app content at the resolution set up by script (or past user pick when the built awarding launches), but scales it to fill the window. When scaling, Unity adds black confined to the rendered output to match the aspect ratio The relationship of an image'south proportional dimensions, such as its width and superlative.
See in Glossary
chosen in the Player settings, so that the content isn't stretched. This process is called letterboxing.
Exclusive Fullscreen (Windows only) Set your app to maintain sole full-screen use of a brandish. Different Fullscreen Window, this mode changes the Os resolution of the display to lucifer the app'southward chosen resolution. This option is just supported on Windows; on other platforms, the setting falls dorsum to Fullscreen Window.
Maximized Window (Mac only) Fix the app window to the operating system's definition of "maximized". On macOS, this means a full-screen window with an automobile-subconscious bill of fare bar and dock. This option is merely supported on macOS; on other platforms, the setting falls back to Fullscreen Window.
Windowed Fix your app to a standard, non-full-screen, movable window, the size of which is dependent on the app resolution. In this mode, the window is resizable by default. To disable this, disable the Resizable Window setting.
Default Is Native Resolution Enable this option to brand the game utilise the default resolution used on the target machine. This option is not bachelor if the Fullscreen Way is set to Windowed.
Default Screen Width Set the default width of the game screen in pixels The smallest unit in a computer prototype. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More than info
Encounter in Glossary
. This option is simply available if the Fullscreen Way is fix to Windowed.
Default Screen Acme Gear up the default height of the game screen in pixels. This option is only available if the Fullscreen Mode is set to Windowed.
Mac Retina Support Enable this option to enable back up for high DPI (Retina) screens on a Mac. Unity enables this by default. This enhances Projects on a Retina display, only it is somewhat resources-intensive when active.
Run In background Enable this option to make the game keep running (rather than pausing) if the app loses focus.

Standalone Player Options section

This section allows y'all to specify how the user can customize the screen. For instance, here you can determine whether the user can resize the screen and how many instances tin can run concurrently.

Standalone Player Options settings for the Standalone Player platforms
Standalone Player Options settings for the Standalone Player platforms
Holding Role
Capture Unmarried Screen Enable this option to ensure standalone games in Fullscreen Manner do non darken the secondary monitor in multi-monitor setups. This is not supported on Mac Os X.
Use Actor Log Enable this option to write a log file with debugging information. Defaults to enabled.
Alarm: If you plan to submit your application to the Mac App Store, leave this option disabled. For more than information, see Publishing to the Mac App Store.
Resizable Window Enable this option to permit the user to resize the standalone player window.
Notation: If you disable this pick, your application can't use the Windowed Fullscreen Fashion.
Visible in Background Enable this option to show the application in the background if Windowed Fullscreen Manner is used (in Windows).
Allow Fullscreen Switch Enable this option to allow default OS full-screen key presses to toggle between full-screen and windowed modes.
Force Single Example Enable this choice to restrict standalone players to a unmarried concurrent running instance.
Supported Aspect Ratios Enable each aspect ratio that y'all want to appear in the Resolution Dialog at startup (as long as they are supported past the user's monitor).

Splash Image

In a higher place the common Splash Screen settings, the Player Settings Settings that let you lot gear up various actor-specific options for the concluding game built by Unity. More than info
See in Glossary
settings permit y'all to specify splash images for standalone platforms.

Splash Image Player settings for Standalone platforms
Splash Image Thespian settings for Standalone platforms
Belongings Function
Virtual Reality Splash Image Select a custom splash image to be displayed in Virtual RealityA system that immerses users in an artificial 3D world of realistic images and sounds, using a headset and motion tracking. More info
Come across in Glossary
displays.

Other Settings

This section allows you to customize a range of options organized into the following groups:

  • RenderingThe process of drawing graphics to the screen (or to a render texture). By default, the principal camera in Unity renders its view to the screen. More info
    See in Glossary
  • Vulkan Settings
  • Mac App Store Options
  • Configuration
  • Optimization
  • Logging
  • Legacy

Rendering

Employ these settings to customize how Unity renders your game for Standalone platforms.

Rendering Player settings for Standalone platforms
Rendering Player settings for Standalone platforms
Belongings Part
Color Infinite Choose which colour space should be used for rendering: Gamma or Linear.
See the Linear rendering overview for an explanation of the difference between the ii.
Automobile Graphics API for Windows Enable this option to use the all-time Graphics API on the Windows machine the game is running on. Disable information technology to add and remove supported Graphics APIs.
Motorcar Graphics API for Mac Enable this option to use the best Graphics API on the Mac the game is running on. Disable information technology to add and remove supported Graphics APIs.
Auto Graphics API for Linux Enable this option to apply the all-time Graphics API on the Linux car it runs on. Disable it to add and remove supported Graphics APIs.
Color Gamut for Mac Y'all tin can add together or remove color gamuts for the Standalone Mac platforms to use for rendering. Click the plus (+) icon to see a list of bachelor gamuts. A color gamut defines a possible range of colors available for a given device (such as a monitor or screen). The sRGB gamut is the default (and required) gamut.
Metal Editor Back up Enable this option to apply the Metal API in the Unity Editor and unlock faster Shader A program that runs on the GPU. More info
Come across in Glossary
iteration for targeting the Metal API.
Metal API Validation Enable this option when you demand to debug Shader problems.
Note: Validation increases CPU usage, so use it only for debugging.
Metal Write-Simply Backbuffer Allow improved performance in non-default device orientation. This sets the frameBufferOnly flag on the back buffer, which prevents readback from the back buffer but enables some driver optimization.
Memoryless Depth Choose when to apply memoryless render textures. Memoryless render textures are temporarily stored in the on-tile memory when rendered, non in CPU or GPU memory. This reduces retention usage of your app but you lot cannot read or write to these render textures.
Note: Memoryless render textures are only supported on iOS, tvOS ten.0+ Metallic and Vulkan. Render textures are read/write protected and stored in CPU or GPU retention on other platforms.
Unused Never utilize memoryless framebuffer depth.
Forced Always use memoryless framebuffer depth.
Automated Permit Unity determine when to use memoryless framebuffer depth.
Static Batching A technique Unity uses to draw GameObjects on the screen that combines static (non-moving) GameObjects into big Meshes, and renders them in a faster mode. More info
Run across in Glossary
Enable this option to apply Static batching.
Dynamic Batching An automatic Unity process which attempts to return multiple meshes as if they were a single mesh for optimized graphics functioning. The technique transforms all of the GameObject vertices on the CPU and groups many similar vertices together. More info
Run across in Glossary
Enable this option to use Dynamic Batching on your build (enabled by default).
Note: Dynamic batching has no effect when a Scriptable Return Pipeline is active, and then this setting is merely visible when nothing is set in the Scriptable Render Pipeline Asset Graphics setting.
Compute Skinning Enable this option to enable DX11/ES3 GPU compute skinning The process of binding bone joints to the vertices of a character's mesh or 'skin'. Performed with an external tool, such equally Blender or Autodesk Maya. More than info
See in Glossary
, freeing upward CPU resources.
Graphics Jobs Enable this choice to instruct Unity to offload graphics tasks (render loops) to worker threads running on other CPU cores. This is intended to reduce the time spent in Camera.Render on the chief thread, which is frequently a bottleneck.
Lightmap Encoding Choose Normal Quality or High Quality to gear up the lightmap A pre-rendered texture that contains the effects of low-cal sources on static objects in the scene. Lightmaps are overlaid on top of scene geometry to create the result of lighting. More info
See in Glossary
encoding. This setting affects the encoding scheme and compression A method of storing information that reduces the corporeality of storage space it requires. Meet Texture Pinch, Animation Compression, Audio Pinch, Build Compression.
See in Glossary
format of the lightmaps.
Lightmap Streaming Whether to utilize Mipmap Streaming for lightmaps. Unity applies this setting to all lightmaps when it generates them.
Note: To use this setting, yous must enable the Texture Streaming Quality setting.
Streaming Priority Set the priority for all lightmaps in the Mipmap Streaming system. Unity applies this setting to all lightmaps when it generates them.
Positive numbers give higher priority. Valid values range from –128 to 127.
Frame Timing Stats Enable this belongings to gather CPU and GPU frame fourth dimension statistics. Employ this together with the Dynamic ResolutionA Photographic camera setting that allows you to dynamically scale individual render targets, to reduce workload on the GPU. More info
See in Glossary
photographic camera A component which creates an image of a particular viewpoint in your scene. The output is either fatigued to the screen or captured as a texture. More info
Run into in Glossary
setting to determine if your application is CPU or GPU jump.
Utilize Display In HDR loftier dynamic range
See in Glossary
Mode
(Windows Only)
Enable this checkbox to make the game automatically switch to HDR mode output when it runs. This simply works on displays that back up this feature. If the display does non support HDR mode, the game runs in standard mode.
Swap Concatenation Bit Depth Select the number of bits in each color aqueduct for bandy chain buffers. Simply available if HDR Style is enabled.
Flake Depth x Unity volition utilise the R10G10B10A2 buffer format and Rec2020 primaries with ST2084 PQ encoding.
Bit Depth 16 Unity will utilize the R16G16B16A16 buffer format and Rec709 primaries with linear color (no encoding).

Vulkan Settings

Enable the SRGB Write Mode option to allow Graphics.SetSRGBWrite() on Vulkan renderer to toggle the sRGB write fashion during the frame.

Vulkan Player settings for Standalone platforms
Vulkan Thespian settings for Standalone platforms

Note: Enabling this feature may reduce performance, especially for tiled GPUs.

Mac App Shop Options

Mac App Store Options
Mac App Store Options

For details on setting these options, see Delivering your awarding to the Mac App Store.

Publishing to the Mac App Store

The Utilise Role player Log property enables writing a log file with debugging information. This is useful for investigating bug with your game. However you need to disable this when publishing games for Apple's Mac App Store, equally Apple may reject your submission if it is enabled. See the Unity Manual Log Files page for further data well-nigh log files.

The Use Mac App Store Validation belongings enables receipt validation for the Mac App Store. If enabled, your game only runs when it contains a valid receipt from the Mac App Shop. Use this when submitting games to Apple tree for publishing on the App Shop. This prevents people from running the game on a different estimator to the one it was purchased on.

Note that this feature does not implement any strong copy protection. In particular, any potential crack against ane Unity game would work against any other Unity content. For this reason, information technology is recommended that you lot implement your own receipt validation code on top of this, using Unity'south plugin feature. However, since Apple requires plugin validation to initially happen earlier showing the screen setup dialog, you lot should still enable this holding to avoid Apple rejecting your submission.

Configuration

Configuration settings for Standalone Player platforms
Configuration settings for Standalone Actor platforms
Setting Function
Scripting Backend A framework that powers scripting in Unity. Unity supports iii dissimilar scripting backends depending on target platform: Mono, .NET and IL2CPP. Universal Windows Platform, however, supports only two: .Internet and IL2CPP. More info
See in Glossary
Cull the scripting backend yous want to use. The scripting backend determines how Unity compiles and executes C# lawmaking in your Project.
Mono Compiles C# code into .Internet Common Intermediate Language (CIL) and executes that CIL using a Common Linguistic communication Runtime. See the Mono Project website for more information.
IL2CPP Compiles C# code into CIL, converts the CIL to C++ and so compiles that C++ into native car code, which executes directly at run fourth dimension. Run into IL2CPPA Unity-adult scripting dorsum-end which you can employ as an alternative to Mono when building projects for some platforms. More than info
Run into in Glossary
for more information.
API Compatibility Level Choose which .NET APIs you lot can use in your project. This setting can affect compatibility with 3rd-party libraries. However, it has no upshot on Editor-specific code (code in an Editor directory, or within an Editor-specific Assembly Definition).
Tip: If yous are having problems with a third-political party associates, you lot can try the suggestion in the API Compatibility Level section beneath.
.Internet 4.x Compatible with the .Net Framework iv (which includes everything in the .NET Standard 2.0 profile as well as boosted APIs). Cull this pick when usng libraries that access APIs not included in .NET Standard 2.0. Produces larger builds and any additional APIs bachelor are not necessarily supported on all platforms. See Referencing additional course library assemblies for more information.
.Cyberspace Standard 2.0 Compatible with .Internet Standard ii.0. Produces smaller builds and has full cantankerous-platform support.
C++ Compiler Configuration Choose the C++ compiler configuration used when compiling IL2CPP generated lawmaking.
Note: This belongings is disabled unless Scripting Backend is ready to IL2CPP.
Apply incremental GC Use the incremental garbage collector, which spreads garbage collection over several frames to reduce gc-related spikes in frame elapsing.
Assembly Version Validation Indicates whether Mono validates types from a strongly-named assembly.
Photographic camera Usage Description Enter the reason for accessing the camera on the selected desktop device.
Microphone Usage Description Enter the reason for accessing the microphone on the selected desktop device.
Agile Input Treatment Choose how you want to handle input from users.
Input Managing director Apply the traditional Input settings.
Input System (New) Use the newer Input system. The Input Organisation is provided as a preview packet A preview package is in development and not yet ready for production. A package in preview might be at any stage of development, from the initial stages to nigh completion.
See in Glossary
for this release. To try a preview of the Input System, install the InputSystem packet.
Both Use both systems side by side.

API Compatibility Level

You can choose your mono API compatibility level for all targets. Sometimes a 3rd-party .Internet library uses functionality that's outside of your .Cyberspace compatibility level. To understand what'southward going on in such cases, and how to best gear up it, try following these suggestions:

  1. Install ILSpy for Windows.
  2. Drag the .NET assemblies for the API compatilibity level that you are having bug with into ILSpy. You can discover these nether Frameworks/Mono/lib/mono/YOURSUBSET/.
  3. Elevate in your third-party assembly.
  4. Correct-click your tertiary-political party associates and select Analyze.
  5. In the analysis written report, inspect the Depends on section. The report highlights anything that the 3rd-party associates depends on, but that is not available in the .NET compatibility level of your choice in red.

Script Compilation

Script compilation settings for Standalone Player platforms
Script compilation settings for Standalone Actor platforms
Setting Function
Scripting Ascertain Symbols Prepare custom compilation flags. For more details, see the documentation on Platform dependent compilation.
Additional Compiler Arguments Add together entries to this list to pass additional arguments to the Roslyn compiler. Use ane new entry for each boosted argument.
To create a new entry, press the '+' button. To remove an entry, printing the '-' button.
When yous have added all desired arguments, click the Use button to include your boosted arguments in future compilations.The Revert button resets this listing to the most recent applied state.
Suppress Common Warnings Disable this setting to brandish the C# warnings CS0169 and CS0649.
Allow 'unsafe' Code Enable support for compiling 'unsafe' C# code in a pre-defined assembly (for instance, Assembly-CSharp.dll).
For Associates Definition Files (.asmdef), click on 1 of your .asmdef files and enable the option in the Inspector window that appears.
Use Deterministic Compilation Disable this setting to prevent compilation with the -deterministic C# flag. With this setting enabled, compiled assemblies are byte-for-byte identical each time they are compiled.
For more information, run into Microsoft's deterministic compiler option documentation.
Enable Roslyn Analyzers Disable this setting to compile user-written scripts A piece of lawmaking that allows y'all to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you similar. More info
Meet in Glossary
without Roslyn analyzer DLLs that might exist nowadays in your project.
Employ Roslyn Reference Assemblies Disable this setting to the compiler non to skip compilation reference assemblies when the metadata of the assembly does not alter.

Optimization

Optimization settings for Standalone Player platforms
Optimization settings for Standalone Player platforms
Holding Role
Prebake Collision A collision occurs when the physics engine detects that the colliders of 2 GameObjects brand contact or overlap, when at to the lowest degree one has a Rigidbody component and is in motility. More info
Meet in Glossary
Meshes
Enable this choice to add collision data to Meshes at build fourth dimension.
Go along Loaded Shaders Alive Enable this option to prevent shaders from being unloaded.
Preloaded Avails Set an array of Assets for the role player to load on startup.
To add together new Avails, increase the value of the Size property and so set a reference to the Asset to load in the new Element box that appears.
Strip Engine Lawmaking (IL2CPP only) Specify whether the Unity Linker tool removes code for Unity Engine features that your Projection does not use.
Managed Stripping Level Defines how aggressively Unity strips unused managed (C#) lawmaking.
When Unity builds your game or application, the Unity Linker process can strip unused lawmaking from the managed dynamically linked libraries used in the project. Stripping code can make the resulting executable significantly smaller, but tin sometimes mistakenly remove code that is actually used. This setting allows yous to choose how aggressively Unity should remove unused lawmaking.
Disabled (Mono simply) Practice not strip whatsoever code. (Managed code stripping is always enabled when using IL2CPP.)
Normal Remove unreachable managed code to reduce build size and Mono/IL2CPP build times.
Aggressive (Experimental) Remove lawmaking more than aggressively than nether the Normal option. Code size is further reduced, only this boosted reduction may accept side furnishings. For case, some methods may no longer exist visible in the debugger and code accessed through reflection can be stripped. You can create a custom link.xml file to preserve specific classes and methods. Run into Managed bytecode stripping with IL2CPP for more information.
Enable Internal profiler A window that helps you to optimize your game. Information technology shows how much time is spent in the diverse areas of your game. For case, it tin report the percentage of time spent rendering, animating, or in your game logic. More info
See in Glossary
(Deprecated)
Enable this pick to get the profiler data from your device in the Android SDK'due south adblogcat output while testing your projects. This is only available in evolution builds A development build includes debug symbols and enables the Profiler. More info
Run into in Glossary
.
Script Call Optimization Choose how to optionally disable exception handling for a speed boost at runtime. See iOS Optimization for details.
Ho-hum and Safe Use full exception handling (with some performance impact on the device when using the Mono scripting backend).
Fast but no Exceptions No data provided for exceptions on the device (the game runs faster when using the Mono scripting backend).
Note: Using this option with the IL2CPP Scripting Backend does not impact performance; however, using it tin avert undefined beliefs on release builds.
Vertex Pinch Set vertex pinch per channel. For case, you lot can enable pinch for everything except positions and lightmap UVs. Whole Mesh The chief graphics primitive of Unity. Meshes make upwardly a large function of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More than info
See in Glossary
compression ready per imported object overrides where vertex compression is assail objects. Everything else obeys these vertex compression settings.
Optimize Mesh Data Enable this option to remove any data from Meshes that is not required past the Cloth applied to them (such every bit tangents, normals, colors, and UVs).

Logging

Select what type of logging to let in specific contexts.

Logging settings for Standalone Player platforms
Logging settings for Standalone Player platforms
  • Select your preferred logging method from the available options.
  • Bank check a box that corresponds to each Log Type (Error, Assert, Warning, Log, and Exception) based on the type of logging you crave. For example:
    • ScriptOnly: Logs just when running scripts.
    • Total: Logs all the time.
    • None: No logs are ever recorded.

Legacy

Enable the Clamp BlendShapes (Deprecated) option to clamp the range of blend shape weights in SkinnedMeshRenderers.

Legacy settings for Standalone Player platforms
Legacy settings for Standalone Player platforms

PC, Mac & Linux Standalone build settings

Source: https://docs.unity3d.com/Manual/class-PlayerSettingsStandalone.html

Posted by: choexpeithe.blogspot.com

0 Response to "How To Make A Player Run From The Camera C#"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel