Cozy Wather + buld systeme
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26fd4112bc7e4454b983d6a7a4d6800a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 425d1fbe84cfe424787415201bde4723
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,210 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEditor.UIElements;
|
||||
using System;
|
||||
using DistantLands.Cozy.Data;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DistantLands.Cozy.EditorScripts
|
||||
{
|
||||
|
||||
[CustomPropertyDrawer(typeof(ChanceEffector))]
|
||||
public class ChanceEffectorField : PropertyDrawer
|
||||
{
|
||||
|
||||
public override VisualElement CreatePropertyGUI(SerializedProperty property)
|
||||
{
|
||||
VisualElement root = new VisualElement();
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/chance-effector-field.uxml"
|
||||
);
|
||||
asset.CloneTree(root);
|
||||
|
||||
root.Q<EnumField>().BindProperty(property.FindPropertyRelative("limitType"));
|
||||
PropertyField propertyField = root.Q<PropertyField>();
|
||||
propertyField.BindProperty(property.FindPropertyRelative("customChanceEffector"));
|
||||
CurveField curveField = root.Q<CurveField>();
|
||||
curveField.BindProperty(property.FindPropertyRelative("curve"));
|
||||
VisualElement curveContainer = root.Q<VisualElement>("curve");
|
||||
propertyField.label = "";
|
||||
|
||||
List<AnimationCurve> presets = new List<AnimationCurve>();
|
||||
List<string> presetNames = new List<string>();
|
||||
|
||||
|
||||
root.Q<EnumField>().RegisterCallback((ChangeEvent<string> evt) =>
|
||||
{
|
||||
if (evt.newValue == "Custom")
|
||||
{
|
||||
propertyField.style.display = DisplayStyle.Flex;
|
||||
curveContainer.style.display = DisplayStyle.None;
|
||||
}
|
||||
else
|
||||
{
|
||||
propertyField.style.display = DisplayStyle.None;
|
||||
curveContainer.style.display = DisplayStyle.Flex;
|
||||
}
|
||||
|
||||
presetNames.Clear();
|
||||
presets.Clear();
|
||||
|
||||
switch (evt.newValue)
|
||||
{
|
||||
|
||||
case ("Temperature"):
|
||||
presets.Add(new AnimationCurve(new Keyframe(0.3f, 1), new Keyframe(0.34f, 0), new Keyframe(0, 1), new Keyframe(1, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0.3f, 0), new Keyframe(0.34f, 1), new Keyframe(0, 0), new Keyframe(1, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0.8f, 0), new Keyframe(1, 1), new Keyframe(0, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 1), new Keyframe(0, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 0.5f), new Keyframe(0.5f, 0), new Keyframe(0.8f, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 0), new Keyframe(0, 0), new Keyframe(0.5f, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 0), new Keyframe(0, 1)));
|
||||
presetNames.Add("Only below freezing");
|
||||
presetNames.Add("Only above freezing");
|
||||
presetNames.Add("Only above 80F");
|
||||
presetNames.Add("More likely at hot tempratures");
|
||||
presetNames.Add("More likely at warm tempratures");
|
||||
presetNames.Add("More likely at cool tempratures");
|
||||
presetNames.Add("More likely at freezing tempratures");
|
||||
break;
|
||||
case ("Precipitation"):
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1, 3, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 0), new Keyframe(0, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 0), new Keyframe(0, 1, -3, -3)));
|
||||
presetNames.Add("More likely during high precipitation");
|
||||
presetNames.Add("Most likely during high precipitation");
|
||||
presetNames.Add("More likely during low precipitation");
|
||||
presetNames.Add("Most likely during low precipitation");
|
||||
break;
|
||||
case ("YearPercentage"):
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 0), new Keyframe(0.1f, 0), new Keyframe(0.2f, 1), new Keyframe(0.35f, 1), new Keyframe(0.45f, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 0), new Keyframe(0.35f, 0), new Keyframe(0.45f, 1), new Keyframe(0.6f, 1), new Keyframe(0.7f, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 0), new Keyframe(0.6f, 0), new Keyframe(0.7f, 1), new Keyframe(0.85f, 1), new Keyframe(0.95f, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 1), new Keyframe(0.1f, 0), new Keyframe(0.95f, 1), new Keyframe(1f, 1), new Keyframe(0.85f, 0)));
|
||||
presetNames.Add("More likely during spring");
|
||||
presetNames.Add("Most likely during summer");
|
||||
presetNames.Add("More likely during fall");
|
||||
presetNames.Add("Most likely during winter");
|
||||
break;
|
||||
case ("Time"):
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 1), new Keyframe(0.2f, 1), new Keyframe(0.25f, 0), new Keyframe(0.75f, 0), new Keyframe(0.8f, 1), new Keyframe(1, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.2f, 0), new Keyframe(0.25f, 1), new Keyframe(0.75f, 1), new Keyframe(0.8f, 0), new Keyframe(1, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.18f, 0), new Keyframe(0.25f, 1), new Keyframe(0.35f, 0), new Keyframe(0.7f, 0), new Keyframe(0.75f, 1), new Keyframe(0.85f, 0), new Keyframe(1, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.70f, 0), new Keyframe(0.8f, 1), new Keyframe(0.85f, 0), new Keyframe(1, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.18f, 0), new Keyframe(0.22f, 1), new Keyframe(0.3f, 0), new Keyframe(1, 0)));
|
||||
presetNames.Add("More likely at night");
|
||||
presetNames.Add("Most likely during the day");
|
||||
presetNames.Add("More likely in the evening & morning");
|
||||
presetNames.Add("More likely in the evening");
|
||||
presetNames.Add("Most likely in the morning");
|
||||
break;
|
||||
case ("AccumulatedWetness"):
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1, 3, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 0), new Keyframe(0, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 0), new Keyframe(0, 1, -3, -3)));
|
||||
presetNames.Add("More likely while wet");
|
||||
presetNames.Add("Most likely while wet");
|
||||
presetNames.Add("More likely while dry");
|
||||
presetNames.Add("Most likely while dry");
|
||||
break;
|
||||
case ("AccumulatedSnow"):
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1, 3, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 0), new Keyframe(0, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 0), new Keyframe(0, 1, -3, -3)));
|
||||
presetNames.Add("More likely while snowy");
|
||||
presetNames.Add("Most likely while snowy");
|
||||
presetNames.Add("More likely while not snowy");
|
||||
presetNames.Add("Most likely while not snowy");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if (property.FindPropertyRelative("limitType").intValue == 6)
|
||||
{
|
||||
propertyField.style.display = DisplayStyle.Flex;
|
||||
curveContainer.style.display = DisplayStyle.None;
|
||||
}
|
||||
else
|
||||
{
|
||||
propertyField.style.display = DisplayStyle.None;
|
||||
curveContainer.style.display = DisplayStyle.Flex;
|
||||
}
|
||||
|
||||
|
||||
switch (property.FindPropertyRelative("limitType").intValue)
|
||||
{
|
||||
|
||||
case (0):
|
||||
presets.Add(new AnimationCurve(new Keyframe(0.3f, 1), new Keyframe(0.34f, 0), new Keyframe(0, 1), new Keyframe(1, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0.3f, 0), new Keyframe(0.34f, 1), new Keyframe(0, 0), new Keyframe(1, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0.8f, 0), new Keyframe(1, 1), new Keyframe(0, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 1), new Keyframe(0, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 0.5f), new Keyframe(0.5f, 0), new Keyframe(0.8f, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 0), new Keyframe(0, 0), new Keyframe(0.5f, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 0), new Keyframe(0, 1)));
|
||||
presetNames.Add("Only below freezing");
|
||||
presetNames.Add("Only above freezing");
|
||||
presetNames.Add("Only above 80F");
|
||||
presetNames.Add("More likely at hot tempratures");
|
||||
presetNames.Add("More likely at warm tempratures");
|
||||
presetNames.Add("More likely at cool tempratures");
|
||||
presetNames.Add("More likely at freezing tempratures");
|
||||
break;
|
||||
case (1):
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1, 3, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 0), new Keyframe(0, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(1, 0), new Keyframe(0, 1, -3, -3)));
|
||||
presetNames.Add("More likely during high precipitation");
|
||||
presetNames.Add("Most likely during high precipitation");
|
||||
presetNames.Add("More likely during low precipitation");
|
||||
presetNames.Add("Most likely during low precipitation");
|
||||
break;
|
||||
case (2):
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 0), new Keyframe(0.1f, 0), new Keyframe(0.2f, 1), new Keyframe(0.35f, 1), new Keyframe(0.45f, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 0), new Keyframe(0.35f, 0), new Keyframe(0.45f, 1), new Keyframe(0.6f, 1), new Keyframe(0.7f, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 0), new Keyframe(0.6f, 0), new Keyframe(0.7f, 1), new Keyframe(0.85f, 1), new Keyframe(0.95f, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 1), new Keyframe(0.1f, 0), new Keyframe(0.95f, 1), new Keyframe(1f, 1), new Keyframe(0.85f, 0)));
|
||||
presetNames.Add("More likely during spring");
|
||||
presetNames.Add("Most likely during summer");
|
||||
presetNames.Add("More likely during fall");
|
||||
presetNames.Add("Most likely during winter");
|
||||
break;
|
||||
case (3):
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 1), new Keyframe(0.2f, 1), new Keyframe(0.25f, 0), new Keyframe(0.75f, 0), new Keyframe(0.8f, 1), new Keyframe(1, 1)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.2f, 0), new Keyframe(0.25f, 1), new Keyframe(0.75f, 1), new Keyframe(0.8f, 0), new Keyframe(1, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.18f, 0), new Keyframe(0.25f, 1), new Keyframe(0.35f, 0), new Keyframe(0.7f, 0), new Keyframe(0.75f, 1), new Keyframe(0.85f, 0), new Keyframe(1, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.70f, 0), new Keyframe(0.8f, 1), new Keyframe(0.85f, 0), new Keyframe(1, 0)));
|
||||
presets.Add(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.18f, 0), new Keyframe(0.22f, 1), new Keyframe(0.3f, 0), new Keyframe(1, 0)));
|
||||
presetNames.Add("More likely at night");
|
||||
presetNames.Add("Most likely during the day");
|
||||
presetNames.Add("More likely in the evening & morning");
|
||||
presetNames.Add("More likely in the evening");
|
||||
presetNames.Add("Most likely in the morning");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
DropdownField presetButton = root.Q<DropdownField>();
|
||||
presetButton.choices = presetNames;
|
||||
presetButton.labelElement.style.display = DisplayStyle.None;
|
||||
presetButton.RegisterCallback((ChangeEvent<string> evt) =>
|
||||
{
|
||||
curveField.value = presets[presetNames.IndexOf(evt.newValue)];
|
||||
});
|
||||
|
||||
|
||||
return root;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfa63574917203742a6ad9a0a31d4a58
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/C#/ChanceEffectorField.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,236 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEditor.UIElements;
|
||||
using System;
|
||||
using DistantLands.Cozy.Data;
|
||||
|
||||
namespace DistantLands.Cozy.EditorScripts
|
||||
{
|
||||
public class CozyProfileField<T> : VisualElement where T : CozyProfile
|
||||
{
|
||||
public static string path;
|
||||
|
||||
public CozyProfileField(SerializedProperty property, EventCallback<ChangeEvent<UnityEngine.Object>> changeEvent)
|
||||
{
|
||||
|
||||
AddToClassList("cozy-profile");
|
||||
|
||||
ObjectField profileField = new ObjectField
|
||||
{
|
||||
objectType = typeof(T)
|
||||
};
|
||||
profileField.RegisterValueChangedCallback(changeEvent);
|
||||
profileField.BindProperty(property);
|
||||
|
||||
Button cloneProfile = new Button
|
||||
{
|
||||
name = "clone-profile",
|
||||
tooltip = "Clone Profile"
|
||||
};
|
||||
cloneProfile.RegisterCallback<ClickEvent>((ClickEvent) =>
|
||||
{
|
||||
path = EditorUtility.SaveFolderPanel("Duplicate Profile", path, "");
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
GUIUtility.ExitGUI();
|
||||
return;
|
||||
}
|
||||
|
||||
path = "Assets" + path.Substring(Application.dataPath.Length);
|
||||
|
||||
if (typeof(ScriptableObject).IsAssignableFrom(typeof(T)))
|
||||
{
|
||||
|
||||
ScriptableObject newInstance = ScriptableObject.CreateInstance(typeof(T));
|
||||
|
||||
string duplication = JsonUtility.ToJson(property.objectReferenceValue);
|
||||
JsonUtility.FromJsonOverwrite(duplication, newInstance);
|
||||
|
||||
path = $"{path}/{property.objectReferenceValue.name} Clone.asset";
|
||||
AssetDatabase.CreateAsset(newInstance, path);
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
property.objectReferenceValue = newInstance;
|
||||
property.serializedObject.ApplyModifiedProperties();
|
||||
property.serializedObject.Update();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Type is not a scriptable object.");
|
||||
}
|
||||
|
||||
ChangeEvent<UnityEngine.Object> evt = new ChangeEvent<UnityEngine.Object>();
|
||||
changeEvent.Invoke(evt);
|
||||
GUIUtility.ExitGUI();
|
||||
|
||||
});
|
||||
cloneProfile.Add(new Image
|
||||
{
|
||||
image = EditorGUIUtility.IconContent("d_SaveAs").image
|
||||
});
|
||||
|
||||
|
||||
Button newProfile = new Button
|
||||
{
|
||||
name = "new-profile",
|
||||
tooltip = "New Profile"
|
||||
};
|
||||
newProfile.RegisterCallback<ClickEvent>((ClickEvent) =>
|
||||
{
|
||||
path = EditorUtility.SaveFolderPanel("Create a New Profile", path, "");
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
GUIUtility.ExitGUI();
|
||||
return;
|
||||
}
|
||||
|
||||
path = "Assets" + path.Substring(Application.dataPath.Length);
|
||||
|
||||
if (typeof(ScriptableObject).IsAssignableFrom(typeof(T)))
|
||||
{
|
||||
ScriptableObject newInstance = ScriptableObject.CreateInstance(typeof(T));
|
||||
|
||||
path = $"{path}/New {typeof(T).Name}.asset";
|
||||
AssetDatabase.CreateAsset(newInstance, path);
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
property.objectReferenceValue = newInstance;
|
||||
property.serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Type is not a scriptable object.");
|
||||
}
|
||||
|
||||
ChangeEvent<UnityEngine.Object> evt = new ChangeEvent<UnityEngine.Object>();
|
||||
changeEvent.Invoke(evt);
|
||||
GUIUtility.ExitGUI();
|
||||
});
|
||||
newProfile.Add(new Image
|
||||
{
|
||||
image = EditorGUIUtility.IconContent("CreateAddNew").image
|
||||
});
|
||||
|
||||
|
||||
Add(profileField);
|
||||
Add(cloneProfile);
|
||||
Add(newProfile);
|
||||
|
||||
}
|
||||
public CozyProfileField(SerializedProperty property)
|
||||
{
|
||||
|
||||
AddToClassList("cozy-profile");
|
||||
|
||||
ObjectField profileField = new ObjectField
|
||||
{
|
||||
objectType = typeof(T)
|
||||
};
|
||||
profileField.BindProperty(property);
|
||||
|
||||
Button cloneProfile = new Button
|
||||
{
|
||||
name = "clone-profile",
|
||||
tooltip = "Clone Profile"
|
||||
};
|
||||
cloneProfile.RegisterCallback<ClickEvent>((ClickEvent) =>
|
||||
{
|
||||
path = EditorUtility.SaveFolderPanel("Duplicate Profile", path, "");
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
GUIUtility.ExitGUI();
|
||||
return;
|
||||
}
|
||||
|
||||
path = "Assets" + path.Substring(Application.dataPath.Length);
|
||||
|
||||
if (typeof(ScriptableObject).IsAssignableFrom(typeof(T)))
|
||||
{
|
||||
|
||||
ScriptableObject newInstance = ScriptableObject.CreateInstance(typeof(T));
|
||||
|
||||
string duplication = JsonUtility.ToJson(property.objectReferenceValue);
|
||||
JsonUtility.FromJsonOverwrite(duplication, newInstance);
|
||||
|
||||
path = $"{path}/{property.objectReferenceValue.name} Clone.asset";
|
||||
AssetDatabase.CreateAsset(newInstance, path);
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
property.objectReferenceValue = newInstance;
|
||||
property.serializedObject.ApplyModifiedProperties();
|
||||
property.serializedObject.Update();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Type is not a scriptable object.");
|
||||
}
|
||||
|
||||
GUIUtility.ExitGUI();
|
||||
|
||||
});
|
||||
cloneProfile.Add(new Image
|
||||
{
|
||||
image = EditorGUIUtility.IconContent("d_SaveAs").image
|
||||
});
|
||||
|
||||
|
||||
Button newProfile = new Button
|
||||
{
|
||||
name = "new-profile",
|
||||
tooltip = "New Profile"
|
||||
};
|
||||
newProfile.RegisterCallback<ClickEvent>((ClickEvent) =>
|
||||
{
|
||||
path = EditorUtility.SaveFolderPanel("Create a New Profile", path, "");
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
GUIUtility.ExitGUI();
|
||||
return;
|
||||
}
|
||||
|
||||
path = "Assets" + path.Substring(Application.dataPath.Length);
|
||||
|
||||
if (typeof(ScriptableObject).IsAssignableFrom(typeof(T)))
|
||||
{
|
||||
ScriptableObject newInstance = ScriptableObject.CreateInstance(typeof(T));
|
||||
|
||||
path = $"{path}/New {typeof(T).Name}.asset";
|
||||
AssetDatabase.CreateAsset(newInstance, path);
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
property.objectReferenceValue = newInstance;
|
||||
property.serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Type is not a scriptable object.");
|
||||
}
|
||||
|
||||
GUIUtility.ExitGUI();
|
||||
});
|
||||
newProfile.Add(new Image
|
||||
{
|
||||
image = EditorGUIUtility.IconContent("CreateAddNew").image
|
||||
});
|
||||
|
||||
|
||||
Add(profileField);
|
||||
Add(cloneProfile);
|
||||
Add(newProfile);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee4ba9da021b2f244b9d8b65ada7d157
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/C#/CozyProfileField.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,19 @@
|
||||
using DistantLands.Cozy;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
class Graph : VisualElement
|
||||
{
|
||||
public new class UxmlFactory : UxmlFactory<Graph> { }
|
||||
public Graph()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
style.display = CozyWeather.Graphs ? DisplayStyle.Flex : DisplayStyle.None;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 82fb72e3997ae72488025e75663c2419
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/C#/Graph.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,73 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEditor.UIElements;
|
||||
using DistantLands.Cozy.Data;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DistantLands.Cozy.EditorScripts
|
||||
{
|
||||
|
||||
[CustomPropertyDrawer(typeof(MeridiemTime))]
|
||||
public class MeridiemTimeDrawer : PropertyDrawer
|
||||
{
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
|
||||
EditorGUI.BeginProperty(position, label, property);
|
||||
|
||||
position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Keyboard), label);
|
||||
|
||||
var indent = EditorGUI.indentLevel;
|
||||
EditorGUI.indentLevel = 0;
|
||||
float div = position.width - 50;
|
||||
|
||||
var hoursRect = new Rect(position.x + div, position.y, 22, position.height);
|
||||
var colonRect = new Rect(position.x + div + 22, position.y, 5, position.height);
|
||||
var minutesRect = new Rect(position.x + div + 28, position.y, 22, position.height);
|
||||
var sliderRect = new Rect(position.x, position.y, div - 5, position.height);
|
||||
|
||||
|
||||
|
||||
MeridiemTime time = new MeridiemTime(property.FindPropertyRelative("hours").intValue, property.FindPropertyRelative("minutes").intValue,
|
||||
property.FindPropertyRelative("seconds").intValue, property.FindPropertyRelative("milliseconds").intValue);
|
||||
|
||||
float timeAsFloat = time;
|
||||
|
||||
EditorGUI.LabelField(colonRect, ":");
|
||||
EditorGUI.BeginChangeCheck();
|
||||
int hours = Mathf.Clamp(EditorGUI.IntField(hoursRect, GUIContent.none, Mathf.FloorToInt(time.hours)), 0, 23);
|
||||
int minutes = Mathf.Clamp(EditorGUI.IntField(minutesRect, GUIContent.none, Mathf.FloorToInt(time.minutes)), 0, 59);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
property.FindPropertyRelative("hours").intValue = hours;
|
||||
time.hours = hours;
|
||||
property.FindPropertyRelative("minutes").intValue = minutes;
|
||||
time.minutes = minutes;
|
||||
timeAsFloat = time;
|
||||
}
|
||||
|
||||
if (div > 55)
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
timeAsFloat = GUI.HorizontalSlider(sliderRect, timeAsFloat, 0, 1);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
time = timeAsFloat;
|
||||
property.FindPropertyRelative("hours").intValue = time.hours;
|
||||
property.FindPropertyRelative("minutes").intValue = time.minutes;
|
||||
property.FindPropertyRelative("seconds").intValue = time.seconds;
|
||||
property.FindPropertyRelative("milliseconds").intValue = time.milliseconds;
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel = indent;
|
||||
|
||||
EditorGUI.EndProperty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 721dc4760b345a541915f04468b94763
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/C#/MeridiemTimeField.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,44 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
public class ModuleTabSelector : VisualElement
|
||||
{
|
||||
public new class UxmlFactory : UxmlFactory<ModuleTabSelector> { }
|
||||
public ModuleTabSelector()
|
||||
{
|
||||
Init(GUIContent.none, "");
|
||||
}
|
||||
|
||||
private Image Image => this.Q<Image>("icon");
|
||||
private Label Label => this.Q<Label>("module-name");
|
||||
private Label DynamicStatus => this.Q<Label>("dynamic-status");
|
||||
|
||||
public ModuleTabSelector(GUIContent content)
|
||||
{
|
||||
Init(content, "Yep. It works :)");
|
||||
}
|
||||
public ModuleTabSelector(GUIContent content, string status)
|
||||
{
|
||||
Init(content, status);
|
||||
}
|
||||
|
||||
public void Init(
|
||||
GUIContent module,
|
||||
string dynamicStatus
|
||||
)
|
||||
{
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/module-tab-selector.uxml"
|
||||
);
|
||||
|
||||
asset.CloneTree(this);
|
||||
Image.image = module.image;
|
||||
Label.text = module.text;
|
||||
DynamicStatus.text = dynamicStatus;
|
||||
|
||||
this.tooltip = module.tooltip;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4d09454c24b23c44fb06e80133ef2881
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/C#/ModuleTabSelector.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,36 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
public class ModuleWidget : VisualElement
|
||||
{
|
||||
public new class UxmlFactory : UxmlFactory<ModuleTabSelector> { }
|
||||
public ModuleWidget()
|
||||
{
|
||||
Init(GUIContent.none, "");
|
||||
}
|
||||
|
||||
private Image Image => this.Q<Image>("icon");
|
||||
private Label Label => this.Q<Label>("name");
|
||||
private Label DynamicStatus => this.Q<Label>("dynamic-status");
|
||||
|
||||
public ModuleWidget(GUIContent content)
|
||||
{
|
||||
Init(content, "Yep. It works :)");
|
||||
}
|
||||
public ModuleWidget(GUIContent content, string status)
|
||||
{
|
||||
Init(content, status);
|
||||
}
|
||||
|
||||
public void Init(
|
||||
GUIContent module,
|
||||
string dynamicStatus
|
||||
)
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5ffd033e8d99b5640be9403692696a2d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/C#/ModuleWidget.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,46 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
public class ModuleWidgetGroup : VisualElement
|
||||
{
|
||||
public new class UxmlFactory : UxmlFactory<ModuleWidgetGroup> { }
|
||||
public ModuleWidgetGroup()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
private VisualElement TabGroup => this.Q<VisualElement>("tab-group");
|
||||
private Label Header => this.Q<Label>("widget-group-header");
|
||||
|
||||
public void AddWidget(VisualElement element)
|
||||
{
|
||||
TabGroup.Add(element);
|
||||
}
|
||||
|
||||
public void Init(
|
||||
)
|
||||
{
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/module-widget-carousel.uxml"
|
||||
);
|
||||
|
||||
asset.CloneTree(this);
|
||||
|
||||
|
||||
}
|
||||
public ModuleWidgetGroup(
|
||||
string headerTitle
|
||||
)
|
||||
{
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/module-widget-carousel.uxml"
|
||||
);
|
||||
|
||||
asset.CloneTree(this);
|
||||
Header.text = headerTitle;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9079271f17f7f314089a446a9a4da5b6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/C#/ModuleWidgetGroup.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
public class SetupCheck : VisualElement
|
||||
{
|
||||
public new class UxmlFactory : UxmlFactory<ModuleTabSelector> { }
|
||||
public SetupCheck()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
public SetupCheck(string _text, string _fixButtonText, Func<bool> _status, Action _fix)
|
||||
{
|
||||
text = _text;
|
||||
status = _status;
|
||||
fix = _fix;
|
||||
fixButtonText = _fixButtonText;
|
||||
|
||||
Init();
|
||||
}
|
||||
public SetupCheck(string _text, string _installButtonText, bool _package, Func<bool> _status, Action _fix)
|
||||
{
|
||||
text = _text;
|
||||
status = _status;
|
||||
fix = _fix;
|
||||
fixButtonText = _installButtonText;
|
||||
package = _package;
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
public string text = "";
|
||||
public string fixButtonText = "Fix";
|
||||
public string reinstallButtonText = "Reinstall";
|
||||
public bool package = false;
|
||||
public Func<bool> status = () => { return true; };
|
||||
public Action fix = () => { Debug.Log("Configure fixes!"); };
|
||||
|
||||
private Label SetupLabel => this.Q<Label>("setup-label");
|
||||
private VisualElement StatusIcon => this.Q<VisualElement>("status-icon");
|
||||
private Button FixButton => this.Q<Button>("fix-button");
|
||||
|
||||
public void Init()
|
||||
{
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/setup-check.uxml"
|
||||
);
|
||||
|
||||
asset.CloneTree(this);
|
||||
bool currentStatus = status.Invoke();
|
||||
|
||||
SetupLabel.text = text;
|
||||
StatusIcon.style.display = !package || currentStatus ? DisplayStyle.Flex : DisplayStyle.None;
|
||||
StatusIcon.style.backgroundImage = currentStatus ?
|
||||
(StyleBackground)EditorGUIUtility.IconContent("Installed").image :
|
||||
(StyleBackground)EditorGUIUtility.IconContent("Warning").image;
|
||||
FixButton.style.display = package || !currentStatus ? DisplayStyle.Flex : DisplayStyle.None;
|
||||
|
||||
FixButton.text = package && currentStatus ? reinstallButtonText : fixButtonText;
|
||||
FixButton.RegisterCallback((ClickEvent evt) =>
|
||||
{
|
||||
fix.Invoke();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc3de7893f42d9944ba853ce4ddd98ea
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/C#/SetupCheck.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,41 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
public class StatusMessage : VisualElement
|
||||
{
|
||||
public new class UxmlFactory : UxmlFactory<StatusMessage> { }
|
||||
public StatusMessage()
|
||||
{
|
||||
Init(0);
|
||||
}
|
||||
|
||||
private Image Image => this.Q<Image>("status-icon");
|
||||
|
||||
public StatusMessage(int messageType)
|
||||
{
|
||||
Init(messageType);
|
||||
}
|
||||
|
||||
public void UpdateStatus(bool goodStatus)
|
||||
{
|
||||
if (goodStatus)
|
||||
Image.image = EditorGUIUtility.IconContent("Installed").image;
|
||||
else
|
||||
Image.image = EditorGUIUtility.IconContent("Warning").image;
|
||||
}
|
||||
|
||||
public void Init(
|
||||
int version
|
||||
)
|
||||
{
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/status-message.uxml"
|
||||
);
|
||||
|
||||
asset.CloneTree(this);
|
||||
Image.image = EditorGUIUtility.IconContent("Warning").image;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25d5f6161fc12294898aa0df431d08f0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/C#/StatusMessage.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,69 @@
|
||||
using DistantLands.Cozy;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
class Tooltip : VisualElement
|
||||
{
|
||||
|
||||
public new class UxmlFactory : UxmlFactory<Tooltip, UxmlTraits> { }
|
||||
|
||||
private Label MessageBox => this.Q<Label>();
|
||||
|
||||
public new class UxmlTraits : VisualElement.UxmlTraits
|
||||
{
|
||||
UxmlStringAttributeDescription message =
|
||||
new UxmlStringAttributeDescription { name = "message", defaultValue = "This is a helpful tooltip for the user that explains a particular part of the COZY Ecosystem in an easy to digest manner." };
|
||||
|
||||
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc)
|
||||
{
|
||||
base.Init(ve, bag, cc);
|
||||
var ate = ve as Tooltip;
|
||||
|
||||
ate.message = message.GetValueFromBag(bag, cc);
|
||||
ate.Init();
|
||||
}
|
||||
}
|
||||
|
||||
public Tooltip()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
public Tooltip(string message)
|
||||
{
|
||||
Init(message);
|
||||
}
|
||||
|
||||
public void Init(string message)
|
||||
{
|
||||
Clear();
|
||||
|
||||
style.display = CozyWeather.Tooltips ? DisplayStyle.Flex : DisplayStyle.None;
|
||||
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/tooltip.uxml"
|
||||
);
|
||||
|
||||
asset.CloneTree(this);
|
||||
MessageBox.text = message;
|
||||
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
Clear();
|
||||
|
||||
style.display = CozyWeather.Tooltips ? DisplayStyle.Flex : DisplayStyle.None;
|
||||
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/tooltip.uxml"
|
||||
);
|
||||
|
||||
asset.CloneTree(this);
|
||||
MessageBox.text = message;
|
||||
|
||||
}
|
||||
|
||||
public string message { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 80088569fce84774ebee5f9740b537a6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/C#/Tooltip.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,78 @@
|
||||
using DistantLands.Cozy.EditorScripts;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
public class TransitGraph : VisualElement
|
||||
{
|
||||
float time = 0.25f;
|
||||
static Gradient DayGradient => new Gradient() {
|
||||
colorKeys = new GradientColorKey[6] {
|
||||
new GradientColorKey(Branding.charcoal, 0.2f),
|
||||
new GradientColorKey(Branding.red, 0.25f),
|
||||
new GradientColorKey(Branding.blue, 0.3f),
|
||||
new GradientColorKey(Branding.blue, 0.7f),
|
||||
new GradientColorKey(Branding.orange, 0.75f),
|
||||
new GradientColorKey(Branding.charcoal, 0.8f)
|
||||
}
|
||||
};
|
||||
public new class UxmlFactory : UxmlFactory<VersionSignifier> { }
|
||||
public TransitGraph()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
public TransitGraph(float _time)
|
||||
{
|
||||
time = _time;
|
||||
Init();
|
||||
}
|
||||
|
||||
public void Init(
|
||||
)
|
||||
{
|
||||
AddToClassList("graph-section");
|
||||
generateVisualContent += GenerateTransitGraph;
|
||||
|
||||
}
|
||||
|
||||
public void GenerateTransitGraph(MeshGenerationContext context)
|
||||
{
|
||||
float width = contentRect.width;
|
||||
float height = contentRect.height;
|
||||
|
||||
AnimationCurve curve = new AnimationCurve(new Keyframe[3] {
|
||||
new Keyframe(0, 0, 0, 0, 0.5f, 0.5f),
|
||||
new Keyframe(0.5f, 1, 0, 0, 0.5f, 0.5f),
|
||||
new Keyframe(1, 0, 0, 0, 0.5f, 0.5f)
|
||||
});
|
||||
|
||||
var painter = context.painter2D;
|
||||
|
||||
painter.lineWidth = 2;
|
||||
painter.strokeColor = new Color(0, 0, 0, 0.25f);
|
||||
|
||||
painter.BeginPath();
|
||||
painter.MoveTo(new Vector2(0, height * 1 / 3));
|
||||
painter.LineTo(new Vector2(width, height * 1 / 3));
|
||||
painter.Stroke();
|
||||
painter.ClosePath();
|
||||
|
||||
painter.strokeGradient = DayGradient;
|
||||
|
||||
painter.BeginPath();
|
||||
painter.MoveTo(new Vector2(0, height * 2 / 3));
|
||||
painter.BezierCurveTo(new Vector2(width / 4, height * 2 / 3), new Vector2(width / 4, 0), new Vector2(width / 2, 0));
|
||||
painter.BezierCurveTo(new Vector2(width * 3 / 4, 0), new Vector2(width * 3 / 4, height * 2 / 3), new Vector2(width, height * 2 / 3));
|
||||
painter.Stroke();
|
||||
painter.ClosePath();
|
||||
|
||||
painter.strokeColor = DayGradient.Evaluate(time);
|
||||
painter.fillColor = DayGradient.Evaluate(time);
|
||||
painter.BeginPath();
|
||||
painter.Arc(new Vector2(width * time, (1 - curve.Evaluate(time)) * height * 2 / 3), 5, 0.0f, 360f, ArcDirection.CounterClockwise);
|
||||
painter.Fill(FillRule.NonZero);
|
||||
painter.Stroke();
|
||||
painter.ClosePath();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b8edc96be17bdac469f80b721867c6b4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/C#/TransitGraph.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,247 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEditor.UIElements;
|
||||
using System;
|
||||
using DistantLands.Cozy.Data;
|
||||
|
||||
namespace DistantLands.Cozy.EditorScripts
|
||||
{
|
||||
|
||||
public class VariablePropertyField : VisualElement
|
||||
{
|
||||
private Toggle Override => this.Q<Toggle>();
|
||||
public Label Label => this.Q<Label>();
|
||||
private VisualElement FieldContainer => this.Q<VisualElement>("field");
|
||||
private VisualElement Mode => this.Q<VisualElement>("mode-selector");
|
||||
|
||||
public VariablePropertyField(SerializedProperty property, bool colorField)
|
||||
{
|
||||
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/variable-property-field.uxml"
|
||||
);
|
||||
|
||||
asset.CloneTree(this);
|
||||
this.tooltip = property.tooltip;
|
||||
|
||||
Override.BindProperty(property.FindPropertyRelative("overrideValue"));
|
||||
Label.SetEnabled(Override.value);
|
||||
FieldContainer.SetEnabled(Override.value);
|
||||
Mode.SetEnabled(Override.value);
|
||||
|
||||
Override.RegisterCallback<ChangeEvent<bool>>((ChangeEvent<bool> evt) =>
|
||||
{
|
||||
Label.SetEnabled(evt.newValue);
|
||||
FieldContainer.SetEnabled(evt.newValue);
|
||||
Mode.SetEnabled(evt.newValue);
|
||||
});
|
||||
|
||||
|
||||
Label.text = property.displayName;
|
||||
SerializedProperty modeProperty = property.FindPropertyRelative("mode");
|
||||
RefreshProperty(property, colorField, modeProperty.boolValue);
|
||||
|
||||
Mode.RegisterCallback<ClickEvent>((ClickEvent evt) =>
|
||||
{
|
||||
modeProperty.boolValue = !modeProperty.boolValue;
|
||||
RefreshProperty(property, colorField, modeProperty.boolValue);
|
||||
property.serializedObject.ApplyModifiedProperties();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
public VariablePropertyField(SerializedProperty property, float min, float max)
|
||||
{
|
||||
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/variable-property-field.uxml"
|
||||
);
|
||||
|
||||
asset.CloneTree(this);
|
||||
this.tooltip = property.tooltip;
|
||||
|
||||
Override.BindProperty(property.FindPropertyRelative("overrideValue"));
|
||||
Label.SetEnabled(Override.value);
|
||||
FieldContainer.SetEnabled(Override.value);
|
||||
Mode.SetEnabled(Override.value);
|
||||
|
||||
Override.RegisterCallback<ChangeEvent<bool>>((ChangeEvent<bool> evt) =>
|
||||
{
|
||||
Label.SetEnabled(evt.newValue);
|
||||
FieldContainer.SetEnabled(evt.newValue);
|
||||
Mode.SetEnabled(evt.newValue);
|
||||
});
|
||||
|
||||
|
||||
Label.text = property.displayName;
|
||||
SerializedProperty modeProperty = property.FindPropertyRelative("mode");
|
||||
RefreshProperty(property, modeProperty.boolValue, min, max);
|
||||
|
||||
Mode.RegisterCallback<ClickEvent>((ClickEvent evt) =>
|
||||
{
|
||||
modeProperty.boolValue = !modeProperty.boolValue;
|
||||
RefreshProperty(property, modeProperty.boolValue, min, max);
|
||||
property.serializedObject.ApplyModifiedProperties();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
public VariablePropertyField(SerializedProperty property, float min, float max, Action action)
|
||||
{
|
||||
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/variable-property-field.uxml"
|
||||
);
|
||||
|
||||
asset.CloneTree(this);
|
||||
this.tooltip = property.tooltip;
|
||||
|
||||
Override.BindProperty(property.FindPropertyRelative("overrideValue"));
|
||||
Label.SetEnabled(Override.value);
|
||||
FieldContainer.SetEnabled(Override.value);
|
||||
Mode.SetEnabled(Override.value);
|
||||
|
||||
Override.RegisterCallback<ChangeEvent<bool>>((ChangeEvent<bool> evt) =>
|
||||
{
|
||||
Label.SetEnabled(evt.newValue);
|
||||
FieldContainer.SetEnabled(evt.newValue);
|
||||
Mode.SetEnabled(evt.newValue);
|
||||
});
|
||||
|
||||
|
||||
Label.text = property.displayName;
|
||||
SerializedProperty modeProperty = property.FindPropertyRelative("mode");
|
||||
RefreshProperty(property, modeProperty.boolValue, min, max, action);
|
||||
|
||||
Mode.RegisterCallback<ClickEvent>((ClickEvent evt) =>
|
||||
{
|
||||
modeProperty.boolValue = !modeProperty.boolValue;
|
||||
RefreshProperty(property, modeProperty.boolValue, min, max, action);
|
||||
property.serializedObject.ApplyModifiedProperties();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void RefreshProperty(SerializedProperty property, bool constant, float min, float max)
|
||||
{
|
||||
FieldContainer.Clear();
|
||||
|
||||
if (constant)
|
||||
{
|
||||
VisualElement combinedFields = new VisualElement();
|
||||
combinedFields.style.flexGrow = 1;
|
||||
combinedFields.style.flexDirection = FlexDirection.Row;
|
||||
|
||||
Slider prop = new Slider(min, max);
|
||||
prop.BindProperty(property.FindPropertyRelative("floatVal"));
|
||||
prop.style.flexGrow = 1;
|
||||
combinedFields.Add(prop);
|
||||
|
||||
FloatField input = new FloatField();
|
||||
input.BindProperty(property.FindPropertyRelative("floatVal"));
|
||||
input.style.width = new Length(50, LengthUnit.Pixel);
|
||||
combinedFields.Add(input);
|
||||
|
||||
FieldContainer.Add(combinedFields);
|
||||
}
|
||||
else
|
||||
{
|
||||
CurveField prop = new CurveField();
|
||||
prop.BindProperty(property.FindPropertyRelative("curveVal"));
|
||||
prop.AddToClassList("m-0");
|
||||
prop.AddToClassList("h-full");
|
||||
FieldContainer.Add(prop);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void RefreshProperty(SerializedProperty property, bool constant, float min, float max, Action callback)
|
||||
{
|
||||
FieldContainer.Clear();
|
||||
|
||||
if (constant)
|
||||
{
|
||||
VisualElement combinedFields = new VisualElement();
|
||||
combinedFields.style.flexGrow = 1;
|
||||
combinedFields.style.flexDirection = FlexDirection.Row;
|
||||
|
||||
Slider prop = new Slider(min, max);
|
||||
prop.BindProperty(property.FindPropertyRelative("floatVal"));
|
||||
prop.style.flexGrow = 1;
|
||||
prop.RegisterCallback<ChangeEvent<float>>((ChangeEvent<float> evt) => { callback.Invoke(); });
|
||||
combinedFields.Add(prop);
|
||||
|
||||
FloatField input = new FloatField();
|
||||
input.BindProperty(property.FindPropertyRelative("floatVal"));
|
||||
input.style.width = new Length(50, LengthUnit.Pixel);
|
||||
input.RegisterCallback<ChangeEvent<float>>((ChangeEvent<float> evt) => { callback.Invoke(); });
|
||||
combinedFields.Add(input);
|
||||
|
||||
FieldContainer.Add(combinedFields);
|
||||
}
|
||||
else
|
||||
{
|
||||
CurveField prop = new CurveField();
|
||||
prop.BindProperty(property.FindPropertyRelative("curveVal"));
|
||||
prop.AddToClassList("m-0");
|
||||
prop.AddToClassList("h-full");
|
||||
FieldContainer.Add(prop);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void RefreshProperty(SerializedProperty property, bool colorField, bool constant)
|
||||
{
|
||||
FieldContainer.Clear();
|
||||
|
||||
if (colorField)
|
||||
{
|
||||
if (constant)
|
||||
{
|
||||
ColorField prop = new ColorField();
|
||||
prop.hdr = true;
|
||||
prop.BindProperty(property.FindPropertyRelative("colorVal"));
|
||||
prop.AddToClassList("m-0");
|
||||
prop.AddToClassList("h-full");
|
||||
FieldContainer.Add(prop);
|
||||
}
|
||||
else
|
||||
{
|
||||
GradientField prop = new GradientField();
|
||||
prop.hdr = true;
|
||||
prop.BindProperty(property.FindPropertyRelative("gradientVal"));
|
||||
prop.AddToClassList("m-0");
|
||||
prop.AddToClassList("h-full");
|
||||
FieldContainer.Add(prop);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (constant)
|
||||
{
|
||||
FloatField prop = new FloatField();
|
||||
prop.BindProperty(property.FindPropertyRelative("floatVal"));
|
||||
prop.AddToClassList("m-0");
|
||||
prop.AddToClassList("h-full");
|
||||
FieldContainer.Add(prop);
|
||||
}
|
||||
else
|
||||
{
|
||||
CurveField prop = new CurveField();
|
||||
prop.BindProperty(property.FindPropertyRelative("curveVal"));
|
||||
prop.AddToClassList("m-0");
|
||||
prop.AddToClassList("h-full");
|
||||
FieldContainer.Add(prop);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc426df993f1c4649bcf77cdf7e03db5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/C#/VariablePropertyField.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,55 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace DistantLands.Cozy.EditorScripts
|
||||
{
|
||||
public class VersionSignifier : VisualElement
|
||||
{
|
||||
public new class UxmlFactory : UxmlFactory<VersionSignifier> { }
|
||||
public VersionSignifier()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
private Label Label => this.Q<Label>("version-number");
|
||||
|
||||
public void Init(
|
||||
)
|
||||
{
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/version-signifier.uxml"
|
||||
);
|
||||
|
||||
asset.CloneTree(this);
|
||||
|
||||
if (AssetInformation.INSTALLED_VERSION == null || AssetInformation.UAS_VERSION == null)
|
||||
return;
|
||||
|
||||
if (AssetInformation.INSTALLED_VERSION > AssetInformation.UAS_VERSION)
|
||||
{
|
||||
styleSheets.Add(AssetDatabase.LoadAssetAtPath<StyleSheet>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Stylesheets/console-dev.uss"
|
||||
));
|
||||
tooltip = "Development Version";
|
||||
}
|
||||
else if (AssetInformation.INSTALLED_VERSION == AssetInformation.UAS_VERSION)
|
||||
{
|
||||
styleSheets.Add(AssetDatabase.LoadAssetAtPath<StyleSheet>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Stylesheets/console-info.uss"
|
||||
));
|
||||
tooltip = "Up to Date";
|
||||
}
|
||||
else
|
||||
{
|
||||
styleSheets.Add(AssetDatabase.LoadAssetAtPath<StyleSheet>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Stylesheets/console-error.uss"
|
||||
));
|
||||
tooltip = $"Current Version is v{AssetInformation.UAS_VERSION}";
|
||||
}
|
||||
|
||||
Label.text = $"v{AssetInformation.INSTALLED_VERSION}";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 520f0dd463cf64244a2df6533efd15d9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/C#/VersionSignifier.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,54 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEditor.UIElements;
|
||||
using System;
|
||||
using DistantLands.Cozy.Data;
|
||||
|
||||
namespace DistantLands.Cozy.EditorScripts
|
||||
{
|
||||
|
||||
public class WRCField : VisualElement
|
||||
{
|
||||
private Slider BaseValue => this.Q<Slider>();
|
||||
private Label Label => this.Q<Label>();
|
||||
private VisualElement CurvesContainer => this.Q<VisualElement>("curves-container");
|
||||
private VisualElement ToggleCurves => this.Q<VisualElement>("toggle-curves");
|
||||
bool open = false;
|
||||
|
||||
public WRCField(SerializedProperty property)
|
||||
{
|
||||
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/weighted-random-chance.uxml"
|
||||
);
|
||||
asset.CloneTree(this);
|
||||
|
||||
BaseValue.BindProperty(property.FindPropertyRelative("baseChance"));
|
||||
Label.text = property.displayName;
|
||||
ToggleCurves.Add(new Image() { image = (open ? EditorGUIUtility.IconContent("d_winbtn_win_close_h@2x").image : EditorGUIUtility.IconContent("MoreOptions@2x").image) });
|
||||
CurvesContainer.style.display = open ? DisplayStyle.Flex : DisplayStyle.None;
|
||||
ToggleCurves.RegisterCallback<ClickEvent>((ClickEvent evt) =>
|
||||
{
|
||||
open = !open;
|
||||
CurvesContainer.style.display = open ? DisplayStyle.Flex : DisplayStyle.None;
|
||||
ToggleCurves.Q<Image>().image = (open ? EditorGUIUtility.IconContent("d_winbtn_win_close_h@2x").image : EditorGUIUtility.IconContent("MoreOptions@2x").image);
|
||||
|
||||
});
|
||||
|
||||
ListView effectorsList = new ListView
|
||||
{
|
||||
showAddRemoveFooter = true,
|
||||
showBorder = true,
|
||||
showBoundCollectionSize = false,
|
||||
reorderable = true,
|
||||
reorderMode = ListViewReorderMode.Animated,
|
||||
virtualizationMethod = CollectionVirtualizationMethod.DynamicHeight
|
||||
};
|
||||
effectorsList.BindProperty(property.FindPropertyRelative("chanceEffectors"));
|
||||
CurvesContainer.Add(effectorsList);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71763c0662d68bd4996d49131bbfa431
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/C#/WRCField.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ccc92002ac94fcb42bef51b51c475a24
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!86 &8600000
|
||||
CustomRenderTexture:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Moon Phase Display
|
||||
m_ImageContentsHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
m_IsAlphaChannelOptional: 0
|
||||
serializedVersion: 6
|
||||
m_Width: 256
|
||||
m_Height: 256
|
||||
m_AntiAliasing: 1
|
||||
m_MipCount: -1
|
||||
m_DepthStencilFormat: 94
|
||||
m_ColorFormat: 8
|
||||
m_MipMap: 0
|
||||
m_GenerateMips: 1
|
||||
m_SRGB: 0
|
||||
m_UseDynamicScale: 0
|
||||
m_UseDynamicScaleExplicit: 0
|
||||
m_BindMS: 0
|
||||
m_EnableCompatibleFormat: 1
|
||||
m_EnableRandomWrite: 0
|
||||
m_TextureSettings:
|
||||
serializedVersion: 2
|
||||
m_FilterMode: 1
|
||||
m_Aniso: 0
|
||||
m_MipBias: 0
|
||||
m_WrapU: 1
|
||||
m_WrapV: 1
|
||||
m_WrapW: 1
|
||||
m_Dimension: 2
|
||||
m_VolumeDepth: 1
|
||||
m_ShadowSamplingMode: 2
|
||||
m_Material: {fileID: 2100000, guid: 1189f0d99ce94ba4f9f60de508532acd, type: 2}
|
||||
m_InitSource: 0
|
||||
m_InitMaterial: {fileID: 0}
|
||||
m_InitColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_InitTexture: {fileID: 0}
|
||||
m_UpdateMode: 1
|
||||
m_InitializationMode: 1
|
||||
m_UpdateZoneSpace: 0
|
||||
m_CurrentUpdateZoneSpace: 0
|
||||
m_UpdateZones: []
|
||||
m_UpdatePeriod: 0
|
||||
m_ShaderPass: 0
|
||||
m_CubemapFaceMask: 4294967295
|
||||
m_DoubleBuffered: 0
|
||||
m_WrapUpdateZones: 0
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6604eebdb1389c42b1936bfd4014178
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 8600000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/Shader/Moon
|
||||
Phase Display.asset
|
||||
uploadId: 939148
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Moon Phase Material
|
||||
m_Shader: {fileID: 4800000, guid: f800f40a64618ea4a8678e6d47908b24, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _Phase: 0.03
|
||||
- _QueueOffset: 0
|
||||
- _Radius: 1
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &8740167271433057022
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 7
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1189f0d99ce94ba4f9f60de508532acd
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/Shader/Moon
|
||||
Phase Material.mat
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,346 @@
|
||||
// Made with Amplify Shader Editor v1.9.5.1
|
||||
// Available at the Unity Asset Store - http://u3d.as/y3X
|
||||
Shader "Distant Lands/Cozy/UI/Moon Phase UI"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Radius("Radius", Float) = 1
|
||||
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
LOD 0
|
||||
|
||||
|
||||
CGINCLUDE
|
||||
#pragma target 3.0
|
||||
ENDCG
|
||||
Blend Off
|
||||
AlphaToMask Off
|
||||
Cull Back
|
||||
ColorMask RGBA
|
||||
ZWrite On
|
||||
ZTest LEqual
|
||||
Offset 0 , 0
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Custom RT Update"
|
||||
CGPROGRAM
|
||||
|
||||
#include "UnityCustomRenderTexture.cginc"
|
||||
#pragma vertex ASECustomRenderTextureVertexShader
|
||||
#pragma fragment frag
|
||||
#pragma target 3.0
|
||||
|
||||
|
||||
struct ase_appdata_customrendertexture
|
||||
{
|
||||
uint vertexID : SV_VertexID;
|
||||
|
||||
};
|
||||
|
||||
struct ase_v2f_customrendertexture
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
float3 localTexcoord : TEXCOORD0; // Texcoord local to the update zone (== globalTexcoord if no partial update zone is specified)
|
||||
float3 globalTexcoord : TEXCOORD1; // Texcoord relative to the complete custom texture
|
||||
uint primitiveID : TEXCOORD2; // Index of the update zone (correspond to the index in the updateZones of the Custom Texture)
|
||||
float3 direction : TEXCOORD3; // For cube textures, direction of the pixel being rendered in the cubemap
|
||||
|
||||
};
|
||||
|
||||
uniform float _Radius;
|
||||
uniform float CZY_UI_MOONPHASE;
|
||||
struct Gradient
|
||||
{
|
||||
int type;
|
||||
int colorsLength;
|
||||
int alphasLength;
|
||||
float4 colors[8];
|
||||
float2 alphas[8];
|
||||
};
|
||||
|
||||
Gradient NewGradient(int type, int colorsLength, int alphasLength,
|
||||
float4 colors0, float4 colors1, float4 colors2, float4 colors3, float4 colors4, float4 colors5, float4 colors6, float4 colors7,
|
||||
float2 alphas0, float2 alphas1, float2 alphas2, float2 alphas3, float2 alphas4, float2 alphas5, float2 alphas6, float2 alphas7)
|
||||
{
|
||||
Gradient g;
|
||||
g.type = type;
|
||||
g.colorsLength = colorsLength;
|
||||
g.alphasLength = alphasLength;
|
||||
g.colors[ 0 ] = colors0;
|
||||
g.colors[ 1 ] = colors1;
|
||||
g.colors[ 2 ] = colors2;
|
||||
g.colors[ 3 ] = colors3;
|
||||
g.colors[ 4 ] = colors4;
|
||||
g.colors[ 5 ] = colors5;
|
||||
g.colors[ 6 ] = colors6;
|
||||
g.colors[ 7 ] = colors7;
|
||||
g.alphas[ 0 ] = alphas0;
|
||||
g.alphas[ 1 ] = alphas1;
|
||||
g.alphas[ 2 ] = alphas2;
|
||||
g.alphas[ 3 ] = alphas3;
|
||||
g.alphas[ 4 ] = alphas4;
|
||||
g.alphas[ 5 ] = alphas5;
|
||||
g.alphas[ 6 ] = alphas6;
|
||||
g.alphas[ 7 ] = alphas7;
|
||||
return g;
|
||||
}
|
||||
|
||||
float4 SampleGradient( Gradient gradient, float time )
|
||||
{
|
||||
float3 color = gradient.colors[0].rgb;
|
||||
UNITY_UNROLL
|
||||
for (int c = 1; c < 8; c++)
|
||||
{
|
||||
float colorPos = saturate((time - gradient.colors[c-1].w) / ( 0.00001 + (gradient.colors[c].w - gradient.colors[c-1].w)) * step(c, (float)gradient.colorsLength-1));
|
||||
color = lerp(color, gradient.colors[c].rgb, lerp(colorPos, step(0.01, colorPos), gradient.type));
|
||||
}
|
||||
#ifndef UNITY_COLORSPACE_GAMMA
|
||||
color = half3(GammaToLinearSpaceExact(color.r), GammaToLinearSpaceExact(color.g), GammaToLinearSpaceExact(color.b));
|
||||
#endif
|
||||
float alpha = gradient.alphas[0].x;
|
||||
UNITY_UNROLL
|
||||
for (int a = 1; a < 8; a++)
|
||||
{
|
||||
float alphaPos = saturate((time - gradient.alphas[a-1].y) / ( 0.00001 + (gradient.alphas[a].y - gradient.alphas[a-1].y)) * step(a, (float)gradient.alphasLength-1));
|
||||
alpha = lerp(alpha, gradient.alphas[a].x, lerp(alphaPos, step(0.01, alphaPos), gradient.type));
|
||||
}
|
||||
return float4(color, alpha);
|
||||
}
|
||||
|
||||
|
||||
|
||||
ase_v2f_customrendertexture ASECustomRenderTextureVertexShader(ase_appdata_customrendertexture IN )
|
||||
{
|
||||
ase_v2f_customrendertexture OUT;
|
||||
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
const float2 vertexPositions[6] =
|
||||
{
|
||||
{ -1.0f, 1.0f },
|
||||
{ -1.0f, -1.0f },
|
||||
{ 1.0f, -1.0f },
|
||||
{ 1.0f, 1.0f },
|
||||
{ -1.0f, 1.0f },
|
||||
{ 1.0f, -1.0f }
|
||||
};
|
||||
|
||||
const float2 texCoords[6] =
|
||||
{
|
||||
{ 0.0f, 0.0f },
|
||||
{ 0.0f, 1.0f },
|
||||
{ 1.0f, 1.0f },
|
||||
{ 1.0f, 0.0f },
|
||||
{ 0.0f, 0.0f },
|
||||
{ 1.0f, 1.0f }
|
||||
};
|
||||
#else
|
||||
const float2 vertexPositions[6] =
|
||||
{
|
||||
{ 1.0f, 1.0f },
|
||||
{ -1.0f, -1.0f },
|
||||
{ -1.0f, 1.0f },
|
||||
{ -1.0f, -1.0f },
|
||||
{ 1.0f, 1.0f },
|
||||
{ 1.0f, -1.0f }
|
||||
};
|
||||
|
||||
const float2 texCoords[6] =
|
||||
{
|
||||
{ 1.0f, 1.0f },
|
||||
{ 0.0f, 0.0f },
|
||||
{ 0.0f, 1.0f },
|
||||
{ 0.0f, 0.0f },
|
||||
{ 1.0f, 1.0f },
|
||||
{ 1.0f, 0.0f }
|
||||
};
|
||||
#endif
|
||||
|
||||
uint primitiveID = IN.vertexID / 6;
|
||||
uint vertexID = IN.vertexID % 6;
|
||||
float3 updateZoneCenter = CustomRenderTextureCenters[primitiveID].xyz;
|
||||
float3 updateZoneSize = CustomRenderTextureSizesAndRotations[primitiveID].xyz;
|
||||
float rotation = CustomRenderTextureSizesAndRotations[primitiveID].w * UNITY_PI / 180.0f;
|
||||
|
||||
#if !UNITY_UV_STARTS_AT_TOP
|
||||
rotation = -rotation;
|
||||
#endif
|
||||
|
||||
// Normalize rect if needed
|
||||
if (CustomRenderTextureUpdateSpace > 0.0) // Pixel space
|
||||
{
|
||||
// Normalize xy because we need it in clip space.
|
||||
updateZoneCenter.xy /= _CustomRenderTextureInfo.xy;
|
||||
updateZoneSize.xy /= _CustomRenderTextureInfo.xy;
|
||||
}
|
||||
else // normalized space
|
||||
{
|
||||
// Un-normalize depth because we need actual slice index for culling
|
||||
updateZoneCenter.z *= _CustomRenderTextureInfo.z;
|
||||
updateZoneSize.z *= _CustomRenderTextureInfo.z;
|
||||
}
|
||||
|
||||
// Compute rotation
|
||||
|
||||
// Compute quad vertex position
|
||||
float2 clipSpaceCenter = updateZoneCenter.xy * 2.0 - 1.0;
|
||||
float2 pos = vertexPositions[vertexID] * updateZoneSize.xy;
|
||||
pos = CustomRenderTextureRotate2D(pos, rotation);
|
||||
pos.x += clipSpaceCenter.x;
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
pos.y += clipSpaceCenter.y;
|
||||
#else
|
||||
pos.y -= clipSpaceCenter.y;
|
||||
#endif
|
||||
|
||||
// For 3D texture, cull quads outside of the update zone
|
||||
// This is neeeded in additional to the preliminary minSlice/maxSlice done on the CPU because update zones can be disjointed.
|
||||
// ie: slices [1..5] and [10..15] for two differents zones so we need to cull out slices 0 and [6..9]
|
||||
if (CustomRenderTextureIs3D > 0.0)
|
||||
{
|
||||
int minSlice = (int)(updateZoneCenter.z - updateZoneSize.z * 0.5);
|
||||
int maxSlice = minSlice + (int)updateZoneSize.z;
|
||||
if (_CustomRenderTexture3DSlice < minSlice || _CustomRenderTexture3DSlice >= maxSlice)
|
||||
{
|
||||
pos.xy = float2(1000.0, 1000.0); // Vertex outside of ncs
|
||||
}
|
||||
}
|
||||
|
||||
OUT.vertex = float4(pos, 0.0, 1.0);
|
||||
OUT.primitiveID = asuint(CustomRenderTexturePrimitiveIDs[primitiveID]);
|
||||
OUT.localTexcoord = float3(texCoords[vertexID], CustomRenderTexture3DTexcoordW);
|
||||
OUT.globalTexcoord = float3(pos.xy * 0.5 + 0.5, CustomRenderTexture3DTexcoordW);
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
OUT.globalTexcoord.y = 1.0 - OUT.globalTexcoord.y;
|
||||
#endif
|
||||
OUT.direction = CustomRenderTextureComputeCubeDirection(OUT.globalTexcoord.xy);
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
float4 frag(ase_v2f_customrendertexture IN ) : COLOR
|
||||
{
|
||||
float4 finalColor;
|
||||
float2 texCoord2 = IN.localTexcoord.xy * float2( 2,2 ) + float2( -1,-1 );
|
||||
float2 break79 = texCoord2;
|
||||
float x256 = pow( abs( break79.x ) , 2.0 );
|
||||
float y257 = pow( abs( break79.y ) , 2.0 );
|
||||
float r258 = pow( ( _Radius - 0.1 ) , 2.0 );
|
||||
float temp_output_6_0 = ( ( x256 + y257 ) <= r258 ? 1.0 : 0.0 );
|
||||
float phase64 = CZY_UI_MOONPHASE;
|
||||
float temp_output_55_0 = sqrt( ( r258 - y257 ) );
|
||||
float x74 = break79.x;
|
||||
float temp_output_77_0 = ( ( ( ( phase64 + 0.5 ) * 2.0 * temp_output_55_0 ) >= x74 ? 1.0 : 0.0 ) * ( ( ( phase64 + -0.5 ) * 2.0 * temp_output_55_0 ) <= x74 ? 1.0 : 0.0 ) );
|
||||
Gradient gradient50 = NewGradient( 0, 2, 2, float4( 0.5135001, 0.4412602, 0.6981132, 0 ), float4( 0.2334906, 0.8483371, 0.9339623, 1 ), 0, 0, 0, 0, 0, 0, float2( 1, 0 ), float2( 1, 1 ), 0, 0, 0, 0, 0, 0 );
|
||||
float2 texCoord52 = IN.localTexcoord.xy * float2( 0.5,0.5 ) + float2( 0,0 );
|
||||
|
||||
finalColor = ( ( float4( 1,1,1,0.1215686 ) * ( temp_output_6_0 * ( 1.0 - temp_output_77_0 ) ) * SampleGradient( gradient50, ( texCoord52.x + texCoord52.y ) ) ) + ( ( temp_output_6_0 * temp_output_77_0 ) * SampleGradient( gradient50, ( texCoord52.x + texCoord52.y ) ) ) );
|
||||
return finalColor;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
CustomEditor "ASEMaterialInspector"
|
||||
Fallback Off
|
||||
}
|
||||
/*ASEBEGIN
|
||||
Version=19501
|
||||
Node;AmplifyShaderEditor.TextureCoordinatesNode;2;1296,-1248;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;2,2;False;1;FLOAT2;-1,-1;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.RangedFloatNode;10;1520,-1040;Inherit;False;Property;_Radius;Radius;0;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.BreakToComponentsNode;79;1520,-1248;Inherit;False;FLOAT2;1;0;FLOAT2;0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15
|
||||
Node;AmplifyShaderEditor.AbsOpNode;12;1728,-1152;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleSubtractOpNode;86;1680,-1040;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0.1;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.PowerNode;5;1840,-1152;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;2;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.PowerNode;13;1840,-1040;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;2;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.RegisterLocalVarNode;57;1984,-1152;Inherit;False;y2;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.RegisterLocalVarNode;58;1984,-1040;Inherit;False;r2;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.RangedFloatNode;14;1712,-928;Inherit;False;Global;CZY_UI_MOONPHASE;CZY_UI_MOONPHASE;1;0;Create;True;0;0;0;False;0;False;-0.43;-0.5;-1;1;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;71;-64,-128;Inherit;False;58;r2;1;0;OBJECT;;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;72;-64,-48;Inherit;False;57;y2;1;0;OBJECT;;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.RegisterLocalVarNode;64;1984,-928;Inherit;False;phase;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;66;80,-368;Inherit;False;64;phase;1;0;OBJECT;;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleSubtractOpNode;73;128,-128;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;67;80,-240;Inherit;False;64;phase;1;0;OBJECT;;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.AbsOpNode;11;1728,-1264;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleAddOpNode;65;272,-368;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0.5;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SqrtOpNode;55;272,-128;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleAddOpNode;68;272,-240;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;-0.5;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.PowerNode;4;1840,-1264;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;2;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.RegisterLocalVarNode;74;1728,-1344;Inherit;False;x;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;69;400,-368;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;2;False;2;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;75;400,-112;Inherit;False;74;x;1;0;OBJECT;;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;70;400,-240;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;2;False;2;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.RegisterLocalVarNode;56;1984,-1264;Inherit;False;x2;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.Compare;63;624,-160;Inherit;False;5;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.Compare;76;624,-320;Inherit;False;3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;59;480,-576;Inherit;False;56;x2;1;0;OBJECT;;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;60;480,-496;Inherit;False;57;y2;1;0;OBJECT;;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;77;816,-240;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.TextureCoordinatesNode;52;1088,-208;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;0.5,0.5;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.GetLocalVarNode;61;624,-416;Inherit;False;58;r2;1;0;OBJECT;;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleAddOpNode;9;688,-576;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.GradientNode;50;1216,-288;Inherit;False;0;2;2;0.5135001,0.4412602,0.6981132,0;0.2334906,0.8483371,0.9339623,1;1,0;1,1;0;1;OBJECT;0
|
||||
Node;AmplifyShaderEditor.SimpleAddOpNode;53;1312,-208;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.Compare;6;848,-576;Inherit;False;5;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.OneMinusNode;90;1024,-352;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;62;1216,-400;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;91;1216,-512;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.GradientSampleNode;51;1440,-288;Inherit;True;2;0;OBJECT;;False;1;FLOAT;0;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;92;1792,-448;Inherit;False;3;3;0;COLOR;1,1,1,0.1215686;False;1;FLOAT;0;False;2;COLOR;0,0,0,0;False;1;COLOR;0
|
||||
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;54;1792,-320;Inherit;False;2;2;0;FLOAT;0;False;1;COLOR;4,0,0,0;False;1;COLOR;0
|
||||
Node;AmplifyShaderEditor.SimpleAddOpNode;93;2016,-400;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;1;2208,-400;Float;False;True;-1;2;ASEMaterialInspector;0;2;Distant Lands/Cozy/UI/Moon Phase UI;32120270d1b3a8746af2aca8bc749736;True;Custom RT Update;0;0;Custom RT Update;1;False;True;0;1;False;;0;False;;0;1;False;;0;False;;True;0;False;;0;False;;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;True;2;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;0;;0;0;Standard;0;0;1;True;False;;False;0
|
||||
WireConnection;79;0;2;0
|
||||
WireConnection;12;0;79;1
|
||||
WireConnection;86;0;10;0
|
||||
WireConnection;5;0;12;0
|
||||
WireConnection;13;0;86;0
|
||||
WireConnection;57;0;5;0
|
||||
WireConnection;58;0;13;0
|
||||
WireConnection;64;0;14;0
|
||||
WireConnection;73;0;71;0
|
||||
WireConnection;73;1;72;0
|
||||
WireConnection;11;0;79;0
|
||||
WireConnection;65;0;66;0
|
||||
WireConnection;55;0;73;0
|
||||
WireConnection;68;0;67;0
|
||||
WireConnection;4;0;11;0
|
||||
WireConnection;74;0;79;0
|
||||
WireConnection;69;0;65;0
|
||||
WireConnection;69;2;55;0
|
||||
WireConnection;70;0;68;0
|
||||
WireConnection;70;2;55;0
|
||||
WireConnection;56;0;4;0
|
||||
WireConnection;63;0;70;0
|
||||
WireConnection;63;1;75;0
|
||||
WireConnection;76;0;69;0
|
||||
WireConnection;76;1;75;0
|
||||
WireConnection;77;0;76;0
|
||||
WireConnection;77;1;63;0
|
||||
WireConnection;9;0;59;0
|
||||
WireConnection;9;1;60;0
|
||||
WireConnection;53;0;52;1
|
||||
WireConnection;53;1;52;2
|
||||
WireConnection;6;0;9;0
|
||||
WireConnection;6;1;61;0
|
||||
WireConnection;90;0;77;0
|
||||
WireConnection;62;0;6;0
|
||||
WireConnection;62;1;77;0
|
||||
WireConnection;91;0;6;0
|
||||
WireConnection;91;1;90;0
|
||||
WireConnection;51;0;50;0
|
||||
WireConnection;51;1;53;0
|
||||
WireConnection;92;1;91;0
|
||||
WireConnection;92;2;51;0
|
||||
WireConnection;54;0;62;0
|
||||
WireConnection;54;1;51;0
|
||||
WireConnection;93;0;92;0
|
||||
WireConnection;93;1;54;0
|
||||
WireConnection;1;0;93;0
|
||||
ASEEND*/
|
||||
//CHKSM=24C65637230871C4B0656E0DAEC6CF9D9AA5A46B
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f800f40a64618ea4a8678e6d47908b24
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/Shader/Moon
|
||||
Phasse.shader
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2423c36cbc9aed64597f7070f41170b6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:VisualElement name="banner-container" class="banner" style="justify-content: center; align-items: center;">
|
||||
<ui:VisualElement name="background-container">
|
||||
<ui:VisualElement name="background-image" style="flex-grow: 1; background-image: resource('Banners/Ambience'); -unity-background-scale-mode: scale-and-crop;" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="banner-content" style="flex-grow: 1; margin-left: 15px;">
|
||||
<ui:VisualElement name="logo" style="width: 48px; height: 48px; flex-shrink: 0; background-image: resource('Promo/Distant Lands Watermark');" />
|
||||
<ui:VisualElement name="banner-text-container">
|
||||
<ui:Label tabindex="-1" text="COZY" parse-escape-sequences="true" display-tooltip-when-elided="true" name="title" />
|
||||
<ui:Label tabindex="-1" text="Setup Wizard" parse-escape-sequences="true" display-tooltip-when-elided="true" name="desc" />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 874c8018201cb1a4f85a5f0961f429a3
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/banner-simple.uxml
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,19 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:VisualElement name="banner-container" class="banner" style="justify-content: center; align-items: center;">
|
||||
<ui:VisualElement name="background-container">
|
||||
<ui:VisualElement name="background-image" style="flex-grow: 1; background-image: resource('Icons/Styles/cozy-luxury'); -unity-background-scale-mode: scale-and-crop;" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="banner-content" style="flex-grow: 1; margin-left: 15px;">
|
||||
<ui:VisualElement name="logo" style="width: 48px; height: 48px; flex-shrink: 0;" />
|
||||
<ui:VisualElement name="banner-text-container">
|
||||
<ui:Label tabindex="-1" text="Transit" parse-escape-sequences="true" display-tooltip-when-elided="true" name="title" />
|
||||
<ui:Label tabindex="-1" text="Sun Movement Module" parse-escape-sequences="true" display-tooltip-when-elided="true" name="desc" />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="status-report" class="status-button" style="flex-grow: 1; position: absolute; right: 5px; bottom: 5px; flex-direction: row;">
|
||||
<StatusMessage />
|
||||
<DistantLands.Cozy.EditorScripts.VersionSignifier />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d1ed574b2a121c24496c06cb642391aa
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/banner.uxml
|
||||
uploadId: 939148
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:VisualElement style="flex-direction: row;">
|
||||
<ui:EnumField type="DistantLands.Cozy.ChanceEffector+LimitType, DistantLands.Cozy.Runtime" style="min-width: 120px; max-width: 120px;" />
|
||||
<uie:PropertyField name="property" style="flex-grow: 1;" />
|
||||
<ui:VisualElement name="curve" style="flex-grow: 1; flex-direction: row;">
|
||||
<uie:CurveField style="flex-grow: 1;" />
|
||||
<ui:DropdownField class="hidden-text" style="justify-content: flex-end; width: 20px;" />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1476067ced1e1cb42996ebd6f3824ecf
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/chance-effector-field.uxml
|
||||
uploadId: 939148
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<engine:UXML
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:engine="UnityEngine.UIElements"
|
||||
xmlns:editor="UnityEditor.UIElements"
|
||||
xsi:noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd"
|
||||
>
|
||||
|
||||
</engine:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6993c9b380f6cf4cb903a5753472f65
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/interactions-property-material.uxml
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,13 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:Button text=" " parse-escape-sequences="true" display-tooltip-when-elided="true" name="widget-button" class="module-widget module-widget-lg">
|
||||
<ui:VisualElement name="upper-container" style="flex-grow: 1; flex-direction: row; height: 50%; align-items: center;">
|
||||
<ui:VisualElement name="icon" style="margin-top: 3px; margin-right: 3px; margin-bottom: 3px; margin-left: 3px; width: 40px; height: 40px;" />
|
||||
<ui:VisualElement style="flex-grow: 1; justify-content: center; flex-shrink: 0;">
|
||||
<ui:Label tabindex="-1" text="Label" parse-escape-sequences="true" display-tooltip-when-elided="true" name="title" />
|
||||
<ui:Label tabindex="-1" text="Label" parse-escape-sequences="true" display-tooltip-when-elided="true" name="dynamic-status" />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="lower-container" style="flex-grow: 1; height: 50%; align-items: flex-start; white-space: normal; -unity-text-align: middle-left; width: 100%;" />
|
||||
</ui:Button>
|
||||
</ui:UXML>
|
||||
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a306053b2b0cce4199877b964526106
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/large-widget.uxml
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,9 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<ui:VisualElement class="unity-base-field">
|
||||
<ui:Label tabindex="-1" text="Label" parse-escape-sequences="true" display-tooltip-when-elided="true" name="label" class="unity-base-field__label" />
|
||||
<ui:Slider high-value="1" show-input-field="false" style="flex-grow: 1;" />
|
||||
<ui:IntegerField value="42" name="hours" />
|
||||
<ui:Label tabindex="-1" text=":" parse-escape-sequences="true" display-tooltip-when-elided="true" style="-unity-text-align: middle-center;" />
|
||||
<ui:IntegerField value="42" name="minutes" />
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bbbcc178af69c7348b36ae4126b043de
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/meridiem-time.uxml
|
||||
uploadId: 939148
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:Button parse-escape-sequences="true" display-tooltip-when-elided="true" class="module-widget">
|
||||
<ui:Image name="icon" style="width: 40px; background-image: none; height: 41px;" />
|
||||
<ui:VisualElement name="info">
|
||||
<ui:Label name="module-name" tabindex="-1" text="Weather" parse-escape-sequences="true" display-tooltip-when-elided="true" />
|
||||
<ui:Label name="dynamic-status" tabindex="-1" text="Partly Cloudy" parse-escape-sequences="true" display-tooltip-when-elided="true" style="width: auto; height: 50%; -unity-font-style: bold; font-size: 10px; -unity-text-align: middle-left; color: rgba(238, 238, 238, 0.46); margin-left: 2px;" />
|
||||
</ui:VisualElement>
|
||||
</ui:Button>
|
||||
</ui:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 728046012dcb61d4cbb266fbb93dc663
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/module-tab-selector.uxml
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<engine:UXML
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:engine="UnityEngine.UIElements"
|
||||
xmlns:editor="UnityEditor.UIElements"
|
||||
xsi:noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd"
|
||||
>
|
||||
|
||||
</engine:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d144f78555b886f4eb28322f751bd1cf
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/module-toolbar.uxml
|
||||
uploadId: 939148
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:VisualElement style="flex-grow: 1;">
|
||||
<ui:Label tabindex="-1" text="Atmosphere" parse-escape-sequences="true" display-tooltip-when-elided="true" name="widget-group-header" class="h1 widget-group-header" />
|
||||
<ui:ScrollView mode="Horizontal" vertical-scroller-visibility="Hidden" horizontal-scroller-visibility="Auto" nested-interaction-kind="StopScrolling" style="height: auto; align-items: stretch; background-color: rgba(0, 0, 0, 0.43); flex-grow: 1; flex-direction: column; max-height: 135px;">
|
||||
<ui:VisualElement name="tab-group" style="justify-content: flex-start; flex-direction: column; flex-wrap: wrap; align-items: flex-start; flex-grow: 1; max-height: none;" />
|
||||
</ui:ScrollView>
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7908a1604a38a1d408b14072352a8d04
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/module-widget-carousel.uxml
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,15 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:VisualElement name="moon-phase-graph" style="flex-grow: 0; flex-direction: row; height: 150px;">
|
||||
<ui:VisualElement style="flex-grow: 0; width: 50%;">
|
||||
<ui:VisualElement name="moon-graph" style="flex-grow: 1; background-image: url("project://database/Packages/com.distantlands.cozy.core/Editor/UI/Components/Shader/Moon%20Phase%20Display.asset?fileID=8600000&guid=e6604eebdb1389c42b1936bfd4014178&type=2#Moon Phase Display"); -unity-background-scale-mode: scale-to-fit; margin-top: 15px; margin-right: 15px; margin-bottom: 15px; margin-left: 15px;" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement style="flex-grow: 1; width: 50%;">
|
||||
<ui:Label tabindex="-1" text="Crescent" parse-escape-sequences="true" display-tooltip-when-elided="true" name="phase-name" class="h2" />
|
||||
<ui:Label tabindex="-1" text="Crescent" parse-escape-sequences="true" display-tooltip-when-elided="true" name="moon-name" class="mb-md" style="-unity-text-align: upper-left;" />
|
||||
<ui:Label tabindex="-1" text="Crescent" parse-escape-sequences="true" display-tooltip-when-elided="true" name="phase-time" />
|
||||
<ui:Label tabindex="-1" text="Crescent" parse-escape-sequences="true" display-tooltip-when-elided="true" name="illumination" class="mb-md" />
|
||||
<ui:Label tabindex="-1" text="Crescent" parse-escape-sequences="true" display-tooltip-when-elided="true" name="declination" />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c9f3cc1dbb9168447bde2fc6f04b6fa2
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/moon-phase-graph.uxml
|
||||
uploadId: 939148
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:VisualElement style="flex-direction: row; align-items: center;">
|
||||
<ui:Label tabindex="-1" text="Label" parse-escape-sequences="true" display-tooltip-when-elided="true" name="setup-label" style="white-space: nowrap; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis;" />
|
||||
<ui:VisualElement style="flex-grow: 1;" />
|
||||
<ui:Button text="Resolve" parse-escape-sequences="true" display-tooltip-when-elided="true" name="fix-button" />
|
||||
<ui:VisualElement name="status-icon" style="flex-grow: 0; height: 15px; width: 15px; margin-top: 4px; margin-right: 4px; margin-bottom: 4px; margin-left: 4px; flex-shrink: 0;" />
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7bfb8c5ebf30d9541ac1bd9e6856bf7f
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/render-pipeline-package.uxml
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,9 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:VisualElement style="flex-direction: row; align-items: center;">
|
||||
<ui:Label tabindex="-1" text="Label" parse-escape-sequences="true" display-tooltip-when-elided="true" name="setup-label" style="flex-shrink: 1; white-space: nowrap; text-overflow: ellipsis;" />
|
||||
<ui:VisualElement style="flex-grow: 1;" />
|
||||
<ui:VisualElement name="status-icon" style="flex-grow: 0; height: 15px; width: 15px; margin-top: 4px; margin-right: 4px; margin-bottom: 4px; margin-left: 4px; flex-shrink: 0;" />
|
||||
<ui:Button text="Resolve" parse-escape-sequences="true" display-tooltip-when-elided="true" name="fix-button" style="width: 100px;" />
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76b619329d03ac54c8d554ef617c7231
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/setup-check.uxml
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,10 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:Button text=" " parse-escape-sequences="true" display-tooltip-when-elided="true" name="widget-button" class="module-widget" style="justify-content: center;">
|
||||
<ui:VisualElement name="icon" style="width: 40px; height: 40px; margin-top: 3px; margin-right: 3px; margin-bottom: 3px; margin-left: 3px; justify-content: center;" />
|
||||
<ui:VisualElement style="flex-grow: 1; justify-content: center; flex-shrink: 0; align-items: flex-start;">
|
||||
<ui:Label tabindex="-1" text="Label" parse-escape-sequences="true" display-tooltip-when-elided="true" name="title" />
|
||||
<ui:Label tabindex="-1" text="Label" parse-escape-sequences="true" display-tooltip-when-elided="true" name="dynamic-status" />
|
||||
</ui:VisualElement>
|
||||
</ui:Button>
|
||||
</ui:UXML>
|
||||
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48901b66986c42746b0dbb2d23be5859
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/small-widget.uxml
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,6 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:VisualElement name="VisualElement">
|
||||
<ui:Image name="status-icon" class="console-status status-message" />
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 504921b239ccbf74da3efd279dce50f3
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/status-message.uxml
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,8 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Stylesheets/tooltip.uss?fileID=7433441132597879392&guid=398002f3c6f6e224d8d3796ec99dbc03&type=3#tooltip" />
|
||||
<ui:VisualElement class="tooltip" style="flex-shrink: 0;">
|
||||
<ui:VisualElement class="icon" />
|
||||
<ui:Label tabindex="-1" text="This is a helpful tooltip for the user that explains a particular part of the COZY Ecosystem in an easy to digest manner." parse-escape-sequences="true" display-tooltip-when-elided="true" style="flex-shrink: 1;" />
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b774ab39ef3287541873a36ad1e6d7f1
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/tooltip.uxml
|
||||
uploadId: 939148
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<ui:VisualElement name="VisualElement" style="flex-direction: row; align-items: center; justify-content: space-between; margin-top: 1px; margin-right: 3px; margin-bottom: 1px; margin-left: 3px;">
|
||||
<ui:VisualElement style="flex-grow: 0; flex-direction: row; align-items: center; flex-shrink: 1; white-space: nowrap; margin-top: 0; margin-right: 2px; margin-bottom: 0; margin-left: 0; padding-top: 2px; padding-right: 2px; padding-bottom: 0; padding-left: 1px;">
|
||||
<ui:Toggle style="margin-top: 3px; margin-right: 3px; margin-bottom: 3px; margin-left: 3px;" />
|
||||
<ui:Label tabindex="-1" text="Label" parse-escape-sequences="true" display-tooltip-when-elided="true" style="padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; flex-shrink: 1; text-overflow: clip; max-height: 20px; white-space: nowrap; overflow: hidden; width: auto; min-width: auto; flex-grow: 1;" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement class="unity-base-field__input" style="flex-direction: row; justify-content: flex-start; flex-grow: 1; max-width: 59%;">
|
||||
<ui:VisualElement name="field" style="flex-grow: 1; flex-shrink: 0; flex-direction: column; overflow: hidden; display: flex;" />
|
||||
<ui:Button parse-escape-sequences="true" display-tooltip-when-elided="true" name="mode-selector" style="padding-top: 0; padding-right: 0; padding-bottom: 0; padding-left: 0; margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; width: 20px; height: 20px; flex-grow: 0;">
|
||||
<ui:VisualElement style="flex-grow: 1; margin-top: 3px; margin-right: 3px; margin-bottom: 3px; margin-left: 3px; border-left-color: rgba(255, 255, 255, 0.44); border-right-color: rgba(255, 255, 255, 0.44); border-top-color: rgba(255, 255, 255, 0.44); border-bottom-color: rgba(255, 255, 255, 0.44); border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-top-left-radius: 100%; border-top-right-radius: 100%; border-bottom-right-radius: 100%; border-bottom-left-radius: 100%;" />
|
||||
</ui:Button>
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f0dfff56c3401c4a866705e24b18604
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/variable-property-field.uxml
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,6 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:VisualElement class="version-signifier console-status">
|
||||
<ui:Label tabindex="-1" text="v0.0.0" parse-escape-sequences="true" display-tooltip-when-elided="true" name="version-number" />
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0108e0ce583885749a3221b007785b54
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/version-signifier.uxml
|
||||
uploadId: 939148
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<ui:VisualElement style="flex-grow: 0;">
|
||||
<ui:VisualElement style="flex-grow: 0; flex-direction: row; margin-top: 1px; margin-right: 0; margin-bottom: 1px; margin-left: 3px; align-items: stretch;">
|
||||
<ui:Label tabindex="-1" text="Label" parse-escape-sequences="true" display-tooltip-when-elided="true" style="min-width: 120px; margin-top: 0; margin-right: 2px; margin-bottom: 0; margin-left: 0;" />
|
||||
<ui:Slider high-value="1" show-input-field="true" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; flex-grow: 1;" />
|
||||
<ui:VisualElement name="toggle-curves" class="unity-button" style="flex-grow: 0; width: 25px; margin-left: 3px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; justify-content: center; align-items: center; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; height: 20px;" />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="curves-container" style="flex-grow: 0; padding-bottom: 15px; margin-left: 120px; padding-top: 0; padding-right: 0; padding-left: 0;" />
|
||||
</ui:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4aa24d5cad0344f4689400d5ba31bc5f
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/weighted-random-chance.uxml
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc37584f073e366488c11b98ec6d1132
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c25172d6daa7d4438868657c79951f3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DistantLands.Cozy;
|
||||
using DistantLands.Cozy.EditorScripts;
|
||||
using UnityEditor;
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
public class CozyHub : EditorWindow
|
||||
{
|
||||
|
||||
[MenuItem("Tools/Cozy: Stylized Weather 3/Open Cozy Hub")]
|
||||
public static void ShowExample()
|
||||
{
|
||||
CozyHub wnd = GetWindow<CozyHub>();
|
||||
wnd.titleContent = new GUIContent("Cozy Hub");
|
||||
}
|
||||
|
||||
public void CreateGUI()
|
||||
{
|
||||
if (CozyWeather.instance)
|
||||
{
|
||||
ScrollView scrollView = new ScrollView();
|
||||
InspectorElement inspector = new InspectorElement(CozyWeather.instance);
|
||||
|
||||
scrollView.Add(inspector);
|
||||
rootVisualElement.Add(scrollView);
|
||||
}
|
||||
else
|
||||
{
|
||||
Tooltip tooltip = new Tooltip("No instance of COZY detected! Please set up your scene.");
|
||||
rootVisualElement.Add(tooltip);
|
||||
|
||||
Button setupButton = new Button(() => { CozySceneTools.SetupScene(); });
|
||||
setupButton.text = "Setup Scene";
|
||||
rootVisualElement.Add(setupButton);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f74eb154f5d6fe40be1b6ea884b198e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Cozy Hub/C#/CozyHub.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,595 @@
|
||||
:root {
|
||||
--good-1: rgba(0, 255, 100, 0.3);
|
||||
--good-0: rgba(0, 255, 100, 0.75);
|
||||
--warning-1: rgba(255, 128, 0, 0.3);
|
||||
--warning-0: rgba(255, 128, 0, 0.75);
|
||||
--error-1: rgba(255, 0, 0, 0.3);
|
||||
--error-0: rgba(255, 0, 0, 0.75);
|
||||
--dev-1: rgba(0, 128, 255, 0.3);
|
||||
--dev-0: rgba(0, 255, 255, 0.75);
|
||||
}
|
||||
|
||||
Label {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.h1 {
|
||||
font-size: 18px;
|
||||
margin-bottom: 8px;
|
||||
margin-top: 8px;
|
||||
-unity-font-style: bold;
|
||||
}
|
||||
|
||||
.h2 {
|
||||
font-size: 14px;
|
||||
margin-bottom: 5px;
|
||||
margin-top: 5px;
|
||||
-unity-font-style: bold;
|
||||
}
|
||||
|
||||
.p {
|
||||
margin-bottom: 4px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.h-full {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.w-full {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.h-lg {
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.h-md {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.h-sm {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.p-0 {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.pl-4 {
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
.m-0 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.m-4 {
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
.mb-lg {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mb-md {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.mt-lg {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.mt-md {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.flex-row {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.flex-col {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.flex-grow {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.font-bold {
|
||||
-unity-font-style: bold;
|
||||
}
|
||||
|
||||
.w-half {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.h-half {
|
||||
height: 50%;
|
||||
}
|
||||
|
||||
.version-signifier {
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
height: 15px;
|
||||
width: 50px;
|
||||
border-width: 1px;
|
||||
border-radius: 9px;
|
||||
flex-shrink: 0;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 2px;
|
||||
-unity-font-style: bold;
|
||||
-unity-text-align: middle-center;
|
||||
font-size: 8px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.status-message {
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
border-width: 1px;
|
||||
border-radius: 9px;
|
||||
flex-shrink: 0;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 2px;
|
||||
-unity-font-style: bold;
|
||||
-unity-text-align: middle-left;
|
||||
font-size: 8px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.module-widget #module-name {
|
||||
-unity-font-style: bold;
|
||||
-unity-text-align: middle-left;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.module-widget {
|
||||
margin: 5px;
|
||||
border-radius: 25px;
|
||||
background-color: rgba(255, 255, 255, 0.18);
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-left-color: rgba(0, 0, 0, 0.83);
|
||||
border-right-color: rgba(0, 0, 0, 0.83);
|
||||
border-top-color: rgba(0, 0, 0, 0.83);
|
||||
border-bottom-color: rgba(0, 0, 0, 0.83);
|
||||
flex-direction: row;
|
||||
width: 150px;
|
||||
transition-duration: 0.05s;
|
||||
}
|
||||
|
||||
.module-widget-lg {
|
||||
width: 150px;
|
||||
height: 110px;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.widget-group-header {
|
||||
-unity-text-align: upper-left;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.module-widget #title {
|
||||
-unity-font-style: bold;
|
||||
-unity-text-align: upper-left;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.module-widget #icon {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.module-widget #dynamic-status {
|
||||
-unity-font-style: bold;
|
||||
-unity-text-align: middle-left;
|
||||
font-size: 10px;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.module-toolbar {
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.module-toolbar #icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.module-toolbar #back-button {
|
||||
width: 20px;
|
||||
padding-right: 4px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.module-toolbar #title {
|
||||
-unity-font-style: bold;
|
||||
-unity-text-align: middle-left;
|
||||
font-size: 10px;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.section-bg {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
padding-top: 5px;
|
||||
padding-right: 7px;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 5px;
|
||||
border-top-left-radius: 15px;
|
||||
border-top-right-radius: 15px;
|
||||
border-bottom-right-radius: 15px;
|
||||
border-bottom-left-radius: 15px;
|
||||
background-color: rgb(69, 69, 69);
|
||||
margin-right: 6px;
|
||||
margin-left: 6px;
|
||||
border-left-color: rgba(0, 0, 0, 0);
|
||||
border-right-color: rgba(0, 0, 0, 0);
|
||||
border-top-color: rgba(0, 0, 0, 0);
|
||||
border-bottom-color: rgba(0, 0, 0, 0);
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.split-widget {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.split-widget VisualElement {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.graph-section {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.half-graph-section {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.style-selector-button {
|
||||
border-radius: 15px;
|
||||
margin: 2px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.style-selector-button.active {
|
||||
border-width:0;
|
||||
border-bottom-width: 5px;
|
||||
border-color: rgba(50, 210, 255, 0.83);
|
||||
}
|
||||
|
||||
.style-selector-button.tall {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.style-selector-button:hover Image {
|
||||
left: -15px;
|
||||
top: -15px;
|
||||
right: -15px;
|
||||
bottom: -15px;
|
||||
}
|
||||
|
||||
.style-selector-button Image {
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
left: -5px;
|
||||
top: -5px;
|
||||
right: -5px;
|
||||
bottom: -5px;
|
||||
transition-duration: 0.15s;
|
||||
transition-timing-function: ease-out;
|
||||
}
|
||||
|
||||
.style-selector-button Label {
|
||||
font-size: 14px;
|
||||
-unity-font-style: bold;
|
||||
-unity-text-align: upper-right;
|
||||
color: rgb(87, 87, 87);
|
||||
}
|
||||
|
||||
.style-selector-button Label.bright {
|
||||
font-size: 14px;
|
||||
-unity-font-style: bold;
|
||||
-unity-text-align: upper-right;
|
||||
color: rgb(235, 235, 235);
|
||||
}
|
||||
|
||||
.cozy-profile {
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cozy-profile ObjectField {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
|
||||
.cozy-profile #clone-profile {
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.cozy-profile #new-profile {
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.toggle-box VisualElement {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.toggle-box #icon {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.toggle-box {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
margin: 3px;
|
||||
padding: 3px;
|
||||
background-color: var(--unity-colors-button-background);
|
||||
border-color: var(--unity-colors-button-border);
|
||||
border-width: 1px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.toggle-box:checked {
|
||||
background-color: var(--unity-colors-button-background-pressed);
|
||||
}
|
||||
|
||||
.toggle-box:hover {
|
||||
background-color: var(--unity-colors-button-background-hover);
|
||||
}
|
||||
|
||||
.toggle-box:checked:hover {
|
||||
background-color: var(--unity-colors-button-background-hover_pressed);
|
||||
}
|
||||
|
||||
.swatch {
|
||||
flex-direction: row;
|
||||
margin-right: 5px;
|
||||
margin-left: 5px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.swatch Label {
|
||||
-unity-text-align: middle-center;
|
||||
-unity-font-style: italic;
|
||||
margin-right: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.swatch VisualElement {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.banner {
|
||||
height: 120px;
|
||||
overflow: hidden;
|
||||
flex-direction: row;
|
||||
color: rgb(255, 255, 255);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.banner #background-container {
|
||||
left: -5px;
|
||||
top: -5px;
|
||||
right: -5px;
|
||||
bottom: -5px;
|
||||
position: absolute;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.banner #background-image {
|
||||
min-width: 110%;
|
||||
min-height: 110%;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
-unity-background-image-tint-color: rgb(185, 185, 185);
|
||||
}
|
||||
|
||||
.banner #banner-content {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.banner #title {
|
||||
-unity-font-style: bold;
|
||||
font-size: 33px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.banner #desc {
|
||||
font-size: 14px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.banner #banner-text-container {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.banner #watermark {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.offset-label {
|
||||
-unity-text-align: upper-right;
|
||||
}
|
||||
|
||||
.hover-effect:hover {
|
||||
background-color: rgba(255, 255, 255, 0.16);
|
||||
}
|
||||
|
||||
.hidden-text {
|
||||
color: rgba(210, 210, 210, 0);
|
||||
font-size: 0.001px;
|
||||
}
|
||||
|
||||
.hide-element-title .unity-object-field__label {
|
||||
opacity: 1;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tab-group {
|
||||
flex-direction: row;
|
||||
height: 25px;
|
||||
transition-duration: 0.1s;
|
||||
}
|
||||
|
||||
.unity-toolbar {
|
||||
background-color: rgb(31, 31, 31);
|
||||
}
|
||||
|
||||
.unity-toolbar-button {
|
||||
background-color: rgb(31, 31, 31);
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
margin-top: 1px;
|
||||
margin-right: 1px;
|
||||
margin-bottom: 1px;
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
.unity-toolbar-button:hover {
|
||||
background-color: rgb(63, 63, 63);
|
||||
}
|
||||
|
||||
.module-widget:hover {
|
||||
margin: 5px;
|
||||
border-radius: 25px;
|
||||
background-color: rgba(255, 255, 255, 0.34);
|
||||
}
|
||||
|
||||
.tab-group > Button {
|
||||
flex-direction: row-reverse;
|
||||
height: 25px;
|
||||
transition-duration: 0.1s;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
border-left-color: rgba(0, 0, 0, 0);
|
||||
border-right-color: rgba(0, 0, 0, 0);
|
||||
border-top-color: rgba(0, 0, 0, 0);
|
||||
border-bottom-color: rgba(0, 0, 0, 0);
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.tab-group > Button:hover {
|
||||
background-color: rgba(57, 57, 57, 0.42);
|
||||
}
|
||||
|
||||
.tab-group > .selected {
|
||||
background-color: rgb(57, 57, 57);
|
||||
}
|
||||
|
||||
.status-button:hover {
|
||||
background-color: rgba(255, 255, 255, 0.13);
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
}
|
||||
|
||||
.tab-group > .selected:hover {
|
||||
background-color: rgb(77, 77, 77);
|
||||
}
|
||||
|
||||
.unity-toolbar-button:focus {
|
||||
background-color: rgb(63, 63, 63);
|
||||
border-bottom-width: 1px;
|
||||
border-right-width: 0;
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.shown {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tooltip .icon {
|
||||
background-image: resource('Icons/Help');
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
flex-shrink: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-top: 3px;
|
||||
margin-right: 3px;
|
||||
margin-bottom: 3px;
|
||||
margin-left: 3px;
|
||||
-unity-background-image-tint-color: rgb(104, 163, 223);
|
||||
}
|
||||
|
||||
.unity-base-field__aligned {
|
||||
}
|
||||
|
||||
.nav-btn {
|
||||
-unity-text-align: upper-right;
|
||||
font-size: 14px;
|
||||
padding-top: 7px;
|
||||
padding-right: 6px;
|
||||
padding-bottom: 7px;
|
||||
padding-left: 4px;
|
||||
-unity-font-style: normal;
|
||||
margin-top: 2px;
|
||||
margin-right: 2px;
|
||||
margin-bottom: 2px;
|
||||
margin-left: 2px;
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
color: rgb(161, 161, 161);
|
||||
}
|
||||
|
||||
.nav-btn:hover {
|
||||
background-color: rgba(108, 108, 108, 0.39);
|
||||
color: rgb(247, 247, 247);
|
||||
}
|
||||
|
||||
.nav-btn.active {
|
||||
background-color: rgb(61, 114, 154);
|
||||
color: rgb(255, 255, 255);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 60b39676bc45100478c0c8a083850788
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
|
||||
disableValidation: 0
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24c36fb9ef161a84d82a15dce01126a6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 760e1b221636b7148854856fd6df747c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,137 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEngine.UIElements;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor.UIElements;
|
||||
using System;
|
||||
using UnityEditor.Experimental.GraphView;
|
||||
using DistantLands.Cozy.Data;
|
||||
|
||||
|
||||
namespace DistantLands.Cozy.EditorScripts
|
||||
{
|
||||
|
||||
[CustomEditor(typeof(CozyBiome))]
|
||||
public class CozyBiomeEditor : Editor
|
||||
{
|
||||
|
||||
CozyBiome biome;
|
||||
|
||||
public List<CozyModuleEditor> moduleEditors = new List<CozyModuleEditor>();
|
||||
public VisualElement root;
|
||||
public VisualElement ModuleContainer => root.Q<VisualElement>("module-container");
|
||||
public VisualElement LocalSettingsContainer => root.Q<VisualElement>("local-settings-container");
|
||||
public VisualElement DistanceContainer => root.Q<VisualElement>("distance");
|
||||
public VisualElement TimeContainer => root.Q<VisualElement>("time");
|
||||
public EnumField ModeSelector => root.Q<EnumField>("mode-selector");
|
||||
public EnumField TransitionSelector => root.Q<EnumField>("transition-selector");
|
||||
public Button AddModule => root.Q<Button>("add-module-button");
|
||||
|
||||
|
||||
List<Type> mods;
|
||||
|
||||
public static CozyWeatherEditor instance;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the object becomes enabled and active.
|
||||
/// </summary>
|
||||
void OnEnable()
|
||||
{
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
biome = (CozyBiome)target;
|
||||
}
|
||||
|
||||
public void ResetModuleEditors()
|
||||
{
|
||||
ModuleContainer.Clear();
|
||||
moduleEditors.Clear();
|
||||
|
||||
for (int i = 0; i < biome.modules.Count; i++)
|
||||
{
|
||||
CozyBiomeModuleEditor moduleEditor = (CozyBiomeModuleEditor)CreateEditor(biome.modules[i] as UnityEngine.Object);
|
||||
if (moduleEditor == null)
|
||||
continue;
|
||||
|
||||
moduleEditors.Add(moduleEditor);
|
||||
}
|
||||
|
||||
moduleEditors.RemoveAll(x => x == null);
|
||||
|
||||
foreach (CozyBiomeModuleEditor editor in moduleEditors)
|
||||
{
|
||||
Label heading = new Label(editor.ModuleTitle);
|
||||
heading.AddToClassList("h2");
|
||||
ModuleContainer.Add(heading);
|
||||
VisualElement ui = editor.DisplayBiomeUI();
|
||||
ui.AddToClassList("section-bg");
|
||||
ModuleContainer.Add(ui);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override VisualElement CreateInspectorGUI()
|
||||
{
|
||||
|
||||
root = new VisualElement();
|
||||
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Inspectors/UXML/cozy-biome.uxml"
|
||||
);
|
||||
|
||||
asset.CloneTree(root);
|
||||
ResetModuleEditors();
|
||||
|
||||
SetVisible(LocalSettingsContainer, biome.mode == CozyBiome.BiomeMode.Local);
|
||||
ModeSelector.RegisterValueChangedCallback((evt) =>
|
||||
{
|
||||
SetVisible(LocalSettingsContainer, biome.mode == CozyBiome.BiomeMode.Local);
|
||||
});
|
||||
|
||||
SetVisible(DistanceContainer, biome.transitionMode == CozyBiome.TransitionMode.Distance);
|
||||
SetVisible(TimeContainer, biome.transitionMode == CozyBiome.TransitionMode.Time);
|
||||
TransitionSelector.RegisterValueChangedCallback((evt) =>
|
||||
{
|
||||
SetVisible(DistanceContainer, biome.transitionMode == CozyBiome.TransitionMode.Distance);
|
||||
SetVisible(TimeContainer, biome.transitionMode == CozyBiome.TransitionMode.Time);
|
||||
});
|
||||
|
||||
|
||||
AddModule.RegisterCallback<ClickEvent>((evt) =>
|
||||
{
|
||||
|
||||
mods = EditorUtilities.ResetBiomeModulesList();
|
||||
|
||||
if (mods.Contains(typeof(ICozyBiomeModule)))
|
||||
mods.Remove(typeof(ICozyBiomeModule));
|
||||
|
||||
if (mods.Contains(typeof(CozyBiomeModuleBase<>)))
|
||||
mods.Remove(typeof(CozyBiomeModuleBase<>));
|
||||
|
||||
foreach (ICozyBiomeModule a in biome.GetComponents<ICozyBiomeModule>())
|
||||
if (mods.Contains(a.GetType()))
|
||||
mods.Remove(a.GetType());
|
||||
|
||||
BiomeModulesSearchProvider provider = CreateInstance<BiomeModulesSearchProvider>();
|
||||
provider.modules = mods;
|
||||
provider.biome = biome;
|
||||
SearchWindow.Open(new SearchWindowContext(GUIUtility.GUIToScreenPoint(Event.current.mousePosition)), provider);
|
||||
|
||||
});
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
public void SetVisible(VisualElement element, bool condition)
|
||||
{
|
||||
element.style.display = condition ? DisplayStyle.Flex : DisplayStyle.None;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d64bf4fcca3f37499b4b4101773f8ef
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Inspectors/C#/CozyBiomeEditor.cs
|
||||
uploadId: 939148
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6793e0feb95d86941b9f203809ac7ff8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Inspectors/C#/CozyWeatherEditor.cs
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8b3c4b821570904fb25278b090de962
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,18 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:Label tabindex="-1" text="Management" parse-escape-sequences="true" display-tooltip-when-elided="true" class="h1" />
|
||||
<ui:VisualElement class="section-bg">
|
||||
<ui:EnumField label="Mode" type="DistantLands.Cozy.CozyBiome+BiomeMode, DistantLands.Cozy.Runtime" binding-path="mode" name="mode-selector" />
|
||||
<ui:VisualElement name="local-settings-container" class="pl-4">
|
||||
<uie:ObjectField label="Trigger" type="UnityEngine.Collider, UnityEngine.PhysicsModule" binding-path="trigger" />
|
||||
<ui:EnumField label="Transition Mode" type="DistantLands.Cozy.CozyBiome+TransitionMode, DistantLands.Cozy.Runtime" binding-path="transitionMode" name="transition-selector" />
|
||||
<ui:FloatField label="Transition Distance" value="1" binding-path="transitionDistance" name="distance" />
|
||||
<ui:FloatField label="Transition Time" value="1" binding-path="transitionTime" name="time" />
|
||||
</ui:VisualElement>
|
||||
<ui:Slider label="Weight" high-value="1" binding-path="maxWeight" show-input-field="true" />
|
||||
<ui:IntegerField label="Priority" value="42" binding-path="priority" />
|
||||
</ui:VisualElement>
|
||||
<ui:Label tabindex="-1" text="Modules" parse-escape-sequences="true" display-tooltip-when-elided="true" class="h1" />
|
||||
<ui:VisualElement name="module-container" style="flex-grow: 1;" />
|
||||
<ui:Button text="Add Module" parse-escape-sequences="true" display-tooltip-when-elided="true" name="add-module-button" />
|
||||
</ui:UXML>
|
||||
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3345af5a9fec552418cc5aab9a5203b0
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Inspectors/UXML/cozy-biome.uxml
|
||||
uploadId: 939148
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:Label tabindex="-1" text="Biomes" parse-escape-sequences="true" display-tooltip-when-elided="true" class="h1" />
|
||||
<ui:VisualElement style="flex-direction: row; height: 50px;">
|
||||
<ui:Button parse-escape-sequences="true" display-tooltip-when-elided="true" name="global-biome" style="flex-grow: 1; align-items: center; justify-content: center; flex-direction: row;">
|
||||
<ui:VisualElement name="icon" style="margin-top: 3px; margin-right: 3px; margin-bottom: 3px; margin-left: 3px; width: 32px; height: 32px;" />
|
||||
<ui:Label tabindex="-1" text="Global Biome" parse-escape-sequences="true" display-tooltip-when-elided="true" />
|
||||
</ui:Button>
|
||||
<ui:Button parse-escape-sequences="true" display-tooltip-when-elided="true" name="local-biome" style="justify-content: center; align-items: center; flex-direction: row; flex-grow: 1;">
|
||||
<ui:VisualElement name="icon" style="flex-grow: 0; width: 32px; height: 32px; margin-top: 3px; margin-right: 3px; margin-bottom: 3px; margin-left: 3px;" />
|
||||
<ui:Label tabindex="-1" text="Local Biome" parse-escape-sequences="true" display-tooltip-when-elided="true" />
|
||||
</ui:Button>
|
||||
</ui:VisualElement>
|
||||
<ui:Label tabindex="-1" text="FX Areas" parse-escape-sequences="true" display-tooltip-when-elided="true" class="h1" />
|
||||
<ui:VisualElement class="mb-lg" style="flex-direction: row; height: 50px;">
|
||||
<ui:Button parse-escape-sequences="true" display-tooltip-when-elided="true" name="fx-block-zone" style="flex-grow: 1; align-items: center; justify-content: center; flex-direction: row;">
|
||||
<ui:VisualElement name="icon" style="flex-grow: 0; width: 32px; height: 32px; margin-top: 3px; margin-right: 3px; margin-bottom: 3px; margin-left: 3px;" />
|
||||
<ui:Label tabindex="-1" text="FX Block Zone" parse-escape-sequences="true" display-tooltip-when-elided="true" />
|
||||
</ui:Button>
|
||||
<ui:Button parse-escape-sequences="true" display-tooltip-when-elided="true" name="fog-culling-zone" style="flex-grow: 1; justify-content: center; align-items: center; flex-direction: row;">
|
||||
<ui:VisualElement name="icon" style="flex-grow: 0; width: 32px; height: 32px; margin-top: 3px; margin-right: 3px; margin-bottom: 3px; margin-left: 3px;" />
|
||||
<ui:Label tabindex="-1" text="Fog Culling Zone" parse-escape-sequences="true" display-tooltip-when-elided="true" />
|
||||
</ui:Button>
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 93d586e0bd7361641bf76217b28d7cff
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Inspectors/UXML/cozy-hub-scene-tools.uxml
|
||||
uploadId: 939148
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:ScrollView>
|
||||
<ui:Label tabindex="-1" text="Orientation" parse-escape-sequences="true" display-tooltip-when-elided="true" class="h1" />
|
||||
<ui:VisualElement class="section-bg">
|
||||
<ui:EnumField label="Lock to Camera" type="DistantLands.Cozy.CozyWeather+LockToCameraStyle, DistantLands.Cozy.Runtime" binding-path="lockToCamera" class="unity-base-field__aligned" style="height: 20px;" />
|
||||
<ui:Toggle label="Custom Center" binding-path="centerAroundCustomObject" name="Toggle" class="unity-base-field__aligned" />
|
||||
<uie:PropertyField binding-path="customPivot" class="unity-base-field__aligned" />
|
||||
</ui:VisualElement>
|
||||
<Tooltip message="Use the toggles below to change the art style for the sky, clouds and fog" />
|
||||
<ui:Label tabindex="-1" text="Lighting" parse-escape-sequences="true" display-tooltip-when-elided="true" class="h1 unity-base-field__aligned" />
|
||||
<ui:VisualElement class="section-bg">
|
||||
<Tooltip message="Control aspects of COZY's lighting" />
|
||||
<uie:PropertyField binding-path="usePhysicalSunHeight" class="unity-base-field__aligned" />
|
||||
<uie:PropertyField binding-path="handleSceneLighting" class="unity-base-field__aligned" />
|
||||
<uie:PropertyField name="separateSunLightAndTransform" binding-path="separateSunLightAndTransform" class="unity-base-field__aligned" />
|
||||
<ui:VisualElement name="sunLightAndTransformContainer" class="pl-4">
|
||||
<uie:PropertyField binding-path="sunTransform" class="unity-base-field__aligned" />
|
||||
<uie:PropertyField binding-path="sunLight" class="unity-base-field__aligned" />
|
||||
</ui:VisualElement>
|
||||
<uie:PropertyField binding-path="disableSunAtNight" class="unity-base-field__aligned" />
|
||||
</ui:VisualElement>
|
||||
<ui:Label tabindex="-1" text="Game" parse-escape-sequences="true" display-tooltip-when-elided="true" class="h1 unity-base-field__aligned" />
|
||||
<ui:VisualElement class="section-bg">
|
||||
<uie:TagField label="Trigger Tag" value="Player" binding-path="cozyTriggerTag" class="unity-base-field__aligned" />
|
||||
<Tooltip message="Don't destroy on load? Use this toggle to make COZY persist even when the current scene changes." />
|
||||
<uie:PropertyField binding-path="dontDestroyOnLoad" class="unity-base-field__aligned" />
|
||||
</ui:VisualElement>
|
||||
<ui:Label tabindex="-1" text="Editor" parse-escape-sequences="true" display-tooltip-when-elided="true" class="h1 unity-base-field__aligned" />
|
||||
<ui:VisualElement class="section-bg">
|
||||
<ui:Toggle label="Update in Edit Mode" name="update-in-edit-mode" class="unity-base-field__aligned" style="height: 16px;" />
|
||||
<ui:Toggle label="Fog" name="fog" class="unity-base-field__aligned" style="height: 16px;" />
|
||||
<ui:Toggle label="Follow Camera" name="follow-camera" class="unity-base-field__aligned" />
|
||||
<ui:Toggle label="Gizmos" name="gizmos" class="unity-base-field__aligned" />
|
||||
<ui:Toggle label="Tooltips" name="tooltips" class="unity-base-field__aligned" />
|
||||
<ui:Toggle label="Graphs" name="graphs" class="unity-base-field__aligned" />
|
||||
</ui:VisualElement>
|
||||
</ui:ScrollView>
|
||||
</ui:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a4f4b7eee8da314ebca849fb9498850
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Inspectors/UXML/cozy-inspector-settings.uxml
|
||||
uploadId: 939148
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:ScrollView>
|
||||
<ui:VisualElement style="flex-shrink: 0;">
|
||||
<ui:Label tabindex="-1" text="Sky Dome" parse-escape-sequences="true" display-tooltip-when-elided="true" class="unity-base-field__aligned h1" />
|
||||
<ui:VisualElement name="sky-style-holder" style="flex-direction: row; flex-wrap: wrap; background-color: rgba(0, 0, 0, 0.14);" />
|
||||
<ui:Label tabindex="-1" text="Cloud Dome" parse-escape-sequences="true" display-tooltip-when-elided="true" class="mt-lg unity-base-field__aligned h1" />
|
||||
<ui:VisualElement name="cloud-style-holder" style="flex-direction: row; flex-wrap: wrap; background-color: rgba(0, 0, 0, 0.14);" />
|
||||
<ui:Label tabindex="-1" text="Fog Dome" parse-escape-sequences="true" display-tooltip-when-elided="true" class="mt-lg unity-base-field__aligned h1" />
|
||||
<ui:VisualElement name="fog-style-holder" style="flex-direction: row; flex-wrap: wrap; background-color: rgba(0, 0, 0, 0.14);" />
|
||||
</ui:VisualElement>
|
||||
</ui:ScrollView>
|
||||
</ui:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c2d0757191e82c143a09935d9297275b
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Inspectors/UXML/cozy-inspector-styles.uxml
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,26 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<ui:Template name="banner" src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Components/UXML/banner.uxml?fileID=9197481963319205126&guid=d1ed574b2a121c24496c06cb642391aa&type=3#banner" />
|
||||
<Style src="project://database/Packages/com.distantlands.cozy.core/Editor/UI/Globals.uss?fileID=7433441132597879392&guid=60b39676bc45100478c0c8a083850788&type=3#Globals" />
|
||||
<ui:VisualElement style="flex-grow: 1; margin-left: -15px; margin-right: -6px; background-color: rgba(0, 0, 0, 0.49);">
|
||||
<ui:Instance template="banner" name="banner" />
|
||||
<ui:VisualElement name="VisualElement" style="flex-grow: 1; width: 100%; flex-direction: column; margin-right: 0; margin-left: 0; overflow: hidden; height: 100%;">
|
||||
<ui:VisualElement name="home-page" style="flex-grow: 1; display: flex;">
|
||||
<uie:Toolbar style="justify-content: flex-start; padding-left: 5px; align-items: stretch;">
|
||||
<uie:ToolbarSearchField name="searchbar" style="flex-shrink: 1;" />
|
||||
<ui:VisualElement style="flex-grow: 1;" />
|
||||
<uie:ToolbarButton parse-escape-sequences="true" display-tooltip-when-elided="true" name="add-module" style="-unity-text-align: middle-center; width: 30px; align-items: center; justify-content: center; flex-shrink: 0;" />
|
||||
<uie:ToolbarButton parse-escape-sequences="true" display-tooltip-when-elided="true" name="styles" style="-unity-text-align: upper-left; width: 28px; align-items: center; justify-content: center; flex-shrink: 0;" />
|
||||
<uie:ToolbarButton parse-escape-sequences="true" display-tooltip-when-elided="true" name="scene-tools" style="-unity-text-align: upper-left; width: 28px; align-items: center; justify-content: center; flex-shrink: 0;" />
|
||||
<uie:ToolbarButton parse-escape-sequences="true" display-tooltip-when-elided="true" name="settings" style="-unity-text-align: upper-left; width: 28px; align-items: center; justify-content: center; flex-shrink: 0;" />
|
||||
</uie:Toolbar>
|
||||
<ui:VisualElement name="search-results" class="section-bg" style="padding-top: 0; padding-right: 8px; padding-bottom: 0; padding-left: 16px;" />
|
||||
<ui:ScrollView style="height: auto;">
|
||||
<Tooltip message="<b><i>Thank you for purchasing COZY: Stylized Weather 3!</b></i><br><br>To help you stay organized and only use what you need, COZY is split into sub-sections called <b>Modules</b>. The weather sphere comes with a few modules enabled by default, but you can add new ones by clicking the + button above!" style="display: none;" />
|
||||
<Tooltip message="You can disable tooltips in the <b>settings menu</b>" />
|
||||
<ui:VisualElement name="widget-container" style="flex-grow: 1;" />
|
||||
</ui:ScrollView>
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="modular-page" style="flex-grow: 1; display: none;" />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 72d1250e9a9c8a44f8984fc7a555093a
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 271742
|
||||
packageName: 'COZY: Stylized Weather 3'
|
||||
packageVersion: 3.6.20
|
||||
assetPath: Packages/com.distantlands.cozy.core/Editor/UI/Inspectors/UXML/cozy-inspector.uxml
|
||||
uploadId: 939148
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ddb77302500d45948b07ac5c3060617e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89f20016c8eeaa14c81ff60ddd6f44a0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,300 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEditor.UIElements;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using DistantLands.Cozy.Data;
|
||||
|
||||
namespace DistantLands.Cozy.EditorScripts
|
||||
{
|
||||
[CustomEditor(typeof(CozyAmbienceModule))]
|
||||
public class CozyAmbienceModuleEditor : CozyBiomeModuleEditor
|
||||
{
|
||||
|
||||
CozyAmbienceModule ambienceModule;
|
||||
public override ModuleCategory Category => ModuleCategory.ecosystem;
|
||||
public override string ModuleTitle => "Ambience";
|
||||
public override string ModuleSubtitle => "Secondary Weather Module";
|
||||
public override string ModuleTooltip => "Controls a secondary weather system that runs parallel to the main system allowing for ambient noises and FX.";
|
||||
|
||||
public VisualElement CurrentInfoContainer => root.Q<VisualElement>("current-information-container");
|
||||
public VisualElement DistributionMap => root.Q<VisualElement>("distribution-map");
|
||||
public VisualElement DistributionMapKey => root.Q<VisualElement>("distribution-map-key");
|
||||
public VisualElement ChancesByVariableChart => root.Q<VisualElement>("chances-by-variable-chart");
|
||||
public VisualElement ChancesByVariableKey => root.Q<VisualElement>("chances-by-variable-key");
|
||||
public EnumField ChancesByVariableLimit => root.Q<EnumField>("chances-by-variable-limit");
|
||||
|
||||
public ListView AmbienceProfileList => root.Q<ListView>("ambience-profile-list");
|
||||
public VisualElement CurrentInformationContainer => root.Q<VisualElement>("current-information-container");
|
||||
Button widget;
|
||||
VisualElement root;
|
||||
|
||||
public static Gradient distributionGradient = new Gradient()
|
||||
{
|
||||
colorKeys = new GradientColorKey[5]
|
||||
{
|
||||
new GradientColorKey(new Color(0.149f, 0.329f, 0.486f, 1f), 0f), // #26547C
|
||||
new GradientColorKey(new Color(0.937f, 0.278f, 0.435f, 1f), 0.25f), // #EF476F
|
||||
new GradientColorKey(new Color(1.0f, 0.820f, 0.400f, 1f), 0.5f), // #FFD166
|
||||
new GradientColorKey(new Color(0.024f, 0.839f, 0.627f, 1f), 0.75f), // #06D6A0
|
||||
new GradientColorKey(new Color(0.765f, 0.765f, 0.902f, 1f), 1f) // #C3C3E6
|
||||
}
|
||||
};
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
ambienceModule = (CozyAmbienceModule)target;
|
||||
}
|
||||
|
||||
public override Button DisplayWidget()
|
||||
{
|
||||
widget = SmallWidget();
|
||||
Label status = widget.Q<Label>("dynamic-status");
|
||||
status.style.fontSize = 8;
|
||||
if (ambienceModule.currentAmbienceProfile)
|
||||
status.text = ambienceModule.currentAmbienceProfile.name;
|
||||
else
|
||||
status.text = "No ambience playing";
|
||||
|
||||
return widget;
|
||||
|
||||
}
|
||||
|
||||
public override VisualElement DisplayUI()
|
||||
{
|
||||
root = new VisualElement();
|
||||
|
||||
VisualTreeAsset asset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
|
||||
"Packages/com.distantlands.cozy.core/Editor/UI/Modules/UXML/ambience-module-editor.uxml"
|
||||
);
|
||||
|
||||
asset.CloneTree(root);
|
||||
|
||||
root.RegisterCallback<PointerMoveEvent>((PointerMoveEvent) =>
|
||||
{
|
||||
UpdateWheel();
|
||||
});
|
||||
|
||||
UpdateWheel();
|
||||
|
||||
AmbienceProfileList.BindProperty(serializedObject.FindProperty("ambienceProfiles"));
|
||||
|
||||
PropertyField currentAmbienceProfile = new PropertyField();
|
||||
currentAmbienceProfile.BindProperty(serializedObject.FindProperty("currentAmbienceProfile"));
|
||||
CurrentInfoContainer.Add(currentAmbienceProfile);
|
||||
|
||||
return root;
|
||||
|
||||
}
|
||||
|
||||
public override VisualElement DisplayBiomeUI()
|
||||
{
|
||||
root = new VisualElement();
|
||||
PropertyField currentAmbienceProfile = new PropertyField();
|
||||
currentAmbienceProfile.BindProperty(serializedObject.FindProperty("currentAmbienceProfile"));
|
||||
root.Add(currentAmbienceProfile);
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
public void RefreshChanceGraph()
|
||||
{
|
||||
ChancesByVariableKey.Clear();
|
||||
|
||||
ChanceEffector.LimitType limitType = (ChanceEffector.LimitType)ChancesByVariableLimit.value;
|
||||
List<AmbienceProfile> adjustedProfiles = ambienceModule.ambienceProfiles
|
||||
.Where(x => x.chance.HasLimit(limitType))
|
||||
.ToList();
|
||||
|
||||
|
||||
|
||||
|
||||
for (int i = 0; i < adjustedProfiles.Count; i++)
|
||||
{
|
||||
AmbienceProfile profile = adjustedProfiles[i];
|
||||
VisualElement container = new VisualElement();
|
||||
container.AddToClassList("swatch");
|
||||
container.RegisterCallback<ClickEvent>((ClickEvent evt) =>
|
||||
{
|
||||
Selection.activeObject = ambienceModule.ambienceProfiles.First(x => x == profile);
|
||||
});
|
||||
|
||||
|
||||
VisualElement swatch = new VisualElement();
|
||||
swatch.style.backgroundColor = distributionGradient.Evaluate((float)i / adjustedProfiles.Count);
|
||||
container.Add(swatch);
|
||||
|
||||
Label timeLabel = new Label
|
||||
{
|
||||
text = adjustedProfiles[i].name
|
||||
};
|
||||
timeLabel.AddToClassList("font-bold");
|
||||
container.Add(timeLabel);
|
||||
|
||||
ChancesByVariableKey.Add(container);
|
||||
|
||||
}
|
||||
|
||||
ChancesByVariableChart.Clear();
|
||||
|
||||
VisualElement graphHolder = new VisualElement();
|
||||
graphHolder.AddToClassList("graph-section");
|
||||
|
||||
graphHolder.generateVisualContent += (MeshGenerationContext context) =>
|
||||
{
|
||||
float width = graphHolder.contentRect.width;
|
||||
float height = graphHolder.contentRect.height;
|
||||
|
||||
|
||||
var painter = context.painter2D;
|
||||
|
||||
painter.lineWidth = 2;
|
||||
painter.strokeColor = Branding.lightGreyAccent;
|
||||
painter.BeginPath();
|
||||
painter.MoveTo(new Vector2(0, height));
|
||||
painter.LineTo(new Vector2(width, height));
|
||||
painter.MoveTo(new Vector2(0, height));
|
||||
painter.LineTo(new Vector2(0, 0));
|
||||
painter.MoveTo(new Vector2(width / 2f, height));
|
||||
painter.LineTo(new Vector2(width / 2f, 0));
|
||||
painter.MoveTo(new Vector2(width * 3f / 4f, height));
|
||||
painter.LineTo(new Vector2(width * 3f / 4f, 0));
|
||||
painter.MoveTo(new Vector2(width * 1f / 4f, height));
|
||||
painter.LineTo(new Vector2(width * 1f / 4f, 0));
|
||||
painter.MoveTo(new Vector2(width, height));
|
||||
painter.LineTo(new Vector2(width, 0));
|
||||
painter.MoveTo(new Vector2(0, 0));
|
||||
painter.LineTo(new Vector2(width, 0));
|
||||
painter.Stroke();
|
||||
|
||||
|
||||
for (int i = 0; i < adjustedProfiles.Count; i++)
|
||||
{
|
||||
|
||||
AmbienceProfile profile = adjustedProfiles[i];
|
||||
painter.strokeColor = distributionGradient.Evaluate((float)i / adjustedProfiles.Count);
|
||||
|
||||
int vertex = 40;
|
||||
|
||||
painter.BeginPath();
|
||||
painter.MoveTo(new Vector2(0, height * (1 - profile.chance.GetChance(limitType, 0f))));
|
||||
|
||||
for (int j = 1; j <= vertex; j++)
|
||||
{
|
||||
painter.LineTo(new Vector2(width * (float)j / vertex, height * (1 - profile.chance.GetChance((ChanceEffector.LimitType)ChancesByVariableLimit.value, (float)j / vertex))));
|
||||
}
|
||||
|
||||
painter.Stroke();
|
||||
}
|
||||
};
|
||||
|
||||
ChancesByVariableChart.Add(graphHolder);
|
||||
|
||||
}
|
||||
|
||||
public void UpdateWheel()
|
||||
{
|
||||
if (DistributionMap == null || DistributionMapKey == null) return;
|
||||
|
||||
DistributionMap.Clear();
|
||||
DistributionMapKey.Clear();
|
||||
|
||||
if (ambienceModule.ambienceProfiles.Length == 0)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
CozyWeather cozyWeather = CozyWeather.instance;
|
||||
List<AmbienceProfile> sortedProfiles = ambienceModule.ambienceProfiles.ToList()
|
||||
.Where(x => x.GetChance(cozyWeather) > 0.05f)
|
||||
.OrderBy(x => x.GetChance(cozyWeather)).ToList();
|
||||
|
||||
float totalChance = sortedProfiles.Sum(x => x.GetChance(cozyWeather));
|
||||
float iteratedChance = 0;
|
||||
|
||||
if (sortedProfiles.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
VisualElement element = new VisualElement();
|
||||
element.AddToClassList("graph-section");
|
||||
|
||||
element.generateVisualContent += (MeshGenerationContext context) =>
|
||||
{
|
||||
float width = element.contentRect.width;
|
||||
float height = element.contentRect.height;
|
||||
|
||||
var painter = context.painter2D;
|
||||
|
||||
for (int i = 0; i < sortedProfiles.Count; i++)
|
||||
{
|
||||
|
||||
Color distributionColor = distributionGradient.Evaluate((float)i / sortedProfiles.Count);
|
||||
float chance = sortedProfiles[i].GetChance(cozyWeather);
|
||||
|
||||
painter.strokeColor = distributionColor;
|
||||
painter.lineWidth = 24;
|
||||
painter.BeginPath();
|
||||
painter.Arc(new Vector2(width / 2f, height / 2f), height / 3f, 360f * (iteratedChance / totalChance) + 1, 360 * (iteratedChance + chance) / totalChance, ArcDirection.Clockwise);
|
||||
painter.Stroke();
|
||||
painter.ClosePath();
|
||||
|
||||
if (sortedProfiles[i] == ambienceModule.currentAmbienceProfile)
|
||||
{
|
||||
painter.BeginPath();
|
||||
painter.lineWidth = 2;
|
||||
painter.strokeColor = new Color(1, 1, 1, 0.6f);
|
||||
painter.Arc(new Vector2(width / 2f, height / 2f), height / 3f + 17, 360f * (iteratedChance / totalChance), 360 * (iteratedChance + chance) / totalChance, ArcDirection.Clockwise);
|
||||
painter.Stroke();
|
||||
painter.ClosePath();
|
||||
}
|
||||
|
||||
iteratedChance += chance;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
for (int i = 0; i < sortedProfiles.Count; i++)
|
||||
{
|
||||
Color distributionColor = distributionGradient.Evaluate((float)i / sortedProfiles.Count);
|
||||
AmbienceProfile profile = sortedProfiles[i];
|
||||
float chance = profile.GetChance(cozyWeather);
|
||||
|
||||
VisualElement key = new VisualElement();
|
||||
key.AddToClassList("swatch");
|
||||
key.RegisterCallback<ClickEvent>((ClickEvent evt) =>
|
||||
{
|
||||
Selection.activeObject = ambienceModule.ambienceProfiles.First(x => x == profile);
|
||||
});
|
||||
|
||||
VisualElement swatch = new VisualElement();
|
||||
swatch.style.backgroundColor = distributionColor;
|
||||
key.Add(swatch);
|
||||
|
||||
Label label = new Label()
|
||||
{
|
||||
text = $"{profile.name} - {Mathf.Round(chance / totalChance * 100)}%"
|
||||
};
|
||||
key.Add(label);
|
||||
DistributionMapKey.Insert(0, key);
|
||||
}
|
||||
|
||||
DistributionMap.Add(element);
|
||||
|
||||
}
|
||||
|
||||
public override void OpenDocumentationURL()
|
||||
{
|
||||
Application.OpenURL("https://distant-lands.gitbook.io/cozy-stylized-weather-documentation/how-it-works/modules/ambience-module");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user