浏览代码

update local packages

/main
Laurenth 5 年前
当前提交
96b9f0c1
共有 907 个文件被更改,包括 1255 次插入41 次删除
  1. 16
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/GameplayIngredients.asmdef
  2. 24
      LocalPackages/net.peeweek.gameplay-ingredients/package.json
  3. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/ActionBase.cs.meta
  4. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/ApplicationExitAction.cs.meta
  5. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/AudioMixParameterAction.cs
  6. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/AudioMixParameterAction.cs.meta
  7. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/AudioMixParameterCurveAction.cs
  8. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/AudioMixParameterCurveAction.cs.meta
  9. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/CursorAction.cs
  10. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/CursorAction.cs.meta
  11. 9
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/CycleResolutionsAction.cs
  12. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/CycleResolutionsAction.cs.meta
  13. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/CycleWindowModeAction.cs
  14. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/CycleWindowModeAction.cs.meta
  15. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/SetAnimatorParameterAction.cs.meta
  16. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/FocusUIAction.cs.meta
  17. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/SendMessageAction.cs.meta
  18. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/SetTimeScaleAction.cs
  19. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/SetTimeScaleAction.cs.meta
  20. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/UnityEventAction.cs.meta
  21. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/StreamingLevelAction.cs.meta
  22. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/SwitcherAction.cs.meta
  23. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/TakeScreenshotAction.cs
  24. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/TakeScreenshotAction.cs.meta
  25. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/ToggleGameObjectAction.cs.meta
  26. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Logic/ConditionalLogic.cs.meta
  27. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Logic/DelayedLogic.cs.meta
  28. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Logic/NextFrameLogic.cs.meta
  29. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Editor/GameplayIngredientsAssetPostprocessor.cs.meta
  30. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Editor/HiearchyItems.cs.meta
  31. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Editor/MenuItems.cs.meta
  32. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Events/OnTriggerEvent.cs.meta
  33. 152
      LocalPackages/net.peeweek.gameplay-ingredients/CHANGELOG.md
  34. 7
      LocalPackages/net.peeweek.gameplay-ingredients/CHANGELOG.md.meta
  35. 8
      LocalPackages/net.peeweek.gameplay-ingredients/Editor.meta
  36. 8
      LocalPackages/net.peeweek.gameplay-ingredients/Icons.meta
  37. 21
      LocalPackages/net.peeweek.gameplay-ingredients/LICENSE
  38. 7
      LocalPackages/net.peeweek.gameplay-ingredients/LICENSE.meta
  39. 8
      LocalPackages/net.peeweek.gameplay-ingredients/NaughtyAttributes.meta
  40. 43
      LocalPackages/net.peeweek.gameplay-ingredients/README.md
  41. 7
      LocalPackages/net.peeweek.gameplay-ingredients/README.md.meta
  42. 8
      LocalPackages/net.peeweek.gameplay-ingredients/Resources.meta
  43. 8
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/Controllers.meta
  44. 8
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/Discover.meta
  45. 12
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/GameLevel.cs
  46. 11
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/GameLevel.cs.meta
  47. 31
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/GameObjectExtensions.cs
  48. 11
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/GameObjectExtensions.cs.meta
  49. 8
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/Ingredients.meta
  50. 8
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting.meta
  51. 8
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/Managers.meta
  52. 8
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/PropertyAttributes.meta
  53. 8
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/SceneViewPOV.meta
  54. 8
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/Settings.meta
  55. 8
      LocalPackages/net.peeweek.gameplay-ingredients/StarterAssets.meta
  56. 8
      LocalPackages/net.peeweek.gameplay-ingredients/UI.meta
  57. 9
      LocalPackages/LightingTools.LightProbesVolumes/Editor.meta
  58. 143
      LocalPackages/LightingTools.LightProbesVolumes/Editor/LightProbesVolume.png
  59. 103
      LocalPackages/LightingTools.LightProbesVolumes/Editor/LightProbesVolume.png.meta
  60. 70
      LocalPackages/LightingTools.LightProbesVolumes/Editor/LightProbesVolumeEditor.cs
  61. 12
      LocalPackages/LightingTools.LightProbesVolumes/Editor/LightProbesVolumeEditor.cs.meta
  62. 16
      LocalPackages/LightingTools.LightProbesVolumes/Editor/LightingTools.LightProbesVolumes.Editor.asmdef
  63. 9
      LocalPackages/LightingTools.LightProbesVolumes/Editor/LightingTools.LightProbesVolumes.Editor.asmdef.meta
  64. 18
      LocalPackages/LightingTools.LightProbesVolumes/Editor/RefreshLightProbesVolumes.cs
  65. 12
      LocalPackages/LightingTools.LightProbesVolumes/Editor/RefreshLightProbesVolumes.cs.meta
  66. 40
      LocalPackages/LightingTools.LightProbesVolumes/README.md
  67. 7
      LocalPackages/LightingTools.LightProbesVolumes/README.md.meta
  68. 10
      LocalPackages/LightingTools.LightProbesVolumes/Runtime.meta
  69. 194
      LocalPackages/LightingTools.LightProbesVolumes/Runtime/LightProbesPlacement.cs
  70. 13
      LocalPackages/LightingTools.LightProbesVolumes/Runtime/LightProbesPlacement.cs.meta
  71. 31
      LocalPackages/LightingTools.LightProbesVolumes/Runtime/LightProbesVolumeSettings.cs
  72. 12
      LocalPackages/LightingTools.LightProbesVolumes/Runtime/LightProbesVolumeSettings.cs.meta
  73. 8
      LocalPackages/LightingTools.LightProbesVolumes/Runtime/LightingTools.LightProbesVolumes.asmdef
  74. 9
      LocalPackages/LightingTools.LightProbesVolumes/Runtime/LightingTools.LightProbesVolumes.asmdef.meta
  75. 7
      LocalPackages/LightingTools.LightProbesVolumes/package.json
  76. 9
      LocalPackages/LightingTools.LightProbesVolumes/package.json.meta
  77. 11
      LocalPackages/LightingTools.LightmapSwitcher/CHANGELOG.md
  78. 7
      LocalPackages/LightingTools.LightmapSwitcher/CHANGELOG.md.meta
  79. 9
      LocalPackages/LightingTools.LightmapSwitcher/CONTRIBUTING.md
  80. 7
      LocalPackages/LightingTools.LightmapSwitcher/CONTRIBUTING.md.meta
  81. 9
      LocalPackages/LightingTools.LightmapSwitcher/Editor.meta

