Added Editor scripts
.dll files auto compile into DunGenPlus folder
This commit is contained in:
parent
99d9d7ae1e
commit
894645d85c
|
@ -5,6 +5,8 @@ VisualStudioVersion = 17.10.35013.160
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DunGenPlus", "DunGenPlus\DunGenPlus.csproj", "{13CDE60E-1975-463B-9DA1-CCB3F3EBABD8}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DunGenPlus", "DunGenPlus\DunGenPlus.csproj", "{13CDE60E-1975-463B-9DA1-CCB3F3EBABD8}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DunGenPlusEditor", "DunGenPlusEditor\DunGenPlusEditor.csproj", "{D3F32D4B-49DA-46D2-A408-000D4B2513EC}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -15,6 +17,10 @@ Global
|
||||||
{13CDE60E-1975-463B-9DA1-CCB3F3EBABD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{13CDE60E-1975-463B-9DA1-CCB3F3EBABD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{13CDE60E-1975-463B-9DA1-CCB3F3EBABD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{13CDE60E-1975-463B-9DA1-CCB3F3EBABD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{13CDE60E-1975-463B-9DA1-CCB3F3EBABD8}.Release|Any CPU.Build.0 = Release|Any CPU
|
{13CDE60E-1975-463B-9DA1-CCB3F3EBABD8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{D3F32D4B-49DA-46D2-A408-000D4B2513EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D3F32D4B-49DA-46D2-A408-000D4B2513EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D3F32D4B-49DA-46D2-A408-000D4B2513EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{D3F32D4B-49DA-46D2-A408-000D4B2513EC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
@ -201,7 +201,9 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>copy "$(TargetPath)" "C:\Users\Jose Garcia\AppData\Roaming\r2modmanPlus-local\LethalCompany\profiles\SDM Debug\BepInEx\plugins\Alice-DungeonGenerationPlus\$(TargetName).dll"</PostBuildEvent>
|
<PostBuildEvent>copy "$(TargetPath)" "C:\Users\Jose Garcia\AppData\Roaming\r2modmanPlus-local\LethalCompany\profiles\SDM Debug\BepInEx\plugins\Alice-DungeonGenerationPlus\$(TargetName).dll"
|
||||||
|
copy "$(TargetPath)" "D:\Previous Computer\Desktop\LethalCompany Modding\Libraries\$(TargetName).dll"
|
||||||
|
copy "$(TargetPath)" "D:\Previous Computer\Desktop\LethalCompany Modding\DunGenPlus\DunGenPlus\DunGenPlus\DunGenPlus\$(TargetName).dll"</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PreBuildEvent>copy "D:\Previous Computer\Desktop\LethalCompany Modding\Unity Template\Assets\AssetBundles\dungen" "$(ProjectDir)\dungen"</PreBuildEvent>
|
<PreBuildEvent>copy "D:\Previous Computer\Desktop\LethalCompany Modding\Unity Template\Assets\AssetBundles\dungen" "$(ProjectDir)\dungen"</PreBuildEvent>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,82 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{D3F32D4B-49DA-46D2-A408-000D4B2513EC}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>DunGenPlusEditor</RootNamespace>
|
||||||
|
<AssemblyName>DunGenPlusEditor</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Assembly-CSharp-firstpass">
|
||||||
|
<HintPath>..\..\..\Libraries\Assembly-CSharp-firstpass.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Assembly-CSharp-publicized">
|
||||||
|
<HintPath>..\..\..\Libraries\Assembly-CSharp-publicized.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="DunGenPlus">
|
||||||
|
<HintPath>..\..\..\Libraries\DunGenPlus.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="UnityEditor">
|
||||||
|
<HintPath>..\..\..\Libraries\UnityEditor.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="UnityEditor.UIBuilderModule">
|
||||||
|
<HintPath>..\..\..\Libraries\UnityEditor.UIBuilderModule.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="UnityEditor.UIElementsModule">
|
||||||
|
<HintPath>..\..\..\Libraries\UnityEditor.UIElementsModule.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="UnityEngine">
|
||||||
|
<HintPath>..\..\..\Libraries\UnityEngine.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="UnityEngine.CoreModule">
|
||||||
|
<HintPath>..\..\..\Libraries\UnityEngine.CoreModule.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="UnityEngine.TextRenderingModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\..\Libraries\UnityEngine.TextRenderingModule.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="UnityEngine.UIElementsModule">
|
||||||
|
<HintPath>..\..\..\Libraries\UnityEngine.UIElementsModule.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="PropertyOverridePropertyDrawer.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent>copy "$(TargetPath)" "D:\Previous Computer\Desktop\LethalCompany Modding\DunGenPlus\DunGenPlus\DunGenPlus\DunGenPlus\$(TargetName).dll"</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,36 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// アセンブリに関する一般情報は以下を通して制御されます
|
||||||
|
// 制御されます。アセンブリに関連付けられている情報を変更するには、
|
||||||
|
// これらの属性値を変更してください。
|
||||||
|
[assembly: AssemblyTitle("DunGenPlusEditor")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("DunGenPlusEditor")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// ComVisible を false に設定すると、このアセンブリ内の型は COM コンポーネントから
|
||||||
|
// 参照できなくなります。COM からこのアセンブリ内の型にアクセスする必要がある場合は、
|
||||||
|
// その型の ComVisible 属性を true に設定してください。
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// このプロジェクトが COM に公開される場合、次の GUID が typelib の ID になります
|
||||||
|
[assembly: Guid("d3f32d4b-49da-46d2-a408-000d4b2513ec")]
|
||||||
|
|
||||||
|
// アセンブリのバージョン情報は、以下の 4 つの値で構成されています:
|
||||||
|
//
|
||||||
|
// メジャー バージョン
|
||||||
|
// マイナー バージョン
|
||||||
|
// ビルド番号
|
||||||
|
// リビジョン
|
||||||
|
//
|
||||||
|
// すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます
|
||||||
|
// 既定値にすることができます:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,59 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEditor.UIElements;
|
||||||
|
using UnityEngine.UIElements;
|
||||||
|
using DunGenPlus;
|
||||||
|
|
||||||
|
namespace DunGenPlusEditor {
|
||||||
|
[CustomPropertyDrawer(typeof(PropertyOverride<>), true)]
|
||||||
|
public class PropertyOverridePropertyDrawer : PropertyDrawer {
|
||||||
|
|
||||||
|
public override VisualElement CreatePropertyGUI(SerializedProperty property) {
|
||||||
|
|
||||||
|
var container = new VisualElement();
|
||||||
|
|
||||||
|
var box = new Box();
|
||||||
|
box.style.paddingBottom = 4f;
|
||||||
|
box.style.paddingLeft = 4f;
|
||||||
|
box.style.paddingRight = 4f;
|
||||||
|
box.style.paddingTop = 4f;
|
||||||
|
box.style.marginBottom = 8f;
|
||||||
|
|
||||||
|
var label = new Label(property.displayName);
|
||||||
|
var weight = label.style.unityFontStyleAndWeight;
|
||||||
|
weight.value = UnityEngine.FontStyle.Bold;
|
||||||
|
label.style.unityFontStyleAndWeight = weight;
|
||||||
|
box.Add(label);
|
||||||
|
|
||||||
|
var overrideProperty = property.FindPropertyRelative("Override");
|
||||||
|
var valueProperty = property.FindPropertyRelative("Value");
|
||||||
|
|
||||||
|
var overrideItem = new PropertyField(overrideProperty);
|
||||||
|
overrideItem.style.marginLeft = 8f;
|
||||||
|
var valueItem = new PropertyField(valueProperty);
|
||||||
|
valueItem.style.marginLeft = 8f;
|
||||||
|
var valueDefaultItem = new Label("Using DungeonFlow's corresponding values");
|
||||||
|
valueDefaultItem.style.marginLeft = 11f;
|
||||||
|
|
||||||
|
void SetDisplayState(bool state){
|
||||||
|
valueItem.style.display = state ? DisplayStyle.Flex : DisplayStyle.None;
|
||||||
|
valueDefaultItem.style.display = !state ? DisplayStyle.Flex : DisplayStyle.None;
|
||||||
|
}
|
||||||
|
SetDisplayState(overrideProperty.boolValue);
|
||||||
|
overrideItem.RegisterValueChangeCallback(evt => SetDisplayState(evt.changedProperty.boolValue));
|
||||||
|
|
||||||
|
box.Add(overrideItem);
|
||||||
|
box.Add(valueItem);
|
||||||
|
box.Add(valueDefaultItem);
|
||||||
|
|
||||||
|
container.Add(box);
|
||||||
|
|
||||||
|
return container;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue