public void SetExtraPositionBone(string boneName) { try { _extraTransform.position = _endUnit.GetBonePosition(boneName); } catch (Exception ex) { FTDebug.LogError($"SetExtraPositionBone Error {this.gameObject.name} {ex.Message} {ex.StackTrace}", true); } }
public void SetExtraFollowerBoneName(string boneName) { try { _extraFollower.target = _endUnit.GetBoneTransform(boneName); } catch (Exception ex) { FTDebug.LogError($"SetExtraFollowerBoneName Error {this.gameObject.name} {ex.Message} {ex.StackTrace}", true); } }
private void BeginPerf(string key, bool ignoreParent = false) { if (!PERF_OPEN) { return; } if (string.IsNullOrEmpty(key)) { FTDebug.LogError("[GamePerf] Perf Lose Key"); return; } var parentKey = ""; if (_perfingList.Count != 0 && !ignoreParent) { parentKey = _perfingList.First().realKey; } var perfing = new GamePerfingData() { key = key, parentKey = parentKey, beginTime = 0, }; if (!_allPerfStatList.ContainsKey(perfing.realKey)) { var perfStat = new GamePerfStat() { key = key, parentKey = parentKey, totalTimes = 0, totalCostTime = 0, lastCostTime = 0, recordList = new List <double>(), childList = new List <string>(), statLevel = 0, }; _allPerfStatList.Add(perfing.realKey, perfStat); if (_allPerfStatList.Keys.Contains(parentKey)) { var parentPerf = _allPerfStatList[parentKey]; parentPerf.childList.Add(perfing.realKey); perfStat.statLevel = parentPerf.statLevel + 1; } } _perfingList.Push(perfing); perfing.beginTime = Time.realtimeSinceStartup * 1000; }