浏览代码

Merge pull request #1447 from Unity-Technologies/Branch_FixInputRegisterCrash

Temporary fix for a crash in input registering.
/main
GitHub 7 年前
当前提交
a466fdb8
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 7
      com.unity.render-pipelines.core/CoreRP/Inputs/InputRegistering.cs

7
com.unity.render-pipelines.core/CoreRP/Inputs/InputRegistering.cs


public static void RegisterInputs(List<InputManagerEntry> entries)
{
// Grab reference to input manager
var inputManager = AssetDatabase.LoadAllAssetsAtPath("ProjectSettings/InputManager.asset")[0];
var assets = AssetDatabase.LoadAllAssetsAtPath("ProjectSettings/InputManager.asset");
// Temporary fix. This happens some time with HDRP init when it's called before asset database is initialized (probably related to package load order).
if (assets.Length == 0)
return;
var inputManager = assets[0];
// Wrap in serialized object
var soInputManager = new SerializedObject(inputManager);

正在加载...
取消
保存