public override void Setup() { base.Setup(); m_Stack = ScriptableObject.CreateInstance <FilterStack>(); m_Context = new FilterContext(FilterUtility.defaultFormat, Vector3.zero, 1f, 0f); }
private void SaveFilterStack(FilterStack filterStack) { List <UnityEngine.Object> objList = new List <UnityEngine.Object>(); objList.Add(filterStack); objList.AddRange(filterStack.filters); filterStack.filters.ForEach((f) => { var l = f.GetObjectsToSerialize(); if (l != null && l.Count > 0) { objList.AddRange(l); } }); // write to the file UnityEditorInternal.InternalEditorUtility.SaveToSerializedFileAndForget(objList.ToArray(), getFilterStackFilePath, true); }