浏览代码

CL 10428

/main
Peter Andreasen 6 年前
当前提交
cfc194b7
共有 37 个文件被更改,包括 1968 次插入1220 次删除
  1. 1
      .gitignore
  2. 2
      Assets/Animation/Characters/Robot/AnimationSets/Run.asset
  3. 2
      Assets/Animation/Characters/Terraformer/AnimationSets/Run.asset
  4. 34
      Assets/BundledResources/Client/Characters.asset
  5. 36
      Assets/BundledResources/Client/ProjectileRegistry.asset
  6. 34
      Assets/BundledResources/Server/Characters.asset
  7. 36
      Assets/BundledResources/Server/ProjectileRegistry.asset
  8. 34
      Assets/BundledResources/Shared/HitscanEffectRegistry.asset
  9. 42
      Assets/BundledResources/Shared/SpatialEffectRegistry.asset
  10. 1001
      Assets/Fonts/TextMeshPro/Roboto-Black SDF.asset
  11. 5
      Assets/Resources/GameConfiguration.asset
  12. 21
      Assets/Scripts/Console/Console.cs
  13. 55
      Assets/Scripts/Console/ConsoleTextLinux.cs
  14. 29
      Assets/Scripts/EditorTools/Editor/BuildTools.cs
  15. 2
      Assets/Scripts/EditorTools/Editor/BuildWindow.cs
  16. 6
      Assets/Scripts/Game/Main/ClientGameLoop.cs
  17. 54
      Assets/Scripts/Game/Main/Game.cs
  18. 19
      Assets/Scripts/Game/Modules/Character/Animation/AnimGraph/AnimGraph_Squash.cs
  19. 2
      Assets/Scripts/Game/Modules/Character/Behaviours/Abilities/Ability_Movement.cs
  20. 13
      Assets/Scripts/Networking/Matchmaking/Matchmaker.cs
  21. 8
      Assets/Scripts/Networking/Matchmaking/MatchmakingClient.cs
  22. 18
      CHANGELOG.md
  23. 104
      Documentation/SourceCode.md
  24. 2
      ProjectSettings/EditorSettings.asset
  25. 19
      README.md
  26. 13
      CONTRIBUTING.md
  27. 26
      Documentation/Images/CutGameObjects.PNG
  28. 40
      Documentation/Images/LPPVTool.PNG
  29. 1001
      Documentation/Images/LightProbeGenerator.PNG
  30. 42
      Documentation/Images/LightProbePlacement.PNG
  31. 43
      Documentation/Images/LookUpAssetWindow.PNG
  32. 58
      Documentation/Images/MaterialPropertyOverrideComponent.PNG
  33. 68
      Documentation/Images/ReplaceSceneSelectionByThisPrefab.PNG
  34. 26
      Documentation/Images/RopeAnchor.PNG
  35. 47
      Documentation/Images/RopeLine.PNG
  36. 74
      Documentation/Images/SelectionHistory.PNG
  37. 171
      Documentation/SmallEditorTools.md

1
.gitignore


*.tmp
*.userprefs
*.app
.idea/
*.VC.*
.DS_Store
*~

2
Assets/Animation/Characters/Robot/AnimationSets/Run.asset


m_EditorClassIdentifier:
animMovePlaySpeed: 1
damping: 0.05
maxStep: 20
maxStep: 12.5
stateResetWindow: 0.15
animAim: {fileID: 7400000, guid: 4bff752e42cef454596b3dc693043579, type: 3}
blendSpaceNodes:

2
Assets/Animation/Characters/Terraformer/AnimationSets/Run.asset


m_EditorClassIdentifier:
animMovePlaySpeed: 1
damping: 0.05
maxStep: 25
maxStep: 12.5
stateResetWindow: 0.15
animAim: {fileID: 7400000, guid: 33bec584c39351344843e4573342016d, type: 3}
blendSpaceNodes:

34
Assets/BundledResources/Client/Characters.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f7bc28c1f6a340344af6a4f64947066d, type: 3}
m_Name: Characters
m_EditorClassIdentifier:
entries:
- {fileID: 11400000, guid: ef10be3110022d547abec5105be5d2f7, type: 2}
- {fileID: 11400000, guid: fcee05c128090e446b5e538ea51e6133, type: 2}
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f7bc28c1f6a340344af6a4f64947066d, type: 3}
m_Name: Characters
m_EditorClassIdentifier:
entries:
- {fileID: 11400000, guid: ef10be3110022d547abec5105be5d2f7, type: 2}
- {fileID: 11400000, guid: fcee05c128090e446b5e538ea51e6133, type: 2}

36
Assets/BundledResources/Client/ProjectileRegistry.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 100f97db1bc7708449e66e21e9f9e94a, type: 3}
m_Name: ProjectileRegistry
m_EditorClassIdentifier:
entries:
- definition: {fileID: 11400000, guid: a86d35bb3c06cd644aeeeb80d91846ea, type: 2}
- definition: {fileID: 11400000, guid: 5245d99c24474a542b6e5142a08a9ecb, type: 2}
- definition: {fileID: 11400000, guid: 0ae4f3eb805dfaa46b0fb17e468206f8, type: 2}
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 100f97db1bc7708449e66e21e9f9e94a, type: 3}
m_Name: ProjectileRegistry
m_EditorClassIdentifier:
entries:
- definition: {fileID: 11400000, guid: a86d35bb3c06cd644aeeeb80d91846ea, type: 2}
- definition: {fileID: 11400000, guid: 5245d99c24474a542b6e5142a08a9ecb, type: 2}
- definition: {fileID: 11400000, guid: 0ae4f3eb805dfaa46b0fb17e468206f8, type: 2}

