Version: 2019.1 (switch to 2019.2b or 2018.4)
Getting started with Facebook development
Windows
Other Versions

Facebook Player settings

This page details the Player settings specific to the Facebook platform. For a description of the general Player settings, see Player.

Facebook Player settings
Facebook Player settings

You can find documentation for the properties in the following sections:

Note: Although the Resolution and Presentation panel appears on the Facebook platform’s Player settings, there are no settings on the panel. Also, the only settings on the Splash Image panel are the common Splash Screen settings.

Since the Facebook build target uses the existing WebGLA JavaScript API that renders 2D and 3D graphics in a web browser. The Unity WebGL build option allows Unity to publish content as JavaScript programs which use HTML5 technologies and the WebGL rendering API to run Unity content in a web browser. More info
See in Glossary
and Windows Standalone build targets, the Player settingsSettings that let you set various player-specific options for the final game built by Unity. More info
See in Glossary
for those targets also apply.

Icon

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

Icon settings for the Facebook platform
Icon settings for the Facebook platform

Other Settings

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

Rendering

Use these settings to customize how Unity renders your game for the Facebook platform.

Rendering Player settings for the Facebook platform
Rendering Player settings for the Facebook platform
Property Function
Auto Graphics API Disable this option to manually pick and reorder the graphics APIs. By default this option is enabled, and Unity includes Direct3D11.
Static BatchingA technique Unity uses to draw GameObjects on the screen that combines static (non-moving) GameObjects into big Meshes, and renders them in a faster way. More info
See in Glossary
Enable this option to use Static batching.
Dynamic BatchingAn automatic Unity process which attempts to render multiple meshes as if they were a single mesh for optimized graphics performance. The technique transforms all of the GameObject vertices on the CPU and groups many similar vertices together. More info
See in Glossary
Enable this option to use Dynamic Batching (activated by default).
Graphics Jobs (Experimental) Enable this option 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 main thread, which is often a bottleneck.
Note: This feature is experimental. It may not deliver a performance improvement for your project, and may introduce instability.
Unity currently only supports Graphics Jobs when using Vulkan and this setting has no effect when using OpenGL ES.
Lightmap Streaming Enabled Enable this option to load only the lightmap mip maps as needed to render the current game Cameras. This value applies to the lightmap textures as they are generated.
Note: To use this setting, you must enable the Texture Streaming Quality setting.
Streaming Priority Set the lightmap mip map streaming priority to resolve resource conflicts. These values are applied to the light map textures as they are generated.
Positive numbers give higher priority. Valid values range from –128 to 127.

Configuration

Configuration settings for the Facebook platform
Configuration settings for the Facebook platform
Setting Function
Scripting Runtime Version Choose which .NET runtime to use in your project. For more details, see Microsoft’s .NET documentation.
.NET 3.5 Equivalent (Deprecated) A .NET runtime which implements the .NET 3.5 API. This functionality is deprecated, and should no longer be used. Please use .NET 4.
.NET 4.x Equivalent A .NET runtime which implements the .NET 4 API. This API is newer than .NET 3.5, and as such, it offers access to more APIs, is compatible with more external libraries, and supports C# 6. This is the default scripting runtime.
Scripting BackendA framework that powers scripting in Unity. Unity supports three different scripting backends depending on target platform: Mono, .NET and IL2CPP. Universal Windows Platform, however, supports only two: .NET and IL2CPP. More info
See in Glossary
This option is not available for WebGL.
API Compatibility Level There are two options for API compatibility level: .NET 4.0, or .NET Standard 2.0.
Tip: If you are having problems with a third-party assembly, you can try the suggestion in the API Compatibility Level section below.
Disable HW Statistics Enable this option to instruct the application not to send information about the hardware to Unity. By default, Unity Android applications send anonymous HW statistics to Unity. This provides you with aggregated information to help you make decisions as a developer.
Scripting Define Symbols Set custom compilation flags. For more details, see Platform dependent compilation.
Allow ‘unsafe’ Code Enable support for compiling ‘unsafe’ C# code in a pre-defined assembly (for example, Assembly-CSharp.dll).
For Assembly Definition Files (.asmdef), click on one of your .asmdef files and enable the option in the Inspector window that appears.
Active Input Handling Choose how you want to handle input from users.
Input Manager Use the traditional Input settings.
Input System (Preview) Use the newer Input system. The Input System is provided as a preview packageA 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 near completion.
See in Glossary
for this release. To try a preview of the Input System, install the InputSystem package.
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 .NET library uses functionality that is outside of your .NET compatibility level. In order to understand what is going on in such cases, and how to best fix it, try following these suggestions:

  1. Install Reflector for Windows.
  2. Drag the .NET assemblies for the API compatilibity level you are having issues with into Reflector. You can find these under Frameworks/Mono/lib/mono/YOURSUBSET/.
  3. Drag in your 3rd-party assembly.
  4. Right-click your 3rd-party assembly and select Analyze.
  5. In the analysis report, inspect the Depends on section. The report highlights anything that the 3rd-party assembly depends on, but that is not available in the .NET compatibility level of your choice in red.

