Merge branch 'RHeavenStudio:master' into acrobat
This commit is contained in:
commit
98e095432a
2
.github/workflows/activation.yml
vendored
2
.github/workflows/activation.yml
vendored
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
|
|
||||||
# Upload artifact (Unity_v20XX.X.XXXX.alf)
|
# Upload artifact (Unity_v20XX.X.XXXX.alf)
|
||||||
- name: Expose as artifact
|
- name: Expose as artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
|
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
|
||||||
path: ${{ steps.getManualLicenseFile.outputs.filePath }}
|
path: ${{ steps.getManualLicenseFile.outputs.filePath }}
|
||||||
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
|
@ -2,7 +2,7 @@ name: Build Heaven Studio
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master", "release_1", "actions_rework" ]
|
branches: [ "master", "release_1_patches" ]
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -35,12 +35,12 @@ jobs:
|
||||||
swap-storage: false
|
swap-storage: false
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
# with:
|
# with:
|
||||||
# lfs: true
|
# lfs: true
|
||||||
|
|
||||||
# Cache reused Library files to speed up compilation
|
# Cache reused Library files to speed up compilation
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v4.0.0
|
||||||
with:
|
with:
|
||||||
path: Library
|
path: Library
|
||||||
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
|
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
|
||||||
|
|
@ -56,7 +56,7 @@ jobs:
|
||||||
# githubToken: ${{ secrets.GITHUB_TOKEN }}
|
# githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
uses: game-ci/unity-builder@v2
|
uses: game-ci/unity-builder@v4
|
||||||
env:
|
env:
|
||||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||||
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
||||||
|
|
|
||||||
25
.github/workflows/cherry-tirage.yml
vendored
Normal file
25
.github/workflows/cherry-tirage.yml
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
types: ["closed"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cherry_no_future_to_current:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Cherry pick into current release
|
||||||
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'release-2') }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Cherry pick into current release
|
||||||
|
uses: xealth/cherry-pick-action@v1.0.0
|
||||||
|
with:
|
||||||
|
branch: release_1_patches
|
||||||
|
labels: |
|
||||||
|
cherry-pick
|
||||||
|
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
7
.vscode/settings.json
vendored
7
.vscode/settings.json
vendored
|
|
@ -51,5 +51,10 @@
|
||||||
"temp/": true,
|
"temp/": true,
|
||||||
"Temp/": true
|
"Temp/": true
|
||||||
},
|
},
|
||||||
"dotnet.defaultSolution": "HeavenStudio.sln"
|
"dotnet.defaultSolution": "HeavenStudio.sln",
|
||||||
|
"files.autoSave": "off",
|
||||||
|
"editor.inlineSuggest.showToolbar": "always",
|
||||||
|
"editor.definitionLinkOpensInPeek": true,
|
||||||
|
"editor.gotoLocation.multipleDefinitions": "gotoAndPeek",
|
||||||
|
"editor.gotoLocation.alternativeDefinitionCommand": "editor.action.peekDefinition"
|
||||||
}
|
}
|
||||||
|
|
@ -22,7 +22,7 @@ namespace UnityBuilderAction
|
||||||
string appName = PlayerSettings.productName;
|
string appName = PlayerSettings.productName;
|
||||||
// Get filename.
|
// Get filename.
|
||||||
string path = EditorUtility.SaveFilePanel("Build out WINDOWS to...", "", appName, "exe");
|
string path = EditorUtility.SaveFilePanel("Build out WINDOWS to...", "", appName, "exe");
|
||||||
Build( BuildTarget.StandaloneWindows, 0, path);
|
Build( BuildTarget.StandaloneWindows64, 0, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
[MenuItem("File/Build Linux")]
|
[MenuItem("File/Build Linux")]
|
||||||
|
|
@ -225,7 +225,7 @@ namespace UnityBuilderAction
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(assetBundleDirectory);
|
Directory.CreateDirectory(assetBundleDirectory);
|
||||||
}
|
}
|
||||||
BuildPipeline.BuildAssetBundles(assetBundleDirectory, BuildAssetBundleOptions.ForceRebuildAssetBundle, buildTarget);
|
BuildPipeline.BuildAssetBundles(assetBundleDirectory, BuildAssetBundleOptions.ForceRebuildAssetBundle | BuildAssetBundleOptions.ChunkBasedCompression, buildTarget);
|
||||||
|
|
||||||
BuildSummary buildSummary = BuildPipeline.BuildPlayer(buildPlayerOptions).summary;
|
BuildSummary buildSummary = BuildPipeline.BuildPlayer(buildPlayerOptions).summary;
|
||||||
ReportSummary(buildSummary);
|
ReportSummary(buildSummary);
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,61 @@
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEditor.Build;
|
|
||||||
using UnityEditor.Build.Reporting;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
using SatorImaging.UnitySourceGenerator.Editor;
|
||||||
|
using HeavenStudio;
|
||||||
|
|
||||||
public class CreateAssetBundles
|
public class CreateAssetBundles
|
||||||
{
|
{
|
||||||
[MenuItem("Assets/Build AssetBundles")]
|
[MenuItem("Assets/Build AssetBundles/Current Platform")]
|
||||||
static void BuildAllAssetBundles()
|
static void BuildAllAssetBundlesCurrPlatform()
|
||||||
{
|
{
|
||||||
string assetBundleDirectory = "Assets/StreamingAssets";
|
string assetBundleDirectory = "Assets/StreamingAssets";
|
||||||
if (!Directory.Exists(Application.streamingAssetsPath))
|
if (!Directory.Exists(Application.streamingAssetsPath))
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(assetBundleDirectory);
|
Directory.CreateDirectory(assetBundleDirectory);
|
||||||
|
}
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
USGUtility.ForceGenerateByType(typeof(Minigames));
|
||||||
|
BuildPipeline.BuildAssetBundles(assetBundleDirectory, BuildAssetBundleOptions.ChunkBasedCompression, EditorUserBuildSettings.activeBuildTarget);
|
||||||
}
|
}
|
||||||
BuildPipeline.BuildAssetBundles(assetBundleDirectory, BuildAssetBundleOptions.None, EditorUserBuildSettings.activeBuildTarget);
|
|
||||||
|
[MenuItem("Assets/Build AssetBundles/Windows")]
|
||||||
|
static void BuildAllAssetBundlesWindows()
|
||||||
|
{
|
||||||
|
string assetBundleDirectory = "Assets/StreamingAssets/Windows";
|
||||||
|
if (!Directory.Exists(Application.streamingAssetsPath))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(assetBundleDirectory);
|
||||||
|
}
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
USGUtility.ForceGenerateByType(typeof(Minigames));
|
||||||
|
BuildPipeline.BuildAssetBundles(assetBundleDirectory, BuildAssetBundleOptions.ChunkBasedCompression, BuildTarget.StandaloneWindows);
|
||||||
|
}
|
||||||
|
|
||||||
|
[MenuItem("Assets/Build AssetBundles/Linux")]
|
||||||
|
static void BuildAllAssetBundlesLinux()
|
||||||
|
{
|
||||||
|
string assetBundleDirectory = "Assets/StreamingAssets/Linux";
|
||||||
|
if (!Directory.Exists(Application.streamingAssetsPath))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(assetBundleDirectory);
|
||||||
|
}
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
USGUtility.ForceGenerateByType(typeof(Minigames));
|
||||||
|
BuildPipeline.BuildAssetBundles(assetBundleDirectory, BuildAssetBundleOptions.ChunkBasedCompression, BuildTarget.StandaloneLinux64);
|
||||||
|
}
|
||||||
|
|
||||||
|
[MenuItem("Assets/Build AssetBundles/Mac")]
|
||||||
|
static void BuildAllAssetBundlesMacOS()
|
||||||
|
{
|
||||||
|
string assetBundleDirectory = "Assets/StreamingAssets/Mac";
|
||||||
|
if (!Directory.Exists(Application.streamingAssetsPath))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(assetBundleDirectory);
|
||||||
|
}
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
USGUtility.ForceGenerateByType(typeof(Minigames));
|
||||||
|
BuildPipeline.BuildAssetBundles(assetBundleDirectory, BuildAssetBundleOptions.ChunkBasedCompression, BuildTarget.StandaloneOSX);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
14
Assets/Editor/CreateMinigameScriptTemplate.cs
Normal file
14
Assets/Editor/CreateMinigameScriptTemplate.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using SatorImaging.UnitySourceGenerator.Editor;
|
||||||
|
|
||||||
|
public class CreateMinigameScriptTemplate
|
||||||
|
{
|
||||||
|
[MenuItem("Assets/Heaven Studio/Create Minigame Script From Template", priority = 0)]
|
||||||
|
public static void CreateMinigameScript()
|
||||||
|
{
|
||||||
|
ProjectWindowUtil.CreateScriptAssetFromTemplateFile("Assets/Editor/ScriptTemplates/MinigameScriptTemplate.txt", "NewMinigame.cs");
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
USGUtility.ForceGenerateByType(typeof(HeavenStudio.Minigames));
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Editor/CreateMinigameScriptTemplate.cs.meta
Normal file
11
Assets/Editor/CreateMinigameScriptTemplate.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 24bc0d119c30f3a41aee57b4e85dbf64
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Editor/ScriptTemplates.meta
Normal file
8
Assets/Editor/ScriptTemplates.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 12ec433916efb3c4a895be2ac0dd6935
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
52
Assets/Editor/ScriptTemplates/MinigameScriptTemplate.txt
Normal file
52
Assets/Editor/ScriptTemplates/MinigameScriptTemplate.txt
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
using HeavenStudio.Util;
|
||||||
|
using HeavenStudio.InputSystem;
|
||||||
|
|
||||||
|
using Jukebox;
|
||||||
|
|
||||||
|
namespace HeavenStudio.Games.Loaders
|
||||||
|
{
|
||||||
|
using static Minigames;
|
||||||
|
/// Minigame loaders handle the setup of your minigame.
|
||||||
|
/// Here, you designate the game prefab, define entities, and mark what AssetBundle to load
|
||||||
|
|
||||||
|
/// Names of minigame loaders follow a specific naming convention of `PlatformcodeNameLoader`, where:
|
||||||
|
/// `Platformcode` is a three-leter platform code with the minigame's origin
|
||||||
|
/// `Name` is a short internal name
|
||||||
|
/// `Loader` is the string "Loader"
|
||||||
|
|
||||||
|
/// Platform codes are as follows:
|
||||||
|
/// Agb: Gameboy Advance ("Advance Gameboy")
|
||||||
|
/// Ntr: Nintendo DS ("Nitro")
|
||||||
|
/// Rvl: Nintendo Wii ("Revolution")
|
||||||
|
/// Ctr: Nintendo 3DS ("Centrair")
|
||||||
|
/// Mob: Mobile
|
||||||
|
/// Pco: PC / Other
|
||||||
|
|
||||||
|
/// Fill in the loader class label, "*prefab name*", and "*Display Name*" with the relevant information
|
||||||
|
/// For help, feel free to reach out to us on our discord, in the #development channel.
|
||||||
|
public static class _______________
|
||||||
|
{
|
||||||
|
public static Minigame AddGame(EventCaller eventCaller)
|
||||||
|
{
|
||||||
|
return new Minigame("*prefab name*", "*Display Name*", "ffffff", false, false, new List<GameAction>()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace HeavenStudio.Games
|
||||||
|
{
|
||||||
|
/// This class handles the minigame logic.
|
||||||
|
/// Minigame inherits directly from MonoBehaviour, and adds Heaven Studio specific methods to override.
|
||||||
|
public class #SCRIPTNAME# : Minigame
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a701bb5358c08074b991f83428d52446
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -77,7 +77,8 @@ public class SpritesheetScaler : EditorWindow
|
||||||
for (int i = 0; i < ti1.spritesheet.Length; i++)
|
for (int i = 0; i < ti1.spritesheet.Length; i++)
|
||||||
{
|
{
|
||||||
SpriteMetaData d = ti1.spritesheet[i];
|
SpriteMetaData d = ti1.spritesheet[i];
|
||||||
Vector2 oldPivot = Rect.NormalizedToPoint(d.rect, d.pivot) * multiplier;
|
// pivot relative to the origin of the rect in pixels
|
||||||
|
Vector2 oldPivot = new Vector2(d.pivot.x * d.rect.width, d.pivot.y * d.rect.height);
|
||||||
d.rect = ScaleRect(d.rect, multiplier, inflateX, inflateY);
|
d.rect = ScaleRect(d.rect, multiplier, inflateX, inflateY);
|
||||||
|
|
||||||
d.border.x += d.border.x > 0 ? inflateX : 0;
|
d.border.x += d.border.x > 0 ? inflateX : 0;
|
||||||
|
|
@ -85,10 +86,12 @@ public class SpritesheetScaler : EditorWindow
|
||||||
d.border.z += d.border.z > 0 ? inflateX : 0;
|
d.border.z += d.border.z > 0 ? inflateX : 0;
|
||||||
d.border.w += d.border.w > 0 ? inflateY : 0;
|
d.border.w += d.border.w > 0 ? inflateY : 0;
|
||||||
|
|
||||||
if (inflateX > 0 || inflateY > 0)
|
if (d.alignment != (int)SpriteAlignment.Center && (inflateX > 0 || inflateY > 0))
|
||||||
{
|
{
|
||||||
d.alignment = (int)SpriteAlignment.Custom;
|
d.alignment = (int)SpriteAlignment.Custom;
|
||||||
d.pivot = Rect.PointToNormalized(d.rect, oldPivot);
|
oldPivot += new Vector2(inflateX, inflateY);
|
||||||
|
Vector2 newPivot = oldPivot * multiplier;
|
||||||
|
d.pivot = new Vector2(newPivot.x / d.rect.width, newPivot.y / d.rect.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
d.border *= multiplier;
|
d.border *= multiplier;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 375dce47d61a68447a1b4813869b10b2
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
using UnityEngine;
|
|
||||||
namespace Bread2Unity
|
|
||||||
{
|
|
||||||
public class BCCAD : IDataModel
|
|
||||||
{
|
|
||||||
|
|
||||||
public BCCAD Read(byte[] bytes)
|
|
||||||
{
|
|
||||||
sheetW = BitConverter.ToUInt16(bytes, 4);
|
|
||||||
sheetH = BitConverter.ToUInt16(bytes, 6);
|
|
||||||
|
|
||||||
|
|
||||||
// int max = (bytes[8] * 2) + 12;
|
|
||||||
int max = 64 * bytes[8] + 12;
|
|
||||||
|
|
||||||
// note this doesn't account for empty sprites, but I'll get there when i get there
|
|
||||||
for (int i = 12; i < max; i += 2) // 16 bit bytes, skip every 2nd byte
|
|
||||||
{
|
|
||||||
ISprite spriteParts_ = new ISprite();
|
|
||||||
int compare = 0;
|
|
||||||
for (int j = 0; j < bytes[i]; j++)
|
|
||||||
{
|
|
||||||
int ind = i + 4 + (64 * j);
|
|
||||||
|
|
||||||
ISpritePart part = new ISpritePart();
|
|
||||||
part.regionX = BitConverter.ToUInt16(bytes, ind + 0);
|
|
||||||
part.regionY = BitConverter.ToUInt16(bytes, ind + 2);
|
|
||||||
part.regionW = BitConverter.ToUInt16(bytes, ind + 4);
|
|
||||||
part.regionH = BitConverter.ToUInt16(bytes, ind + 6);
|
|
||||||
part.posX = BitConverter.ToInt16(bytes, ind + 8);
|
|
||||||
part.posY = BitConverter.ToInt16(bytes, ind + 10);
|
|
||||||
part.stretchX = BitConverter.ToSingle(bytes, ind + 12);
|
|
||||||
part.stretchY = BitConverter.ToSingle(bytes, ind + 14);
|
|
||||||
part.rotation = BitConverter.ToSingle(bytes, ind + 16);
|
|
||||||
part.flipX = bytes[ind + 18] != (byte)0;
|
|
||||||
part.flipY = bytes[ind + 20] != (byte)0;
|
|
||||||
// im sure the values between 20 and 28 are important so remind me to come back to these
|
|
||||||
part.opacity = bytes[ind + 28];
|
|
||||||
|
|
||||||
Debug.Log("offset: " + ind + ", val: " + part.regionX);
|
|
||||||
|
|
||||||
spriteParts_.parts.Add(part);
|
|
||||||
|
|
||||||
compare += 64;
|
|
||||||
}
|
|
||||||
|
|
||||||
sprites.Add(spriteParts_);
|
|
||||||
|
|
||||||
i += compare;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return new BCCAD()
|
|
||||||
{
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// sprites length bytes start = 12
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 3b4f0c7c12cfcc74bbfdc8c1be61d4b0
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEditor;
|
|
||||||
|
|
||||||
using Starpelly;
|
|
||||||
|
|
||||||
namespace Bread2Unity
|
|
||||||
{
|
|
||||||
public class Bread2Unity : EditorWindow
|
|
||||||
{
|
|
||||||
public const string editorFolderName = "bread2unity";
|
|
||||||
|
|
||||||
[MenuItem("Tools/bread2unity")]
|
|
||||||
public static void ShowWindow()
|
|
||||||
{
|
|
||||||
EditorWindow.GetWindow<Bread2Unity>("bread2unity");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnGUI()
|
|
||||||
{
|
|
||||||
Texture logo = (Texture)AssetDatabase.LoadAssetAtPath($"Assets/Editor/{editorFolderName}/logo.png", typeof(Texture));
|
|
||||||
GUILayout.Box(logo, new GUILayoutOption[] { GUILayout.ExpandWidth(true), GUILayout.Height(60) });
|
|
||||||
GUILayout.Space(30);
|
|
||||||
|
|
||||||
GUIStyle desc = EditorStyles.label;
|
|
||||||
desc.wordWrap = true;
|
|
||||||
desc.fontStyle = FontStyle.BoldAndItalic;
|
|
||||||
|
|
||||||
GUILayout.Box("bread2unity is a tool built with the purpose of converting RH Megamix and Fever animations to unity. And to generally speed up development by a lot." +
|
|
||||||
"\nCreated by Starpelly.", desc);
|
|
||||||
|
|
||||||
GUILayout.Space(120);
|
|
||||||
|
|
||||||
if (GUILayout.Button("Test"))
|
|
||||||
{
|
|
||||||
string path = EditorUtility.OpenFilePanel("Open BCCAD File", null, "bccad");
|
|
||||||
if (path.Length != 0)
|
|
||||||
{
|
|
||||||
var fileContent = File.ReadAllBytes(path);
|
|
||||||
new BCCAD().Read(fileContent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
if (GUILayout.Button("Bread Download", GUILayout.Height(40)))
|
|
||||||
{
|
|
||||||
Application.OpenURL("https://github.com/rhmodding/bread");
|
|
||||||
}
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 0967d3b57ef5e5d46965e261ead79e15
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,201 +0,0 @@
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 5149fd98229eaac4fb4d8a83f8c9b52f
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 4801a6826549d7d4a978c7387a1aa26a
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Bread2Unity
|
|
||||||
{
|
|
||||||
public class IAnimation
|
|
||||||
{
|
|
||||||
public List<IAnimationStep> steps;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class IAnimationStep
|
|
||||||
{
|
|
||||||
public ushort spriteIndex;
|
|
||||||
public ushort delay;
|
|
||||||
|
|
||||||
public float stretchX;
|
|
||||||
public float stretchY;
|
|
||||||
|
|
||||||
public float rotation;
|
|
||||||
|
|
||||||
public byte opacity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: c33bcfd692627dd4a97ac1cd1d930420
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Bread2Unity
|
|
||||||
{
|
|
||||||
public class IDataModel
|
|
||||||
{
|
|
||||||
public List<ISprite> sprites = new List<ISprite>();
|
|
||||||
public List<IAnimation> animations = new List<IAnimation>();
|
|
||||||
public int sheetW;
|
|
||||||
public int sheetH;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: ddf1fd563dabc6040a863537a081843a
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Bread2Unity
|
|
||||||
{
|
|
||||||
public class ISprite
|
|
||||||
{
|
|
||||||
public List<ISpritePart> parts = new List<ISpritePart>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ISpritePart
|
|
||||||
{
|
|
||||||
public ushort regionX;
|
|
||||||
public ushort regionY;
|
|
||||||
public ushort regionW;
|
|
||||||
public ushort regionH;
|
|
||||||
|
|
||||||
public short posX;
|
|
||||||
public short posY;
|
|
||||||
|
|
||||||
public float stretchX;
|
|
||||||
public float stretchY;
|
|
||||||
|
|
||||||
public float rotation;
|
|
||||||
|
|
||||||
public bool flipX;
|
|
||||||
public bool flipY;
|
|
||||||
|
|
||||||
public byte opacity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: d4aae79bea7b7234f9ce059ade5fce08
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
# bread2unity
|
|
||||||
Rhythm Heaven animation to Unity animation converter
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: dcb89f55ef62d184d886dfce1fca7bd6
|
|
||||||
TextScriptImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 33 KiB |
|
|
@ -1,120 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: bca6955e61a73c44caba7d24d46c78f5
|
|
||||||
TextureImporter:
|
|
||||||
internalIDToNameTable: []
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 11
|
|
||||||
mipmaps:
|
|
||||||
mipMapMode: 0
|
|
||||||
enableMipMap: 0
|
|
||||||
sRGBTexture: 1
|
|
||||||
linearTexture: 0
|
|
||||||
fadeOut: 0
|
|
||||||
borderMipMap: 0
|
|
||||||
mipMapsPreserveCoverage: 0
|
|
||||||
alphaTestReferenceValue: 0.5
|
|
||||||
mipMapFadeDistanceStart: 1
|
|
||||||
mipMapFadeDistanceEnd: 3
|
|
||||||
bumpmap:
|
|
||||||
convertToNormalMap: 0
|
|
||||||
externalNormalMap: 0
|
|
||||||
heightScale: 0.25
|
|
||||||
normalMapFilter: 0
|
|
||||||
isReadable: 0
|
|
||||||
streamingMipmaps: 0
|
|
||||||
streamingMipmapsPriority: 0
|
|
||||||
vTOnly: 0
|
|
||||||
grayScaleToAlpha: 0
|
|
||||||
generateCubemap: 6
|
|
||||||
cubemapConvolution: 0
|
|
||||||
seamlessCubemap: 0
|
|
||||||
textureFormat: 1
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
filterMode: 0
|
|
||||||
aniso: 1
|
|
||||||
mipBias: 0
|
|
||||||
wrapU: 1
|
|
||||||
wrapV: 1
|
|
||||||
wrapW: 1
|
|
||||||
nPOTScale: 0
|
|
||||||
lightmap: 0
|
|
||||||
compressionQuality: 50
|
|
||||||
spriteMode: 1
|
|
||||||
spriteExtrude: 1
|
|
||||||
spriteMeshType: 1
|
|
||||||
alignment: 0
|
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
|
||||||
spritePixelsToUnits: 100
|
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
|
||||||
alphaUsage: 1
|
|
||||||
alphaIsTransparency: 1
|
|
||||||
spriteTessellationDetail: -1
|
|
||||||
textureType: 8
|
|
||||||
textureShape: 1
|
|
||||||
singleChannelComponent: 0
|
|
||||||
flipbookRows: 1
|
|
||||||
flipbookColumns: 1
|
|
||||||
maxTextureSizeSet: 0
|
|
||||||
compressionQualitySet: 0
|
|
||||||
textureFormatSet: 0
|
|
||||||
ignorePngGamma: 0
|
|
||||||
applyGammaDecoding: 0
|
|
||||||
platformSettings:
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: DefaultTexturePlatform
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 2
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Standalone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 2
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: WebGL
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 2
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
spriteSheet:
|
|
||||||
serializedVersion: 2
|
|
||||||
sprites: []
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
bones: []
|
|
||||||
spriteID: 5e97eb03825dee720800000000000000
|
|
||||||
internalID: 0
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
secondaryTextures: []
|
|
||||||
spritePackingTag:
|
|
||||||
pSDRemoveMatte: 0
|
|
||||||
pSDShowRemoveMatteOption: 0
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,18 +1,66 @@
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Rellac.Windows
|
namespace Rellac.Windows
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Simple script to destroy the target GameObject when window is closed
|
/// Simple script to destroy the target GameObject when window is closed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GUIWindow : MonoBehaviour
|
public class GUIWindow : MonoBehaviour
|
||||||
{
|
{
|
||||||
/// <summary>
|
[SerializeField] private float maxWidth = 0;
|
||||||
/// Close window by destroying this GameObject
|
[SerializeField] private float maxHeight = 0;
|
||||||
/// </summary>
|
|
||||||
public void CloseWindow()
|
/// <summary>
|
||||||
{
|
/// Close window by destroying this GameObject
|
||||||
Destroy(gameObject);
|
/// </summary>
|
||||||
}
|
public void CloseWindow()
|
||||||
}
|
{
|
||||||
|
Destroy(gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
// limit window size
|
||||||
|
RectTransform rectTransform = GetComponent<RectTransform>();
|
||||||
|
if (maxWidth > 0 && rectTransform.rect.width > maxWidth)
|
||||||
|
{
|
||||||
|
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, maxWidth);
|
||||||
|
}
|
||||||
|
if (maxHeight > 0 && rectTransform.rect.height > maxHeight)
|
||||||
|
{
|
||||||
|
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, maxHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
// keep in bounds of parent
|
||||||
|
RectTransform parent = transform.parent.GetComponent<RectTransform>();
|
||||||
|
if (parent != null)
|
||||||
|
{
|
||||||
|
Vector3[] corners = new Vector3[4];
|
||||||
|
parent.GetWorldCorners(corners);
|
||||||
|
Vector3 min = corners[0];
|
||||||
|
Vector3 max = corners[2];
|
||||||
|
|
||||||
|
Vector3[] myCorners = new Vector3[4];
|
||||||
|
rectTransform.GetWorldCorners(myCorners);
|
||||||
|
|
||||||
|
if (myCorners[0].x < min.x)
|
||||||
|
{
|
||||||
|
rectTransform.localPosition += new Vector3(min.x - myCorners[0].x, 0, 0);
|
||||||
|
}
|
||||||
|
if (myCorners[2].x > max.x)
|
||||||
|
{
|
||||||
|
rectTransform.localPosition -= new Vector3(myCorners[2].x - max.x, 0, 0);
|
||||||
|
}
|
||||||
|
if (myCorners[0].y < min.y)
|
||||||
|
{
|
||||||
|
rectTransform.localPosition += new Vector3(0, min.y - myCorners[0].y, 0);
|
||||||
|
}
|
||||||
|
if (myCorners[2].y > max.y)
|
||||||
|
{
|
||||||
|
rectTransform.localPosition -= new Vector3(0, myCorners[2].y - max.y, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -56,8 +56,8 @@ namespace Rellac.Windows
|
||||||
//register to pointer events
|
//register to pointer events
|
||||||
onPointerDown.AddListener(SetIsGrabbed);
|
onPointerDown.AddListener(SetIsGrabbed);
|
||||||
onPointerDown.AddListener(parentWindow.SetAsLastSibling);
|
onPointerDown.AddListener(parentWindow.SetAsLastSibling);
|
||||||
// onPointerEnter.AddListener(ShowCursor);
|
onPointerEnter.AddListener(ShowCursor);
|
||||||
// onPointerExit.AddListener(ResetCursor);
|
onPointerExit.AddListener(ResetCursor);
|
||||||
|
|
||||||
// find what direction we're pulling with this handle
|
// find what direction we're pulling with this handle
|
||||||
switch (axis)
|
switch (axis)
|
||||||
|
|
@ -129,8 +129,9 @@ namespace Rellac.Windows
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector2 scaleOffset = (Vector2.one - (Vector2)transform.lossyScale) + Vector2.one;
|
Vector2 scaleOffset = (Vector2.one - (Vector2)transform.lossyScale) + Vector2.one;
|
||||||
Vector2 parentScale = parentWindow.transform.parent.GetComponent<RectTransform>().rect.size;
|
Vector3 anchoredPosition = Input.mousePosition;
|
||||||
Vector2 mouseDelta = Vector2.Scale((Vector2)Camera.main.ScreenToWorldPoint(GUIWindowUtils.MousePosition()) - initialMousePos, scaleOffset*parentScale);
|
anchoredPosition.z = 0;
|
||||||
|
Vector2 mouseDelta = Vector2.Scale((Vector2)anchoredPosition - initialMousePos, scaleOffset) * 0.5f;
|
||||||
Vector2 size = initialSize;
|
Vector2 size = initialSize;
|
||||||
|
|
||||||
switch (direction)
|
switch (direction)
|
||||||
|
|
@ -199,7 +200,9 @@ namespace Rellac.Windows
|
||||||
if (isLocked) return;
|
if (isLocked) return;
|
||||||
isGrabbed = true;
|
isGrabbed = true;
|
||||||
|
|
||||||
initialMousePos = Camera.main.ScreenToWorldPoint(GUIWindowUtils.MousePosition());
|
Vector3 anchoredPosition = Input.mousePosition;
|
||||||
|
anchoredPosition.z = 0;
|
||||||
|
initialMousePos = anchoredPosition;
|
||||||
initialSize = parentWindow.sizeDelta;
|
initialSize = parentWindow.sizeDelta;
|
||||||
initialPivot = parentWindow.pivot;
|
initialPivot = parentWindow.pivot;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,9 @@ namespace Rellac.Windows
|
||||||
|
|
||||||
public static Vector3 MousePosition()
|
public static Vector3 MousePosition()
|
||||||
{
|
{
|
||||||
var mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
Vector3 anchoredPosition = Input.mousePosition;
|
||||||
|
anchoredPosition.z = 0;
|
||||||
|
var mousePos = Camera.main.ScreenToWorldPoint(anchoredPosition);
|
||||||
return new Vector3(mousePos.x, mousePos.y, 0);
|
return new Vector3(mousePos.x, mousePos.y, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
21
Assets/New Flare.flare
Normal file
21
Assets/New Flare.flare
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!121 &12100000
|
||||||
|
Flare:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: New Flare
|
||||||
|
m_FlareTexture: {fileID: 0}
|
||||||
|
m_TextureLayout: 0
|
||||||
|
m_Elements:
|
||||||
|
- m_ImageIndex: 0
|
||||||
|
m_Position: 0
|
||||||
|
m_Size: 0.5
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 0}
|
||||||
|
m_UseLightColor: 1
|
||||||
|
m_Rotate: 0
|
||||||
|
m_Zoom: 1
|
||||||
|
m_Fade: 1
|
||||||
|
m_UseFog: 1
|
||||||
8
Assets/New Flare.flare.meta
Normal file
8
Assets/New Flare.flare.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 203e150a187c5ee488d2f6793cf8ecfe
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 12100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -2,7 +2,6 @@ using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using Starpelly;
|
|
||||||
|
|
||||||
public class ColorPreview : MonoBehaviour
|
public class ColorPreview : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
@ -21,18 +20,18 @@ public class ColorPreview : MonoBehaviour
|
||||||
public void ChangeColor(Color c)
|
public void ChangeColor(Color c)
|
||||||
{
|
{
|
||||||
colorPicker.color = c;
|
colorPicker.color = c;
|
||||||
hex.text = c.Color2Hex();
|
hex.text = Color2Hex(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnColorChanged(Color c)
|
public void OnColorChanged(Color c)
|
||||||
{
|
{
|
||||||
previewGraphic.color = c;
|
previewGraphic.color = c;
|
||||||
hex.text = c.Color2Hex();
|
hex.text = Color2Hex(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetColorFromHex(string hex)
|
public void SetColorFromHex(string hex)
|
||||||
{
|
{
|
||||||
colorPicker.color = Starpelly.Colors.Hex2RGB(hex);
|
colorPicker.color = Hex2RGB(hex);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
|
|
@ -45,4 +44,38 @@ public class ColorPreview : MonoBehaviour
|
||||||
{
|
{
|
||||||
SetColorFromHex(hex.text);
|
SetColorFromHex(hex.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static string Color2Hex(Color color)
|
||||||
|
{
|
||||||
|
Color32 col = (Color32)color;
|
||||||
|
string hex = col.r.ToString("X2") + col.g.ToString("X2") + col.b.ToString("X2");
|
||||||
|
return hex;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Converts a Hexadecimal Color to an RGB Color.
|
||||||
|
/// </summary>
|
||||||
|
static Color Hex2RGB(string hex)
|
||||||
|
{
|
||||||
|
if (hex is null or "") return Color.black;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
hex = hex.Replace("0x", "");//in case the string is formatted 0xFFFFFF
|
||||||
|
hex = hex.Replace("#", "");//in case the string is formatted #FFFFFF
|
||||||
|
byte a = 255;//assume fully visible unless specified in hex
|
||||||
|
byte r = byte.Parse(hex.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
|
||||||
|
byte g = byte.Parse(hex.Substring(2, 2), System.Globalization.NumberStyles.HexNumber);
|
||||||
|
byte b = byte.Parse(hex.Substring(4, 2), System.Globalization.NumberStyles.HexNumber);
|
||||||
|
//Only use alpha if the string has enough characters
|
||||||
|
if (hex.Length >= 8)
|
||||||
|
{
|
||||||
|
a = byte.Parse(hex.Substring(6, 2), System.Globalization.NumberStyles.HexNumber);
|
||||||
|
}
|
||||||
|
return new Color32(r, g, b, a);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return Color.black;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 5c02948e56fc801488f8e266ae84de7e
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 8a63350dadfa3364ca113259df8a333a
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Discord
|
|
||||||
{
|
|
||||||
public partial class ActivityManager
|
|
||||||
{
|
|
||||||
public void RegisterCommand()
|
|
||||||
{
|
|
||||||
RegisterCommand(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 6247f141a06f4c64bace3428adf1b1c3
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Discord
|
|
||||||
{
|
|
||||||
static class Constants
|
|
||||||
{
|
|
||||||
public const string DllName = "discord_game_sdk";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: a8beacc6f1e76b94da362fffb1e25e2e
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 322f7411488994c4ba05fef35275c9ae
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
#if UNITY_EDITOR || UNITY_STANDALONE
|
|
||||||
using UnityEngine;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Discord
|
|
||||||
{
|
|
||||||
public partial struct ImageHandle
|
|
||||||
{
|
|
||||||
static public ImageHandle User(Int64 id)
|
|
||||||
{
|
|
||||||
return User(id, 128);
|
|
||||||
}
|
|
||||||
|
|
||||||
static public ImageHandle User(Int64 id, UInt32 size)
|
|
||||||
{
|
|
||||||
return new ImageHandle
|
|
||||||
{
|
|
||||||
Type = ImageType.User,
|
|
||||||
Id = id,
|
|
||||||
Size = size,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public partial class ImageManager
|
|
||||||
{
|
|
||||||
public void Fetch(ImageHandle handle, FetchHandler callback)
|
|
||||||
{
|
|
||||||
Fetch(handle, false, callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte[] GetData(ImageHandle handle)
|
|
||||||
{
|
|
||||||
var dimensions = GetDimensions(handle);
|
|
||||||
var data = new byte[dimensions.Width * dimensions.Height * 4];
|
|
||||||
GetData(handle, data);
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if UNITY_EDITOR || UNITY_STANDALONE
|
|
||||||
public Texture2D GetTexture(ImageHandle handle)
|
|
||||||
{
|
|
||||||
var dimensions = GetDimensions(handle);
|
|
||||||
var texture = new Texture2D((int)dimensions.Width, (int)dimensions.Height, TextureFormat.RGBA32, false, true);
|
|
||||||
texture.LoadRawTextureData(GetData(handle));
|
|
||||||
texture.Apply();
|
|
||||||
return texture;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 9aaaf736e0538da4d921dda51e049299
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Discord
|
|
||||||
{
|
|
||||||
public partial class LobbyManager
|
|
||||||
{
|
|
||||||
public IEnumerable<User> GetMemberUsers(Int64 lobbyID)
|
|
||||||
{
|
|
||||||
var memberCount = MemberCount(lobbyID);
|
|
||||||
var members = new List<User>();
|
|
||||||
for (var i = 0; i < memberCount; i++)
|
|
||||||
{
|
|
||||||
members.Add(GetMemberUser(lobbyID, GetMemberUserId(lobbyID, i)));
|
|
||||||
}
|
|
||||||
return members;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SendLobbyMessage(Int64 lobbyID, string data, SendLobbyMessageHandler handler)
|
|
||||||
{
|
|
||||||
SendLobbyMessage(lobbyID, Encoding.UTF8.GetBytes(data), handler);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 9f595176ca2beab4da4f6473f1a4d102
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Discord
|
|
||||||
{
|
|
||||||
public partial class StorageManager
|
|
||||||
{
|
|
||||||
public IEnumerable<FileStat> Files()
|
|
||||||
{
|
|
||||||
var fileCount = Count();
|
|
||||||
var files = new List<FileStat>();
|
|
||||||
for (var i = 0; i < fileCount; i++)
|
|
||||||
{
|
|
||||||
files.Add(StatAt(i));
|
|
||||||
}
|
|
||||||
return files;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 0de83ab0ec089db4eb806d35d6dd9558
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Discord
|
|
||||||
{
|
|
||||||
public partial class StoreManager
|
|
||||||
{
|
|
||||||
public IEnumerable<Entitlement> GetEntitlements()
|
|
||||||
{
|
|
||||||
var count = CountEntitlements();
|
|
||||||
var entitlements = new List<Entitlement>();
|
|
||||||
for (var i = 0; i < count; i++)
|
|
||||||
{
|
|
||||||
entitlements.Add(GetEntitlementAt(i));
|
|
||||||
}
|
|
||||||
return entitlements;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<Sku> GetSkus()
|
|
||||||
{
|
|
||||||
var count = CountSkus();
|
|
||||||
var skus = new List<Sku>();
|
|
||||||
for (var i = 0; i < count; i++)
|
|
||||||
{
|
|
||||||
skus.Add(GetSkuAt(i));
|
|
||||||
}
|
|
||||||
return skus;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 12e503df03fd6734d8f085997e64656c
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 70173042601fc1846a90b0c8ea926df4
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 42267c7ce7eae61448e2ea4ecbf34463
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 7dc43ba202aaeee43b83eda90c7cf67b
|
|
||||||
PluginImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
iconMap: {}
|
|
||||||
executionOrder: {}
|
|
||||||
defineConstraints: []
|
|
||||||
isPreloaded: 0
|
|
||||||
isOverridable: 0
|
|
||||||
isExplicitlyReferenced: 0
|
|
||||||
validateReferences: 1
|
|
||||||
platformData:
|
|
||||||
- first:
|
|
||||||
Any:
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings: {}
|
|
||||||
- first:
|
|
||||||
Editor: Editor
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: x86
|
|
||||||
DefaultValueInitialized: true
|
|
||||||
- first:
|
|
||||||
Standalone: Linux64
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: None
|
|
||||||
- first:
|
|
||||||
Standalone: OSXUniversal
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: x86
|
|
||||||
- first:
|
|
||||||
Standalone: Win
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
- first:
|
|
||||||
Standalone: Win64
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: None
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: e291cd87df3992b40b4cb0fc5f542185
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
|
|
@ -1,63 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: ba4f73ad56fdd254c9406111c6702f84
|
|
||||||
PluginImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
iconMap: {}
|
|
||||||
executionOrder: {}
|
|
||||||
defineConstraints: []
|
|
||||||
isPreloaded: 0
|
|
||||||
isOverridable: 0
|
|
||||||
isExplicitlyReferenced: 0
|
|
||||||
validateReferences: 1
|
|
||||||
platformData:
|
|
||||||
- first:
|
|
||||||
: Any
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
Exclude Editor: 0
|
|
||||||
Exclude Linux64: 0
|
|
||||||
Exclude OSXUniversal: 0
|
|
||||||
Exclude Win: 0
|
|
||||||
Exclude Win64: 0
|
|
||||||
- first:
|
|
||||||
Any:
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings: {}
|
|
||||||
- first:
|
|
||||||
Editor: Editor
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: x86_64
|
|
||||||
DefaultValueInitialized: true
|
|
||||||
OS: AnyOS
|
|
||||||
- first:
|
|
||||||
Standalone: Linux64
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
- first:
|
|
||||||
Standalone: OSXUniversal
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
- first:
|
|
||||||
Standalone: Win
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: None
|
|
||||||
- first:
|
|
||||||
Standalone: Win64
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: x86_64
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 0d629049536dd6044b09086f92fc7305
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: ffaf5645d42da1d40b14356395eb1bb8
|
|
||||||
PluginImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
iconMap: {}
|
|
||||||
executionOrder: {}
|
|
||||||
defineConstraints: []
|
|
||||||
isPreloaded: 0
|
|
||||||
isOverridable: 0
|
|
||||||
isExplicitlyReferenced: 0
|
|
||||||
validateReferences: 1
|
|
||||||
platformData:
|
|
||||||
- first:
|
|
||||||
Any:
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings: {}
|
|
||||||
- first:
|
|
||||||
Editor: Editor
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: x86_64
|
|
||||||
DefaultValueInitialized: true
|
|
||||||
- first:
|
|
||||||
Standalone: Linux64
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
- first:
|
|
||||||
Standalone: OSXUniversal
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: x86_64
|
|
||||||
- first:
|
|
||||||
Standalone: Win
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: None
|
|
||||||
- first:
|
|
||||||
Standalone: Win64
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
|
|
@ -1,80 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: cbdb66c634dc7af4cb711bca303d2c1a
|
|
||||||
PluginImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
iconMap: {}
|
|
||||||
executionOrder: {}
|
|
||||||
defineConstraints: []
|
|
||||||
isPreloaded: 0
|
|
||||||
isOverridable: 0
|
|
||||||
isExplicitlyReferenced: 0
|
|
||||||
validateReferences: 1
|
|
||||||
platformData:
|
|
||||||
- first:
|
|
||||||
: Any
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
Exclude Android: 0
|
|
||||||
Exclude Editor: 0
|
|
||||||
Exclude Linux64: 0
|
|
||||||
Exclude OSXUniversal: 0
|
|
||||||
Exclude Win: 0
|
|
||||||
Exclude Win64: 0
|
|
||||||
Exclude iOS: 0
|
|
||||||
- first:
|
|
||||||
Android: Android
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: ARMv7
|
|
||||||
- first:
|
|
||||||
Any:
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings: {}
|
|
||||||
- first:
|
|
||||||
Editor: Editor
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: x86_64
|
|
||||||
DefaultValueInitialized: true
|
|
||||||
OS: AnyOS
|
|
||||||
- first:
|
|
||||||
Standalone: Linux64
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
- first:
|
|
||||||
Standalone: OSXUniversal
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: x86_64
|
|
||||||
- first:
|
|
||||||
Standalone: Win
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: None
|
|
||||||
- first:
|
|
||||||
Standalone: Win64
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
- first:
|
|
||||||
iPhone: iOS
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
AddToEmbeddedBinaries: false
|
|
||||||
CPU: AnyCPU
|
|
||||||
CompileFlags:
|
|
||||||
FrameworkDependencies:
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
|
|
@ -1,63 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: f5327cb3294b2bc46a8451ef4c09a855
|
|
||||||
PluginImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
iconMap: {}
|
|
||||||
executionOrder: {}
|
|
||||||
defineConstraints: []
|
|
||||||
isPreloaded: 0
|
|
||||||
isOverridable: 0
|
|
||||||
isExplicitlyReferenced: 0
|
|
||||||
validateReferences: 1
|
|
||||||
platformData:
|
|
||||||
- first:
|
|
||||||
: Any
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
Exclude Editor: 0
|
|
||||||
Exclude Linux64: 0
|
|
||||||
Exclude OSXUniversal: 1
|
|
||||||
Exclude Win: 0
|
|
||||||
Exclude Win64: 0
|
|
||||||
- first:
|
|
||||||
Any:
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings: {}
|
|
||||||
- first:
|
|
||||||
Editor: Editor
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: x86_64
|
|
||||||
DefaultValueInitialized: true
|
|
||||||
OS: AnyOS
|
|
||||||
- first:
|
|
||||||
Standalone: Linux64
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
- first:
|
|
||||||
Standalone: OSXUniversal
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: None
|
|
||||||
- first:
|
|
||||||
Standalone: Win
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: None
|
|
||||||
- first:
|
|
||||||
Standalone: Win64
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
BIN
Assets/Plugins/JSL/.DS_Store
vendored
BIN
Assets/Plugins/JSL/.DS_Store
vendored
Binary file not shown.
|
|
@ -1,219 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using UnityEditor;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public static class JSL
|
|
||||||
{
|
|
||||||
public const int ButtonMaskUp = 0;
|
|
||||||
public const int ButtonMaskDown = 1;
|
|
||||||
public const int ButtonMaskLeft = 2;
|
|
||||||
public const int ButtonMaskRight = 3;
|
|
||||||
public const int ButtonMaskPlus = 4;
|
|
||||||
public const int ButtonMaskOptions = 4;
|
|
||||||
public const int ButtonMaskMinus = 5;
|
|
||||||
public const int ButtonMaskShare = 5;
|
|
||||||
public const int ButtonMaskLClick = 6;
|
|
||||||
public const int ButtonMaskRClick = 7;
|
|
||||||
public const int ButtonMaskL = 8;
|
|
||||||
public const int ButtonMaskR = 9;
|
|
||||||
public const int ButtonMaskZL = 10;
|
|
||||||
public const int ButtonMaskZR = 11;
|
|
||||||
public const int ButtonMaskS = 12;
|
|
||||||
public const int ButtonMaskE = 13;
|
|
||||||
public const int ButtonMaskW = 14;
|
|
||||||
public const int ButtonMaskN = 15;
|
|
||||||
public const int ButtonMaskHome = 16;
|
|
||||||
public const int ButtonMaskPS = 16;
|
|
||||||
public const int ButtonMaskCapture = 17;
|
|
||||||
public const int ButtonMaskTouchpadClick = 17;
|
|
||||||
public const int ButtonMaskSL = 18;
|
|
||||||
public const int ButtonMaskSR = 19;
|
|
||||||
|
|
||||||
public const int TypeJoyConLeft = 1;
|
|
||||||
public const int TypeJoyConRight = 2;
|
|
||||||
public const int TypeProController = 3;
|
|
||||||
public const int TypeDualShock4 = 4;
|
|
||||||
public const int TypeDualSense = 5;
|
|
||||||
|
|
||||||
public const int SplitLeft = 1;
|
|
||||||
public const int SplitRight = 2;
|
|
||||||
public const int SplitFull = 3;
|
|
||||||
|
|
||||||
// PS5 Player maps for the DS Player Lightbar
|
|
||||||
public static readonly int[] DualSensePlayerMask = {
|
|
||||||
4,
|
|
||||||
10,
|
|
||||||
21,
|
|
||||||
27,
|
|
||||||
31
|
|
||||||
};
|
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct JOY_SHOCK_STATE
|
|
||||||
{
|
|
||||||
public int buttons;
|
|
||||||
public float lTrigger;
|
|
||||||
public float rTrigger;
|
|
||||||
public float stickLX;
|
|
||||||
public float stickLY;
|
|
||||||
public float stickRX;
|
|
||||||
public float stickRY;
|
|
||||||
}
|
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct IMU_STATE
|
|
||||||
{
|
|
||||||
public float accelX;
|
|
||||||
public float accelY;
|
|
||||||
public float accelZ;
|
|
||||||
public float gyroX;
|
|
||||||
public float gyroY;
|
|
||||||
public float gyroZ;
|
|
||||||
}
|
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct MOTION_STATE {
|
|
||||||
public float quatW;
|
|
||||||
public float quatX;
|
|
||||||
public float quatY;
|
|
||||||
public float quatZ;
|
|
||||||
public float accelX;
|
|
||||||
public float accelY;
|
|
||||||
public float accelZ;
|
|
||||||
public float gravX;
|
|
||||||
public float gravY;
|
|
||||||
public float gravZ;
|
|
||||||
}
|
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct TOUCH_STATE {
|
|
||||||
public int t0Id;
|
|
||||||
public int t1Id;
|
|
||||||
public bool t0Down;
|
|
||||||
public bool t1Down;
|
|
||||||
public float t0X;
|
|
||||||
public float t0Y;
|
|
||||||
public float t1X;
|
|
||||||
public float t1Y;
|
|
||||||
}
|
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct JSL_AUTO_CALIBRATION {
|
|
||||||
public float confidence;
|
|
||||||
public bool autoCalibrationEnabled;
|
|
||||||
public bool isSteady;
|
|
||||||
}
|
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct JSL_SETTINGS {
|
|
||||||
public int gyroSpace;
|
|
||||||
public int bodyColour;
|
|
||||||
public int lGripColour;
|
|
||||||
public int rGripColour;
|
|
||||||
public int buttonColour;
|
|
||||||
public int playerNumber;
|
|
||||||
public int controllerType;
|
|
||||||
public int splitType;
|
|
||||||
public bool isCalibrating;
|
|
||||||
public bool autoCalibrationEnabled;
|
|
||||||
public bool isConnected;
|
|
||||||
}
|
|
||||||
|
|
||||||
public delegate void EventCallback(int handle, JOY_SHOCK_STATE state, JOY_SHOCK_STATE lastState,
|
|
||||||
IMU_STATE imuState, IMU_STATE lastImuState, float deltaTime);
|
|
||||||
|
|
||||||
public delegate void TouchCallback(int handle, TOUCH_STATE state, TOUCH_STATE lastState, float deltaTime);
|
|
||||||
|
|
||||||
public delegate void ConnectionCallback(int handle);
|
|
||||||
public delegate void DeconnectionCallback(int handle, bool isConnected);
|
|
||||||
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern int JslConnectDevices();
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern int JslGetConnectedDeviceHandles(int[] deviceHandleArray, int size);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslDisconnectAndDisposeAll();
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern bool JslStillConnected(int deviceId);
|
|
||||||
|
|
||||||
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern JOY_SHOCK_STATE JslGetSimpleState(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern IMU_STATE JslGetIMUState(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern MOTION_STATE JslGetMotionState(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern TOUCH_STATE JslGetTouchState(int deviceId);
|
|
||||||
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslSetGyroSpace(int deviceId, int gyroSpace);
|
|
||||||
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern float JslGetStickStep(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern float JslGetTriggerStep(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern float JslGetPollRate(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern float JslGetTimeSinceLastUpdate(int deviceId);
|
|
||||||
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern float JslGetTouchId(int deviceId, bool secondTouch = false);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern float JslGetTouchDown(int deviceId, bool secondTouch = false);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern float JslGetTouchX(int deviceId, bool secondTouch = false);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern float JslGetTouchY(int deviceId, bool secondTouch = false);
|
|
||||||
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslResetContinuousCalibration(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslStartContinuousCalibration(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslPauseContinuousCalibration(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslGetCalibrationOffset(int deviceId, ref float xOffset, ref float yOffset, ref float zOffset);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslGetCalibrationOffset(int deviceId, float xOffset, float yOffset, float zOffset);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern JSL_AUTO_CALIBRATION JslGetAutoCalibrationStatus(int deviceId);
|
|
||||||
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslSetCallback(EventCallback callback);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslSetTouchCallback(TouchCallback callback);
|
|
||||||
// this function will get called for each device when it is newly connected
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslSetConnectCallback(ConnectionCallback callback);
|
|
||||||
// this function will get called for each device when it is disconnected
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslSetDisconnectCallback(DeconnectionCallback callback);
|
|
||||||
|
|
||||||
// super-getter for reading a whole lot of state at once
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern JSL_SETTINGS JslGetControllerInfoAndSettings(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern int JslGetControllerType(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern int JslGetControllerSplitType(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern int JslGetControllerColour(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern int JslGetControllerButtonColour(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern int JslGetControllerLeftGripColour(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern int JslGetControllerRightGripColour(int deviceId);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslSetLightColour(int deviceId, int colour);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslSetRumble(int deviceId, int smallRumble, int bigRumble);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslSetRumbleFrequency(int deviceId, float smallRumble, float bigRumble, float smallFrequency, float bigFrequency);
|
|
||||||
[DllImport("JoyShockLibrary")]
|
|
||||||
public static extern void JslSetPlayerNumber(int deviceId, int number);
|
|
||||||
}
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 129c872137ca57441bd8e920a0caceef
|
|
||||||
PluginImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
iconMap: {}
|
|
||||||
executionOrder: {}
|
|
||||||
defineConstraints: []
|
|
||||||
isPreloaded: 0
|
|
||||||
isOverridable: 0
|
|
||||||
isExplicitlyReferenced: 0
|
|
||||||
validateReferences: 1
|
|
||||||
platformData:
|
|
||||||
- first:
|
|
||||||
: Any
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
Exclude Editor: 0
|
|
||||||
Exclude Linux64: 0
|
|
||||||
Exclude OSXUniversal: 0
|
|
||||||
Exclude Win: 0
|
|
||||||
Exclude Win64: 0
|
|
||||||
- first:
|
|
||||||
Any:
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings: {}
|
|
||||||
- first:
|
|
||||||
Editor: Editor
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
DefaultValueInitialized: true
|
|
||||||
OS: AnyOS
|
|
||||||
- first:
|
|
||||||
Standalone: Linux64
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
- first:
|
|
||||||
Standalone: OSXUniversal
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
- first:
|
|
||||||
Standalone: Win
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: x86
|
|
||||||
- first:
|
|
||||||
Standalone: Win64
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: x86_64
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 46ec8bf5775b6af429f16d7140f02d54
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 8290861ef07e2d74497c02c16ea45608
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 309dd656c95dd434ba2f1ccefa8b3ec0
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
|
|
@ -1,80 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 53ce567e644ef4880b1db00e550aa797
|
|
||||||
PluginImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
iconMap: {}
|
|
||||||
executionOrder: {}
|
|
||||||
defineConstraints: []
|
|
||||||
isPreloaded: 1
|
|
||||||
isOverridable: 0
|
|
||||||
isExplicitlyReferenced: 0
|
|
||||||
validateReferences: 1
|
|
||||||
platformData:
|
|
||||||
- first:
|
|
||||||
: Any
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
Exclude Android: 0
|
|
||||||
Exclude Editor: 0
|
|
||||||
Exclude Linux64: 1
|
|
||||||
Exclude OSXUniversal: 0
|
|
||||||
Exclude Win: 1
|
|
||||||
Exclude Win64: 1
|
|
||||||
Exclude iOS: 0
|
|
||||||
- first:
|
|
||||||
Android: Android
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: ARMv7
|
|
||||||
- first:
|
|
||||||
Any:
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings: {}
|
|
||||||
- first:
|
|
||||||
Editor: Editor
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
DefaultValueInitialized: true
|
|
||||||
OS: AnyOS
|
|
||||||
- first:
|
|
||||||
Standalone: Linux64
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: None
|
|
||||||
- first:
|
|
||||||
Standalone: OSXUniversal
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
CPU: AnyCPU
|
|
||||||
- first:
|
|
||||||
Standalone: Win
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: x86
|
|
||||||
- first:
|
|
||||||
Standalone: Win64
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
CPU: x86_64
|
|
||||||
- first:
|
|
||||||
iPhone: iOS
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings:
|
|
||||||
AddToEmbeddedBinaries: false
|
|
||||||
CPU: AnyCPU
|
|
||||||
CompileFlags:
|
|
||||||
FrameworkDependencies:
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
222
Assets/Plugins/JoyShockLibrary/JoyShockLibrary.cs
Normal file
222
Assets/Plugins/JoyShockLibrary/JoyShockLibrary.cs
Normal file
|
|
@ -0,0 +1,222 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public static class JSL
|
||||||
|
{
|
||||||
|
public const int ButtonMaskUp = 0;
|
||||||
|
public const int ButtonMaskDown = 1;
|
||||||
|
public const int ButtonMaskLeft = 2;
|
||||||
|
public const int ButtonMaskRight = 3;
|
||||||
|
public const int ButtonMaskPlus = 4;
|
||||||
|
public const int ButtonMaskOptions = 4;
|
||||||
|
public const int ButtonMaskMinus = 5;
|
||||||
|
public const int ButtonMaskShare = 5;
|
||||||
|
public const int ButtonMaskLClick = 6;
|
||||||
|
public const int ButtonMaskRClick = 7;
|
||||||
|
public const int ButtonMaskL = 8;
|
||||||
|
public const int ButtonMaskR = 9;
|
||||||
|
public const int ButtonMaskZL = 10;
|
||||||
|
public const int ButtonMaskZR = 11;
|
||||||
|
public const int ButtonMaskS = 12;
|
||||||
|
public const int ButtonMaskE = 13;
|
||||||
|
public const int ButtonMaskW = 14;
|
||||||
|
public const int ButtonMaskN = 15;
|
||||||
|
public const int ButtonMaskHome = 16;
|
||||||
|
public const int ButtonMaskPS = 16;
|
||||||
|
public const int ButtonMaskCapture = 17;
|
||||||
|
public const int ButtonMaskTouchpadClick = 17;
|
||||||
|
public const int ButtonMaskMic = 18;
|
||||||
|
public const int ButtonMaskSL = 19;
|
||||||
|
public const int ButtonMaskSR = 20;
|
||||||
|
public const int ButtonMaskFnL = 21;
|
||||||
|
public const int ButtonMaskFnR = 22;
|
||||||
|
|
||||||
|
public const int TypeJoyConLeft = 1;
|
||||||
|
public const int TypeJoyConRight = 2;
|
||||||
|
public const int TypeProController = 3;
|
||||||
|
public const int TypeDualShock4 = 4;
|
||||||
|
public const int TypeDualSense = 5;
|
||||||
|
|
||||||
|
public const int SplitLeft = 1;
|
||||||
|
public const int SplitRight = 2;
|
||||||
|
public const int SplitFull = 3;
|
||||||
|
|
||||||
|
// PS5 Player maps for the DS Player Lightbar
|
||||||
|
public static readonly int[] DualSensePlayerMask = {
|
||||||
|
4,
|
||||||
|
10,
|
||||||
|
21,
|
||||||
|
27,
|
||||||
|
31
|
||||||
|
};
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct JOY_SHOCK_STATE
|
||||||
|
{
|
||||||
|
public int buttons;
|
||||||
|
public float lTrigger;
|
||||||
|
public float rTrigger;
|
||||||
|
public float stickLX;
|
||||||
|
public float stickLY;
|
||||||
|
public float stickRX;
|
||||||
|
public float stickRY;
|
||||||
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct IMU_STATE
|
||||||
|
{
|
||||||
|
public float accelX;
|
||||||
|
public float accelY;
|
||||||
|
public float accelZ;
|
||||||
|
public float gyroX;
|
||||||
|
public float gyroY;
|
||||||
|
public float gyroZ;
|
||||||
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct MOTION_STATE {
|
||||||
|
public float quatW;
|
||||||
|
public float quatX;
|
||||||
|
public float quatY;
|
||||||
|
public float quatZ;
|
||||||
|
public float accelX;
|
||||||
|
public float accelY;
|
||||||
|
public float accelZ;
|
||||||
|
public float gravX;
|
||||||
|
public float gravY;
|
||||||
|
public float gravZ;
|
||||||
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct TOUCH_STATE {
|
||||||
|
public int t0Id;
|
||||||
|
public int t1Id;
|
||||||
|
public bool t0Down;
|
||||||
|
public bool t1Down;
|
||||||
|
public float t0X;
|
||||||
|
public float t0Y;
|
||||||
|
public float t1X;
|
||||||
|
public float t1Y;
|
||||||
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct JSL_AUTO_CALIBRATION {
|
||||||
|
public float confidence;
|
||||||
|
public bool autoCalibrationEnabled;
|
||||||
|
public bool isSteady;
|
||||||
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct JSL_SETTINGS {
|
||||||
|
public int gyroSpace;
|
||||||
|
public int bodyColour;
|
||||||
|
public int lGripColour;
|
||||||
|
public int rGripColour;
|
||||||
|
public int buttonColour;
|
||||||
|
public int playerNumber;
|
||||||
|
public int controllerType;
|
||||||
|
public int splitType;
|
||||||
|
public bool isCalibrating;
|
||||||
|
public bool autoCalibrationEnabled;
|
||||||
|
public bool isConnected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public delegate void EventCallback(int handle, JOY_SHOCK_STATE state, JOY_SHOCK_STATE lastState,
|
||||||
|
IMU_STATE imuState, IMU_STATE lastImuState, float deltaTime);
|
||||||
|
|
||||||
|
public delegate void TouchCallback(int handle, TOUCH_STATE state, TOUCH_STATE lastState, float deltaTime);
|
||||||
|
|
||||||
|
public delegate void ConnectionCallback(int handle);
|
||||||
|
public delegate void DeconnectionCallback(int handle, bool isConnected);
|
||||||
|
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern int JslConnectDevices();
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern int JslGetConnectedDeviceHandles(int[] deviceHandleArray, int size);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslDisconnectAndDisposeAll();
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern bool JslStillConnected(int deviceId);
|
||||||
|
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern JOY_SHOCK_STATE JslGetSimpleState(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern IMU_STATE JslGetIMUState(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern MOTION_STATE JslGetMotionState(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern TOUCH_STATE JslGetTouchState(int deviceId);
|
||||||
|
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslSetGyroSpace(int deviceId, int gyroSpace);
|
||||||
|
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern float JslGetStickStep(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern float JslGetTriggerStep(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern float JslGetPollRate(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern float JslGetTimeSinceLastUpdate(int deviceId);
|
||||||
|
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern float JslGetTouchId(int deviceId, bool secondTouch = false);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern float JslGetTouchDown(int deviceId, bool secondTouch = false);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern float JslGetTouchX(int deviceId, bool secondTouch = false);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern float JslGetTouchY(int deviceId, bool secondTouch = false);
|
||||||
|
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslResetContinuousCalibration(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslStartContinuousCalibration(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslPauseContinuousCalibration(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslGetCalibrationOffset(int deviceId, ref float xOffset, ref float yOffset, ref float zOffset);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslGetCalibrationOffset(int deviceId, float xOffset, float yOffset, float zOffset);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern JSL_AUTO_CALIBRATION JslGetAutoCalibrationStatus(int deviceId);
|
||||||
|
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslSetCallback(EventCallback callback);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslSetTouchCallback(TouchCallback callback);
|
||||||
|
// this function will get called for each device when it is newly connected
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslSetConnectCallback(ConnectionCallback callback);
|
||||||
|
// this function will get called for each device when it is disconnected
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslSetDisconnectCallback(DeconnectionCallback callback);
|
||||||
|
|
||||||
|
// super-getter for reading a whole lot of state at once
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern JSL_SETTINGS JslGetControllerInfoAndSettings(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern int JslGetControllerType(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern int JslGetControllerSplitType(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern int JslGetControllerColour(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern int JslGetControllerButtonColour(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern int JslGetControllerLeftGripColour(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern int JslGetControllerRightGripColour(int deviceId);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslSetLightColour(int deviceId, int colour);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslSetRumble(int deviceId, int smallRumble, int bigRumble);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslSetRumbleFrequency(int deviceId, float smallRumble, float bigRumble, float smallFrequency, float bigFrequency);
|
||||||
|
[DllImport("JoyShockLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void JslSetPlayerNumber(int deviceId, int number);
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: f9c0f41c6ce6e8d4e9efd06732127f2b
|
guid: ff63a2670a6ba934aaf5addc3520f87e
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
BIN
Assets/Plugins/JoyShockLibrary/Plugins/JoyShockLibrary.dll
Normal file
BIN
Assets/Plugins/JoyShockLibrary/Plugins/JoyShockLibrary.dll
Normal file
Binary file not shown.
|
|
@ -19,7 +19,7 @@ PluginImporter:
|
||||||
Exclude Editor: 0
|
Exclude Editor: 0
|
||||||
Exclude Linux64: 0
|
Exclude Linux64: 0
|
||||||
Exclude OSXUniversal: 0
|
Exclude OSXUniversal: 0
|
||||||
Exclude Win: 0
|
Exclude Win: 1
|
||||||
Exclude Win64: 0
|
Exclude Win64: 0
|
||||||
- first:
|
- first:
|
||||||
Any:
|
Any:
|
||||||
|
|
@ -31,9 +31,9 @@ PluginImporter:
|
||||||
second:
|
second:
|
||||||
enabled: 1
|
enabled: 1
|
||||||
settings:
|
settings:
|
||||||
CPU: AnyCPU
|
CPU: x86_64
|
||||||
DefaultValueInitialized: true
|
DefaultValueInitialized: true
|
||||||
OS: AnyOS
|
OS: Windows
|
||||||
- first:
|
- first:
|
||||||
Standalone: Linux64
|
Standalone: Linux64
|
||||||
second:
|
second:
|
||||||
|
|
@ -49,9 +49,9 @@ PluginImporter:
|
||||||
- first:
|
- first:
|
||||||
Standalone: Win
|
Standalone: Win
|
||||||
second:
|
second:
|
||||||
enabled: 1
|
enabled: 0
|
||||||
settings:
|
settings:
|
||||||
CPU: x86
|
CPU: None
|
||||||
- first:
|
- first:
|
||||||
Standalone: Win64
|
Standalone: Win64
|
||||||
second:
|
second:
|
||||||
|
|
@ -17,31 +17,33 @@
|
||||||
#define JS_SPLIT_TYPE_RIGHT 2
|
#define JS_SPLIT_TYPE_RIGHT 2
|
||||||
#define JS_SPLIT_TYPE_FULL 3
|
#define JS_SPLIT_TYPE_FULL 3
|
||||||
|
|
||||||
#define JSMASK_UP 0x00001
|
#define JSMASK_UP 0x000001
|
||||||
#define JSMASK_DOWN 0x00002
|
#define JSMASK_DOWN 0x000002
|
||||||
#define JSMASK_LEFT 0x00004
|
#define JSMASK_LEFT 0x000004
|
||||||
#define JSMASK_RIGHT 0x00008
|
#define JSMASK_RIGHT 0x000008
|
||||||
#define JSMASK_PLUS 0x00010
|
#define JSMASK_PLUS 0x000010
|
||||||
#define JSMASK_OPTIONS 0x00010
|
#define JSMASK_OPTIONS 0x000010
|
||||||
#define JSMASK_MINUS 0x00020
|
#define JSMASK_MINUS 0x000020
|
||||||
#define JSMASK_SHARE 0x00020
|
#define JSMASK_SHARE 0x000020
|
||||||
#define JSMASK_LCLICK 0x00040
|
#define JSMASK_LCLICK 0x000040
|
||||||
#define JSMASK_RCLICK 0x00080
|
#define JSMASK_RCLICK 0x000080
|
||||||
#define JSMASK_L 0x00100
|
#define JSMASK_L 0x000100
|
||||||
#define JSMASK_R 0x00200
|
#define JSMASK_R 0x000200
|
||||||
#define JSMASK_ZL 0x00400
|
#define JSMASK_ZL 0x000400
|
||||||
#define JSMASK_ZR 0x00800
|
#define JSMASK_ZR 0x000800
|
||||||
#define JSMASK_S 0x01000
|
#define JSMASK_S 0x001000
|
||||||
#define JSMASK_E 0x02000
|
#define JSMASK_E 0x002000
|
||||||
#define JSMASK_W 0x04000
|
#define JSMASK_W 0x004000
|
||||||
#define JSMASK_N 0x08000
|
#define JSMASK_N 0x008000
|
||||||
#define JSMASK_HOME 0x10000
|
#define JSMASK_HOME 0x010000
|
||||||
#define JSMASK_PS 0x10000
|
#define JSMASK_PS 0x010000
|
||||||
#define JSMASK_CAPTURE 0x20000
|
#define JSMASK_CAPTURE 0x020000
|
||||||
#define JSMASK_TOUCHPAD_CLICK 0x20000
|
#define JSMASK_TOUCHPAD_CLICK 0x020000
|
||||||
#define JSMASK_MIC 0x40000
|
#define JSMASK_MIC 0x040000
|
||||||
#define JSMASK_SL 0x40000
|
#define JSMASK_SL 0x080000
|
||||||
#define JSMASK_SR 0x80000
|
#define JSMASK_SR 0x100000
|
||||||
|
#define JSMASK_FNL 0x200000
|
||||||
|
#define JSMASK_FNR 0x400000
|
||||||
|
|
||||||
#define JSOFFSET_UP 0
|
#define JSOFFSET_UP 0
|
||||||
#define JSOFFSET_DOWN 1
|
#define JSOFFSET_DOWN 1
|
||||||
|
|
@ -66,8 +68,10 @@
|
||||||
#define JSOFFSET_CAPTURE 17
|
#define JSOFFSET_CAPTURE 17
|
||||||
#define JSOFFSET_TOUCHPAD_CLICK 17
|
#define JSOFFSET_TOUCHPAD_CLICK 17
|
||||||
#define JSOFFSET_MIC 18
|
#define JSOFFSET_MIC 18
|
||||||
#define JSOFFSET_SL 18
|
#define JSOFFSET_SL 19
|
||||||
#define JSOFFSET_SR 19
|
#define JSOFFSET_SR 20
|
||||||
|
#define JSOFFSET_FNL 21
|
||||||
|
#define JSOFFSET_FNR 22
|
||||||
|
|
||||||
// PS5 Player maps for the DS Player Lightbar
|
// PS5 Player maps for the DS Player Lightbar
|
||||||
#define DS5_PLAYER_1 4
|
#define DS5_PLAYER_1 4
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 129c872137ca57441bd8e920a0caceef
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
: Any
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
Exclude Editor: 1
|
||||||
|
Exclude Linux64: 1
|
||||||
|
Exclude OSXUniversal: 1
|
||||||
|
Exclude Win: 1
|
||||||
|
Exclude Win64: 1
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
OS: AnyOS
|
||||||
|
- first:
|
||||||
|
Standalone: Linux64
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: None
|
||||||
|
- first:
|
||||||
|
Standalone: OSXUniversal
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: None
|
||||||
|
- first:
|
||||||
|
Standalone: Win
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: None
|
||||||
|
- first:
|
||||||
|
Standalone: Win64
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: None
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Plugins/JoyShockLibrary/Plugins/libJoyShockLibrary.dylib
Normal file
BIN
Assets/Plugins/JoyShockLibrary/Plugins/libJoyShockLibrary.dylib
Normal file
Binary file not shown.
|
|
@ -0,0 +1,63 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4808849b7792adb4b852af4fbb552d0e
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 1
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
: Any
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
Exclude Editor: 0
|
||||||
|
Exclude Linux64: 1
|
||||||
|
Exclude OSXUniversal: 0
|
||||||
|
Exclude Win: 1
|
||||||
|
Exclude Win64: 1
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
OS: OSX
|
||||||
|
- first:
|
||||||
|
Standalone: Linux64
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
- first:
|
||||||
|
Standalone: OSXUniversal
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
- first:
|
||||||
|
Standalone: Win
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: x86
|
||||||
|
- first:
|
||||||
|
Standalone: Win64
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: x86_64
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Plugins/JoyShockLibrary/Plugins/libJoyShockLibrary.so
Normal file
BIN
Assets/Plugins/JoyShockLibrary/Plugins/libJoyShockLibrary.so
Normal file
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: c785dbfac2c67974fa1cce056df6404d
|
guid: 2fca353d6ce7fb94099ff7c8b75293a3
|
||||||
PluginImporter:
|
PluginImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
|
|
@ -33,7 +33,7 @@ PluginImporter:
|
||||||
settings:
|
settings:
|
||||||
CPU: AnyCPU
|
CPU: AnyCPU
|
||||||
DefaultValueInitialized: true
|
DefaultValueInitialized: true
|
||||||
OS: AnyOS
|
OS: Linux
|
||||||
- first:
|
- first:
|
||||||
Standalone: Linux64
|
Standalone: Linux64
|
||||||
second:
|
second:
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 7609f7b6787a54496aa41a3053fcc76a
|
guid: 8a8e6577c9e32f04c85e89a8f43e92fa
|
||||||
timeCreated: 1483902788
|
|
||||||
licenseType: Pro
|
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
defaultReferences: []
|
defaultReferences: []
|
||||||
executionOrder: 0
|
executionOrder: 0
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: ddc4e7b83981f244ba9a26b88c18cb67
|
guid: cb2d899d659d1184bb966272a336be62
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue