Skip to content

Commit d0e85ff

Browse files
Fixes #1
* Add more features with InputterTester
1 parent 8bcc432 commit d0e85ff

51 files changed

Lines changed: 4071 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Editor.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/ExtensionProcessorEditor.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using UnityEditor;
2+
using UnityEngine;
3+
using UnityEngine.InputSystem.Editor;
4+
5+
namespace Inputter
6+
{
7+
public class ExtensionProcessorEditor : InputParameterEditor<ExtensionProcessor>
8+
{
9+
public override void OnGUI()
10+
{
11+
var style = new GUIStyle
12+
{
13+
normal = new GUIStyleState
14+
{
15+
textColor = Color.grey,
16+
},
17+
fontStyle = FontStyle.Italic,
18+
wordWrap = true,
19+
};
20+
21+
EditorGUILayout.LabelField("Note: Action Type must be of Pass Through, in order to work", style);
22+
EditorGUILayout.Space(10f);
23+
24+
target.sensitivitySpeed = EditorGUILayout.FloatField("Sensitivity Speed", target.sensitivitySpeed);
25+
target.gravitySpeed = EditorGUILayout.FloatField("Gravity Speed", target.gravitySpeed);
26+
}
27+
}
28+
}

Editor/ExtensionProcessorEditor.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Inputter.Editor.asmdef

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "Inputter.Runtime.Editor",
3+
"rootNamespace": "",
4+
"references": [
5+
"GUID:4cb071ee81692854ab0e0c65eb9ba25e",
6+
"GUID:75469ad4d38634e559750d17036d5f7c"
7+
],
8+
"includePlatforms": [
9+
"Editor"
10+
],
11+
"excludePlatforms": [],
12+
"allowUnsafeCode": false,
13+
"overrideReferences": false,
14+
"precompiledReferences": [],
15+
"autoReferenced": true,
16+
"defineConstraints": [],
17+
"versionDefines": [],
18+
"noEngineReferences": false
19+
}

Editor/Inputter.Editor.asmdef.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Inputter.cs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using UnityEngine;
5+
using UnityEditor;
6+
7+
namespace Inputter.Editor
8+
{
9+
/// <summary>
10+
/// Adds the given define symbols to PlayerSettings define symbols.
11+
/// Just add your own define symbols to the Symbols property at the below.
12+
/// </summary>
13+
[InitializeOnLoad]
14+
public class Inputter : UnityEditor.Editor
15+
{
16+
/// <summary>
17+
/// Symbols that will be added to the editor
18+
/// </summary>
19+
public static readonly string[] Symbols = new[]
20+
{
21+
"INPUTTER"
22+
};
23+
24+
/// <summary>
25+
/// Add define symbols as soon as Unity gets done compiling.
26+
/// </summary>
27+
static Inputter()
28+
{
29+
var definesString = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
30+
31+
var allDefines = definesString.Split(';').ToList();
32+
33+
allDefines.AddRange(Symbols.Except(allDefines));
34+
35+
PlayerSettings.SetScriptingDefineSymbolsForGroup(
36+
EditorUserBuildSettings.selectedBuildTargetGroup,
37+
string.Join(";", allDefines.ToArray()));
38+
}
39+
40+
}
41+
}

Editor/Inputter.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 MrRobin
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

LICENSE.txt.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)