Optimization

Optimization settings for the Facebook platform
Optimization settings for the Facebook platform
Setting Function
Prebake Collision Meshes Enable this option to add collisionA collision occurs when the physics engine detects that the colliders of two GameObjects make contact or overlap, when at least one has a rigidbody component and is in motion. More info
See in Glossary
data to Meshes at build time.
Keep Loaded Shaders Alive Enable this option to prevent shadersA small script that contains the mathematical calculations and algorithms for calculating the Color of each pixel rendered, based on the lighting input and the Material configuration. More info
See in Glossary
from being unloaded.
Preloaded Assets Set an array of Assets for the player to load on startup.
To add new Assets, increase the value of the Size property and then set a reference to the Asset to load in the new Element box that appears.
Vertex Compression Set vertex compressionA method of storing data that reduces the amount of storage space it requires. See Texture Compression3D Graphics hardware requires Textures to be compressed in specialised formats which are optimised for fast Texture sampling. More info
See in Glossary
, Animation CompressionThe method of compressing animation data to significantly reduce file sizes without causing a noticable reduction in motion quality. Animation compression is a trade off between saving on memory and image quality. More info
See in Glossary
, Audio Compression, Build Compression.
See in Glossary
per channel. For example, you can enable compression for everything except positions and lightmapA pre-rendered texture that contains the effects of light sources on static objects in the scene. Lightmaps are overlaid on top of scene geometry to create the effect of lighting. More info
See in Glossary
UVs. Whole MeshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info
See in Glossary
compression set per imported object overrides where vertex compression is set on objects. Everything else obeys these vertex compression settings.
Optimize Mesh Data Enable this option to remove any data from Meshes that is not required by the Material applied to them (such as tangents, normals, colors, and UVs).

Logging

Select what type of logging to allow in specific contexts.

Logging settings for the Facebook platform
Logging settings for the Facebook platform

Check one box that corresponds to each Log Type (Error, Assert, Warning, Log, and Exception) when running scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary
(ScriptOnly) , all the time (Full), or never (None).

Legacy

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

Legacy settings for the Facebook platform
Legacy settings for the Facebook platform

Publishing settings

Property Function
Facebook SDK Version Choose the version of the Facebook SDK you want use for your Project. As Facebook publishes new versions compatible with your version of Unity, they will appear in this menu.
AppID Enter your AppID, used by Facebook to identify your app. See Getting Started Facebook for Unity for help with setting up an AppID.
Upload access token Enter your upload access token. Facebook requires this token to authorize the Unity Editor to upload builds of your app to Facebook. You can get this from Facebook, on your app configuration page, under the Web Hosting tab.
Show Windows Player Settings Click this button to switch to the Standalone Player settings, which affect any Facebook builds for Gameroom.
FB.Init() Parameters Some parameters affecting how the Facebook SDK is initialized on the facebook.com web page. For more information, see the Facebook Developers FB.Init reference page.
Show WebGL Player Settings Click this button to switch to the WebGL Player settings, which affect any Facebook builds for WebGL.



  • 2018–11–28 Page published with no editorial review
  • Input System preview added in Unity 2019.1

Did you find this page useful? Please give it a rating:

Getting started with Facebook development
Windows