initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e5d17a21594effb4e9591490b009e7aa
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace UnityEditor.AddressableAssets.Settings.GroupSchemas
|
||||
{
|
||||
/// <summary>
|
||||
/// Schema for content updates.
|
||||
/// </summary>
|
||||
// [CreateAssetMenu(fileName = "ContentUpdateGroupSchema.asset", menuName = "Addressables/Group Schemas/Content Update")]
|
||||
[DisplayName("Content Update Restriction")]
|
||||
public class ContentUpdateGroupSchema : AddressableAssetGroupSchema
|
||||
{
|
||||
[FormerlySerializedAs("m_staticContent")]
|
||||
[SerializeField]
|
||||
bool m_StaticContent;
|
||||
|
||||
/// <summary>
|
||||
/// Is the group static. This property is used in determining which assets need to be moved to a new remote group during the content update process.
|
||||
/// </summary>
|
||||
public bool StaticContent
|
||||
{
|
||||
get => m_StaticContent;
|
||||
set
|
||||
{
|
||||
if (m_StaticContent != value)
|
||||
{
|
||||
m_StaticContent = value;
|
||||
SetDirty(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private GUIContent m_UpdateRestrictionGUIContent = new GUIContent("Prevent Updates", "Assets in Prevent Update groups will be moved to a new remote group during the content update process");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void OnGUI()
|
||||
{
|
||||
var staticContent = EditorGUILayout.Toggle(m_UpdateRestrictionGUIContent, m_StaticContent);
|
||||
if (staticContent != m_StaticContent)
|
||||
{
|
||||
var prop = SchemaSerializedObject.FindProperty("m_StaticContent");
|
||||
prop.boolValue = staticContent;
|
||||
SchemaSerializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void OnGUIMultiple(List<AddressableAssetGroupSchema> otherSchemas)
|
||||
{
|
||||
string propertyName = "m_StaticContent";
|
||||
var prop = SchemaSerializedObject.FindProperty(propertyName);
|
||||
|
||||
// Type/Static Content
|
||||
ShowMixedValue(prop, otherSchemas, typeof(bool), propertyName);
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
var staticContent = EditorGUILayout.Toggle(m_UpdateRestrictionGUIContent, m_StaticContent);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
prop.boolValue = staticContent;
|
||||
SchemaSerializedObject.ApplyModifiedProperties();
|
||||
foreach (var s in otherSchemas)
|
||||
{
|
||||
var otherProp = s.SchemaSerializedObject.FindProperty(propertyName);
|
||||
otherProp.boolValue = staticContent;
|
||||
s.SchemaSerializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUI.showMixedValue = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5834b5087d578d24c926ce20cd31e6d6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace UnityEditor.AddressableAssets.Settings.GroupSchemas
|
||||
{
|
||||
/// <summary>
|
||||
/// Schema for the player data asset group
|
||||
/// </summary>
|
||||
//[CreateAssetMenu(fileName = "PlayerDataGroupSchema.asset", menuName = "Addressables/Group Schemas/Player Data")]
|
||||
[DisplayName("Resources and Built In Scenes")]
|
||||
public class PlayerDataGroupSchema : AddressableAssetGroupSchema
|
||||
{
|
||||
[Tooltip("Assets in resources folders will have addresses generated during the build")]
|
||||
[FormerlySerializedAs("m_includeResourcesFolders")]
|
||||
[SerializeField]
|
||||
bool m_IncludeResourcesFolders = true;
|
||||
|
||||
/// <summary>
|
||||
/// If enabled, all assets in resources folders will have addresses generated during the build.
|
||||
/// </summary>
|
||||
public bool IncludeResourcesFolders
|
||||
{
|
||||
get => m_IncludeResourcesFolders;
|
||||
set
|
||||
{
|
||||
if (m_IncludeResourcesFolders != value)
|
||||
{
|
||||
m_IncludeResourcesFolders = value;
|
||||
SetDirty(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Tooltip("All scenes in the editor build settings will have addresses generated during the build")]
|
||||
[FormerlySerializedAs("m_includeBuildSettingsScenes")]
|
||||
[SerializeField]
|
||||
bool m_IncludeBuildSettingsScenes = true;
|
||||
|
||||
/// <summary>
|
||||
/// If enabled, all scenes in the editor build settings will have addresses generated during the build.
|
||||
/// </summary>
|
||||
public bool IncludeBuildSettingsScenes
|
||||
{
|
||||
get => m_IncludeBuildSettingsScenes;
|
||||
set
|
||||
{
|
||||
if (m_IncludeBuildSettingsScenes != value)
|
||||
{
|
||||
m_IncludeBuildSettingsScenes = value;
|
||||
SetDirty(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void OnGUIMultiple(List<AddressableAssetGroupSchema> otherSchemas)
|
||||
{
|
||||
SerializedProperty prop;
|
||||
string propertyName = "m_IncludeResourcesFolders";
|
||||
HashSet<SerializedObject> applyModifications = new HashSet<SerializedObject>();
|
||||
|
||||
// IncludeResourcesFolders
|
||||
prop = SchemaSerializedObject.FindProperty(propertyName);
|
||||
ShowMixedValue(prop, otherSchemas, typeof(bool), propertyName);
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool newIncludeResourcesFolders = (bool)EditorGUILayout.Toggle(new GUIContent(prop.displayName, "Assets in resources folders will have addresses generated during the build"),
|
||||
IncludeResourcesFolders);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
prop.boolValue = newIncludeResourcesFolders;
|
||||
applyModifications.Add(SchemaSerializedObject);
|
||||
foreach (var s in otherSchemas)
|
||||
{
|
||||
var otherProp = s.SchemaSerializedObject.FindProperty(propertyName);
|
||||
otherProp.boolValue = newIncludeResourcesFolders;
|
||||
applyModifications.Add(s.SchemaSerializedObject);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUI.showMixedValue = false;
|
||||
|
||||
// IncludeBuildSettingsScenes
|
||||
propertyName = "m_IncludeBuildSettingsScenes";
|
||||
prop = SchemaSerializedObject.FindProperty(propertyName);
|
||||
ShowMixedValue(prop, otherSchemas, typeof(bool), propertyName);
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool newIncludeBuildSettingsScenes =
|
||||
(bool)EditorGUILayout.Toggle(new GUIContent(prop.displayName, "All scenes in the editor build settings will have addresses generated during the build"), IncludeBuildSettingsScenes);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
prop.boolValue = newIncludeBuildSettingsScenes;
|
||||
applyModifications.Add(SchemaSerializedObject);
|
||||
foreach (var s in otherSchemas)
|
||||
{
|
||||
var otherProp = s.SchemaSerializedObject.FindProperty(propertyName);
|
||||
otherProp.boolValue = newIncludeBuildSettingsScenes;
|
||||
applyModifications.Add(s.SchemaSerializedObject);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUI.showMixedValue = false;
|
||||
|
||||
foreach (SerializedObject serializedObject in applyModifications)
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b1487f5d688e4f94f828f879d599dbdc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Add table
Add a link
Reference in a new issue