From 05a7cda9e1577fcba8b4919e6e11b369f0c089f3 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Mon, 24 Oct 2022 17:56:22 +0900 Subject: [PATCH] remove ThisType? field. #1866 --- Assets/VRMShaders/GLTF/IO/Runtime/PathObject.cs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/Assets/VRMShaders/GLTF/IO/Runtime/PathObject.cs b/Assets/VRMShaders/GLTF/IO/Runtime/PathObject.cs index cc4a66e2d..55cddca2e 100644 --- a/Assets/VRMShaders/GLTF/IO/Runtime/PathObject.cs +++ b/Assets/VRMShaders/GLTF/IO/Runtime/PathObject.cs @@ -50,20 +50,10 @@ namespace VRMShaders } } - static PathObject? _root; - public static PathObject UnityRoot - { - get - { - if (!_root.HasValue) - { - _root = FromFullPath(Path.GetDirectoryName(Application.dataPath)); - } - return _root.Value; - } - } + public static PathObject UnityRoot { get; } = FromFullPath(Path.GetDirectoryName(Application.dataPath)); - public static PathObject UnityAssets => UnityRoot.Child("Assets/"); + // 記述順に解決? + public static PathObject UnityAssets { get; } = UnityRoot.Child("Assets/"); PathObject(string src) {