34
Assets/BundledResources/Server/Characters.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f7bc28c1f6a340344af6a4f64947066d, type: 3}
m_Name: Characters
m_EditorClassIdentifier:
entries:
- {fileID: 11400000, guid: ef10be3110022d547abec5105be5d2f7, type: 2}
- {fileID: 11400000, guid: fcee05c128090e446b5e538ea51e6133, type: 2}
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f7bc28c1f6a340344af6a4f64947066d, type: 3}
m_Name: Characters
m_EditorClassIdentifier:
entries:
- {fileID: 11400000, guid: ef10be3110022d547abec5105be5d2f7, type: 2}
- {fileID: 11400000, guid: fcee05c128090e446b5e538ea51e6133, type: 2}

36
Assets/BundledResources/Server/ProjectileRegistry.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 100f97db1bc7708449e66e21e9f9e94a, type: 3}
m_Name: ProjectileRegistry
m_EditorClassIdentifier:
entries:
- definition: {fileID: 11400000, guid: a86d35bb3c06cd644aeeeb80d91846ea, type: 2}
- definition: {fileID: 11400000, guid: 5245d99c24474a542b6e5142a08a9ecb, type: 2}
- definition: {fileID: 11400000, guid: 0ae4f3eb805dfaa46b0fb17e468206f8, type: 2}
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 100f97db1bc7708449e66e21e9f9e94a, type: 3}
m_Name: ProjectileRegistry
m_EditorClassIdentifier:
entries:
- definition: {fileID: 11400000, guid: a86d35bb3c06cd644aeeeb80d91846ea, type: 2}
- definition: {fileID: 11400000, guid: 5245d99c24474a542b6e5142a08a9ecb, type: 2}
- definition: {fileID: 11400000, guid: 0ae4f3eb805dfaa46b0fb17e468206f8, type: 2}

34
Assets/BundledResources/Shared/HitscanEffectRegistry.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2e804af01086f8143a38335a2250aa74, type: 3}
m_Name: HitscanEffectRegistry
m_EditorClassIdentifier:
entries:
- {fileID: 11400000, guid: 78c6697ae0f7ed04c8b0b8b59519ae61, type: 2}
- {fileID: 11400000, guid: 0535d66d5ba94b442bb4a6824f0dcfd0, type: 2}
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2e804af01086f8143a38335a2250aa74, type: 3}
m_Name: HitscanEffectRegistry
m_EditorClassIdentifier:
entries:
- {fileID: 11400000, guid: 78c6697ae0f7ed04c8b0b8b59519ae61, type: 2}
- {fileID: 11400000, guid: 0535d66d5ba94b442bb4a6824f0dcfd0, type: 2}

42
Assets/BundledResources/Shared/SpatialEffectRegistry.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a432273cf0631cc40b8e61f9afc1aa48, type: 3}
m_Name: SpatialEffectRegistry
m_EditorClassIdentifier:
entries:
- {fileID: 11400000, guid: 090f8686190245849b000508ef74ad0e, type: 2}
- {fileID: 11400000, guid: 7110c14a9d2a35b41bf6706daa0a5535, type: 2}
- {fileID: 11400000, guid: 67a2bcb76b270414a9ebb7cdb3717f5d, type: 2}
- {fileID: 11400000, guid: dedadc755e9129a4bb9061ed728ca5cd, type: 2}
- {fileID: 11400000, guid: 7942eed226c6d424596134d04568620f, type: 2}
- {fileID: 11400000, guid: 67a6d542fdddf744684c258d66e99253, type: 2}
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a432273cf0631cc40b8e61f9afc1aa48, type: 3}
m_Name: SpatialEffectRegistry
m_EditorClassIdentifier:
entries:
- {fileID: 11400000, guid: 090f8686190245849b000508ef74ad0e, type: 2}
- {fileID: 11400000, guid: 7110c14a9d2a35b41bf6706daa0a5535, type: 2}
- {fileID: 11400000, guid: 67a2bcb76b270414a9ebb7cdb3717f5d, type: 2}
- {fileID: 11400000, guid: dedadc755e9129a4bb9061ed728ca5cd, type: 2}
- {fileID: 11400000, guid: 7942eed226c6d424596134d04568620f, type: 2}
- {fileID: 11400000, guid: 67a6d542fdddf744684c258d66e99253, type: 2}

1001
Assets/Fonts/TextMeshPro/Roboto-Black SDF.asset
文件差异内容过多而无法显示
查看文件

5
Assets/Resources/GameConfiguration.asset


MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0

playerSpeed: 6
playerSprintSpeed: 8
playerAcceleration: 100
playerAcceleration: 50
playerFriction: 16
playerAiracceleration: 1
playerAirFriction: 0.5

21
Assets/Scripts/Console/Console.cs


static void CmdExec(string[] arguments)
{
if (arguments.Length != 1)
bool silent = false;
string filename = "";
if (arguments.Length == 1)
{
filename = arguments[0];
}
else if (arguments.Length == 2 && arguments[0] == "-s")
{
silent = true;
filename = arguments[1];
}
else
OutputString("Usage: exec <filename>");
OutputString("Usage: exec [-s] <filename>");
var lines = System.IO.File.ReadAllLines(arguments[0]);
var lines = System.IO.File.ReadAllLines(filename);
s_PendingCommands.InsertRange(0, lines);
if (s_PendingCommands.Count > 128)
{

}
catch (Exception e)
{
OutputString("Exec failed: " + e.Message);
if(!silent)
OutputString("Exec failed: " + e.Message);
}
}

55
Assets/Scripts/Console/ConsoleTextLinux.cs


using System.Collections.Generic;
using UnityEngine;
using System;
using System.Threading.Tasks;
using System.Threading;
#if UNITY_STANDALONE_LINUX

