浏览代码

Refactor : Dependencies as OpenUPM references (#31)

* Removed NaughtyAttributes / Upgraded Code to 2020.1

* Added NoLabel Property Drawers

* Updated Changelog

* Upgraded Logo to 2020.1

* Updated Site Banner

* Updated Readme install instructions

* Updated Package.json

* Updated README instructions

* Updated Changelog
/main
GitHub 4 年前
当前提交
24e9e3e7
共有 27 个文件被更改,包括 1782 次插入1473 次删除
  1. 19
      CHANGELOG.md
  2. 999
      Documentation~/Images/site-banner.png
  3. 999
      Documentation~/Images/wizard-banner.png
  4. 1
      Editor/PropertyDrawers/CallablePropertyDrawer.cs
  5. 999
      Editor/WelcomeScreen/welcome-title.png
  6. 34
      README.md
  7. 2
      Runtime/Ingredients/Factory/Factory.cs
  8. 2
      Runtime/Ingredients/Rigs/ReachPositionRig.cs
  9. 2
      Runtime/Ingredients/Timer/TimerDisplayRig.cs
  10. 2
      Runtime/LevelScripting/Actions/LogAction.cs
  11. 2
      Runtime/LevelScripting/Events/OnUpdateEvent.cs
  12. 2
      Runtime/Managers/Implementations/GameSaveManager.cs
  13. 4
      Runtime/Settings/GameplayIngredientsSettings.cs
  14. 9
      package.json
  15. 2
      Editor/PropertyDrawers/NoLabelPropertyDrawer.cs.meta
  16. 2
      Runtime/Attributes/NoLabelAttribute.cs.meta
  17. 2
      Documentation~/Images/bg-source2.txt
  18. 142
      Documentation~/Images/project-settings.png
  19. 16
      Editor/PropertyDrawers/NoLabelPropertyDrawer.cs
  20. 7
      Runtime/Attributes/NoLabelAttribute.cs
  21. 8
      NaughtyAttributes.meta
  22. 0
      /Editor/PropertyDrawers/NoLabelPropertyDrawer.cs.meta
  23. 0
      /Runtime/Attributes/NoLabelAttribute.cs.meta

19
CHANGELOG.md


# Changelog
## 2020.2.0
This release changes the minimal version to **Unity 2020.2**
The following release changes the main guidelines in order to install and update:
* Installation and update now rely on Project Settings/Package Manager/Scoped Registries
* Installation must declare the OpenUPM scoped registry to the project `https://package.openupm.com` with the following scopes:
* `net.peeweek`
* `com.dbrizov` (used for NaughtyAttributes dependency, minimal version 2.0.8)
* Once declared in the Scoped Registries, package manager shall display gameplay ingredients.
#### Added
* NoLabel property attribute (Hides label in inspector)
## 2019.3.7
#### Added

999
Documentation~/Images/site-banner.png
文件差异内容过多而无法显示
查看文件

999
Documentation~/Images/wizard-banner.png
文件差异内容过多而无法显示
查看文件

1
Editor/PropertyDrawers/CallablePropertyDrawer.cs


namespace GameplayIngredients.Editor
{
[CustomPropertyDrawer(typeof(Callable))]
public class CallablePropertyDrawer : PropertyDrawer
{

999
Editor/WelcomeScreen/welcome-title.png
文件差异内容过多而无法显示
查看文件

34
README.md


## Requirements
* **Unity 2020.2** (Older versions compatible with 2018.3 / 2019.1 / 2019.2 / 2019.3 / 2019.4 / 2020.1)
* Package Manager UI
* (**Optional** : Command-line Git installed on your system, for example [Git For Windows](https://gitforwindows.org/))
* **Unity 2020.2** (Older versions compatible with 2018.3 / 2019.1 / 2019.2 / 2019.3 / 2020.1)
* (**Optional, for older versions or development** : Command-line Git installed on your system, for example [Git For Windows](https://gitforwindows.org/))
## How to install
## How to install (2020.2 and Newer)
### Install as Local Package
* In Unity, Open **Project Settings** Window (Edit/Project Settings) and navigate to **Package Manager**
* Add a new **Scoped Registry** that references the [openupm registry](https://openupm.com): `https://package.openupm.com`
* Add the following scopes to the OpenUPM Scoped Registry : `com.dbrizov`, `net.peeweek`
You can use a manual, local package installation if you need to alter the code locally or update the code base regularly.
![](https://raw.githubusercontent.com/peeweek/net.peeweek.gameplay-ingredients/master/Documentation%7E/Images/project-settings.png)
- Clone this repository somewhere of your liking
- In your project, open the `Window/Package Manager` window and use the + button to select the `Add Package from Disk...` option.
- Navigate to your repository folder and select the `package.json` file
- The package shall be added as a **local package**
* Open the Package Manager window (Window/Package Manager) and Select **Packages : My Registries** in the toolbar.
* Select Gameplay Ingredients in the list, then click the Install Button
## How to install as Local Package (2020.2 and Newer)
* Clone the repository.
* In Unity, Open **Project Settings** Window (Edit/Project Settings) and navigate to **Package Manager**
* Add a new **Scoped Registry** that references the [openupm registry](https://openupm.com): `https://package.openupm.com`
* Add the following scopes to the OpenUPM Scoped Registry : `com.dbrizov`, `net.peeweek`
* Open the Package Manager window (Window/Package Manager)
* Click the plus button, select "Add Pacakge from disk" and locate the `package.json` file located at the root of the package.
## How to install (2019.3.x and Older)
### Install via OpenUPM

Gameplay Ingredients comes at latest version with the following compatibility:
**Unity 2019.3** : clone and check out the `master` branch at the tag `2019.3.7`
**Unity 2020.2 +** : choose the tag `2020.2.0`
* **Unity 2019.3 / 2020.1** : choose the the tag `2019.3.7`

2
Runtime/Ingredients/Factory/Factory.cs


}
[Header("Blueprint")]
[ReorderableList, NonNullCheck]
[ReorderableList, NoLabel, NonNullCheck]
public GameObject[] FactoryBlueprints;
public BlueprintSelectionMode blueprintSelecionMode = BlueprintSelectionMode.Random;
[ShowIf("usesGameSave")]

2
Runtime/Ingredients/Rigs/ReachPositionRig.cs


[Header("Target")]
[SerializeField]
[InfoBox("Target needs to have the same parent as the current game object", InfoBoxType.Warning, "warnLocalParent")]
[InfoBox("Target needs to have the same parent as the current game object", EInfoBoxType.Warning)]
protected Transform m_Target;
[Header("Motion")]
public float Dampen = 1.0f;

2
Runtime/Ingredients/Timer/TimerDisplayRig.cs


[NonNullCheck]
public Timer timer;
[InfoBox("Use the following wildcards:\n - %h : hours\n - %m : minutes\n - %s : seconds\n - %x : milliseconds", InfoBoxType.Normal)]
[InfoBox("Use the following wildcards:\n - %h : hours\n - %m : minutes\n - %s : seconds\n - %x : milliseconds", EInfoBoxType.Normal)]
public string format = "%h:%m:%s:%x";
private void OnValidate()

2
Runtime/LevelScripting/Actions/LogAction.cs


%TIME% : Time (since startup)
";
[Multiline, InfoBox(kHelpText, InfoBoxType.Normal)]
[Multiline, InfoBox(kHelpText, EInfoBoxType.Normal)]
public string LogText = "Instigator = %INSTIGATOR%";
public LogType type = LogType.Log;

2
Runtime/LevelScripting/Events/OnUpdateEvent.cs


{
public class OnUpdateEvent : EventBase
{
[ReorderableList, ShowIf("AllowUpdateCalls"), InfoBox("Update Calls are disabled on this project. Check your GameplayIngredientsSettings asset if you want to allow them.", InfoBoxType.Warning, "ForbidUpdateCalls")]
[ReorderableList, ShowIf("AllowUpdateCalls")]
public Callable[] OnUpdate;
private void OnEnable()

2
Runtime/Managers/Implementations/GameSaveManager.cs


[ManagerDefaultPrefab("GameSaveManager")]
public class GameSaveManager : Manager
{
[InfoBox(@"Use PlayerPrefs will store save data in common target platform registry instead of individual files. For some platforms where writing on disk is forbidden, this is required.", InfoBoxType.Normal)]
[InfoBox(@"Use PlayerPrefs will store save data in common target platform registry instead of individual files. For some platforms where writing on disk is forbidden, this is required.", EInfoBoxType.Normal)]
public bool UsePlayerPrefs = false;
[DisableIf("UsePlayerPrefs"), SerializeField, Tooltip("The path where system and user saves will be stored. Relative to the Application.persistantDataPath folder.")]

4
Runtime/Settings/GameplayIngredientsSettings.cs


protected string[] m_ExcludedManagers;
[BoxGroup("Callables")]
[SerializeField, InfoBox("Verbose Calls enable logging at runtime, this can lead to performance drop, use only when debugging.", InfoBoxType.Warning, "m_VerboseCalls")]
[SerializeField, InfoBox("Verbose Calls enable logging at runtime, this can lead to performance drop, use only when debugging.", EInfoBoxType.Warning)]
[SerializeField, InfoBox("Per-update calls should be avoided due to high performance impact. Enable and use with care, only if strictly necessary.", InfoBoxType.Warning, "m_AllowUpdateCalls")]
[SerializeField, InfoBox("Per-update calls should be avoided due to high performance impact. Enable and use with care, only if strictly necessary.", EInfoBoxType.Warning)]
private bool m_AllowUpdateCalls = false;
const string kAssetName = "GameplayIngredientsSettings";

9
package.json


{
"name": "net.peeweek.gameplay-ingredients",
"displayName": "Gameplay Ingredients",
"version": "2019.3.7",
"version": "2020.2.0",
"unity": "2019.3",
"unity": "2020.2",
"com.unity.cinemachine": "2.5.0",
"com.unity.timeline" : "1.3.0"
"com.unity.cinemachine": "2.6.3",
"com.unity.timeline": "1.4.5",
"com.dbrizov.naughtyattributes" : "2.0.8"
},
"keywords": [
"Gameplay",

2
Editor/PropertyDrawers/NoLabelPropertyDrawer.cs.meta


fileFormatVersion: 2
guid: dac53a514fd03bb48b3fae8d3d23bf78
guid: 174492dd868634b4291352bef24a3598
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
Runtime/Attributes/NoLabelAttribute.cs.meta


fileFormatVersion: 2
guid: a3ef98b2c0ffe1b4c91fbec23d77898e
guid: 91ceac716d1fbf249ba4f46ed1067339
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
Documentation~/Images/bg-source2.txt


Photo by NordWood Themes on Unsplash
https://unsplash.com/photos/wtevVfGYwnM

142
Documentation~/Images/project-settings.png

之前 之后
宽度: 714  |  高度: 538  |  大小: 51 KiB

16
Editor/PropertyDrawers/NoLabelPropertyDrawer.cs


using UnityEngine;
using UnityEditor;
namespace GameplayIngredients.Editor
{
[CustomPropertyDrawer(typeof(NoLabelAttribute))]
public class NoLabelPropertyDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
EditorGUIUtility.labelWidth = 0;
EditorGUI.PropertyField(position, property, GUIContent.none);
}
}
}

7
Runtime/Attributes/NoLabelAttribute.cs


using System;
using UnityEngine;
namespace GameplayIngredients
{
public class NoLabelAttribute : PropertyAttribute { }
}

8
NaughtyAttributes.meta


fileFormatVersion: 2
guid: bfdc546b0991bd54fb24ad7151d27f7e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

/NaughtyAttributes/Core/DrawerAttributes/DisableIfAttribute.cs.meta → /Editor/PropertyDrawers/NoLabelPropertyDrawer.cs.meta

/NaughtyAttributes/Core/DrawerAttributes/EnableIfAttribute.cs.meta → /Runtime/Attributes/NoLabelAttribute.cs.meta

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存