ghorsington 4 years ago
commit
28e721d61e

+ 513 - 0
.gitignore

@@ -0,0 +1,513 @@
+lib/
+
+# Created by https://www.gitignore.io/api/visualstudio,csharp
+# Edit at https://www.gitignore.io/?templates=visualstudio,csharp
+
+### Csharp ###
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+### VisualStudio ###
+
+# User-specific files
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+
+# Mono auto generated files
+
+# Build results
+
+# Visual Studio 2015/2017 cache/options directory
+# Uncomment if you have tasks that create the project's static files in wwwroot
+
+# Visual Studio 2017 auto generated files
+
+# MSTest test Results
+
+# NUnit
+
+# Build Results of an ATL Project
+
+# Benchmark Results
+
+# .NET Core
+
+# StyleCop
+
+# Files built by Visual Studio
+
+# Chutzpah Test files
+
+# Visual C++ cache files
+
+# Visual Studio profiler
+
+# Visual Studio Trace Files
+
+# TFS 2012 Local Workspace
+
+# Guidance Automation Toolkit
+
+# ReSharper is a .NET coding add-in
+
+# JustCode is a .NET coding add-in
+
+# TeamCity is a build add-in
+
+# DotCover is a Code Coverage Tool
+
+# AxoCover is a Code Coverage Tool
+
+# Visual Studio code coverage results
+
+# NCrunch
+
+# MightyMoose
+
+# Web workbench (sass)
+
+# Installshield output folder
+
+# DocProject is a documentation generator add-in
+
+# Click-Once directory
+
+# Publish Web Output
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+
+# NuGet Packages
+# NuGet Symbol Packages
+# The packages folder can be ignored because of Package Restore
+# except build/, which is used as an MSBuild target.
+# Uncomment if necessary however generally it will be regenerated when needed
+# NuGet v3's project.json files produces more ignorable files
+
+# Microsoft Azure Build Output
+
+# Microsoft Azure Emulator
+
+# Windows Store app package directories and files
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+# but keep track of directories ending in .cache
+
+# Others
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+
+# RIA/Silverlight projects
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+
+# SQL Server files
+
+# Business Intelligence projects
+
+# Microsoft Fakes
+
+# GhostDoc plugin setting file
+
+# Node.js Tools for Visual Studio
+
+# Visual Studio 6 build log
+
+# Visual Studio 6 workspace options file
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+
+# Visual Studio LightSwitch build output
+
+# Paket dependency manager
+
+# FAKE - F# Make
+
+# CodeRush personal settings
+
+# Python Tools for Visual Studio (PTVS)
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+
+# Telerik's JustMock configuration file
+
+# BizTalk build output
+
+# OpenCover UI analysis results
+
+# Azure Stream Analytics local run output
+
+# MSBuild Binary and Structured Log
+
+# NVidia Nsight GPU debugger configuration file
+
+# MFractors (Xamarin productivity tool) working folder
+
+# Local History for Visual Studio
+
+# BeatPulse healthcheck temp database
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+
+# End of https://www.gitignore.io/api/visualstudio,csharp

File diff suppressed because it is too large
+ 1139 - 0
CM3D2.XTMasterSlave.Plugin/CM3D2.XTMasterSlave.2ndWnd.cs


File diff suppressed because it is too large
+ 14920 - 0
CM3D2.XTMasterSlave.Plugin/CM3D2.XTMasterSlave.Plugin.cs


+ 67 - 0
CM3D2.XTMasterSlave.Plugin/COM3D2.XTMasterSlave.Plugin.csproj