public class ConsoleTextLinux : IConsoleUI
{
bool IsDumb()
{
return System.Console.IsInputRedirected || System.Console.IsOutputRedirected;
}
void ReaderThread()
{
}
char[] buf = new char[1024];
System.Console.WriteLine("Dumb console: " + IsDumb());
if (IsDumb())
{
m_ReaderThread = new Thread(() =>
{
Thread.CurrentThread.IsBackground = true;
while (true)
{
var read = System.Console.In.Read(buf, 0, buf.Length);
if (read > 0)
{
m_CurrentLine += new string(buf, 0, read);
}
else
break;
}
});
m_ReaderThread.Start();
}
System.Console.Clear();
m_CurrentLine = "";
DrawInputline();

public void ConsoleUpdate()
{
// Handling for cases where the terminal is 'dumb', i.e. cursor etc.
// and no individual keys fired
if (IsDumb())
{
var lines = m_CurrentLine.Split('\n');
if (lines.Length > 1)
{
for (int i = 0; i < lines.Length - 1; i++)
Console.EnqueueCommand(lines[i]);
m_CurrentLine = lines[lines.Length - 1];
}
return;
}
if (!System.Console.KeyAvailable)
return;

{
ClearInputLine();
if(message.Length > 0 && message[0] == '>')
if (!IsDumb() && message.Length > 0 && message[0] == '>')
{
var oldColor = System.Console.ForegroundColor;
System.Console.ForegroundColor = System.ConsoleColor.Green;

void ClearInputLine()
{
if (IsDumb())
return;
System.Console.CursorLeft = 0;
System.Console.CursorTop = System.Console.BufferHeight - 1;
System.Console.Write(new string(' ', System.Console.BufferWidth - 1));

void DrawInputline()
{
if (IsDumb())
return;
System.Console.CursorLeft = 0;
System.Console.CursorTop = System.Console.BufferHeight - 1;
System.Console.Write(m_CurrentLine + new string(' ', System.Console.BufferWidth - m_CurrentLine.Length - 1));

string m_CurrentLine;
private Thread m_ReaderThread;
//TextWriter m_PreviousOutput;
}
#endif

29
Assets/Scripts/EditorTools/Editor/BuildTools.cs


var serverBat = new string[]
{
"REM start game server on level_01",
executableName + " -nographics -batchmode +serve level_01 +game.modename assault"
executableName + " -nographics -batchmode -noboot +serve level_01 +game.modename assault"
};
File.WriteAllLines(buildPath + "/server.bat", serverBat);
Debug.Log(" server.bat");

Debug.Log(" user.cfg");
// Build game.cfg
var gameCfg = new string[]
// Build boot.cfg
var bootCfg = new string[]
File.WriteAllLines(buildPath + "/game.cfg", gameCfg);
Debug.Log(" game.cfg");
File.WriteAllLines(buildPath + "/" + Game.k_BootConfigFilename, bootCfg);
Debug.Log(" " + Game.k_BootConfigFilename);
Debug.Log("Window64 build postprocessing done.");
}

Directory.CreateDirectory(buildPath);
BuildBundles(buildPath, target, true, true, true);
var res = BuildGame(buildPath, executableName, target, BuildOptions.EnableHeadlessMode, buildName, false);
if (!res)
throw new Exception("BuildPipeline.BuildPlayer failed");
if (res.summary.result != UnityEditor.Build.Reporting.BuildResult.Succeeded)
throw new Exception("BuildPipeline.BuildPlayer failed: " + res.ToString());
}
// This is just a little convenience for when iterating on Linux specific code
// Build a full build and then use this to just build the executable into the same build folder.
[MenuItem("FPS Sample/BuildSystem/Linux64/CreateBuildLinux64_OnlyExecutable")]
public static void CreateBuildLinux64_OnlyExecutable()
{
var target = BuildTarget.StandaloneLinux64;
var buildName = GetBuildName();
var buildPath = GetBuildPath(target, buildName);
string executableName = Application.productName;
Directory.CreateDirectory(buildPath);
var res = BuildGame(buildPath, executableName, target, BuildOptions.EnableHeadlessMode, buildName, false);
if (!res)

2
Assets/Scripts/EditorTools/Editor/BuildWindow.cs


var buildExe = GetBuildExe(buildTarget);
Debug.Log("Starting " + buildExe + " in " + buildPath);
var process = new System.Diagnostics.Process();
process.StartInfo.UseShellExecute = false;
process.StartInfo.UseShellExecute = args.Contains("-batchmode");
process.StartInfo.FileName = Application.dataPath + "/../" + buildPath + "/" + buildExe; // mogensh: for some reason we now need to specify project path
process.StartInfo.Arguments = args;
process.StartInfo.WorkingDirectory = buildPath;

6
Assets/Scripts/Game/Main/ClientGameLoop.cs


Console.AddCommand("nextchar", CmdNextChar, "Select next character", this.GetHashCode());
Console.AddCommand("nextteam", CmdNextTeam, "Select next character", this.GetHashCode());
Console.AddCommand("spectator", CmdSpectator, "Select spectator cam", this.GetHashCode());
Console.AddCommand("matchmake", CmdMatchmake, "matchmake <ip:port>: Find and join a server", this.GetHashCode());
Console.AddCommand("matchmake", CmdMatchmake, "matchmake <hostname[:port]/{projectid}>: Find and join a server", this.GetHashCode());
if (args.Length > 0)
{

{
if (m_useMatchmaking)
{
m_matchmaker?.UpdateMatchmaking();
m_matchmaker?.Update();
}
UpdateIdleScreen();

if (string.IsNullOrEmpty(endpoint))
{
GameDebug.LogError("matchmake: command requires an endpoint <ip:port>");
GameDebug.LogError("matchmake: command requires an endpoint <hostname[:port]/{projectid}>");
return;
}

54
Assets/Scripts/Game/Main/Game.cs


using System;
using System.Globalization;
using UnityEngine.Rendering.PostProcessing;
//using SQP;
#if UNITY_EDITOR
using UnityEditor;
#endif

[ConfigVar(Name = "chartype", DefaultValue = "-1", Description = "Character to start with (-1 uses default character)")]
public static ConfigVar characterType;
[ConfigVar(Name = "allowcharchange", DefaultValue = "1", Description = "Is changing charaacter allowed")]
[ConfigVar(Name = "allowcharchange", DefaultValue = "1", Description = "Is changing character allowed")]
public static ConfigVar allowCharChange;
[ConfigVar(Name = "debug.cpuprofile", DefaultValue = "0", Description = "Profile and dump cpu usage")]

public static ConfigVar netDropEvents;
static readonly string k_UserConfigFilename = "user.cfg";
static readonly string k_GameConfigFilename = "game.cfg";
public static readonly string k_BootConfigFilename = "boot.cfg";
public static GameConfiguration config;
public static InputSystem inputSystem;

var commandLineArgs = new List<string>(System.Environment.GetCommandLineArgs());
#if UNITY_STANDALONE_LINUX
m_isHeadless = true;
#else
#endif
var consoleRestoreFocus = commandLineArgs.Contains("-consolerestorefocus");
if (m_isHeadless)

ConfigVar.Init();
Console.EnqueueCommandNoHistory("exec " + k_UserConfigFilename);
Console.EnqueueCommandNoHistory("exec -s " + k_UserConfigFilename);
// Default is to allow no frame cap, i.e. as fast as possible if vsync is disabled
Application.targetFrameRate = -1;

Application.targetFrameRate = serverTickRate.IntValue;
QualitySettings.vSyncCount = 0; // Needed to make targetFramerate work; even in headless mode
#if !UNITY_STANDALONE_LINUX
#endif
}
// Determine if we are a 'normal' game build. If so we run game.cfg to get started
//bool menuBoot = (buildInfo != null && buildInfo.buildId != "AutoBuild" && !commandLineArgs.Contains("-nogame")) || commandLineArgs.Contains("-game");
if(!commandLineArgs.Contains("-nogame"))
{
Console.EnqueueCommandNoHistory("exec " + k_GameConfigFilename);
}
// Out of the box game behaviour is driven by boot.cfg unless you ask it not to
if(!commandLineArgs.Contains("-noboot"))
{
Console.EnqueueCommandNoHistory("exec -s " + k_BootConfigFilename);
var forceClientSystem = commandLineArgs.Contains("-forceclientsystems");
if (!m_isHeadless || forceClientSystem)

UnityEngine.Object.DontDestroyOnLoad(go);
clientFrontend = go.GetComponentInChildren<ClientFrontend>();
}
//m_SQPClient = new SQP.SQPClient();
GameDebug.Log("fps.sample initialized");
#if UNITY_EDITOR

Console.AddCommand("crashme", (string[] args) => { GameDebug.Assert(false); }, "Crashes the game next frame ");
Console.AddCommand("saveconfig", CmdSaveConfig, "Save the user config variables");
Console.AddCommand("loadconfig", CmdLoadConfig, "Load the user config variables");
//Console.AddCommand("sqp", CmdSQP, "Query the given server");
#if UNITY_STANDALONE_WIN
Console.AddCommand("windowpos", CmdWindowPosition, "Position of window. e.g. windowpos 100,100");

UpdateCPUStats();
//m_SQPClient.Update();
endUpdateEvent?.Invoke();
}

GameDebug.Log("Cannot connect from current gamemode");
}
/*
private void CmdSQP(string[] args)
{
if(m_SQPClient.ClientState != SQPClient.SQPClientState.Idle)
{
GameDebug.Log("SQPClient is busy");
return;
}
if(args.Length != 1)
{
Console.Write("Usage sqp <server>");
return;
}
System.Net.IPAddress addr;
if(!System.Net.IPAddress.TryParse(args[0], out addr))
{
Console.Write("Invalid address");
return;
}
m_SQPClient.StartInfoQuery(new System.Net.IPEndPoint(addr, NetworkConfig.serverSQPPort.IntValue));
}
*/
void CmdQuit(string[] args)
{
#if UNITY_EDITOR

System.Diagnostics.Stopwatch m_Clock;
static int s_bMouseLockFrameNo;
//SQPClient m_SQPClient;
}

19
Assets/Scripts/Game/Modules/Character/Animation/AnimGraph/AnimGraph_Squash.cs


}
}
// Change Direction
else if (animState.charLocoState == CharacterPredictedState.StateData.LocoState.GroundMove &&
Vector2.Angle(animState.locomotionVector, m_prevLocoVector) > 90f)
{
m_lastSquashTick = time.tick;
animState.squashTime = 0;
animState.squashWeight = m_Settings.stop.weight;
playSpeed = m_Settings.stop.playSpeed;
}
// Disabled for now. Will be replaced in later version
// // Change Direction
// else if (animState.charLocoState == CharacterPredictedState.StateData.LocoState.GroundMove &&
// Vector2.Angle(animState.locomotionVector, m_prevLocoVector) > 90f)
// {
// m_lastSquashTick = time.tick;
// animState.squashTime = 0;
// animState.squashWeight = m_Settings.stop.weight;
// playSpeed = m_Settings.stop.playSpeed;
// }
}
if (animState.squashWeight > 0)

2
Assets/Scripts/Game/Modules/Character/Behaviours/Abilities/Ability_Movement.cs


}
if (time.tick != characterPredictedState.State.tick + 1)
GameDebug.LogError("Update tick invalid. Game tick:" + time.tick + " but current state is at tick:" + characterPredictedState.State.tick);
GameDebug.Log("Update tick invalid. Game tick:" + time.tick + " but current state is at tick:" + characterPredictedState.State.tick);
characterPredictedState.State.tick = time.tick;

13
Assets/Scripts/Networking/Matchmaking/Matchmaker.cs


public class Matchmaker
{
/// <summary>
/// The ip:port of the matchmaking service
/// The hostname[:port]/{projectid} for the running matchmaker assigned to this project
/// </summary>
public string Endpoint;

/// <summary>
/// Matchmaking state-machine driver
/// </summary>
/// <exception cref="ArgumentException"></exception>
public void UpdateMatchmaking()
/// <exception cref="ArgumentOutOfRangeException"></exception>
public void Update()
{
switch (State)
{

break;
case MatchmakingState.Found:
case MatchmakingState.Error:
break; // User hasn't stopped the state machine yet.
Debug.Log("Update() is still being called after matchmaking finished.");
break;
throw new ArgumentException();
throw new ArgumentOutOfRangeException();
}
}

{
MatchmakingRequest request = new MatchmakingRequest();
MatchmakingPlayer thisPlayer = new MatchmakingPlayer(playerId);
thisPlayer.Properties = JsonUtility.ToJson(playerProps);
request.Players.Add(thisPlayer);

8
Assets/Scripts/Networking/Matchmaking/MatchmakingClient.cs


{
internal string Url { get; }
const string k_CreateRequestEndpoint = "/mmrequest";
const string k_CreateRequestEndpoint = "/request";
const string k_GetAssignmentEndpoint = "/mmassigment";
const string k_GetAssignmentEndpoint = "/assignment";
Url = "http://" + endpoint + "/v" + k_ApiVersion;
Url = "https://" + endpoint + "/matchmaking/api/v" + k_ApiVersion;
}
/// <summary>

internal UnityWebRequestAsyncOperation GetAssignmentAsync(string id)
{
string url = Url + k_GetAssignmentEndpoint + "?id=" + id;
UnityWebRequest webRequest = new UnityWebRequest(url, "POST");
UnityWebRequest webRequest = new UnityWebRequest(url, "GET");
webRequest.SetRequestHeader("Content-Type", "application/json");
webRequest.downloadHandler = new DownloadHandlerBuffer();
Debug.Log("Calling... " + url);

18
CHANGELOG.md


# Changelog
## [0.1.1] - 2018-10-22
- Fix for headless build not running on some machines (Mominon)
- Changed boot behaviour. Now always read boot.cfg (previously named game.cfg) unless -noboot passed.
- Added documentation about small tools in editor
- Fix for exec command giving scary sounding warnings
- Fix for project using Perforce by default
- Tweak to animation for slightly smoother 3rd person
- Fixes to SourceCode doc (Badger0101)
- Changed Tick error message to just be info
- Type fixes (jfmc)
- Updated matchmaker code
- Added information about contribution
- Improved documentation about animation
- Fix for linux version of headless server not working with redict of in-/output
### Added
- First public release, Unite L.A. 2018

104
Documentation/SourceCode.md


The Game class (Game.cs) is a MonoBehavior that defines the main loop of the game.
All gamecode is run from Game.Update method (with a few exceptions).
The game class is one of first classes to be instantiated and is always present no matter what state the game is in.
The Game class instantiates various systems like Audio and Input and has other app level utility functionality.
The Game class instantiates various systems like Audio, Input as well as containing other app level utility functionality.
Gameloops implements various mode the game can be in.
They handle initialization and shutdown of required systems and updates systems in correct order.
Gameloops implements various modes the game can be in.
They handle initialization and shutdown of required systems along with updating systems in the correct order.
ServerGameLoop (ServerGameLoop.cs) handles connection to a list of clients and update all server systems.
ServerGameLoop (ServerGameLoop.cs) handles connection to a list of clients and updates all the server systems.
PreviewGameLoop (PreviewGameLoop.cs) is mutations of Server and Client game loops slapped together.
It uses a mix of server and client systems and is used as a way to preview game without building bundles and starting up server and client.
This is the gameloop that is used when user presses play in editor with a game scene loaded.
PreviewGameLoop (PreviewGameLoop.cs) is a mutation of Server and Client game loops slapped together.
It uses a mix of server and client systems as a way to preview the game without building bundles or starting up the server and client.
This becomes the gameloop when a user presses play in the editor with a game scene loaded.
Modules contains components and the systems that update them and one or more module class that what is instantiated from the gameloop.
Modules can have specific server, client or preview implementations.
Modules are found in Assets/Scripts/Game/Modules
Modules contain components, along with the systems that update these components. The modules may also contain one or more additional specific classes that are instantiated by the gameloop.
Modules can have a specific server, client or preview implementations.
Modules location: Assets/Scripts/Game/Modules
To replicate a gameobject it needs to be a prefab and have the ReplicatedEntity component attached.
This will ensure prefab is registered in ReplicatedEntityRegistry (when build tool "Update Registry" is run).
Server and client have different ReplicatedEntityRegistry allowing for different prefabs to be spawned on server and client each representing the same entity (but they both need same set of serializable components)
Components that has data that should be replicated needs to implement the INetworkSerializable interface and be attacheds to same gameobject as ReplicatedEntity component.
To replicate a gameobject, it must be a prefab with the ReplicatedEntity component attached.
This will ensure the prefab is registered within ReplicatedEntityRegistry (any time build tool runs: "Update Registry").
Server and client have different ReplicatedEntityRegistry allowing for different prefabs to be spawned on the server and client. Each representing the same entity while simultaneously utilizing the same set of serializable components.
Components that have data to be replicated must implement the INetworkSerializable interface and be attached to the same gameobject as ReplicatedEntity component.
To replicate an ECS entity you need to create a scriptable object deriving from ReplicatedEntityFactory.
This class is also registered in ReplicatedEntityRegistry and has abstracts methods that needs to be implemented to create entity and create classes that serializes/deserializes component
To replicate an ECS entity you create a ScriptableObject deriving from ReplicatedEntityFactory.
This class is also registered in ReplicatedEntityRegistry. It contains abstract methods that must be implemented in order to create entities and classes with the serialize or deserialize component.
Player module handles server broadcasting of player information, sampling of user commands on client and local handling of controlled characters.
Player module handles server broadcasting of player information. The sampling of user commands on the client and local handling of controlled characters.
Player entity contains data that server sends to all clients (e.g. playername and what character the player is controlling) and data that is sent only the client the player represents (e.g. what UI elements to open)
Player entities contain data that the server sends to all connected clients (e.g. playername and what character the player is controlling). This data that is sent only to the client that the player represents (e.g. what UI elements to open)
Each client also have a *LocalPlayer* instantiated that has local presentation components (e.g camera control and UI).
Components specific to the type of entity being controlled can be added to LocalPlayer for custom handling.
Each client acontains a *LocalPlayer* instantiation that has local presentation components (e.g camera control and UI).
Components specific to the type of entity that is being controlled can be added to the LocalPlayer for custom handling.
Character module handles character abilities, animation and UI.
A character is define by prefab with either Character or Character1P MonoBehavior attached.
Character is used on server and on client for 3P characters whereas Character1P is used for 1P view of character.
Characters are setup using the *CharacterTypeDefinition* scriptable object.
It has references to Server and Client versions of the 3P character prefab, and reference to the 1P prefab character that is instantiated in 1P view.
The Character module is responsible for character abilities, animation and UI.
A character is defined by a prefab with either Character or Character1P MonoBehavior attached.
Character is used on the server and on the client for 3P characters. Whereas, Character1P is used for first person camera view.
Characters are setup using the *CharacterTypeDefinition* ScriptableObject.
This ScriptableObject has references to the Server and Client versions of the 3P character prefab, and reference to the 1P prefab character that is instantiated in first person camera view.
All character behaviour is handled by *Abilities* (in Character/Behaviours/Abilities).
What abilities are active is controlled by the *AbilityController*.
In current implementation characters always have the movement ability active and allow for only one other ability to be active (e.g. sprint, melee, shoot)
All character behaviour is handled by *Abilities* (Located: Character/Behaviours/Abilities).
Abilities are actives and controlled by the *AbilityController*.
In the current implementation characters always have the movement ability active. Characters are allowed only one other ability to be active at a time (e.g. sprint, melee, shoot)
HeroTypeAsset (HeroTypeAsset.cs) is used to setup a game hero. (note: in comments and naming the word character is often used for hero)
HeroTypeAsset (HeroTypeAsset.cs) is used to setup the games hero. (note: in comments and naming the word character is often used for hero)
Items are replicated but currently only client versions of prefabs have any logic or presentation.
When items are updated they read state of relevant abilities and uses that to trigger effects.
Items are replicated but currently only the client versions of the prefab have any logic or visuals.
When items are updated they read the state of the relevant abilities and use those to trigger the associated effects.
Effect module is responsible for showing short clientside effects (gfx and sound).
Effects are "fire and forget" and cannot be canceled.
Currently supports two kinds of effects: *SpatialEffect* and *HitscanEffect*.
Effects are created in a static pools at startup and reused.
Each effect is setup using a scriptable object (e.g. SpatialEffectTypeDefinition) that defines what prefab should be used for the effect and how large effect pool should be.
Effect are requested by gamecode by creating entities with request component (e.g SpatialEffectRequest) that are then picked up by effect systems and effct is triggered.
Effect module controls clientside effects (gfx and sound).
Effects are "fire and forget" this cannot be cancelled.
This module currently supports two kinds of effects: *SpatialEffect* and *HitscanEffect*.
Effects are created within static pools at startup.
Each effect is setup using a ScriptableObject (e.g. SpatialEffectTypeDefinition) that defines what prefab should be used for the effect as well as how large the effect pool should be.
Effects are requested by gamecode, it creates entities with the requested component (e.g SpatialEffectRequest). These are then added to the effect systems at which time the effect is then triggered.
Grenade module handles creation and updating of grenades. Grenades is updated on server and interpolated on client.
Grenade module handles the creation and updating of grenades. Grenades are updated on the server and interpolated to the client.
HitCollision module handles hit collision of all objects that can receive damage in the game.
Server stores position and rotation of moving colliders so they can be "rolled back" to a given tick before collision tests are performed.
HitCollision module handles hit collision of all objects that are capable of receiving damage within the game.
The server stores position and rotation of moving colliders so that they can be "rolled back". This allows rollingback the collider to any given tick before collision tests have been performed.
HitCollision for characters can be setup in a seperate prefab so it can be shared betweem server and client prefab
HitCollision for characters can be setup in a seperate prefab so that it can be shared between the server and client prefabs.
*RaySphereQueryReciever* can be used to queue collision queries that first does a raytest against environment and then sphere cast against hit collision.
*RaySphereQueryReciever* can be used to queue collision queries. It first processes a raytest against the environment and then sphere casts against the hit collision.
When hit collision is hit the *HitCollisionOwner* component can be used to add damage events.
These events are not used by the HitCollision module, but it is up to some other system (e.g. Character or DestructableProp) to read and clear list and apply damage to whatever health presentation they have.
When hit collision is hit the *HitCollisionOwner* component is used for adding damage events.
These events are not used by the HitCollision module. Instead it is used by other systems (e.g. Character or DestructableProp) to read and clear the list and apply damage to whatever health value they have.
Module also contains *SplashDamageSystem* that is an fire and forget way of giving splash damage to an area
This module also contains a *SplashDamageSystem* that is a fire and forget way of giving splash damage to an area.
Handles simulation of projectiles and visualization of projectiles on clients.
Server creates *Projectiles* that are replicated to clients.
When client receives projectile it creates a corresponding *ClientProjectile* that contains visualization of projectile.
Projectiles can also predicatively be created on client.
When a projectile is received from server that matches a predicted, the predicted is deleted and the associated clientprojectile is linked to the projectile from the server.
This module processes simulation of projectiles and their associated visuals to the client.
The server creates *Projectiles* and these are what is replicated to client side.
When a client receives a projectile it creates a corresponding *ClientProjectile* with visuals of the projectile.
Projectiles can also predicatively be created on the client.
When a projectile is received from the server which matches a predicted, the predicted is deleted while the associated clientprojectile is linked to the projectile from the server.
Handles updating state of all active ragdolls. Simulation done by Unity physics system.
Updates the state of all active ragdolls. Simulation processed by Unity physics system.
Handles a replicated player controllable camera. This has been used to test controlling non-character units and is currently in a pretty hacky state.
Controls a replicated player camera, that can be controlled by the spectator. This can be used to test control of non-character units and is currently in a pretty hacky state.

2
ProjectSettings/EditorSettings.asset


EditorSettings:
m_ObjectHideFlags: 0
serializedVersion: 7
m_ExternalVersionControlSupport: Perforce
m_ExternalVersionControlSupport: Visible Meta Files
m_SerializationMode: 2
m_LineEndingsForNewScripts: 1
m_DefaultBehaviorMode: 0

19
README.md


> **will not work**. You must clone the project with a version of git that has LFS.
> You can download Git LFS here: https://git-lfs.github.com/.
The project size is about 18GB. If your cloned repository is much smaller,
The project size is about 18GB (size of Assets folder). Your cloned repository
will be almost double of that due to git state. If it is much smaller,
you most likely did not have LFS when you cloned.
## Getting the right version of Unity

### Building bundles and standalone
Leave playmode again and in the Project Tools windows, in the
bundles section, press __All \[force\]__.
Leave playmode again and in the Project Tools window, verify that
it says "Building for: StandaloneWindows64..." under the Game headline.
If it does not, change your platform in the usual way, using File > Build
settings window.
Now, in the Project Tools window in the bundles section, press __All \[force\]__.
This will build the levels and other assets into assetbundles. The first time
around this will take a significant amount of time as all shaders have to be

the [CHANGELOG](CHANGELOG.md) with highlights but the full history is not
carried over.
For legal and practical reasons we are not able to take larger contributions
just now. We are working to see how we can make it happen and we are always happy
to hear about bugfixes and ideas for improvements in our forum. If you post
bugfixes, we remind you that they will be covered by
[Unity Contribution Agreement](https://unity3d.com/legal/licenses/Unity_Contribution_Agreement).
For practical reasons we are not able to take larger contributions
just now. But bugfixes are very welcome! Read the guidelines for
contributing in [CONTRIBUTING](CONTRIBUTING.md).
## More information

13
CONTRIBUTING.md


# Contributing
## If you are interested in contributing, here are some ground rules:
As the projects matures this will change, but currently it is like this:
* We are not ready to take new features or bigger changes so don't make big PRs yet. Bring up your thoughts in the forum.
* We are happy to get fixes to bugs and improvements to the out-of-box experience of the project.
## All contributions are subject to the [Unity Contribution Agreement(UCA)](https://unity3d.com/legal/licenses/Unity_Contribution_Agreement)
By making a pull request, you are confirming agreement to the terms and conditions of the UCA, including that your Contributions are your original creation and that you have complete right and authority to make your Contributions.
## Once you have a change ready following these ground rules. Simply make a pull request

26
Documentation/Images/CutGameObjects.PNG

之前 之后
宽度: 385  |  高度: 51  |  大小: 6.8 KiB

40
Documentation/Images/LPPVTool.PNG

之前 之后
宽度: 782  |  高度: 214  |  大小: 14 KiB

1001
Documentation/Images/LightProbeGenerator.PNG
文件差异内容过多而无法显示
查看文件

42
Documentation/Images/LightProbePlacement.PNG

之前 之后
宽度: 783  |  高度: 294  |  大小: 22 KiB

43
Documentation/Images/LookUpAssetWindow.PNG

之前 之后
宽度: 804  |  高度: 184  |  大小: 10 KiB

58
Documentation/Images/MaterialPropertyOverrideComponent.PNG

之前 之后
宽度: 785  |  高度: 228  |  大小: 21 KiB

68
Documentation/Images/ReplaceSceneSelectionByThisPrefab.PNG

之前 之后
宽度: 668  |  高度: 211  |  大小: 21 KiB

26
Documentation/Images/RopeAnchor.PNG

之前 之后
宽度: 784  |  高度: 98  |  大小: 7.8 KiB

47
Documentation/Images/RopeLine.PNG

之前 之后
宽度: 783  |  高度: 244  |  大小: 21 KiB

74
Documentation/Images/SelectionHistory.PNG

之前 之后
宽度: 606  |  高度: 368  |  大小: 26 KiB

171
Documentation/SmallEditorTools.md


# Small editortools and scripts
The FPS Sample project features a range of little tools, editorscripts, hotkeys and components
that we used creating this project.
This file documents the most commonly used ones, ordered by dicipline.
## Scene editing
__Toggle game view tracking [Hotkey toggle]__\
Syncs position of scene view and default game camera.
> Hotkey: Ctrl+Shift+K\
> Menu: FPS Sample > Hotkeys > Toggle game view tracking
__Cut GameObjects [Hotkey]__\
Cuts the current selection in the scene Hierarchy. The cut objects are marked by a little round icon to the right in the scene Hierarchy
![](Images/CutGameObjects.png)
> Hotkey: Ctrl+Shift+X\
> Menu: FPS Sample > Hotkeys > Cut GameObjects
__Paste GameObjects [Hotkey]__\
Paste in previous cut selections in the scene Hierarchy
> Hotkey: Ctrl+Shift+V\
> Menu: FPS Sample > Hotkeys > Paste GameObjects
__Deselect All [Hotkey]__\
Clears the current selection in the scene Hierarchy and Project
> Hotkey: Alt+D\
> Menu: FPS Sample > Hotkeys > Deselect all
__Position under mouse [Hotkey]__\
Positions current selection under the mouse cursor in the scene view on first found collider. Very handy for worldbuilding
> Hotkey: Ctrl+Shift+Q\
> Menu: FPS Sample > Hotkeys > Position under mouse
__Align and position under mouse [Hotkey]__\
Positions and aligns rotation of current selection under the mouse cursor in
the scene view on first found collider
> Hotkey: Ctrl+Shift+Z\
> Menu: FPS Sample > Hotkeys > Align and position under mouse
__Selection History [Dockable window]__\
A dockable window that captures selection history. The checkbox next to history items is
used to 'pin' the item so it doesn't get pushed out by later selected items.
Items in the history window can be dragged onto component fields.
This is useful for setting up assets with many cross references such as materials and complicated prefabs
![](Images/SelectionHistory.png)
> Menu: FPS Sample > Windows > Selection History
__Toggle Gizmos [Hotkey toggle]__\
Toggles the visibility of gizmos in the scene view
> Hotkey: Ctrl+G\
> Menu: FPS Sample > Hotkeys > Toggle Gizmos
__LodSelector [Hotkey toggle]__\
A toggle to prevent selection in the scene view of gameobjects that are
referenced in a LOD Component. This helps you avoid mistakes where you select a LOD gameobject
and e.g. move that instead of the prefab it belongs to.
> Hotkey: Alt+L\
> Menu: FPS Sample > Hotkeys > LodSelector
__Replace scene selection by this prefab [Hotkey]__\
Enables you to easily replace scene Hierarchy selection with another resource from Project. Simply make a selection in the
scene Hierarchy and Ctrl+RMB in Project on what resource you want to replace your selection with and press "Replace scene selection by this prefab"
![](Images/ReplaceSceneSelectionByThisPrefab.png)
> Hotkey: Ctrl+RMB
__Take screenshot [Utility]__\
Takes a screenshot using active game view and prompts user where to save screenshot. This script saves out the screenshot in whatever
resolution is chosen in game view regardless of monitor resolution and because of this it can be used to capture high resolution screenshots better than a regular PrintScreen
> Menu: FPS Sample > Take Screenshot
__Fix sceneview fov [Utility]__\
When zooming in the scene view by using the mousewheel the camera clipping
planes are scaled. This script prevents that. Instead the mousewheel will
dolly the camera (i.e. move it forward/backward).
> Menu: FPS Sample > Fix sceneview fov
__Material property override [Component][Asset]__\
The _Material Property Override Component_ allows the user to override material properties based on shader keywords. This is handy as it enables you to tweak ie. the color of a material
or the strength of a normalmap without having to create a new material.
The _Material Property Override Asset_ allows you to push the properties you want to override to a Material Property Override Component from an asset rather than typing it in manually per instance.
This way you can easily push changes to many different materials making it easy to manage ie. color schemes. In the FPS Sample we used Material Property Override Assets
to manage the colors of the pipes, the industrial tanks, the factory exterior detail props and more. By using Material
Property Override Assets we could push the same color values to many different materials making it easy to manage color schemes and keep the number of material resources at a minimum.
![](Images/MaterialPropertyOverrideComponent.png)
__Rope line [Component]__\
These components help setting up ropes using a line renderer. The Rope Line Component keeps track of anchor gameobjects and
draws lines using a line renderer between the ancors. Children of the gameobject that has a Rope Anchor Component will automatically be assigned
to the anchor list if Simulate is ticked. When Simulate is ticked the anchor list is updated and the ropes are simulated. When you
are satisfied with the ropes untick Simulate and the ropes are then saved.
The Rope Anchor Component defines the length and number of segments for that section of the rope.
![](Images/RopeLine.png)
![](Images/RopeAnchor.png)
## Lighting
__LPPV Tool [Component]__\
This component helps set up and manage light probe proxy volumes. It is a component that references
a given light probe proxy volume and basically checks if it's meshrenderer children are set up to use the same light probe proxy volume
as it refers to. If this is not the case you can set this up by pressing "Assign". This speeds up bulk setup of light probe proxy volumes
![](Images/LPPVTool.png)
__Clear all reflectionprobes to black [Utility]__\
Clears all reflectionprobes to black. This is required to get correct bakes when baking reflectionprobes
> Menu: FPS Sample > Lighting > Reflection Probes > Clear To Black
__Light probe placement [Component]__\
This is a component that can be used for easier placement of lightprobes.
To use this component add it to the gameobject you have your Light Probe Group component.
Enable the script by pressing the toggle key labelled "Place [L key]" and press "Edit Light Probes" in the Light Probe Group Component.
Now a lightprobe will be added whenever you press L. The placement of the probe is pushed in the normal direction of the collision you click on and the height can be altered in the Light Probe Placement component.
It is important that the gameobject on which the component is placed is situated at 0, 0, 0 in worldspace as the probe placement otherwise will be incorrect.
![](Images/LightProbePlacement.png)
__Light Probe Generator [Asset postprocessor]__\
This is an asset post processor that looks for meshes with the prefix "LPG_" and when found it assigns a Light Probe Group to the object and generates a lightprobe per vertice.
![](Images/LightProbeGenerator.png)
## Other
__Lookup asset guid [Utility]__\
Looks up the GUID for an asset OR looks up the asset for a particular GUID.
![](Images/LookUpAssetWindow.png)
> Hotkey: Ctrl+Alt+L\
> Menu: FPS Sample > Hotkeys > Lookup asset guid
## Animation
__Update Avatar Masks [Utility]__\
Updates all Avatar Masks copies in Clips to their latest source
> Menu: FPS Sample > Animation > Update Animation Masks
__Update Avatar References [Utility]__\
Updates all Avatars copies to their latest source
> Menu: FPS Sample > Animation > Update Avatar References
__Skeleton Pose Interop [Utility]__\
Saves/Loads the transforms of a hierarchy to disk (TMP folder). Based on root selection.
Mainly intended to interop poses between our Maya Character pipeline and Unity.
> Menu: FPS Sample > Animation > Skeleton Pose Interop > ..
正在加载...
取消
保存