16
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/GameplayIngredients.asmdef


{
"name": "GameplayIngredients",
"references": [],
"optionalUnityReferences": [],
"references": [
"NaughtyAttributes.Core",
"Cinemachine",
"Unity.Timeline",
"UnityEngine.UI"
],
"allowUnsafeCode": false
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

24
LocalPackages/net.peeweek.gameplay-ingredients/package.json


{
"name": "net.peeweek.gameplay-ingredients",
"displayName": "Gameplay Ingredients",
"version": "0.0.1",
"unity": "2018.3",
"description": "Gameplay ingredients base package"
"name": "net.peeweek.gameplay-ingredients",
"displayName": "Gameplay Ingredients",
"version": "2019.3.1",
"category": "Gameplay",
"unity": "2019.3",
"description": "Gameplay ingredients - A Collection of scripts for the editor and runtime to set-up gameplay actions and logic in your games.",
"dependencies": {
"com.unity.cinemachine": "2.3.4"
},
"keywords": [
"Gameplay",
"Ingredients",
"Unity",
"Behaviour",
"State Machine",
"Editor",
"Streaming"
],
"hideInEditor": false
}

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/ActionBase.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 87355f4718c07b542b49dd0fe0abe447, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/ApplicationExitAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: d8d829f83095c314fa81326a7695d5df, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/AudioMixParameterAction.cs


public UnityEvent OnInterpComplete;
Coroutine m_Coroutine;
public override void Execute()
public override void Execute(GameObject instigator = null)
{
if (InterpDuration <= 0.0f)
{

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/AudioMixParameterAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: bdcc63f36a8ac6643bbfb90bb398716a, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/AudioMixParameterCurveAction.cs


public UnityEvent OnInterpComplete;
Coroutine m_Coroutine;
public override void Execute()
public override void Execute(GameObject instigator = null)
{
if (m_Coroutine != null)

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/AudioMixParameterCurveAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: bdcc63f36a8ac6643bbfb90bb398716a, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/CursorAction.cs


public CursorLockMode LockState = CursorLockMode.None;
public bool CursorVisible = true;
public override void Execute()
public override void Execute(GameObject instigator = null)
{
Cursor.lockState = LockState;
Cursor.visible = CursorVisible;

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/CursorAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: ba45de1ff09adbf459f4db4bf50a8c14, type: 3}
userData:
assetBundleName:
assetBundleVariant:

9
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/CycleResolutionsAction.cs


string getText(Resolution currentResolution)
{
#if UNITY_EDITOR
return "No resolution switch in the editor";
#endif
#if !UNITY_EDITOR
if (currentResolution.width == 0 || currentResolution.height == 0)
{

return string.Format("Resolution: {0}X{1}", currentResolution.width, currentResolution.height);
#else
return "No resolution switch in the editor";
#endif
}
Resolution[] availableResolutions;

ButtonLabel.text = getText(selectedResolution);
}
public override void Execute()
public override void Execute(GameObject instigator = null)
{
// When we are in the editor we don't have any available resolutions
if (availableResolutions.Length == 0)

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/CycleResolutionsAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 4112ad68bb67a9646acd12615491fc97, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/CycleWindowModeAction.cs


ButtonLabel.text = getText(Screen.fullScreen);
}
public override void Execute()
public override void Execute(GameObject instigator = null)
{
Screen.fullScreen = !Screen.fullScreen;
}

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/CycleWindowModeAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 4112ad68bb67a9646acd12615491fc97, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/SetAnimatorParameterAction.cs.meta


fileFormatVersion: 2
guid: e5b32278809154e47b5d8375352f6f8f
guid: e5f9a6ca2faa0514095c2a061d47807e
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/FocusUIAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: eccd73d046a00214f8eee58ce0e2b16e, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/SendMessageAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 60943dcd3a3663942942cf1f0dce3c11, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/SetTimeScaleAction.cs


{
public float TimeScale = 1.0f;
public override void Execute()
public override void Execute(GameObject instigator = null)
{
Time.timeScale = TimeScale;
}

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/SetTimeScaleAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 119b1440af22d6247a08df45aa367754, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/UnityEventAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 5c4fb08bfbc3da848b42e663f823b47e, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/StreamingLevelAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 225c53326635b1748868c470ea1bccce, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/SwitcherAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 225c53326635b1748868c470ea1bccce, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/TakeScreenshotAction.cs


public int figureCount = 2;
private int screenshotNumber = 0;
public override void Execute()
public override void Execute(GameObject instigator = null)
{
ScreenCapture.CaptureScreenshot(name + screenshotNumber.ToString().PadLeft(figureCount, '0') + ".png", supersampleRate);
screenshotNumber += 1;

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/TakeScreenshotAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 4112ad68bb67a9646acd12615491fc97, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/ToggleGameObjectAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 225c53326635b1748868c470ea1bccce, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Logic/ConditionalLogic.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 6d0a734cdedf48d478f3fcc7612af66f, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Logic/DelayedLogic.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 6d0a734cdedf48d478f3fcc7612af66f, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Logic/NextFrameLogic.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 6d0a734cdedf48d478f3fcc7612af66f, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
LocalPackages/net.peeweek.gameplay-ingredients/Editor/GameplayIngredientsAssetPostprocessor.cs.meta


fileFormatVersion: 2
guid: 19e53b416fec4b341a147adedee96946
guid: a13118b22a04c0d4d95bb500a88e59ab
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
LocalPackages/net.peeweek.gameplay-ingredients/Editor/HiearchyItems.cs.meta


fileFormatVersion: 2
guid: 067ff0798d64f3f4cab5a7ddf7057db3
guid: 28d66973767a30643a54411070050920
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
LocalPackages/net.peeweek.gameplay-ingredients/Editor/MenuItems.cs.meta


fileFormatVersion: 2
guid: 4a42a87995c7dd1418e01c581ec175f1
guid: 9b95ff60e46051544a400d4a0afa962b
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Events/OnTriggerEvent.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 72c736bbabc19884988f7d3f5376ee26, type: 3}
icon: {fileID: 2800000, guid: 6059a3dad39232d428c4045188ba78a7, type: 3}
userData:
assetBundleName:
assetBundleVariant:

152
LocalPackages/net.peeweek.gameplay-ingredients/CHANGELOG.md


# Changelog
## 2019.3.1
#### Changed
* **Messager** is now able to pass instigator Game Object through message broadcast.
* **OnMessageEvent** now passes the optional instigator instead of itself as instigator to the Calls. In order to pass itself use an intermediate **SetInstigatorLogic** that targets the OnMessageEvent owner to replicate the former behaviour.
* **SendMessageAction** now passes its instigator game object to the **Messager**
#### Added
* **Call Tree Explorer**: Added Category for Erroneous Calls
* Added **ToggleBehaviourAction** working the same as ToggleGameObjectAction, but for behaviour components instead.
* **SendMessageBehaviour** (Timeline Send Message Tracks/Clips) now displays an instigator game object field in the inspector to be attached to the sent message.
* Added **VFXSetPropertyAction**
* Added **VFXSendEventAction**
#### Fixed
* Fixed `OnValidate` for FirstPersonController leading to infinite import loop when displaying the inspector for a Prefab Asset.
* Fix for null Callables in Callable Tree Window.
## 2019.3.0
* Feature Release
* Requires Unity 2019.3.0 or newer
#### Added
* **Call Tree Explorer :** Using Window/Gameplay Ingredients/Call Tree Explorer , opens a window that lists the tree of Events, Logic and Actions, State Machines and Event Calling Actions
* **Folders:** In the Game Object creation Menu, Select folder to add a folder in the hierarchy. Automatically adds Static Game Objects with colored icon (Displayed using Advanced Hierarchy View)
* **Global Variables System**:
- Added Global Variables (Globals + Local Scope)
- Added Global Variable Debug Window (`Window/Gameplay Ingredients/Globals Debug`)
- Added Global Variable Set Action
- Added Global Variable Logic
- Added Global Variables Reset Action
* **Timers**:
* Added Timer Component
* Added TimerAction to control Timer
* Added TimerDisplayRig
* Added option in GameplayIngredientsSettings to disable visibility of Callable[] bound to Update Loops.
* Added OnUpdate Event : Perform calls every update
* Added OnColider Event : Perform calls upon collisions
* Added OnJoinBreak Event : Perform calls upon Rigid body joint break
* Added FlipFlop Logic : Two-state latch logic
* Added State Logic : Perform logic based on State Machine current state.
* Added Audio Mix Snapshot Action : Set Mixer Snapshots
* Added RigidBody Action : Perform actions on a rigidbody
* Added SetAnimatorParameterAction : Perform parameter setting on Animators
* Added Sacrifice Oldest option to Factory : When needing a new spawn but no slots left, sacrifices the first spawn of the list
* Added Context Menu in ToggleGameObjectAction to update entries based on current enabled state in scene.
#### Changed
- Improved **Find & Replace** window, with a selection-based criteria.
- Moved Menu Items in Window menu into a Gameplay Ingredients Subfolder
- GameManager Resets Global Variables Local Scope on Level Load
- Updated NaughtyAttributes to a more recent version
- Renamed the Add Game Object menu category from `'GameplayIngredients' to 'Gameplay Ingredients'` and adjusted its contents
#### Fixed
* Fixed LinkGameView not working in play mode when excluding VirtualCameraManager.
* Fixed Performance issue in GameplayIngredientsSettings when having a big list of Excluded managers.
* Fixed ApplicationExitAction : Exits play mode when in Editor.
## 2019.1.2
#### Changed
* **[Breaking Change]** Discover Assets now reference many Scenes/SceneSetups
* Action to take: have to re-reference scenes in Discover Asset
#### Added
* Added Screenshot Manager (Defaults to F11 to take screenshots)
* Added OnMouseDownEvent
* Added OnMouseHoverEvent
* Added OnVisibilityEvent
* Added SaveDataSwitchOnIntLogic
#### Fixed
* Fixed warning in CycleResolutionsAction
## 2019.1.1
#### Changed
#### Added
* Log Action
* Added Playable Director to objects in discover (to open atimeline at a give playable director)
* Added support of Game Save Value index for Factories (in order to select a blueprint object from a saved value)
#### Fixed
* Fixed Import Errors at first project load, including the way we load discover and GameplayIngredients project settings
* Secure checks in Gathering Manager classes from assembly (skips protected assemblies now)
## 2019.1.0
#### Changed
* Removed counts in OnTriggerEvent
* Callables can now be friendly-named (with default formatting)
* Updated Starter Packages
#### Added
- Added NTimesLogic (split from OnTriggerEvent)
- Added Replace Mode for Level Streaming Manager
- Added UIToggle Action and Property Drawer
- Added Audio Play Clip Action
- Added Platform Logic
- New Welcome Screen, with Wizard
- New optional GameplayIngredients Project Configuration asset
- Toggles for verbose callable logging
- Manager Exclusion List
- New Scene from Template Window + Config SceneTemplateLists Assets
- Helps creating new scenes from user-made templates
- New Discover Window System:
- Adds a new DiscoverAsset to reference Levels / Scene Setups
- Adds new Discover components in scenes
- Discover window helps navigate scenes while in editor and discover content.
- Added improved Game Manager
- Manages loading of main menu & levels directly instead of using LevelStreamingManager
- Manages Level Startup in sync after all scenes have started.
#### Fixed
* Fixed code to run on Unity 2019.1
* Fixed factory managed objects upon destroy
* Fixes in LinkGameView when application is not playing
* Fix in LevelStreamingManager incorrect computation of Scene Counts
* Fixes in VirtualCameraManager
* Fixes in Find/Replace window
* Fixes in Hierarchy View Hints for Unity 2019.3 new skin
## 2018.3.0
Initial Version

7
LocalPackages/net.peeweek.gameplay-ingredients/CHANGELOG.md.meta


fileFormatVersion: 2
guid: a2d80afb13247c646b079b5f51dcb6ac
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
LocalPackages/net.peeweek.gameplay-ingredients/Editor.meta


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

8
LocalPackages/net.peeweek.gameplay-ingredients/Icons.meta


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

21
LocalPackages/net.peeweek.gameplay-ingredients/LICENSE


MIT License
Copyright (c) 2018 Thomas ICHÉ
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

7
LocalPackages/net.peeweek.gameplay-ingredients/LICENSE.meta


fileFormatVersion: 2
guid: f3d05d1088ace584489c2e0fdfdb75b0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
LocalPackages/net.peeweek.gameplay-ingredients/NaughtyAttributes.meta


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

43
LocalPackages/net.peeweek.gameplay-ingredients/README.md


![](https://raw.githubusercontent.com/peeweek/net.peeweek.gameplay-ingredients/master/Documentation%7E/Images/site-banner.png)
Gameplay Ingredients for your Unity Games - A collection of scripts that ease simple tasks while making games and prototypes.
<u>You can read Documentation at this address :</u> [https://peeweek.readthedocs.io/en/latest/gameplay-ingredients/](https://peeweek.readthedocs.io/en/latest/gameplay-ingredients/)
## Requirements
* **Unity 2019.3** (Older versions compatible with 2018.3 / 2019.1 / 2019.2)
* Package Manager UI
* (**Optional** : Command-line Git installed on your system, for example [Git For Windows](https://gitforwindows.org/))
## How to install
You can use a manual, local package installation if you need to alter the code locally or update the code base regularly.
Otherwise, you can perform a git referenced package in your `manifset.json` file : this option shall download and manage automatically the repository, with the drawback of being read-only.
### Manual Version
- 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**
### Git reference version
- Ensure you have a **[Command Line Git](https://gitforwindows.org/) Installed**
- With Unity 2019.3 closed, edit the `Packages/manifest.json` with a text editor
- Append the line ` "net.peeweek.gameplay-ingredients": "https://github.com/peeweek/net.peeweek.gameplay-ingredients.git#2019.3.0",` under `dependencies`
You can check that the package was imported by looking at the project window, under Packages/ Hierarchy, there should be a `Gameplay Ingredients` hierarchy
# Version / Tag Compatibility
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.1`
#### Older Versions
* **Unity 2018.3 / 2018.4 :** choose the tag `2018.3.0`
* **Unity 2019.1 / 2019.2 :** choose the tag `2019.1.2`

7
LocalPackages/net.peeweek.gameplay-ingredients/README.md.meta


fileFormatVersion: 2
guid: b1565dfac550b7e41a3aced8a4474ff8
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
LocalPackages/net.peeweek.gameplay-ingredients/Resources.meta


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

8
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/Controllers.meta


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

8
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/Discover.meta


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

12
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/GameLevel.cs


using UnityEngine;
using NaughtyAttributes;
namespace GameplayIngredients
{
public class GameLevel : ScriptableObject
{
[ReorderableList, Scene]
public string[] StartupScenes;
}
}

11
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/GameLevel.cs.meta


fileFormatVersion: 2
guid: d0e5997dc40a2dc47afc7b9a41a9a862
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 9921921a4e899394dbc39b4b38db93ef, type: 3}
userData:
assetBundleName:
assetBundleVariant:

31
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/GameObjectExtensions.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class GameObjectExtensions
{
public static IEnumerable<Transform> GetAllChildren(this Transform transform)
{
var stack = new Stack<Transform>();
stack.Push(transform);
while(stack.Count != 0)
{
var t = stack.Pop();
yield return t;
for (int i = 0; i < t.childCount; i++)
{
stack.Push(t.GetChild(i));
}
}
}
public static IEnumerable<GameObject> GetAllChildren(this GameObject gameObject)
{
var all = gameObject.transform.GetAllChildren();
foreach(Transform t in all)
{
yield return t.gameObject;
}
}
}

11
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/GameObjectExtensions.cs.meta


fileFormatVersion: 2
guid: 043df10a698bef24f85a021cc54479c2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/Ingredients.meta


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

8
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting.meta


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

8
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/Managers.meta


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

8
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/PropertyAttributes.meta


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

8
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/SceneViewPOV.meta


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

8
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/Settings.meta


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

8
LocalPackages/net.peeweek.gameplay-ingredients/StarterAssets.meta


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

8
LocalPackages/net.peeweek.gameplay-ingredients/UI.meta


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

9
LocalPackages/LightingTools.LightProbesVolumes/Editor.meta


fileFormatVersion: 2
guid: cee0b306a665f174998de09b82121deb
folderAsset: yes
timeCreated: 1492708210
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

143
LocalPackages/LightingTools.LightProbesVolumes/Editor/LightProbesVolume.png

之前 之后
宽度: 512  |  高度: 512  |  大小: 7.0 KiB

103
LocalPackages/LightingTools.LightProbesVolumes/Editor/LightProbesVolume.png.meta


fileFormatVersion: 2
guid: 8ef34d7d3b3b45b4d923405b38d36f35
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
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
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
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
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

70
LocalPackages/LightingTools.LightProbesVolumes/Editor/LightProbesVolumeEditor.cs


using UnityEngine;
using UnityEditor;
namespace LightingTools.LightProbesVolumes
{
[CustomEditor(typeof(LightProbesVolumeSettings))]
public class LightProbesVolumeEditor : Editor
{
SerializedProperty horizontalSpacing;
SerializedProperty verticalSpacing;
SerializedProperty offsetFromFloor;
SerializedProperty numberOfLayers;
SerializedProperty fillVolume;
SerializedProperty followFloor;
SerializedProperty discardInsideGeometry;
SerializedProperty drawDebug;
void OnEnable()
{
horizontalSpacing = serializedObject.FindProperty("horizontalSpacing");
verticalSpacing = serializedObject.FindProperty("verticalSpacing");
offsetFromFloor = serializedObject.FindProperty("offsetFromFloor");
numberOfLayers = serializedObject.FindProperty("numberOfLayers");
fillVolume = serializedObject.FindProperty("fillVolume");
followFloor = serializedObject.FindProperty("followFloor");
discardInsideGeometry = serializedObject.FindProperty("discardInsideGeometry");
drawDebug = serializedObject.FindProperty("drawDebug");
}
public override void OnInspectorGUI()
{
var volume = (LightProbesVolumeSettings)target;
serializedObject.Update();
EditorGUILayout.DelayedFloatField(horizontalSpacing);
EditorGUILayout.DelayedFloatField(verticalSpacing);
EditorGUILayout.PropertyField(offsetFromFloor);
EditorGUILayout.PropertyField(fillVolume);
serializedObject.ApplyModifiedProperties();
EditorGUI.BeginDisabledGroup(fillVolume.boolValue);
EditorGUILayout.PropertyField(numberOfLayers);
EditorGUI.EndDisabledGroup();
EditorGUILayout.PropertyField(followFloor);
EditorGUILayout.PropertyField(discardInsideGeometry);
EditorGUILayout.PropertyField(drawDebug);
if (GUILayout.Button("Create Light Probes in Selected Volume"))
{
volume.Populate();
}
serializedObject.ApplyModifiedProperties();
}
[MenuItem("GameObject/Light/Lightprobes Volume", false, 10)]
static void CreateCustomGameObject(MenuCommand menuCommand)
{
// Create a custom game object
GameObject volume = new GameObject("LightprobeVolume");
// Ensure it gets reparented if this was a context click (otherwise does nothing)
GameObjectUtility.SetParentAndAlign(volume, menuCommand.context as GameObject);
// Register the creation in the undo system
Undo.RegisterCreatedObjectUndo(volume, "Create " + volume.name);
Selection.activeObject = volume;
volume.AddComponent<LightProbesVolumeSettings>();
volume.GetComponent<BoxCollider>().size = new Vector3(5, 2, 5);
volume.GetComponent<BoxCollider>().isTrigger = true;
}
}
}

12
LocalPackages/LightingTools.LightProbesVolumes/Editor/LightProbesVolumeEditor.cs.meta


fileFormatVersion: 2
guid: f046a008730fb8f40aca66fe59632d95
timeCreated: 1490885515
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

16
LocalPackages/LightingTools.LightProbesVolumes/Editor/LightingTools.LightProbesVolumes.Editor.asmdef


{
"name": "LightingTools.LightProbesVolumes.Editor",
"references": [
"LightingTools.LightProbesVolumes"
],
"optionalUnityReferences": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}

9
LocalPackages/LightingTools.LightProbesVolumes/Editor/LightingTools.LightProbesVolumes.Editor.asmdef.meta


fileFormatVersion: 2
guid: 087ff6b4289583947b41b0c03d628d1f
timeCreated: 1546438390
licenseType: Pro
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

18
LocalPackages/LightingTools.LightProbesVolumes/Editor/RefreshLightProbesVolumes.cs


using UnityEngine;
using UnityEditor;
namespace LightingTools.LightProbesVolumes
{
public class RefreshLightProbesVolumes
{
[MenuItem("Lighting/Refresh lightprobes volumes")]
static void Refresh()
{
var volumes = GameObject.FindObjectsOfType<LightProbesVolumeSettings>();
foreach (var volume in volumes)
{
volume.Populate();
}
}
}
}

12
LocalPackages/LightingTools.LightProbesVolumes/Editor/RefreshLightProbesVolumes.cs.meta


fileFormatVersion: 2
guid: 69d120c0b1360954680fd20bf7e055e2
timeCreated: 1490885515
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

40
LocalPackages/LightingTools.LightProbesVolumes/README.md


# LightingTools.LightProbesVolumes
Light probes volumes
Requires Unity 2018.1 or above.
# Setup instructions :
- In your project folder create a "LocalPackages" folder next to your "Assets" folder
- In the LocalPackages folder extract this repo under a "LightingTools.LightProbesVolumes" folder
- In the "Packages" folder open the "manifest.json" in a text editing software
- in "manifest.json" under "dependencies" add the line :
"li.lightingtools.core": "file:../LocalPackages/LightingTools.LightProbesVolumes" (you need to add a "," if this is not the last dependency)
- open the project and profit !
# How to use it :
- In the hierarchy view click : Create / Light / Lightprobe Volume
- Set the size of the box collider to the size of the area you want to place lightprobes in ( if you have a ceiling it is recommended to set the vertical bounds lower to the ceiling, or it will spawn probes on top of it).
- Set the " Light probe volume settings" :
- vertical and horizontal spacing ( one probe every X meters )
- offset from floor is at which vertical distance from the collision you want to spawn the first layer of probes
- number of layers is the number of probes that will be placed vertically above the hit collider
- follow floor : when enabled the script performs raycast in order to place lightprobes above existing static geometry that has a collider. When disabled the lightprobes are just placed above the lower face of the volume.
- fill volume enabled will fill the whole height of the volume instead of just doing X number of layer. When this is enabled the number of layers is ignored.
- discard inside geometry will test if your probe is inside an object with collisions. This will only work if the top face of your volume is not itself inside an object with collisions. In order to check this enable "draw Debug" and fill the volume : the green cross at the top has to be located in the air and not inside a geometry.
- Click the button !
- When you have several volumes setup in your scene and you want to refresh them all :
- Go to lighting / Refresh lightprobes volumes. This will place again the probes in all the volumes in the scene.
# Improvements I would like to do :
- Replace the raycast to colliders by raycast to meshrenderers
# Troubleshoot :
- if the script doesn't place any lightprobe, make sure your geometric is marked as static, and that it has a collider. Using colliders isn't ideal but I haven't found a good solution that would work without them.
# Contributions :
This was originally based on the script shared by ghostmantis games : http://ghostmantis.com/?p=332

7
LocalPackages/LightingTools.LightProbesVolumes/README.md.meta


fileFormatVersion: 2
guid: 0e68ecda44ce2814bb8206e78e262818
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

10
LocalPackages/LightingTools.LightProbesVolumes/Runtime.meta


fileFormatVersion: 2
guid: 814405171c7b05741a1b7aa8a09674eb
folderAsset: yes
timeCreated: 1546438065
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

194
LocalPackages/LightingTools.LightProbesVolumes/Runtime/LightProbesPlacement.cs


using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace LightingTools.LightProbesVolumes
{
public static class LightProbesPlacement
{
#if UNITY_EDITOR
public static void Populate (GameObject gameObject, float horizontalSpacing, float verticalSpacing, float offsetFromFloor, int numberOfLayers, bool drawDebug, bool fillVolume, bool discardInsideGeometry, bool followFloor)
{
BoxCollider boxCollider = gameObject.GetComponent<BoxCollider>();
if (boxCollider == null)
{
Debug.LogWarning("Box collider not found on " + gameObject.name);
return;
}
//Make sure collider is a trigger
boxCollider.isTrigger = true;
//avoid division by 0
horizontalSpacing = Mathf.Max(horizontalSpacing, 0.01f);
verticalSpacing = Mathf.Max(verticalSpacing, 0.01f);
//Check if there is already a lightprobegroup component
// if there is destroy it
LightProbeGroup oldLightprobes = gameObject.GetComponent<LightProbeGroup>();
//Calculate Start Points at the top of the collider
Vector3[] startPositions = StartPoints(boxCollider.size, boxCollider.center, boxCollider.transform, horizontalSpacing);
float minY = boxCollider.bounds.min.y;
float maxY = boxCollider.bounds.max.y;
float sizeY = boxCollider.size.y;
int ycount = Mathf.FloorToInt((sizeY-offsetFromFloor) / verticalSpacing) + 1;
List<Vector3> VertPositions = new List<Vector3>();
int currentTrace = 0;
//if followFloor we raycast from top to down in order to follow the static geometry (with colliders)
if(followFloor)
{
foreach (Vector3 startPos in startPositions)
{
//RaycastHit hit;
RaycastHit[] hits;
Ray ray = new Ray();
ray.origin = startPos;
ray.direction = -Vector3.up;
hits = Physics.RaycastAll(ray, sizeY + 1, -1, QueryTriggerInteraction.Ignore);
//Validate hits
foreach (var hit in hits)
{
if (!hit.collider.gameObject.isStatic)
break;
if (hit.point.y + offsetFromFloor < maxY && hit.point.y + offsetFromFloor > minY)
VertPositions.Add(hit.point + new Vector3(0, offsetFromFloor, 0));
int maxLayer = fillVolume ? ycount : numberOfLayers;
for (int i = 1; i < maxLayer; i++)
{
if (hit.point.y + offsetFromFloor + i * verticalSpacing < maxY && hit.point.y + offsetFromFloor + verticalSpacing > minY)
VertPositions.Add(hit.point + new Vector3(0, offsetFromFloor + i * verticalSpacing, 0));
}
}
EditorUtility.DisplayProgressBar("Tracing floor collisions", currentTrace.ToString() + "/" + startPositions.Length.ToString(), (float)currentTrace / (float)startPositions.Length);
currentTrace++;
}
EditorUtility.ClearProgressBar();
}
else
{
int maxLayer = fillVolume ? ycount : numberOfLayers;
for (int i = 0; i< maxLayer; i++)
{
foreach(Vector3 position in startPositions)
{
VertPositions.Add(position + Vector3.up * verticalSpacing * i - Vector3.up*sizeY + Vector3.up * offsetFromFloor);
}
}
}
if(drawDebug)
{
foreach(Vector3 position in VertPositions)
{
Debug.DrawLine(position, position + Vector3.up * 0.5f,Color.red,3);
}
}
List<Vector3> validVertPositions = new List<Vector3>();
//Inside Geometry test : take an arbitrary position in space and trace from that position to the probe position and back from the probe position to the arbitrary position. If the number of hits is different for both raycasts the probe is considered to be inside an object.
//When using Draw Debug the arbitrary position is the Green cross in the air.
if (discardInsideGeometry)
{
int j = 0;
Vector3 insideTestPosition = gameObject.transform.position + gameObject.GetComponent<BoxCollider>().center + new Vector3(0, maxY / 2, 0);
if (drawDebug)
{
Debug.DrawLine(insideTestPosition + Vector3.up, insideTestPosition - Vector3.up, Color.green, 5);
Debug.DrawLine(insideTestPosition + Vector3.right, insideTestPosition - Vector3.right, Color.green, 5);
Debug.DrawLine(insideTestPosition + Vector3.forward, insideTestPosition - Vector3.forward, Color.green, 5);
}
foreach (Vector3 positionCandidate in VertPositions)
{
EditorUtility.DisplayProgressBar("Checking probes inside geometry", j.ToString() + "/" + VertPositions.Count, (float)j / (float)VertPositions.Count);
Ray forwardRay = new Ray(insideTestPosition, Vector3.Normalize(positionCandidate - insideTestPosition));
Ray backwardRay = new Ray(positionCandidate, Vector3.Normalize(insideTestPosition - positionCandidate));
RaycastHit[] hitsForward;
RaycastHit[] hitsBackward;
hitsForward = Physics.RaycastAll(forwardRay, Vector3.Distance(positionCandidate, insideTestPosition), -1, QueryTriggerInteraction.Ignore);
hitsBackward = Physics.RaycastAll(backwardRay, Vector3.Distance(positionCandidate, insideTestPosition), -1, QueryTriggerInteraction.Ignore);
if (hitsForward.Length == hitsBackward.Length) validVertPositions.Add(positionCandidate);
else if (drawDebug)
Debug.DrawRay(backwardRay.origin, backwardRay.direction * Vector3.Distance(positionCandidate, insideTestPosition), Color.cyan, 5);
j++;
}
EditorUtility.ClearProgressBar();
}
else
validVertPositions = VertPositions;
// Check if we have any hits
if (validVertPositions.Count < 1)
{
Debug.Log("no valid hit for " + gameObject.name);
return;
}
LightProbeGroup LPGroup = oldLightprobes != null ? oldLightprobes : gameObject.AddComponent<LightProbeGroup>();
// Feed lightprobe positions
Vector3[] ProbePos = new Vector3[validVertPositions.Count];
for (int i = 0; i < validVertPositions.Count; i++)
{
ProbePos[i] = gameObject.transform.InverseTransformPoint(validVertPositions[i]);
}
LPGroup.probePositions = ProbePos;
//Finish
Debug.Log("Finished placing " + ProbePos.Length + " probes for " + gameObject.name);
}
static Vector3[] StartPoints(Vector3 size, Vector3 offset, Transform transform, float horizontalSpacing)
{
// Calculate count and start offset
int xCount = Mathf.FloorToInt(size.x / horizontalSpacing) + 1;
int zCount = Mathf.FloorToInt(size.z / horizontalSpacing) + 1;
float startxoffset = (size.x - (xCount-1) * horizontalSpacing)/2;
float startzoffset = (size.z - (zCount-1) * horizontalSpacing)/2;
//if lightprobe count fits exactly in bounds, I know the probes at the maximum bounds will be rejected, so add offset
if (startxoffset == 0)
startxoffset = horizontalSpacing / 2;
if (startzoffset == 0)
startzoffset = horizontalSpacing / 2;
Vector3[] vertPositions = new Vector3[ xCount * zCount ];
int vertexnumber = 0;
for (int i = 0; i < xCount; i++)
{
for (int j = 0; j < zCount; j++ )
{
Vector3 position = new Vector3
{
y = size.y / 2,
x = startxoffset + (i * horizontalSpacing) - (size.x / 2),
z = startzoffset + (j * horizontalSpacing) - (size.z / 2)
};
vertPositions[vertexnumber] = transform.TransformPoint(position + offset);
vertexnumber++;
}
}
return vertPositions;
}
#endif
}
}

13
LocalPackages/LightingTools.LightProbesVolumes/Runtime/LightProbesPlacement.cs.meta


fileFormatVersion: 2
guid: 82da266145fa8e8449852cf58020c13d
timeCreated: 1546423551
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

31
LocalPackages/LightingTools.LightProbesVolumes/Runtime/LightProbesVolumeSettings.cs


using UnityEngine;
namespace LightingTools.LightProbesVolumes
{
[ExecuteInEditMode]
[RequireComponent(typeof(BoxCollider))]
public class LightProbesVolumeSettings : MonoBehaviour
{
public float horizontalSpacing = 2.0f;
public float verticalSpacing = 2.0f;
public float offsetFromFloor = 0.5f;
public int numberOfLayers = 2;
public bool fillVolume = false;
public bool followFloor = true;
public bool discardInsideGeometry;
public bool drawDebug = false;
private void OnEnable()
{
var boxCollider = GetComponent<BoxCollider>();
boxCollider.isTrigger = true;
}
#if UNITY_EDITOR
public void Populate()
{
LightProbesPlacement.Populate(gameObject,horizontalSpacing,verticalSpacing,offsetFromFloor,numberOfLayers,drawDebug,fillVolume,discardInsideGeometry, followFloor);
}
#endif
}
}

12
LocalPackages/LightingTools.LightProbesVolumes/Runtime/LightProbesVolumeSettings.cs.meta


fileFormatVersion: 2
guid: fc7eebf330e67854398f83add3b50749
timeCreated: 1490885515
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 8ef34d7d3b3b45b4d923405b38d36f35, type: 3}
userData:
assetBundleName:
assetBundleVariant:

8
LocalPackages/LightingTools.LightProbesVolumes/Runtime/LightingTools.LightProbesVolumes.asmdef


{
"name": "LightingTools.LightProbesVolumes",
"references": [],
"optionalUnityReferences": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false
}

9
LocalPackages/LightingTools.LightProbesVolumes/Runtime/LightingTools.LightProbesVolumes.asmdef.meta


fileFormatVersion: 2
guid: 636c3e62138bf8548a29334166578537
timeCreated: 1546438430
licenseType: Pro
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

7
LocalPackages/LightingTools.LightProbesVolumes/package.json


{
"name": "li.lightingtools.lightprobesvolumes",
"displayName": "Light Probes Volumes",
"version": "0.0.1",
"unity": "2018.3",
"description": "Lighting tools test."
}

9
LocalPackages/LightingTools.LightProbesVolumes/package.json.meta


fileFormatVersion: 2
guid: 1d6b995f4d143ea40a626591e25d164e
timeCreated: 1546438320
licenseType: Pro
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

11
LocalPackages/LightingTools.LightmapSwitcher/CHANGELOG.md


# Changelog
All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [0.1.0] - 2017-MM-DD
### This is the first release of *Unity Package \<Your package name\>*.
*Short description of this release*

7
LocalPackages/LightingTools.LightmapSwitcher/CHANGELOG.md.meta


fileFormatVersion: 2
guid: 73d00c311b68c0b43b290792f9229142
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

9
LocalPackages/LightingTools.LightmapSwitcher/CONTRIBUTING.md


# Contributing
## If you are interested in contributing, here are some ground rules:
* ... Define guidelines & rules for what contributors need to know to successfully make Pull requests against your repo ...
## All contributions are subject to the [Unity Contribution Agreement(UCA)](https://unity3d.com/legal/licenses/Unity_Contribution_Agreement)
By making a pull request, you are confirming agreement to the terms and conditions of the UCA, including that your Contributions are your original creation and that you have complete right and authority to make your Contributions.
## Once you have a change ready following these ground rules. Simply make a pull request

7
LocalPackages/LightingTools.LightmapSwitcher/CONTRIBUTING.md.meta


fileFormatVersion: 2
guid: 12e422220e727d14aba019c24b31c69c
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

9
LocalPackages/LightingTools.LightmapSwitcher/Editor.meta


fileFormatVersion: 2
guid: b1ebd9449aa245a42b8cf1842f144df3
folderAsset: yes
timeCreated: 1479375522
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

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

正在加载...
取消
保存