@@ -0,0 +1,67 @@
+<?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>{8726B846-D345-4A52-8A65-AE19F246780F}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>CM3D2.XTMasterSlave.Plugin</RootNamespace>
+    <AssemblyName>COM3D2.XTMasterSlave.Plugin</AssemblyName>
+    <TargetFrameworkVersion>v3.5</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>TRACE;DEBUG;COM3D2</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;COM3D2</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Assembly-CSharp">
+      <HintPath>..\lib\Assembly-CSharp.dll</HintPath>
+    </Reference>
+    <Reference Include="Assembly-CSharp-firstpass">
+      <HintPath>..\lib\Assembly-CSharp-firstpass.dll</HintPath>
+    </Reference>
+    <Reference Include="JsonFx.Json">
+      <HintPath>..\lib\JsonFx.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="PluginExt">
+      <HintPath>..\lib\PluginExt.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+    <Reference Include="UnityEngine">
+      <HintPath>..\lib\UnityEngine.dll</HintPath>
+    </Reference>
+    <Reference Include="UnityInjector">
+      <HintPath>..\lib\UnityInjector.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="CM3D2.XTMasterSlave.2ndWnd.cs" />
+    <Compile Include="CM3D2.XTMasterSlave.Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="XtMsHook.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 36 - 0
CM3D2.XTMasterSlave.Plugin/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("CM3D2.XTMasterSlave.Plugin")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("CM3D2.XTMasterSlave.Plugin")]
+[assembly: AssemblyCopyright("Copyright ©  2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("8726b846-d345-4a52-8a65-ae19f246780f")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 40 - 0
CM3D2.XTMasterSlave.Plugin/XtMsHook.cs

@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using UnityEngine;
+
+namespace CM3D2.XtMasterSlave.Plugin
+{
+    class Hook
+    {
+        static XtMasterSlave xtms;
+
+        public static void hookPreAutoTwist(TBody tbody)
+        {
+            if (!xtms)
+                xtms = GameObject.FindObjectOfType<XtMasterSlave>();
+
+            if (xtms)
+                xtms.preTBodyAutoTwist(tbody);
+        }
+
+        /*public static void hookBodyPreLateUpdate(TBody body)
+        {
+            if (!xtms)
+                xtms = GameObject.FindObjectOfType<XtMasterSlave>();
+
+            if (xtms)
+                xtms.preBodyLateUpdate(body);
+        }*/
+        /*
+        public static void hookIKPreLateUpdate(object ikctrl)
+        {
+            if (!xtms)
+                xtms = GameObject.FindObjectOfType<XtMasterSlave>();
+
+            if (xtms)
+                xtms.postIKUpdate(ikctrl);
+        }*/
+    }
+}

+ 665 - 0
COM3D2.XtMasterSlave.IKO132/COM3D2.XtMasterSlave.IKO132.cs

@@ -0,0 +1,665 @@
+#define IKO132
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using static ExtensionMethods.MyExtensions;
+using CM3D2.XtMasterSlave.Plugin;
+using UnityEngine;
+using System.Reflection;
+
+namespace XtMasterSlave_IK_XDLL
+{
+#if IKO132
+    public class IkpInst : IkInst
+    {
+        public const string INFO = "Fixed by @ghorsington on Twitter";
+
+        public static bool boAnime = false; //?
+        public static bool IKBend = false;  //
+
+        public override bool IsNewPointIK(Maid m, string hand = "右手")
+        {
+            var ikP = m.body0.IKCtrl.GetIKData(hand, IKBend).GetIKSettingData(IKCtrlData.IKAttachType.Point);
+            return (ikP.MyType == IKCtrlData.IKAttachType.NewPoint);
+        }
+
+        public override object GetIkPoint(TBody body, string hand = "右手")
+        {
+#if DEBUG
+            if (Input.GetKey(KeyCode.Space))
+            {
+                IKBend = true;
+                Console.WriteLine("IKBend: ON");
+            }
+            else
+            {
+                IKBend = false;
+            }
+#endif
+            var obj = body.IKCtrl.GetIKData(hand, IKBend).GetIKSettingData(IKCtrlData.IKAttachType.Point);
+            if (obj == null)
+                obj = body.IKCtrl.GetIKData(hand, IKBend).GetIKSettingData(IKCtrlData.IKAttachType.NewPoint);
+
+            return obj;
+        }
+
+        public override object GetIkCtrl(Maid maid)
+        {
+            return maid.IKCtrl;
+        }
+
+        public override object GetIkCtrlPoint(TBody body, string hand = "右手")
+        {
+#if DEBUG
+            if (Input.GetKey(KeyCode.Space))
+            {
+                IKBend = true;
+                Console.WriteLine("IKBend: ON");
+            }
+            else
+            {
+                IKBend = false;
+            }
+#endif
+            var obj = body.IKCtrl.GetIKData(hand, IKBend);
+            return obj;
+        }
+
+        private IKCtrlData.IKAttachType GetDefType(XtMasterSlave.MsLinkConfig mscfg)
+        {
+            if (mscfg.doIK159NewPointToDef)
+            {
+                return IKCtrlData.IKAttachType.NewPoint;
+            }
+            else
+            {
+                return IKCtrlData.IKAttachType.Point;
+            }
+        }
+
+        public override void IkClear(Maid tgt, XtMasterSlave.MsLinkConfig mscfg)
+        {
+            List<string> listHand = new List<string> { "右手", "左手" };
+            IkClear(tgt, listHand, mscfg);
+        }
+
+        //public override void IkClear(Maid tgt, List<string> listHand, XtMasterSlave.MsLinkConfig mscfg, IKCtrlData.IKAttachType IkType = (IKCtrlData.IKAttachType)(-1))
+        public override void IkClear(Maid tgt, List<string> listHand, XtMasterSlave.MsLinkConfig mscfg, int IkType = (-1))
+        {
+            List<IKCtrlData.IKAttachType> listTypes = new List<IKCtrlData.IKAttachType>
+                                    { IKCtrlData.IKAttachType.NewPoint, IKCtrlData.IKAttachType.Rotate };
+
+            listHand.ToList().ForEach(h =>
+            {
+                var ctrl = tgt.body0.IKCtrl.GetIKData(h, IKBend);
+                listTypes.ForEach(t =>
+                {
+                    var iks = ctrl.GetIKSettingData(t);
+
+                    if (IkXT.IsIkCtrlO117)
+                    {
+                        ctrl.SetIKSetting(t, IKCtrlData.IKExecTiming.Normal, null, string.Empty, null, Vector3.zero);
+                        ctrl.Detach(t);
+                        //ctrl.SetIKSetting(t, false, null, -1, string.Empty, null, null, Vector3.zero, false, 0f);
+                        //iks.SetIKSetting(null, -1, string.Empty, null, null, Vector3.zero, false, 0f);
+                        //ctrl.Detach(t, 0f);
+                    }
+                    else
+                    {
+                        //iks.TgtMaid = null;
+                        //iks.Tgt_AttachSlot = -1;
+                        //iks.Tgt_AttachName = string.Empty;
+                        //iks.Target = null;
+                        //iks.AxisTgt = null;
+                        //iks.TgtOffset = Vector3.zero;
+                        //iks.IsTgtAxis
+                    }
+
+                    if (iks.MyType != IKCtrlData.IKAttachType.Rotate)
+                    {
+                        if (IkType >= 0 && IkType != (int)IKCtrlData.IKAttachType.Rotate
+                                && Enum.IsDefined(typeof(IKCtrlData.IKAttachType), IkType))
+                        {
+                            iks.ChangeIKType((IKCtrlData.IKAttachType)IkType);
+                        }
+                        else
+                        {
+                            if (mscfg != null)
+                                iks.ChangeIKType(GetDefType(mscfg));/*fix v5.0
+                            else
+                                iks.ChangePointType(IKCtrlData.IKAttachType.NewPoint);*/
+                        }
+                    }
+                });
+            });
+        }
+
+        public override void CopyHandIK(Maid master, Maid slave, XtMasterSlave.v3Offsets[] v3ofs, int num_)
+        {
+            List<string> listHand = new List<string> { "右手", "左手" };
+            List<IKCtrlData.IKAttachType> listTypes = new List<IKCtrlData.IKAttachType>
+                                    { IKCtrlData.IKAttachType.NewPoint, IKCtrlData.IKAttachType.Rotate };
+
+            listHand.ToList().ForEach(h =>
+            {
+                var ikcm = master.body0.IKCtrl.GetIKData(h, IKBend);
+                var ikcs = slave.body0.IKCtrl.GetIKData(h, IKBend);
+                listTypes.ForEach(t =>
+                {
+                    var ikm = ikcm.GetIKSettingData(t);
+                    var iks = ikcs.GetIKSettingData(t);
+
+                    if (!(string.IsNullOrEmpty(ikm.curTargetData.Tgt_AttachName) && ikm.curTargetData.Target == null))
+                    {
+                        //Console.WriteLine("{0} {1} -> {2} {3} {4}", h, t, ikm.MyType, ikm.Tgt_AttachName, ikm.Target);
+
+                        if (iks.MyType != IKCtrlData.IKAttachType.Rotate)
+                        {
+                            if (ikm.MyType != IKCtrlData.IKAttachType.Rotate)
+                            {
+                                iks.ChangeIKType(ikm.MyType);
+                            }
+                        }
+
+                        float fixAngle(float angle)
+                        {
+                            while (Mathf.Abs(angle) > 360f)
+                            {
+                                angle = ((!(angle < 0f)) ? (angle - 360f) : (angle + 360f));
+                            }
+                            return angle;
+                        }
+
+                        if (IkXT.IsIkCtrlO117)
+                        {
+                            ikcs.SetIKSetting(t, IKCtrlData.IKExecTiming.Normal, ikm.curTargetData.TgtChara, ikm.curTargetData.Tgt_AttachSlot, ikm.curTargetData.Tgt_AttachName, ikm.curTargetData.AxisTgt, ikm.curTargetData.Target, ikm.curTargetData.TgtOffset, ikm.DoAnimation);
+                            //ikcs.SetIKSetting(t, false, ikm.TgtMaid, ikm.Tgt_AttachSlot, ikm.Tgt_AttachName, ikm.AxisTgt, ikm.Target, ikm.TgtOffset, ikm.DoAnimation, ikm.BlendTime);
+                            //iks.SetIKSetting(ikm.TgtMaid, ikm.Tgt_AttachSlot, ikm.Tgt_AttachName, ikm.AxisTgt, ikm.Target, ikm.TgtOffset, ikm.DoAnimation, ikm.BlendTime);
+                        }
+                        else
+                        {
+                            //iks.TgtMaid = ikm.TgtMaid;
+                            //iks.Tgt_AttachSlot = ikm.Tgt_AttachSlot;
+                            //iks.Tgt_AttachName = ikm.Tgt_AttachName;
+                            //iks.Target = ikm.Target;
+                            //iks.AxisTgt = ikm.AxisTgt;
+                        }
+
+                        if (iks.IsPointAttach)
+                        {
+                            iks.curTargetData.TgtOffset = ikm.curTargetData.TgtOffset;
+                            if (h == "右手")
+                                iks.curTargetData.TgtOffset += v3ofs[num_].v3HandROffset;
+                            else
+                                iks.curTargetData.TgtOffset += v3ofs[num_].v3HandLOffset;
+                        }
+                        else
+                        {
+                            Vector3 v3rot = Vector3.zero;
+                            if (h == "右手")
+                                v3rot = v3ofs[num_].v3HandROffsetRot;
+                            else
+                                v3rot = v3ofs[num_].v3HandLOffsetRot;
+
+                            iks.curTargetData.TgtOffset.x = fixAngle(ikm.curTargetData.TgtOffset.x + v3rot.x);
+                            iks.curTargetData.TgtOffset.y = fixAngle(ikm.curTargetData.TgtOffset.y + v3rot.y);
+                            iks.curTargetData.TgtOffset.z = fixAngle(ikm.curTargetData.TgtOffset.z + v3rot.z);
+                        }
+                    }
+
+                });
+            });
+
+            //needInit = true;
+        }
+        
+        public override void SetHandIKRotate(string handName, Maid master, Maid slave, string boneTgtname, Vector3 v3HandLOffsetRot)
+        {
+            slave.IKTargetToBone(handName, master, boneTgtname, v3HandLOffsetRot, IKCtrlData.IKAttachType.Rotate, false, boAnime, IKCtrlData.IKExecTiming.Normal);
+
+            //slave.IKTargetToBone(handName, master, boneTgtname, v3HandLOffsetRot, IKCtrlData.IKAttachType.Rotate, false, 0f, boAnime, false);
+        }
+
+        public override void SetHandIKTarget(XtMasterSlave.MsLinkConfig mscfg, string handName, Maid master, Maid slave, int slot_no, string attach_name, Transform target, Vector3 v3HandLOffset)
+        {
+            /*if (needInit)
+            {
+                needInit = false;
+                if (mscfg.doIK159NewPointToDef)
+                    IKInit(slave, mscfg);
+#if DEBUG
+                else
+                    IKInit4OldPoint(slave);
+#endif
+            }*/
+
+            slave.IKCtrl.GetIKData(handName, IKBend).SetIKSetting(GetDefType(mscfg), IKCtrlData.IKExecTiming.Normal, master, slot_no, attach_name, null, target, v3HandLOffset, boAnime);
+
+            HandFootIKData ikdata = slave.IKCtrl.GetIKData<HandFootIKData>(handName);
+            ikdata.CorrectType = HandFootIKData.BorderCorrectType.Bone;
+        }
+
+        bool needInit = true;
+        static string bodytgt = "dummyBodyTgtXt";
+        //RootMotion.FinalIK.FullBodyBipedIK m_FullbodyIK;
+#if DEBUG
+        /*GameObject goBodyTgt = new GameObject("dummyBodyTgtXt");
+        RootMotion.FinalIK.FullBodyBipedIK m_FullbodyIK;
+        GameObject goTgtSR = new GameObject("xtTgtSR");
+        GameObject goTgtSL = new GameObject("xtTgtSL");*/
+#endif
+
+        Dictionary<Maid, string> lastAnimeFNs = new Dictionary<Maid, string>();
+        private void IKInit(Maid slave, XtMasterSlave.MsLinks ms, XtMasterSlave.MsLinkConfig mscfg)
+        {
+            var fik = slave.body0.IKCtrl.GetNonPublicField<RootMotion.FinalIK.FullBodyBipedIK>("m_FullbodyIK");
+            RootMotion.FinalIK.FullBodyBipedIK FullbodyIK = fik;
+            var solver = FullbodyIK.solver;
+            string[] tgtlist = new string[] { "IKTarget", "BendBone", "ChainRootBone" };
+
+            bool animStop = true; //モーション停止中
+            if (ms.doMasterSlave && !mscfg.doStackSlave_PosSyncMode)
+            {
+                animStop = false;
+            }
+            else
+            {
+                Animation anim = slave.body0.m_Bones.GetComponent<Animation>();
+                animStop = !anim.isPlaying;
+            }
+
+            if (!lastAnimeFNs.ContainsKey(slave) || slave.body0.LastAnimeFN != lastAnimeFNs[slave])
+            {
+                lastAnimeFNs[slave] = slave.body0.LastAnimeFN;
+                animStop = false;
+            }
+
+            solver.spineStiffness = 1f;      //背骨の硬さ
+            solver.pullBodyVertical = 0.5f;  //ボディエフェクター位置補正
+            solver.pullBodyHorizontal = 0f;
+            solver.spineMapping.twistWeight = 0f;
+
+            foreach (var e in solver.effectors)
+            {
+                if (animStop)
+                {
+                    e.positionWeight = 1f;
+                    e.rotationWeight = 0f;
+                }
+                else
+                {
+                    e.PinToBone(1f, 0f);
+                }
+
+                var tgtname = e.target.gameObject.name;
+
+                if (tgtlist.Contains(tgtname))
+                {
+                    // COM3D2標準ターゲット
+                    e.target.transform.position = e.bone.position;
+                    e.target.transform.rotation = e.bone.rotation;
+                }
+            }
+
+            solver.rightShoulderEffector.positionWeight = 0.95f;
+            solver.leftShoulderEffector.positionWeight = 0.95f;
+
+            solver.bodyEffector.rotationWeight = 1f;
+
+            solver.rightThighEffector.positionWeight = 0.95f;
+            solver.leftThighEffector.positionWeight = 0.95f;
+
+            if (mscfg != null && mscfg.doFinalIKShoulderMove)
+            {
+                solver.rightShoulderEffector.positionWeight = 0f;
+                solver.leftShoulderEffector.positionWeight = 0f;
+            }
+            if (mscfg != null && mscfg.doFinalIKThighMove)
+            { 
+                solver.bodyEffector.rotationWeight = 0f;
+
+                solver.rightThighEffector.positionWeight = 0f;
+                solver.leftThighEffector.positionWeight = 0f;
+            }
+
+            foreach (var m in solver.limbMappings)
+            {
+                m.weight = 1f;
+                m.maintainRotationWeight = 0f;
+            }
+
+            if (mscfg != null)
+            {
+                solver.rightLegMapping.weight = mscfg.fFinalIKLegWeight; //0.5f;
+                solver.leftLegMapping.weight = mscfg.fFinalIKLegWeight; //0.5f;
+            }
+            solver.rightLegMapping.maintainRotationWeight = 1f;
+            solver.leftLegMapping.maintainRotationWeight = 1f;
+        }
+
+#region for TEST
+#if DEBUG
+        private void IKInit4OldPoint(Maid slave)
+        {
+            var fik = slave.body0.IKCtrl.GetNonPublicField<RootMotion.FinalIK.FullBodyBipedIK>("m_FullbodyIK");
+            RootMotion.FinalIK.FullBodyBipedIK FullbodyIK = fik;
+            var solver = FullbodyIK.solver;
+            string[] tgtlist = new string[] { "IKTarget", "BendBone", "ChainRootBone" };
+
+            solver.spineStiffness = 1f;      //背骨の硬さ
+            solver.pullBodyVertical = 0f;  //ボディエフェクター位置補正
+            solver.pullBodyHorizontal = 0f;
+            solver.spineMapping.twistWeight = 0f;
+
+            foreach (var e in solver.effectors)
+            {
+                e.PinToBone(1f, 1f);
+
+                var tgtname = e.target.gameObject.name;
+
+                if (tgtlist.Contains(tgtname))
+                {
+                    // COM3D2標準ターゲット
+                    e.target.transform.position = e.bone.position;
+                    e.target.transform.rotation = e.bone.rotation;
+                }
+            }
+            
+            foreach(var m in solver.limbMappings)
+            {
+                m.weight = 0f;
+                m.maintainRotationWeight = 1f;
+            }
+        }
+
+        private void IKInit2(Maid slave)
+        {
+            var fik = slave.body0.IKCtrl.GetNonPublicField<RootMotion.FinalIK.FullBodyBipedIK>("m_FullbodyIK");
+            RootMotion.FinalIK.FullBodyBipedIK FullbodyIK = fik;
+            var solver = FullbodyIK.solver;
+            string[] tgtlist = new string[] { "IKTarget", "BendBone", "ChainRootBone" };
+            string[] bendlist = new string[] { "BendBone", };
+            /*
+#if DEBUG
+            solver.spineStiffness = 1f;      //背骨の硬さ
+            //solver.rightLegMapping.weight = 0f;
+            //solver.leftLegMapping.weight = 0f;
+            if (!solver.bodyEffector.target || solver.bodyEffector.target.gameObject.name != bodytgt)
+                solver.bodyEffector.target = new GameObject(bodytgt).transform;
+            solver.bodyEffector.positionWeight = 1f;
+            solver.bodyEffector.rotationWeight = 1f;
+            solver.rightShoulderEffector.positionWeight = 0.95f;
+            solver.leftShoulderEffector.positionWeight = 0.95f;
+            solver.rightShoulderEffector.rotationWeight = 0.5f;
+            solver.leftShoulderEffector.rotationWeight = 0.5f;
+
+            solver.leftThighEffector.positionWeight = 1f;
+            solver.leftThighEffector.rotationWeight = 0.5f;
+            solver.rightThighEffector.positionWeight = 1f;
+            solver.rightThighEffector.rotationWeight = 0.5f;
+            solver.leftFootEffector.positionWeight = 1.0f;
+            solver.rightFootEffector.positionWeight = 1.0f;
+
+            if (!solver.rightThighEffector.target || solver.rightThighEffector.target.gameObject.name != bodytgt)
+                solver.rightThighEffector.target = new GameObject(bodytgt).transform;
+            if (!solver.leftThighEffector.target || solver.leftThighEffector.target.gameObject.name != bodytgt)
+                solver.leftThighEffector.target = new GameObject(bodytgt).transform;
+
+            if (!solver.rightFootEffector.target || solver.rightFootEffector.target.gameObject.name != bodytgt)
+                solver.rightFootEffector.target = new GameObject(bodytgt).transform;
+            if (!solver.leftFootEffector.target || solver.leftFootEffector.target.gameObject.name != bodytgt)
+                solver.leftFootEffector.target = new GameObject(bodytgt).transform;
+
+            solver.rightLegMapping.weight = 0.2f;
+            solver.leftLegMapping.weight = 0.2f;
+            //Sync(solver.leftArmChain.bendConstraint.bendGoal.transform, solver.leftArmMapping.bone2);
+            //Sync(solver.rightArmChain.bendConstraint.bendGoal.transform, solver.rightArmMapping.bone2);
+            foreach (var e in solver.effectors)
+            {
+                Sync(e);
+                var tgtname = e.target.gameObject.name;
+
+                if (tgtlist.Contains(tgtname) || tgtname == bodytgt)
+                {
+                    // COM3D2標準ターゲット
+                    e.target.transform.position = e.bone.position;
+                    e.target.transform.rotation = e.bone.rotation;
+                }
+                else if (bendlist.Contains(tgtname))
+                {
+                    // COM3D2標準ターゲット
+                    e.target.transform.position = e.bone.position;
+                    e.target.transform.rotation = e.bone.rotation;
+                }
+            }
+            return;
+#endif
+
+            */
+            solver.spineStiffness = 1f;      //背骨の硬さ
+            solver.pullBodyVertical = 0.5f;  //ボディエフェクター位置補正
+            solver.pullBodyHorizontal = 0f;
+
+            foreach (var e in solver.effectors)
+            {
+
+                e.PinToBone(1f, 0f);
+#if DEBUG
+                e.PinToBone(1f, 1f);
+#endif
+                var tgtname = e.target.gameObject.name;
+
+                if (tgtlist.Contains(tgtname))
+                {
+                    // COM3D2標準ターゲット
+                    e.target.transform.position = e.bone.position;
+                    e.target.transform.rotation = e.bone.rotation;
+                }
+            }
+            solver.rightShoulderEffector.positionWeight = 0.95f;
+            solver.leftShoulderEffector.positionWeight = 0.95f;
+            solver.bodyEffector.rotationWeight = 1f;
+
+            solver.rightLegMapping.maintainRotationWeight = 0f;
+            solver.leftLegMapping.maintainRotationWeight = 0f;
+            solver.rightLegMapping.weight = 0f;
+            solver.leftLegMapping.weight = 0f;
+
+            solver.rightArmMapping.maintainRotationWeight = 0f;
+            solver.leftArmMapping.maintainRotationWeight = 0f;
+            solver.rightArmMapping.weight = 1f;
+            solver.leftArmMapping.weight = 1f;
+        }
+
+        private void IKInitTest(Maid slave, string handName)
+        {
+            var fik = slave.body0.IKCtrl.GetNonPublicField<RootMotion.FinalIK.FullBodyBipedIK>("m_FullbodyIK");
+            RootMotion.FinalIK.FullBodyBipedIK FullbodyIK = fik;
+
+            var solver = FullbodyIK.solver;
+            if (handName.Contains("右"))
+            {
+                //solver.rightLegMapping.weight = 0f;
+                //solver.spineMapping.twistWeight = 0f;
+
+                //m_FullbodyIK.references.root = slave.gameObject.transform;
+                //solver.SetToReferences(FullbodyIK.references, null);
+                solver.spineStiffness = 1f;
+                solver.pullBodyVertical = 0f;
+                solver.pullBodyHorizontal = 0f;
+
+                if (Input.GetKey(KeyCode.LeftAlt))
+                {
+                    solver.spineStiffness = 0f;
+                    solver.pullBodyVertical = 1f;
+                }
+                foreach (var e in solver.effectors)
+                {
+                    if (Input.GetKey(KeyCode.RightAlt))
+                        e.PinToBone(0.25f, 1f);
+                    else if (Input.GetKey(KeyCode.RightShift))
+                        e.PinToBone(0.5f, 0f);
+                    else if (Input.GetKey(KeyCode.RightControl))
+                        e.PinToBone(0f, 1f);
+                    else
+                        e.PinToBone(1f, 1f);
+                }
+                solver.rightLegMapping.maintainRotationWeight = 1f;
+                solver.leftLegMapping.maintainRotationWeight = 1f;
+
+                if (Input.GetKey(KeyCode.Space))
+                    solver.rightLegMapping.weight = 1f;
+                else if (Input.GetKey(KeyCode.Keypad0))
+                    solver.rightLegMapping.weight = 0f;
+                else
+                    solver.rightLegMapping.weight = 0.5f;
+
+                /*Sync(solver.bodyEffector);
+                Sync(solver.rightFootEffector);
+                Sync(solver.rightThighEffector);
+                Sync(solver.rightShoulderEffector);
+                WeightZero(solver.rightFootEffector);
+                WeightZero(solver.rightThighEffector);
+                WeightZero(solver.rightShoulderEffector);*/
+            }
+            else
+            {
+                solver.leftLegMapping.maintainRotationWeight = 1f;
+                if (Input.GetKey(KeyCode.Space))
+                    solver.leftLegMapping.weight = 1f;
+                else if (Input.GetKey(KeyCode.Keypad0))
+                    solver.leftLegMapping.weight = 0f;
+                else
+                    solver.leftLegMapping.weight = 0.5f;
+
+                /*Sync(solver.leftFootEffector);
+                Sync(solver.leftThighEffector);
+                Sync(solver.leftShoulderEffector);
+                WeightZero(solver.leftFootEffector);
+                WeightZero(solver.leftThighEffector);
+                WeightZero(solver.leftShoulderEffector);*/
+            }
+        }
+#endif
+#endregion
+
+        private static void Sync(Transform tr1, Transform tr2)
+        {
+            tr1.position = tr2.position;
+            tr1.rotation = tr2.rotation;
+        }
+        private static void Sync(RootMotion.FinalIK.IKEffector eff)
+        {
+            eff.position = eff.bone.position;
+            eff.rotation = eff.bone.rotation;
+            /*eff.target.position = eff.bone.position;
+            eff.target.rotation = eff.bone.rotation;
+            eff.PinToBone(1f, 1f);*/
+        }
+        private static void WeightZero(RootMotion.FinalIK.IKEffector eff)
+        {
+            eff.positionWeight = 0f;
+            eff.rotationWeight = 0f;
+        }
+
+        public override object GetIKCmo(TBody body, string hand = "右手")
+        {
+            return body.IKCtrl.GetIKData(hand, IKBend).IKCmo;
+
+            /*
+            if (hand == "右手")
+                return body.IKCtrl.GetIKData("右手").IKCmo;
+            else
+                return body.IKCtrl.GetIKData("左手").IKCmo;
+                */
+        }
+
+        public override bool IKUpdate(TBody body)
+        {
+            body.IKCtrl.IKUpdate();
+            return true;
+        }
+
+        public override bool GetIKCmoPosRot(TBody body, out Vector3 pos, out Quaternion rot, string hand = "右手")
+        {
+            var ctrl = body.IKCtrl.GetIKData(hand, IKBend);
+            bool proc = false;
+
+            pos = Vector3.zero;
+            rot = Quaternion.identity;
+
+            var data = ctrl.GetIKSettingData(IKCtrlData.IKAttachType.Point);
+            if (data.curTargetData.Target != null)
+            {
+                pos = data.curTargetData.Target.position;
+                rot = data.curTargetData.Target.rotation;
+                proc = true;
+            }
+            else if (data.curTargetData.Tgt_AttachName != string.Empty)
+            {
+                if (data.curTargetData.TgtChara != null && data.curTargetData.TgtChara.body0 != null && data.curTargetData.Tgt_AttachSlot >= 0 && data.curTargetData.TgtChara.body0.goSlot[data.curTargetData.Tgt_AttachSlot].morph != null)
+                {
+                    Vector3 vector;
+                    data.curTargetData.TgtChara.body0.goSlot[data.curTargetData.Tgt_AttachSlot].morph.GetAttachPoint(data.curTargetData.Tgt_AttachName, out pos, out rot, out vector, false);
+                    proc = true;
+                }
+                else
+                {
+                    data.curTargetData.Tgt_AttachName = string.Empty;
+                }
+            }
+
+            return proc;
+        }
+
+        public override bool IKCmoUpdate(TBody body, Transform trh, Vector3 offset, string hand = "右手")
+        {
+            var ctrl = body.IKCtrl.GetIKData(hand, IKBend);
+            /*ctrl.MyIKCtrl.GetType().GetProperty("IsUpdateEnd").SetValue(ctrl.MyIKCtrl, true, null);
+            ctrl.MyIKCtrl.IsUpdateLate = false;
+            ctrl.ApplyIKSetting();
+            */
+
+            Vector3 pos = Vector3.zero;
+            Quaternion rot = Quaternion.identity;
+            bool proc = GetIKCmoPosRot(body, out pos, out rot, hand);
+
+            if (proc)
+            {
+                ctrl.IKCmo.Porc(trh.parent.parent, trh.parent, trh, pos, rot * offset, ctrl);
+                return true;
+            }
+            return false;
+        }
+
+        public override bool UpdateFinalIK(Maid maid, XtMasterSlave.MsLinks ms, XtMasterSlave.MsLinkConfig mscfg)
+        {
+            if (!maid || !maid.body0)
+                return false;
+
+            needInit = false;
+            if (mscfg.doIK159NewPointToDef)
+                IKInit(maid, ms, mscfg);
+#if DEBUG
+            else
+                IKInit4OldPoint(maid);
+#endif
+            return true; // 実行できたか
+        }
+    }
+#endif
+}
+
+public static class Extentions
+{
+    public static T GetNonPublicField<T>(this object obj, string name)
+    {
+        var ret = obj.GetType().GetField(name, BindingFlags.Instance | BindingFlags.NonPublic).GetValue(obj);
+        
+        if (ret is T)
+            return (T)ret;
+        return default(T);
+    }
+}

+ 62 - 0
COM3D2.XtMasterSlave.IKO132/COM3D2.XtMasterSlave.IKO132.csproj

@@ -0,0 +1,62 @@
+<?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>{7E739022-517F-4FDC-A679-8825E2FDFF3B}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>COM3D2.XtMasterSlave.IKO132</RootNamespace>
+    <AssemblyName>COM3D2.XtMasterSlave.IKO132</AssemblyName>
+    <TargetFrameworkVersion>v3.5</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">
+      <HintPath>..\lib\Assembly-CSharp.dll</HintPath>
+    </Reference>
+    <Reference Include="Assembly-CSharp-firstpass">
+      <HintPath>..\lib\Assembly-CSharp-firstpass.dll</HintPath>
+    </Reference>
+    <Reference Include="PluginExt">
+      <HintPath>..\lib\PluginExt.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Core" />
+    <Reference Include="UnityEngine">
+      <HintPath>..\lib\UnityEngine.dll</HintPath>
+    </Reference>
+    <Reference Include="UnityInjector">
+      <HintPath>..\lib\UnityInjector.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="COM3D2.XtMasterSlave.IKO132.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\CM3D2.XTMasterSlave.Plugin\COM3D2.XTMasterSlave.Plugin.csproj">
+      <Project>{8726b846-d345-4a52-8a65-ae19f246780f}</Project>
+      <Name>COM3D2.XTMasterSlave.Plugin</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 36 - 0
COM3D2.XtMasterSlave.IKO132/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("COM3D2.XtMasterSlave.IKO132")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("COM3D2.XtMasterSlave.IKO132")]
+[assembly: AssemblyCopyright("Copyright ©  2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("7e739022-517f-4fdc-a679-8825e2fdff3b")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 31 - 0
XTMasterSlave.sln

@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29215.179
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "COM3D2.XTMasterSlave.Plugin", "CM3D2.XTMasterSlave.Plugin\COM3D2.XTMasterSlave.Plugin.csproj", "{8726B846-D345-4A52-8A65-AE19F246780F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "COM3D2.XtMasterSlave.IKO132", "COM3D2.XtMasterSlave.IKO132\COM3D2.XtMasterSlave.IKO132.csproj", "{7E739022-517F-4FDC-A679-8825E2FDFF3B}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{8726B846-D345-4A52-8A65-AE19F246780F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{8726B846-D345-4A52-8A65-AE19F246780F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{8726B846-D345-4A52-8A65-AE19F246780F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{8726B846-D345-4A52-8A65-AE19F246780F}.Release|Any CPU.Build.0 = Release|Any CPU
+		{7E739022-517F-4FDC-A679-8825E2FDFF3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{7E739022-517F-4FDC-A679-8825E2FDFF3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{7E739022-517F-4FDC-A679-8825E2FDFF3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{7E739022-517F-4FDC-A679-8825E2FDFF3B}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {D9F793F5-71B3-496D-A694-1ABD661D4184}
+	EndGlobalSection
+EndGlobal