private Texture2D GetTextureValue(EZData.Context item, string path, Dictionary<EZData.Context, EZData.Property<Texture2D>> cache) { if (item == null) return null; EZData.Property<Texture2D> property = null; if (cache.TryGetValue(item, out property)) return property.GetValue(); property = item.FindProperty<Texture2D>(path, this); if (property == null) return null; property.OnChange += OnOptionDataChange; cache.Add(item, property); return property.GetValue(); }
private EZData.Property<string> GetDisplayValueProperty(EZData.Context item) { if (item == null) return null; EZData.Property<string> property = null; if (_displayValuesCache.TryGetValue(item, out property)) return property; property = item.FindProperty<string>(DisplayValuePath, this); if (property != null) _displayValuesCache.Add(item, property); return property; }
private bool GetBoolValue(EZData.Context item, string path, Dictionary<EZData.Context, EZData.Property<bool>> cache) { if (item == null) return false; EZData.Property<bool> property = null; if (cache.TryGetValue(item, out property)) return property.GetValue(); property = item.FindProperty<bool>(path, this); if (property == null) return false; property.OnChange += OnOptionDataChange; cache.Add(item, property); return property.GetValue(); }