commit 61f2fde82f2bf5e85768b8046d6f4319e2db120a Author: huqibin <762612145@qq.com> Date: Mon Feb 24 17:59:58 2025 +0800 初始化 diff --git a/Assets/HQB.meta b/Assets/HQB.meta new file mode 100644 index 0000000..7722e56 --- /dev/null +++ b/Assets/HQB.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a213dbd45f4890346bdda99af70fa533 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HQB/Subject4001Controller.cs b/Assets/HQB/Subject4001Controller.cs new file mode 100644 index 0000000..c1adcd3 --- /dev/null +++ b/Assets/HQB/Subject4001Controller.cs @@ -0,0 +1,27 @@ +using System.Collections; +using System.Collections.Generic; +//using System.Runtime.Remoting.Metadata.W3cXsd2001; +using UnityEngine; + +public class Subject4001Controller : SubjectControllerBase +{ + // Start is called before the first frame update + //public override void OnInit() + //{ + // GameManager.EventMgr.AddEventListener(Enum_EventType.SwitchScene, CheckBtnBySceneName); + //} + + private void CheckBtnBySceneName(E_SceneType scene) + { + StopCoroutine(WaitSceneLoad()); + StartCoroutine(WaitSceneLoad()); + } + private IEnumerator WaitSceneLoad() + { + yield return new WaitForSeconds(0.5f); + if (UIManager.Instance.GetPanel()) + { + //UIManager.Instance.GetPanel().faultRegBtn; + } + } +} diff --git a/Assets/HQB/Subject4001Controller.cs.meta b/Assets/HQB/Subject4001Controller.cs.meta new file mode 100644 index 0000000..a5e1c31 --- /dev/null +++ b/Assets/HQB/Subject4001Controller.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fb6b7e13d34aa3945942018bc7e6a332 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..18d81fc --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 78705b2832f73a3498aec4d23aa94922 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant.meta b/Assets/Plugins/Demigiant.meta new file mode 100644 index 0000000..cfb2591 --- /dev/null +++ b/Assets/Plugins/Demigiant.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 9f80792dcd2829e41b1f075e7245ca5b +labels: +- Tween +- Tweening +- Animation +- HOTween +- Paths +- VisualScripting +- VisualEditor +- iTween +- Ease +- Easing +- Shake +- Punch +- 2DToolkit +- TextMeshPro +- Text +- LeanTween +- DFTween +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DOTween.meta b/Assets/Plugins/Demigiant/DOTween.meta new file mode 100644 index 0000000..cbebc39 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween.meta @@ -0,0 +1,21 @@ +fileFormatVersion: 2 +guid: a50bd9a009c8dfc4ebd88cc8101225a7 +labels: +- Tween +- Tweening +- Animation +- HOTween +- Paths +- iTween +- DFTween +- LeanTween +- Ease +- Easing +- Shake +- Punch +- 2DToolkit +- TextMeshPro +- Text +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/DOTween.XML b/Assets/Plugins/Demigiant/DOTween/DOTween.XML new file mode 100644 index 0000000..46e79c4 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/DOTween.XML @@ -0,0 +1,3089 @@ + + + + DOTween + + + + + Types of autoPlay behaviours + + + + No tween is automatically played + + + Only Sequences are automatically played + + + Only Tweeners are automatically played + + + All tweens are automatically played + + + + What axis to constrain in case of Vector tweens + + + + Called the first time the tween is set in a playing state, after any eventual delay + + + + Used in place of System.Func, which is not available in mscorlib. + + + + + Used in place of System.Action. + + + + + Public so it can be used by lose scripts related to DOTween (like DOTweenAnimation) + + + + + Used to separate DOTween class from the MonoBehaviour instance (in order to use static constructors on DOTween). + Contains all instance-based methods + + + + Used internally inside Unity Editor, as a trick to update DOTween's inspector at every frame + + + + Directly sets the current max capacity of Tweeners and Sequences + (meaning how many Tweeners and Sequences can be running at the same time), + so that DOTween doesn't need to automatically increase them in case the max is reached + (which might lead to hiccups when that happens). + Sequences capacity must be less or equal to Tweeners capacity + (if you pass a low Tweener capacity it will be automatically increased to match the Sequence's). + Beware: use this method only when there are no tweens running. + + Max Tweeners capacity. + Default: 200 + Max Sequences capacity. + Default: 50 + + + + This class contains a C# port of the easing equations created by Robert Penner (http://robertpenner.com/easing). + + + + + Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in: accelerating from zero velocity. + + + Current time (in frames or seconds). + + + Expected easing duration (in frames or seconds). + + Unused: here to keep same delegate for all ease types. + Unused: here to keep same delegate for all ease types. + + The eased value. + + + + + Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out: decelerating from zero velocity. + + + Current time (in frames or seconds). + + + Expected easing duration (in frames or seconds). + + Unused: here to keep same delegate for all ease types. + Unused: here to keep same delegate for all ease types. + + The eased value. + + + + + Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in/out: acceleration until halfway, then deceleration. + + + Current time (in frames or seconds). + + + Expected easing duration (in frames or seconds). + + Unused: here to keep same delegate for all ease types. + Unused: here to keep same delegate for all ease types. + + The eased value. + + + + + Returns a value between 0 and 1 (inclusive) based on the elapsed time and ease selected + + + + + Returns a value between 0 and 1 (inclusive) based on the elapsed time and ease selected + + + + + Used to interpret AnimationCurves as eases. + Public so it can be used by external ease factories + + + + + Behaviour in case a tween nested inside a Sequence fails and is captured by safe mode + + + + If the Sequence contains other elements, kill the failed tween but preserve the rest + + + Kill the whole Sequence + + + + Log types thrown by errors captured and prevented by safe mode + + + + No logs. NOT RECOMMENDED + + + Throw a normal log + + + Throw a warning log (default) + + + Throw an error log + + + + Additional notices passed to plugins when updating. + Public so it can be used by custom plugins. Internally, only PathPlugin uses it + + + + + None + + + + + Lets the plugin know that we restarted or rewinded + + + + + OnRewind callback behaviour (can only be set via DOTween's Utility Panel) + + + + + When calling Rewind or PlayBackwards/SmoothRewind, OnRewind callbacks will be fired only if the tween isn't already rewinded + + + + + When calling Rewind, OnRewind callbacks will always be fired, even if the tween is already rewinded. + When calling PlayBackwards/SmoothRewind instead, OnRewind callbacks will be fired only if the tween isn't already rewinded + + + + + When calling Rewind or PlayBackwards/SmoothRewind, OnRewind callbacks will always be fired, even if the tween is already rewinded + + + + + Public only so custom shortcuts can access some of these methods + + + + + INTERNAL: used by DO shortcuts and Modules to set special startup mode + + + + + INTERNAL: used by DO shortcuts and Modules to set the tween as blendable + + + + + INTERNAL: used by DO shortcuts and Modules to prevent a tween from using a From setup even if passed + + + + + Used to dispatch commands that need to be captured externally, usually by Modules + + + + + Various utils + + + + + Returns a Vector3 with z = 0 + + + + + Returns the 2D angle between two vectors + + + + + Returns a point on a circle with the given center and radius, + using Unity's circle coordinates (0° points up and increases clockwise) + + + + + Uses approximate equality on each axis instead of Unity's Vector3 equality, + because the latter fails (in some cases) when assigning a Vector3 to a transform.position and then checking it. + + + + + Looks for the type within all possible project assembly names + + + + NO-GC METHOD: changes the start value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new start value + If bigger than 0 applies it as the new tween duration + + + NO-GC METHOD: changes the end value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new end value + If TRUE the start value will become the current target's value, otherwise it will stay the same + + + NO-GC METHOD: changes the end value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new end value + If bigger than 0 applies it as the new tween duration + If TRUE the start value will become the current target's value, otherwise it will stay the same + + + NO-GC METHOD: changes the start and end value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new start value + The new end value + If bigger than 0 applies it as the new tween duration + + + + Struct that stores two colors (used for LineRenderer tweens) + + + + + Used for tween callbacks + + + + + Used for tween callbacks + + + + + Used for custom and animationCurve-based ease functions. Must return a value between 0 and 1. + + + + + Straight Quaternion plugin. Instead of using Vector3 values accepts Quaternion values directly. + Beware: doesn't work with LoopType.Incremental (neither directly nor if inside a LoopType.Incremental Sequence). + To use it, call DOTween.To with the plugin parameter overload, passing it PureQuaternionPlugin.Plug() as first parameter + (do not use any of the other public PureQuaternionPlugin methods): + DOTween.To(PureQuaternionPlugin.Plug(), ()=> myQuaternionProperty, x=> myQuaternionProperty = x, myQuaternionEndValue, duration); + + + + + Plug this plugin inside a DOTween.To call. + Example: + DOTween.To(PureQuaternionPlugin.Plug(), ()=> myQuaternionProperty, x=> myQuaternionProperty = x, myQuaternionEndValue, duration); + + + + INTERNAL: do not use + + + INTERNAL: do not use + + + INTERNAL: do not use + + + INTERNAL: do not use + + + INTERNAL: do not use + + + INTERNAL: do not use + + + INTERNAL: do not use + + + INTERNAL: do not use + + + + Extra non-tweening-related curve methods + + + + + Cubic bezier curve methods + + + + + Calculates a point along the given Cubic Bezier segment-curve. + + Segment start point + Start point's control point/handle + Segment end point + End point's control point/handle + 0-1 percentage along which to retrieve point + + + + Returns an array containing a series of points along the given Cubic Bezier segment-curve. + + Start point + Start point's control point/handle + End point + End point's control point/handle + Cloud resolution (min: 2) + + + + Calculates a series of points along the given Cubic Bezier segment-curve and adds them to the given list. + + Start point + Start point's control point/handle + End point + End point's control point/handle + Cloud resolution (min: 2) + + + + Main DOTween class. Contains static methods to create and control tweens in a generic way + + + + DOTween's version + + + If TRUE (default) makes tweens slightly slower but safer, automatically taking care of a series of things + (like targets becoming null while a tween is playing). + Default: TRUE + + + Log type when safe mode reports capturing an error and preventing it + + + Behaviour in case a tween nested inside a Sequence fails (and is caught by safe mode). + Default: NestedTweenFailureBehaviour.TryToPreserveSequence + + + If TRUE you will get a DOTween report when exiting play mode (only in the Editor). + Useful to know how many max Tweeners and Sequences you reached and optimize your final project accordingly. + Beware, this will slightly slow down your tweens while inside Unity Editor. + Default: FALSE + + + Global DOTween global timeScale (default: 1). + The final timeScale of a non-timeScaleIndependent tween is: + Unity's Time.timeScale * DOTween.timeScale * tween.timeScale + while the final timeScale of a timeScaleIndependent tween is: + DOTween.unscaledTimeScale * DOTween.timeScale * tween.timeScale + + + DOTween timeScale applied only to timeScaleIndependent tweens (default: 1). + The final timeScale of a timeScaleIndependent tween is: + DOTween.unscaledTimeScale * DOTween.timeScale * tween.timeScale + + + If TRUE, DOTween will use Time.smoothDeltaTime instead of Time.deltaTime for UpdateType.Normal and UpdateType.Late tweens + (unless they're set as timeScaleIndependent, in which case a value between the last timestep + and will be used instead). + Setting this to TRUE will lead to smoother animations. + Default: FALSE + + + If is TRUE, this indicates the max timeStep that an independent update call can last. + Setting this to TRUE will lead to smoother animations. + Default: FALSE + + + DOTween's log behaviour. + Default: LogBehaviour.ErrorsOnly + + + Used to intercept DOTween's logs. If this method isn't NULL, DOTween will call it before writing a log via Unity's own Debug log methods. + Return TRUE if you want DOTween to proceed with the log, FALSE otherwise. + This method must return a bool and accept two parameters: + - LogType: the type of Unity log that DOTween is trying to log + - object: the log message that DOTween wants to log + + + If TRUE draws path gizmos in Unity Editor (if the gizmos button is active). + Deactivate this if you want to avoid gizmos overhead while in Unity Editor + + + If TRUE activates various debug options + + + Stores the target id so it can be used to give more info in case of safeMode error capturing. + Only active if both debugMode and useSafeMode are TRUE + + + Default updateType for new tweens. + Default: UpdateType.Normal + + + Sets whether Unity's timeScale should be taken into account by default or not. + Default: false + + + Default autoPlay behaviour for new tweens. + Default: AutoPlay.All + + + Default autoKillOnComplete behaviour for new tweens. + Default: TRUE + + + Default loopType applied to all new tweens. + Default: LoopType.Restart + + + If TRUE all newly created tweens are set as recyclable, otherwise not. + Default: FALSE + + + Default ease applied to all new Tweeners (not to Sequences which always have Ease.Linear as default). + Default: Ease.InOutQuad + + + Default overshoot/amplitude used for eases + Default: 1.70158f + + + Default period used for eases + Default: 0 + + + Used internally. Assigned/removed by DOTweenComponent.Create/DestroyInstance + + + + Must be called once, before the first ever DOTween call/reference, + otherwise it will be called automatically and will use default options. + Calling it a second time won't have any effect. + You can chain SetCapacity to this method, to directly set the max starting size of Tweeners and Sequences: + DOTween.Init(false, false, LogBehaviour.Default).SetCapacity(100, 20); + + If TRUE all new tweens will be set for recycling, meaning that when killed, + instead of being destroyed, they will be put in a pool and reused instead of creating new tweens. This option allows you to avoid + GC allocations by reusing tweens, but you will have to take care of tween references, since they might result active + even if they were killed (since they might have been respawned and are now being used for other tweens). + If you want to automatically set your tween references to NULL when a tween is killed + you can use the OnKill callback like this: + .OnKill(()=> myTweenReference = null) + You can change this setting at any time by changing the static property, + or you can set the recycling behaviour for each tween separately, using: + SetRecyclable(bool recyclable) + Default: FALSE + If TRUE makes tweens slightly slower but safer, automatically taking care of a series of things + (like targets becoming null while a tween is playing). + You can change this setting at any time by changing the static property. + Default: FALSE + Type of logging to use. + You can change this setting at any time by changing the static property. + Default: ErrorsOnly + + + + Directly sets the current max capacity of Tweeners and Sequences + (meaning how many Tweeners and Sequences can be running at the same time), + so that DOTween doesn't need to automatically increase them in case the max is reached + (which might lead to hiccups when that happens). + Sequences capacity must be less or equal to Tweeners capacity + (if you pass a low Tweener capacity it will be automatically increased to match the Sequence's). + Beware: use this method only when there are no tweens running. + + Max Tweeners capacity. + Default: 200 + Max Sequences capacity. + Default: 50 + + + + Kills all tweens, clears all cached tween pools and plugins and resets the max Tweeners/Sequences capacities to the default values. + + If TRUE also destroys DOTween's gameObject and resets its initializiation, default settings and everything else + (so that next time you use it it will need to be re-initialized) + + + + Clears all cached tween pools. + + + + + Checks all active tweens to find and remove eventually invalid ones (usually because their targets became NULL) + and returns the total number of invalid tweens found and removed. + IMPORTANT: this will cause an error on UWP platform, so don't use it there + BEWARE: this is a slightly expensive operation so use it with care + + + + + Updates all tweens that are set to . + + Manual deltaTime + Unscaled delta time (used with tweens set as timeScaleIndependent) + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using a custom plugin + The plugin to use. Each custom plugin implements a static Get() method + you'll need to call to assign the correct plugin in the correct way, like this: + CustomPlugin.Get() + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens only one axis of a Vector3 to the given value using default plugins. + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + The axis to tween + + + Tweens only the alpha of a Color to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a virtual property from the given start to the given end value + and implements a setter that allows to use that value with an external method or a lambda + Example: + To(MyMethod, 0, 12, 0.5f); + Where MyMethod is a function that accepts a float parameter (which will be the result of the virtual tween) + The action to perform with the tweened value + The value to start from + The end value to reach + The duration of the virtual tween + + + + Punches a Vector3 towards the given direction and then back to the starting one + as if it was connected to the starting position via an elastic. + This tween type generates some GC allocations at startup + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The direction and strength of the punch + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting position when bouncing backwards. + 1 creates a full oscillation between the direction and the opposite decaying direction, + while 0 oscillates only between the starting position and the decaying direction + + + Shakes a Vector3 with the given values. + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction and behave like a random punch. + If TRUE only shakes on the X Y axis (looks better with things like cameras). + If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + Randomness mode + + + Shakes a Vector3 with the given values. + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction and behave like a random punch. + If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + Randomness mode + + + Tweens a property or field to the given values using default plugins. + Ease is applied between each segment and not as a whole. + This tween type generates some GC allocations at startup + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end values to reach for each segment. This array must have the same length as durations + The duration of each segment. This array must have the same length as endValues + + + + Returns a new to be used for tween groups. + Mind that Sequences don't have a target applied automatically like Tweener creation shortcuts, + so if you want to be able to kill this Sequence when calling DOTween.Kill(target) you'll have to add + the target manually; you can do that directly by using the overload instead of this one + + + + + Returns a new to be used for tween groups, and allows to set a target + (because Sequences don't have their target set automatically like Tweener creation shortcuts). + That way killing/controlling tweens by target will apply to this Sequence too. + + The target of the Sequence. Relevant only for static target-based methods like DOTween.Kill(target), + useless otherwise + + + Completes all tweens and returns the number of actual tweens completed + (meaning tweens that don't have infinite loops and were not already complete) + For Sequences only: if TRUE also internal Sequence callbacks will be fired, + otherwise they will be ignored + + + Completes all tweens with the given ID or target and returns the number of actual tweens completed + (meaning the tweens that don't have infinite loops and were not already complete) + For Sequences only: if TRUE internal Sequence callbacks will be fired, + otherwise they will be ignored + + + Flips all tweens (changing their direction to forward if it was backwards and viceversa), + then returns the number of actual tweens flipped + + + Flips the tweens with the given ID or target (changing their direction to forward if it was backwards and viceversa), + then returns the number of actual tweens flipped + + + Sends all tweens to the given position (calculating also eventual loop cycles) and returns the actual tweens involved + + + Sends all tweens with the given ID or target to the given position (calculating also eventual loop cycles) + and returns the actual tweens involved + + + Kills all tweens and returns the number of actual tweens killed + If TRUE completes the tweens before killing them + + + Kills all tweens and returns the number of actual tweens killed + If TRUE completes the tweens before killing them + Eventual IDs or targets to exclude from the killing + + + Kills all tweens with the given ID or target and returns the number of actual tweens killed + If TRUE completes the tweens before killing them + + + Kills all tweens with the given target and the given ID, and returns the number of actual tweens killed + If TRUE completes the tweens before killing them + + + Pauses all tweens and returns the number of actual tweens paused + + + Pauses all tweens with the given ID or target and returns the number of actual tweens paused + (meaning the tweens that were actually playing and have been paused) + + + Plays all tweens and returns the number of actual tweens played + (meaning tweens that were not already playing or complete) + + + Plays all tweens with the given ID or target and returns the number of actual tweens played + (meaning the tweens that were not already playing or complete) + + + Plays all tweens with the given target and the given ID, and returns the number of actual tweens played + (meaning the tweens that were not already playing or complete) + + + Plays backwards all tweens and returns the number of actual tweens played + (meaning tweens that were not already started, playing backwards or rewinded) + + + Plays backwards all tweens with the given ID or target and returns the number of actual tweens played + (meaning the tweens that were not already started, playing backwards or rewinded) + + + Plays backwards all tweens with the given target and ID and returns the number of actual tweens played + (meaning the tweens that were not already started, playing backwards or rewinded) + + + Plays forward all tweens and returns the number of actual tweens played + (meaning tweens that were not already playing forward or complete) + + + Plays forward all tweens with the given ID or target and returns the number of actual tweens played + (meaning the tweens that were not already playing forward or complete) + + + Plays forward all tweens with the given target and ID and returns the number of actual tweens played + (meaning the tweens that were not already started, playing backwards or rewinded) + + + Restarts all tweens, then returns the number of actual tweens restarted + + + Restarts all tweens with the given ID or target, then returns the number of actual tweens restarted + If TRUE includes the eventual tweens delays, otherwise skips them + If >= 0 changes the startup delay of all involved tweens to this value, otherwise doesn't touch it + + + Restarts all tweens with the given target and the given ID, and returns the number of actual tweens played + (meaning the tweens that were not already playing or complete) + If TRUE includes the eventual tweens delays, otherwise skips them + If >= 0 changes the startup delay of all involved tweens to this value, otherwise doesn't touch it + + + Rewinds and pauses all tweens, then returns the number of actual tweens rewinded + (meaning tweens that were not already rewinded) + + + Rewinds and pauses all tweens with the given ID or target, then returns the number of actual tweens rewinded + (meaning the tweens that were not already rewinded) + + + Smoothly rewinds all tweens (delays excluded), then returns the number of actual tweens rewinding/rewinded + (meaning tweens that were not already rewinded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + Note that a tween that was smoothly rewinded will have its play direction flipped + + + Smoothly rewinds all tweens (delays excluded) with the given ID or target, then returns the number of actual tweens rewinding/rewinded + (meaning the tweens that were not already rewinded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + Note that a tween that was smoothly rewinded will have its play direction flipped + + + Toggles the play state of all tweens and returns the number of actual tweens toggled + (meaning tweens that could be played or paused, depending on the toggle state) + + + Toggles the play state of all tweens with the given ID or target and returns the number of actual tweens toggled + (meaning the tweens that could be played or paused, depending on the toggle state) + + + + Returns TRUE if a tween with the given ID or target is active. + You can also use this to know if a shortcut tween is active for a given target. + Example: + transform.DOMoveX(45, 1); // transform is automatically added as the tween target + DOTween.IsTweening(transform); // Returns true + + The target or ID to look for + If FALSE (default) returns TRUE as long as a tween for the given target/ID is active, + otherwise also requires it to be playing + + + + Returns the total number of active tweens (so both Tweeners and Sequences). + A tween is considered active if it wasn't killed, regardless if it's playing or paused + + + + + Returns the total number of active Tweeners. + A Tweener is considered active if it wasn't killed, regardless if it's playing or paused + + + + + Returns the total number of active Sequences. + A Sequence is considered active if it wasn't killed, regardless if it's playing or paused + + + + + Returns the total number of active and playing tweens. + A tween is considered as playing even if its delay is actually playing + + + + + Returns a the total number of active tweens with the given id. + + If TRUE returns only the tweens with the given ID that are currently playing + + + + Returns a list of all active tweens in a playing state. + Returns NULL if there are no active playing tweens. + Beware: each time you call this method a new list is generated, so use it for debug only + + If NULL creates a new list, otherwise clears and fills this one (and thus saves allocations) + + + + Returns a list of all active tweens in a paused state. + Returns NULL if there are no active paused tweens. + Beware: each time you call this method a new list is generated, so use it for debug only + + If NULL creates a new list, otherwise clears and fills this one (and thus saves allocations) + + + + Returns a list of all active tweens with the given id. + Returns NULL if there are no active tweens with the given id. + Beware: each time you call this method a new list is generated + + If TRUE returns only the tweens with the given ID that are currently playing + If NULL creates a new list, otherwise clears and fills this one (and thus saves allocations) + + + + Returns a list of all active tweens with the given target. + Returns NULL if there are no active tweens with the given target. + Beware: each time you call this method a new list is generated + If TRUE returns only the tweens with the given target that are currently playing + If NULL creates a new list, otherwise clears and fills this one (and thus saves allocations) + + + + + Creates virtual tweens that can be used to change other elements via their OnUpdate calls + + + + + Tweens a virtual float. + You can add regular settings to the generated tween, + but do not use OnUpdate or you will overwrite the onVirtualUpdate parameter + + The value to start from + The value to tween to + The duration of the tween + A callback which must accept a parameter of type float, called at each update + + + + Tweens a virtual int. + You can add regular settings to the generated tween, + but do not use OnUpdate or you will overwrite the onVirtualUpdate parameter + + The value to start from + The value to tween to + The duration of the tween + A callback which must accept a parameter of type int, called at each update + + + + Tweens a virtual Vector2. + You can add regular settings to the generated tween, + but do not use OnUpdate or you will overwrite the onVirtualUpdate parameter + + The value to start from + The value to tween to + The duration of the tween + A callback which must accept a parameter of type Vector3, called at each update + + + + Tweens a virtual Vector3. + You can add regular settings to the generated tween, + but do not use OnUpdate or you will overwrite the onVirtualUpdate parameter + + The value to start from + The value to tween to + The duration of the tween + A callback which must accept a parameter of type Vector3, called at each update + + + + Tweens a virtual Color. + You can add regular settings to the generated tween, + but do not use OnUpdate or you will overwrite the onVirtualUpdate parameter + + The value to start from + The value to tween to + The duration of the tween + A callback which must accept a parameter of type Color, called at each update + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The type of ease + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The type of ease + Eventual overshoot to use with Back ease + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The type of ease + Eventual amplitude to use with Elastic easeType + Eventual period to use with Elastic easeType + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The AnimationCurve to use for ease + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The type of ease + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The type of ease + Eventual overshoot to use with Back ease + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The type of ease + Eventual amplitude to use with Elastic easeType + Eventual period to use with Elastic easeType + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The AnimationCurve to use for ease + + + Fires the given callback after the given time. + Callback delay + Callback to fire when the delay has expired + If TRUE (default) ignores Unity's timeScale + + + + Don't assign this! It's assigned automatically when creating 0 duration tweens + + + + + Don't assign this! It's assigned automatically when setting the ease to an AnimationCurve or to a custom ease function + + + + + Allows to wrap ease method in special ways, adding extra features + + + + + Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS + + FPS at which the tween should be played + Ease type + + + + Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS + + FPS at which the tween should be played + AnimationCurve to use for the ease + + + + Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS + + FPS at which the tween should be played + Custom ease function to use + + + + Used to allow method chaining with DOTween.Init + + + + + Directly sets the current max capacity of Tweeners and Sequences + (meaning how many Tweeners and Sequences can be running at the same time), + so that DOTween doesn't need to automatically increase them in case the max is reached + (which might lead to hiccups when that happens). + Sequences capacity must be less or equal to Tweeners capacity + (if you pass a low Tweener capacity it will be automatically increased to match the Sequence's). + Beware: use this method only when there are no tweens running. + + Max Tweeners capacity. + Default: 200 + Max Sequences capacity. + Default: 50 + + + + Behaviour that can be assigned when chaining a SetLink to a tween + + + + Pauses the tween when the link target is disabled + + + Pauses the tween when the link target is disabled, plays it when it's enabled + + + Pauses the tween when the link target is disabled, restarts it when it's enabled + + + Plays the tween when the link target is enabled + + + Restarts the tween when the link target is enabled + + + Kills the tween when the link target is disabled + + + Kills the tween when the link target is destroyed (becomes NULL). This is always active even if another behaviour is chosen + + + Completes the tween when the link target is disabled + + + Completes and kills the tween when the link target is disabled + + + Rewinds the tween (delay excluded) when the link target is disabled + + + Rewinds and kills the tween when the link target is disabled + + + + Path mode (used to determine correct LookAt orientation) + + + + Ignores the path mode (and thus LookAt behaviour) + + + Regular 3D path + + + 2D top-down path + + + 2D side-scroller path + + + + Type of path to use with DOPath tweens + + + + Linear, composed of straight segments between each waypoint + + + Curved path (which uses Catmull-Rom curves) + + + EXPERIMENTAL: Curved path (which uses Cubic Bezier curves, where each point requires two extra control points) + + + + Tweens a Vector2 along a circle. + EndValue represents the center of the circle, start and end value degrees are inside options + ChangeValue x is changeValue°, y is unused + + + + + Path control point + + + + + Path waypoints (modified by PathPlugin when setting relative end/change value or by CubicBezierDecoder) and by DOTweenPathInspector + + + + + Minimum input points necessary to create the path (doesn't correspond to actual waypoints required) + + + + + Gets the point on the path at the given percentage (0 to 1) + + The percentage (0 to 1) at which to get the point + If TRUE constant speed is taken into account, otherwise not + + + + Base interface for all tween plugins options + + + + Resets the plugin + + + + This plugin generates some GC allocations at startup + + + + + Path plugin works exclusively with Transforms + + + + + Rotation mode used with DORotate methods + + + + + Fastest way that never rotates beyond 360° + + + + + Fastest way that rotates beyond 360° + + + + + Adds the given rotation to the transform using world axis and an advanced precision mode + (like when using transform.Rotate(Space.World)). + In this mode the end value is is always considered relative + + + + + Adds the given rotation to the transform's local axis + (like when rotating an object with the "local" switch enabled in Unity's editor or using transform.Rotate(Space.Self)). + In this mode the end value is is always considered relative + + + + + Type of scramble to apply to string tweens + + + + + No scrambling of characters + + + + + A-Z + a-z + 0-9 characters + + + + + A-Z characters + + + + + a-z characters + + + + + 0-9 characters + + + + + Custom characters + + + + + Type of randomness to apply to a shake tween + + + + Default, full randomness + + + Creates a more balanced randomness that looks more harmonic + + + + Methods that extend Tween objects and allow to control or get data from them + + + + Completes the tween + + + Completes the tween + For Sequences only: if TRUE also internal Sequence callbacks will be fired, + otherwise they will be ignored + + + Optional: indicates that the tween creation has ended, to be used (optionally) as the last element of tween chaining creation.
+ This method won't do anything except in case of 0-duration tweens, + where it will complete them immediately instead of waiting for the next internal update routine + (unless they're nested in a Sequence, in which case the Sequence will still be the one in control and this method will be ignored)
+
+ + Flips the direction of this tween (backwards if it was going forward or viceversa) + + + Forces the tween to initialize its settings immediately + + + Send the tween to the given position in time + Time position to reach + (if higher than the whole tween duration the tween will simply reach its end) + If TRUE will play the tween after reaching the given position, otherwise it will pause it + + + Send the tween to the given position in time while also executing any callback between the previous time position and the new one + Time position to reach + (if higher than the whole tween duration the tween will simply reach its end) + If TRUE will play the tween after reaching the given position, otherwise it will pause it + + + Kills the tween + If TRUE completes the tween before killing it + + + + Forces this tween to update manually, regardless of the set via SetUpdate. + Note that the tween will still be subject to normal tween rules, so if for example it's paused this method will do nothing. + Also note that if you only want to update this tween instance manually you'll have to set it to anyway, + so that it's not updated automatically. + + Manual deltaTime + Unscaled delta time (used with tweens set as timeScaleIndependent) + + + Pauses the tween + + + Plays the tween + + + Sets the tween in a backwards direction and plays it + + + Sets the tween in a forward direction and plays it + + + Restarts the tween from the beginning + Ignored in case of Sequences. If TRUE includes the eventual tween delay, otherwise skips it + Ignored in case of Sequences. If >= 0 changes the startup delay to this value, otherwise doesn't touch it + + + Rewinds and pauses the tween + Ignored in case of Sequences. If TRUE includes the eventual tween delay, otherwise skips it + + + Smoothly rewinds the tween (delays excluded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + If called on a tween who is still waiting for its delay to happen, it will simply set the delay to 0 and pause the tween. + Note that a tween that was smoothly rewinded will have its play direction flipped + + + Plays the tween if it was paused, pauses it if it was playing + + + Send a path tween to the given waypoint. + Has no effect if this is not a path tween. + BEWARE, this is a special utility method: + it works only with Linear eases. Also, the lookAt direction might be wrong after calling this and might need to be set manually + (because it relies on a smooth path movement and doesn't work well with jumps that encompass dramatic direction changes) + Waypoint index to reach + (if higher than the max waypoint index the tween will simply go to the last one) + If TRUE will play the tween after reaching the given waypoint, otherwise it will pause it + + + + Creates a yield instruction that waits until the tween is killed or complete. + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForCompletion(); + + + + + Creates a yield instruction that waits until the tween is killed or rewinded. + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForRewind(); + + + + + Creates a yield instruction that waits until the tween is killed. + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForKill(); + + + + + Creates a yield instruction that waits until the tween is killed or has gone through the given amount of loops. + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForElapsedLoops(2); + + Elapsed loops to wait for + + + + Creates a yield instruction that waits until the tween is killed or has reached the given position (loops included, delays excluded). + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForPosition(2.5f); + + Position (loops included, delays excluded) to wait for + + + + Creates a yield instruction that waits until the tween is killed or started + (meaning when the tween is set in a playing state the first time, after any eventual delay). + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForStart(); + + + + Returns the total number of loops completed by this tween + + + Returns the eventual delay set for this tween + + + Returns the eventual elapsed delay set for this tween + + + Returns the duration of this tween (delays excluded). + NOTE: when using settings like SpeedBased, the duration will be recalculated when the tween starts + If TRUE returns the full duration loops included, + otherwise the duration of a single loop cycle + + + Returns the elapsed time for this tween (delays exluded) + If TRUE returns the elapsed time since startup loops included, + otherwise the elapsed time within the current loop cycle + + + Returns the elapsed percentage (0 to 1) of this tween (delays exluded) + If TRUE returns the elapsed percentage since startup loops included, + otherwise the elapsed percentage within the current loop cycle + + + Returns the elapsed percentage (0 to 1) of this tween (delays exluded), + based on a single loop, and calculating eventual backwards Yoyo loops as 1 to 0 instead of 0 to 1 + + + Returns FALSE if this tween has been killed or is NULL, TRUE otherwise. + BEWARE: if this tween is recyclable it might have been spawned again for another use and thus return TRUE anyway. + When working with recyclable tweens you should take care to know when a tween has been killed and manually set your references to NULL. + If you want to be sure your references are set to NULL when a tween is killed you can use the OnKill callback like this: + .OnKill(()=> myTweenReference = null) + + + Returns TRUE if this tween was reversed and is set to go backwards + + + NOTE: To check if a tween was simply set to go backwards see . + Returns TRUE if this tween is going backwards for any of these reasons: + - The tween was reversed and is going backwards on a straight loop + - The tween was reversed and is going backwards on an odd Yoyo loop + - The tween is going forward but on an even Yoyo loop + IMPORTANT: if used inside a tween's callback, this will return a result concerning the exact frame when it's asked, + so for example in a callback at the end of a Yoyo loop step this method will never return FALSE + because the frame will never end exactly there and the tween will already be going backwards when the callback is fired + + + Returns TRUE if the tween is complete + (silently fails and returns FALSE if the tween has been killed) + + + Returns TRUE if this tween has been initialized + + + Returns TRUE if this tween is playing + + + Returns the total number of loops set for this tween + (returns -1 if the loops are infinite) + + + + Returns a point on a path based on the given path percentage. + Returns Vector3.zero if this is not a path tween, if the tween is invalid, or if the path is not yet initialized. + A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature). + You can force a path to be initialized by calling myTween.ForceInit(). + + Percentage of the path (0 to 1) on which to get the point + + + + Returns an array of points that can be used to draw the path. + Note that this method generates allocations, because it creates a new array. + Returns NULL if this is not a path tween, if the tween is invalid, or if the path is not yet initialized. + A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature). + You can force a path to be initialized by calling myTween.ForceInit(). + + How many points to create for each path segment (waypoint to waypoint). + Only used in case of non-Linear paths + + + + Returns the length of a path. + Returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized. + A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature). + You can force a path to be initialized by calling myTween.ForceInit(). + + + + + Types of loop + + + + Each loop cycle restarts from the beginning + + + The tween moves forward and backwards at alternate cycles + + + Continuously increments the tween at the end of each loop cycle (A to B, B to B+(A-B), and so on), thus always moving "onward". + In case of String tweens works only if the tween is set as relative + + + + Controls other tweens as a group + + + + + Methods that extend known Unity objects and allow to directly create and control tweens from their instances + + + + Tweens a Camera's aspect to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's backgroundColor to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's farClipPlane to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's fieldOfView to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's nearClipPlane to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's orthographicSize to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's pixelRect to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's rect to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Shakes a Camera's localPosition along its relative X Y axes with the given values. + Also stores the camera as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + Randomness mode + + + Shakes a Camera's localPosition along its relative X Y axes with the given values. + Also stores the camera as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + Randomness mode + + + Shakes a Camera's localRotation. + Also stores the camera as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + Randomness mode + + + Shakes a Camera's localRotation. + Also stores the camera as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + Randomness mode + + + Tweens a Light's color to the given value. + Also stores the light as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Light's intensity to the given value. + Also stores the light as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Light's shadowStrength to the given value. + Also stores the light as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a LineRenderer's color to the given value. + Also stores the LineRenderer as the tween's target so it can be used for filtered operations. + Note that this method requires to also insert the start colors for the tween, + since LineRenderers have no way to get them. + The start value to tween from + The end value to reachThe duration of the tween + + + Tweens a Material's color to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Material's named color property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween (like _Tint or _SpecColor) + The duration of the tween + + + Tweens a Material's named color property with the given ID to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The ID of the material property to tween (also called nameID in Unity's manual) + The duration of the tween + + + Tweens a Material's alpha color to the given value + (will have no effect unless your material supports transparency). + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Material's alpha color to the given value + (will have no effect unless your material supports transparency). + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween (like _Tint or _SpecColor) + The duration of the tween + + + Tweens a Material's alpha color with the given ID to the given value + (will have no effect unless your material supports transparency). + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The ID of the material property to tween (also called nameID in Unity's manual) + The duration of the tween + + + Tweens a Material's named float property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Material's named float property with the given ID to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The ID of the material property to tween (also called nameID in Unity's manual) + The duration of the tween + + + Tweens a Material's texture offset to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The duration of the tween + + + Tweens a Material's named texture offset property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Material's texture scale to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The duration of the tween + + + Tweens a Material's named texture scale property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Material's named Vector property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Material's named Vector property with the given ID to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The ID of the material property to tween (also called nameID in Unity's manual) + The duration of the tween + + + Tweens a TrailRenderer's startWidth/endWidth to the given value. + Also stores the TrailRenderer as the tween's target so it can be used for filtered operations + The end startWidth to reachThe end endWidth to reach + The duration of the tween + + + Tweens a TrailRenderer's time to the given value. + Also stores the TrailRenderer as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's position to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's X position to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's Y position to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's Z position to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's localPosition to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's X localPosition to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's Y localPosition to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's Z localPosition to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's rotation to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + Rotation mode + + + Tweens a Transform's rotation to the given value using pure quaternion values. + Also stores the transform as the tween's target so it can be used for filtered operations. + PLEASE NOTE: DORotate, which takes Vector3 values, is the preferred rotation method. + This method was implemented for very special cases, and doesn't support LoopType.Incremental loops + (neither for itself nor if placed inside a LoopType.Incremental Sequence) + + The end value to reachThe duration of the tween + + + Tweens a Transform's localRotation to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + Rotation mode + + + Tweens a Transform's rotation to the given value using pure quaternion values. + Also stores the transform as the tween's target so it can be used for filtered operations. + PLEASE NOTE: DOLocalRotate, which takes Vector3 values, is the preferred rotation method. + This method was implemented for very special cases, and doesn't support LoopType.Incremental loops + (neither for itself nor if placed inside a LoopType.Incremental Sequence) + + The end value to reachThe duration of the tween + + + Tweens a Transform's localScale to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's localScale uniformly to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's X localScale to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's Y localScale to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's Z localScale to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's rotation so that it will look towards the given world position. + Also stores the transform as the tween's target so it can be used for filtered operations + The position to look atThe duration of the tween + Eventual axis constraint for the rotation + The vector that defines in which direction up is (default: Vector3.up) + + + EXPERIMENTAL Tweens a Transform's rotation so that it will look towards the given world position, + while also updating the lookAt position every frame + (contrary to which calculates the lookAt rotation only once, when the tween starts). + Also stores the transform as the tween's target so it can be used for filtered operations + The position to look atThe duration of the tween + Eventual axis constraint for the rotation + The vector that defines in which direction up is (default: Vector3.up) + + + Punches a Transform's localPosition towards the given direction and then back to the starting one + as if it was connected to the starting position via an elastic. + The direction and strength of the punch (added to the Transform's current position) + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting position when bouncing backwards. + 1 creates a full oscillation between the punch direction and the opposite direction, + while 0 oscillates only between the punch and the start position + If TRUE the tween will smoothly snap all values to integers + + + Punches a Transform's localScale towards the given size and then back to the starting one + as if it was connected to the starting scale via an elastic. + The punch strength (added to the Transform's current scale) + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting size when bouncing backwards. + 1 creates a full oscillation between the punch scale and the opposite scale, + while 0 oscillates only between the punch scale and the start scale + + + Punches a Transform's localRotation towards the given size and then back to the starting one + as if it was connected to the starting rotation via an elastic. + The punch strength (added to the Transform's current rotation) + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting rotation when bouncing backwards. + 1 creates a full oscillation between the punch rotation and the opposite rotation, + while 0 oscillates only between the punch and the start rotation + + + Shakes a Transform's localPosition with the given values. + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the tween will smoothly snap all values to integers + If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + Randomness mode + + + Shakes a Transform's localPosition with the given values. + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the tween will smoothly snap all values to integers + If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + Randomness mode + + + Shakes a Transform's localRotation. + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + Randomness mode + + + Shakes a Transform's localRotation. + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + Randomness mode + + + Shakes a Transform's localScale. + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + Randomness mode + + + Shakes a Transform's localScale. + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + Randomness mode + + + Tweens a Transform's position to the given value, while also applying a jump effect along the Y axis. + Returns a Sequence instead of a Tweener. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reach + Power of the jump (the max height of the jump is represented by this plus the final Y offset) + Total number of jumps + The duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's localPosition to the given value, while also applying a jump effect along the Y axis. + Returns a Sequence instead of a Tweener. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reach + Power of the jump (the max height of the jump is represented by this plus the final Y offset) + Total number of jumps + The duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's position through the given path waypoints, using the chosen path algorithm. + Also stores the transform as the tween's target so it can be used for filtered operations + The waypoints to go through + The duration of the tween + The type of path: Linear (straight path), CatmullRom (curved CatmullRom path) or CubicBezier (curved with control points) + The path mode: 3D, side-scroller 2D, top-down 2D + The resolution of the path (useless in case of Linear paths): higher resolutions make for more detailed curved paths but are more expensive. + Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints + The color of the path (shown when gizmos are active in the Play panel and the tween is running) + + + Tweens a Transform's localPosition through the given path waypoints, using the chosen path algorithm. + Also stores the transform as the tween's target so it can be used for filtered operations + The waypoint to go through + The duration of the tween + The type of path: Linear (straight path), CatmullRom (curved CatmullRom path) or CubicBezier (curved with control points) + The path mode: 3D, side-scroller 2D, top-down 2D + The resolution of the path: higher resolutions make for more detailed curved paths but are more expensive. + Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints + The color of the path (shown when gizmos are active in the Play panel and the tween is running) + + + IMPORTANT: Unless you really know what you're doing, you should use the overload that accepts a Vector3 array instead. + Tweens a Transform's position via the given path. + Also stores the transform as the tween's target so it can be used for filtered operations + The path to use + The duration of the tween + The path mode: 3D, side-scroller 2D, top-down 2D + + + IMPORTANT: Unless you really know what you're doing, you should use the overload that accepts a Vector3 array instead. + Tweens a Transform's localPosition via the given path. + Also stores the transform as the tween's target so it can be used for filtered operations + The path to use + The duration of the tween + The path mode: 3D, side-scroller 2D, top-down 2D + + + Tweens a Tween's timeScale to the given value. + Also stores the Tween as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Light's color to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Light as the tween's target so it can be used for filtered operations + The value to tween toThe duration of the tween + + + Tweens a Material's color to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Material as the tween's target so it can be used for filtered operations + The value to tween toThe duration of the tween + + + Tweens a Material's named color property to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Material as the tween's target so it can be used for filtered operations + The value to tween to + The name of the material property to tween (like _Tint or _SpecColor) + The duration of the tween + + + Tweens a Material's named color property with the given ID to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Material as the tween's target so it can be used for filtered operations + The value to tween to + The ID of the material property to tween (also called nameID in Unity's manual) + The duration of the tween + + + Tweens a Transform's position BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableMove tweens to work together on the same target, + instead than fight each other as multiple DOMove would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's localPosition BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableMove tweens to work together on the same target, + instead than fight each other as multiple DOMove would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + EXPERIMENTAL METHOD - Tweens a Transform's rotation BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableRotate tweens to work together on the same target, + instead than fight each other as multiple DORotate would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + Rotation mode + + + EXPERIMENTAL METHOD - Tweens a Transform's lcoalRotation BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableRotate tweens to work together on the same target, + instead than fight each other as multiple DORotate would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + Rotation mode + + + Punches a Transform's localRotation BY the given value and then back to the starting one + as if it was connected to the starting rotation via an elastic. Does it in a way that allows other + DOBlendableRotate tweens to work together on the same target + The punch strength (added to the Transform's current rotation) + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting rotation when bouncing backwards. + 1 creates a full oscillation between the punch rotation and the opposite rotation, + while 0 oscillates only between the punch and the start rotation + + + Tweens a Transform's localScale BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableScale tweens to work together on the same target, + instead than fight each other as multiple DOScale would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + + + + Completes all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens completed + (meaning the tweens that don't have infinite loops and were not already complete) + + For Sequences only: if TRUE also internal Sequence callbacks will be fired, + otherwise they will be ignored + + + + Completes all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens completed + (meaning the tweens that don't have infinite loops and were not already complete) + + For Sequences only: if TRUE also internal Sequence callbacks will be fired, + otherwise they will be ignored + + + + Kills all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens killed. + + If TRUE completes the tween before killing it + + + + Kills all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens killed. + + If TRUE completes the tween before killing it + + + + Flips the direction (backwards if it was going forward or viceversa) of all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens flipped. + + + + + Flips the direction (backwards if it was going forward or viceversa) of all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens flipped. + + + + + Sends to the given position all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens involved. + + Time position to reach + (if higher than the whole tween duration the tween will simply reach its end) + If TRUE will play the tween after reaching the given position, otherwise it will pause it + + + + Sends to the given position all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens involved. + + Time position to reach + (if higher than the whole tween duration the tween will simply reach its end) + If TRUE will play the tween after reaching the given position, otherwise it will pause it + + + + Pauses all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens paused. + + + + + Pauses all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens paused. + + + + + Plays all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays backwards all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays backwards all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays forward all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays forward all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Restarts all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens restarted. + + + + + Restarts all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens restarted. + + + + + Rewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + + + + Rewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + + + + Smoothly rewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + + + + Smoothly rewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + + + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens involved. + + + + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens involved. + + + + + This class serves only as a utility class to store tween settings to apply on multiple tweens. + It is in no way needed otherwise, since you can directly apply tween settings to a tween via chaining + + + + A variable you can eventually Clear and reuse when needed, + to avoid instantiating TweenParams objects + + + Creates a new TweenParams object, which you can use to store tween settings + to pass to multiple tweens via myTween.SetAs(myTweenParms) + + + Clears and resets this TweenParams instance using default values, + so it can be reused without instantiating another one + + + Sets the autoKill behaviour of the tween. + Has no effect if the tween has already started + If TRUE the tween will be automatically killed when complete + + + Sets an ID for the tween, which can then be used as a filter with DOTween's static methods. + The ID to assign to this tween. Can be an int, a string, an object or anything else. + + + Sets an ID for the tween, which can then be used as a filter with DOTween's static methods. + The ID to assign to this tween. Can be an int, a string, an object or anything else. + + + Sets an ID for the tween, which can then be used as a filter with DOTween's static methods. + The ID to assign to this tween. Can be an int, a string, an object or anything else. + + + Sets the target for the tween, which can then be used as a filter with DOTween's static methods. + IMPORTANT: use it with caution. If you just want to set an ID for the tween use SetId instead. + When using shorcuts the shortcut target is already assigned as the tween's target, + so using this method will overwrite it and prevent shortcut-operations like myTarget.DOPause from working correctly. + The target to assign to this tween. Can be an int, a string, an object or anything else. + + + Sets the looping options for the tween. + Has no effect if the tween has already started + Number of cycles to play (-1 for infinite - will be converted to 1 in case the tween is nested in a Sequence) + Loop behaviour type (default: LoopType.Restart) + + + Sets the ease of the tween. + If applied to Sequences eases the whole sequence animation + Eventual overshoot or amplitude to use with Back or Elastic easeType (default is 1.70158) + Eventual period to use with Elastic easeType (default is 0) + + + Sets the ease of the tween using an AnimationCurve. + If applied to Sequences eases the whole sequence animation + + + Sets the ease of the tween using a custom ease function. + If applied to Sequences eases the whole sequence animation + + + Sets the recycling behaviour for the tween. + If TRUE the tween will be recycled after being killed, otherwise it will be destroyed. + + + Sets the update type to the one defined in DOTween.defaultUpdateType (UpdateType.Normal unless changed) + and lets you choose if it should be independent from Unity's Time.timeScale + If TRUE the tween will ignore Unity's Time.timeScale + + + Sets the type of update (default or independent) for the tween + The type of update (default: UpdateType.Normal) + If TRUE the tween will ignore Unity's Time.timeScale + + + Sets the onStart callback for the tween. + Called the first time the tween is set in a playing state, after any eventual delay + + + Sets the onPlay callback for the tween. + Called when the tween is set in a playing state, after any eventual delay. + Also called each time the tween resumes playing from a paused state + + + Sets the onRewind callback for the tween. + Called when the tween is rewinded, + either by calling Rewind or by reaching the start position while playing backwards. + Rewinding a tween that is already rewinded will not fire this callback + + + Sets the onUpdate callback for the tween. + Called each time the tween updates + + + Sets the onStepComplete callback for the tween. + Called the moment the tween completes one loop cycle, even when going backwards + + + Sets the onComplete callback for the tween. + Called the moment the tween reaches its final forward position, loops included + + + Sets the onKill callback for the tween. + Called the moment the tween is killed + + + Sets the onWaypointChange callback for the tween. + Called when a path tween reaches a new waypoint + + + Sets a delayed startup for the tween. + Has no effect on Sequences or if the tween has already started + + + If isRelative is TRUE sets the tween as relative + (the endValue will be calculated as startValue + endValue instead than being used directly). + Has no effect on Sequences or if the tween has already started + + + If isSpeedBased is TRUE sets the tween as speed based + (the duration will represent the number of units the tween moves x second). + Has no effect on Sequences, nested tweens, or if the tween has already started + + + + Methods that extend Tween objects and allow to set their parameters + + + + Sets the autoKill behaviour of the tween to TRUE. + Has no effect if the tween has already started or if it's added to a Sequence + + + Sets the autoKill behaviour of the tween. + Has no effect if the tween has already started or if it's added to a Sequence + If TRUE the tween will be automatically killed when complete + + + Sets an ID for the tween (), which can then be used as a filter with DOTween's static methods. + The ID to assign to this tween. Can be an int, a string, an object or anything else. + + + Sets a string ID for the tween (), which can then be used as a filter with DOTween's static methods. + Filtering via string is 2X faster than using an object as an ID (using the alternate obejct overload) + The string ID to assign to this tween. + + + Sets an int ID for the tween (), which can then be used as a filter with DOTween's static methods. + Filtering via int is 4X faster than via object, 2X faster than via string (using the alternate object/string overloads) + The int ID to assign to this tween. + + + Allows to link this tween to a GameObject + so that it will be automatically killed when the GameObject is destroyed. + Has no effect if the tween is added to a Sequence + The link target (unrelated to the target set via SetTarget) + + + Allows to link this tween to a GameObject and assign a behaviour depending on it. + This will also automatically kill the tween when the GameObject is destroyed. + Has no effect if the tween is added to a Sequence + The link target (unrelated to the target set via SetTarget) + The behaviour to use ( is always evaluated even if you choose another one) + + + Sets the target for the tween, which can then be used as a filter with DOTween's static methods. + IMPORTANT: use it with caution. If you just want to set an ID for the tween use SetId instead. + When using shorcuts the shortcut target is already assigned as the tween's target, + so using this method will overwrite it and prevent shortcut-operations like myTarget.DOPause from working correctly. + The target to assign to this tween. Can be an int, a string, an object or anything else. + + + Sets the looping options for the tween. + Has no effect if the tween has already started + Number of cycles to play (-1 for infinite - will be converted to 1 in case the tween is nested in a Sequence) + + + Sets the looping options for the tween. + Has no effect if the tween has already started + Number of cycles to play (-1 for infinite - will be converted to 1 in case the tween is nested in a Sequence) + Loop behaviour type (default: LoopType.Restart) + + + Sets the ease of the tween. + If applied to Sequences eases the whole sequence animation + + + Sets the ease of the tween. + If applied to Sequences eases the whole sequence animation + + Eventual overshoot to use with Back or Flash ease (default is 1.70158 - 1 for Flash). + In case of Flash ease it must be an intenger and sets the total number of flashes that will happen. + Using an even number will complete the tween on the starting value, while an odd one will complete it on the end value. + + + + Sets the ease of the tween. + If applied to Sequences eases the whole sequence animation + Eventual amplitude to use with Elastic easeType or overshoot to use with Flash easeType (default is 1.70158 - 1 for Flash). + In case of Flash ease it must be an integer and sets the total number of flashes that will happen. + Using an even number will complete the tween on the starting value, while an odd one will complete it on the end value. + + Eventual period to use with Elastic or Flash easeType (default is 0). + In case of Flash ease it indicates the power in time of the ease, and must be between -1 and 1. + 0 is balanced, 1 weakens the ease with time, -1 starts the ease weakened and gives it power towards the end. + + + + Sets the ease of the tween using an AnimationCurve. + If applied to Sequences eases the whole sequence animation + + + Sets the ease of the tween using a custom ease function (which must return a value between 0 and 1). + If applied to Sequences eases the whole sequence animation + + + Allows the tween to be recycled after being killed. + + + Sets the recycling behaviour for the tween. + If TRUE the tween will be recycled after being killed, otherwise it will be destroyed. + + + Sets the update type to UpdateType.Normal and lets you choose if it should be independent from Unity's Time.timeScale + If TRUE the tween will ignore Unity's Time.timeScale + + + Sets the type of update for the tween + The type of update (defalt: UpdateType.Normal) + + + Sets the type of update for the tween and lets you choose if it should be independent from Unity's Time.timeScale + The type of update + If TRUE the tween will ignore Unity's Time.timeScale + + + EXPERIMENTAL: inverts this tween, so that it will play from the end to the beginning + (playing it backwards will actually play it from the beginning to the end). + Has no effect if the tween has already started or if it's added to a Sequence + + + EXPERIMENTAL: inverts this tween, so that it will play from the end to the beginning + (playing it backwards will actually play it from the beginning to the end). + Has no effect if the tween has already started or if it's added to a Sequence + If TRUE the tween will be inverted, otherwise it won't + + + Sets the onStart callback for the tween, clearing any previous onStart callback that was set. + Called the first time the tween is set in a playing state, after any eventual delay + + + Sets the onPlay callback for the tween, clearing any previous onPlay callback that was set. + Called when the tween is set in a playing state, after any eventual delay. + Also called each time the tween resumes playing from a paused state + + + Sets the onPause callback for the tween, clearing any previous onPause callback that was set. + Called when the tween state changes from playing to paused. + If the tween has autoKill set to FALSE, this is called also when the tween reaches completion. + + + Sets the onRewind callback for the tween, clearing any previous onRewind callback that was set. + Called when the tween is rewinded, + either by calling Rewind or by reaching the start position while playing backwards. + Rewinding a tween that is already rewinded will not fire this callback + + + Sets the onUpdate callback for the tween, clearing any previous onUpdate callback that was set. + Called each time the tween updates + + + Sets the onStepComplete callback for the tween, clearing any previous onStepComplete callback that was set. + Called the moment the tween completes one loop cycle, even when going backwards + + + Sets the onComplete callback for the tween, clearing any previous onComplete callback that was set. + Called the moment the tween reaches its final forward position, loops included + + + Sets the onKill callback for the tween, clearing any previous onKill callback that was set. + Called the moment the tween is killed + + + Sets the onWaypointChange callback for the tween, clearing any previous onWaypointChange callback that was set. + Called when a path tween's current waypoint changes + + + Sets the parameters of the tween (id, ease, loops, delay, timeScale, callbacks, etc) as the parameters of the given one. + Doesn't copy specific SetOptions settings: those will need to be applied manually each time. + Has no effect if the tween has already started. + NOTE: the tween's target will not be changed + Tween from which to copy the parameters + + + Sets the parameters of the tween (id, ease, loops, delay, timeScale, callbacks, etc) as the parameters of the given TweenParams. + Has no effect if the tween has already started. + TweenParams from which to copy the parameters + + + Adds the given tween to the end of the Sequence. + Has no effect if the Sequence has already started + The tween to append + + + Adds the given tween to the beginning of the Sequence, pushing forward the other nested content. + Has no effect if the Sequence has already started + The tween to prepend + + + Inserts the given tween at the same time position of the last tween, callback or interval added to the Sequence. + Note that, in case of a Join after an interval, the insertion time will be the time where the interval starts, not where it finishes. + Has no effect if the Sequence has already started + + + Inserts the given tween at the given time position in the Sequence, + automatically adding an interval if needed. + Has no effect if the Sequence has already started + The time position where the tween will be placed + The tween to insert + + + Adds the given interval to the end of the Sequence. + Has no effect if the Sequence has already started + The interval duration + + + Adds the given interval to the beginning of the Sequence, pushing forward the other nested content. + Has no effect if the Sequence has already started + The interval duration + + + Adds the given callback to the end of the Sequence. + Has no effect if the Sequence has already started + The callback to append + + + Adds the given callback to the beginning of the Sequence, pushing forward the other nested content. + Has no effect if the Sequence has already started + The callback to prepend + + + Inserts the given callback at the same time position of the last tween, callback or interval added to the Sequence. + Note that, in case of a Join after an interval, the insertion time will be the time where the interval starts, not where it finishes. + Has no effect if the Sequence has already started + /// <param name="callback">The callback to prepend</param> + + + Inserts the given callback at the given time position in the Sequence, + automatically adding an interval if needed. + Has no effect if the Sequence has already started + The time position where the callback will be placed + The callback to insert + + + Changes a TO tween into a FROM tween: sets the current target's position as the tween's endValue + then immediately sends the target to the previously set endValue. + + + Changes a TO tween into a FROM tween: sets the current target's position as the tween's endValue + then immediately sends the target to the previously set endValue. + If TRUE the FROM value will be calculated as relative to the current one + + + Changes a TO tween into a FROM tween: sets the current value of the target as the endValue, + and the previously passed endValue as the actual startValue. + If TRUE sets the target to from value immediately, otherwise waits for the tween to start + If TRUE the FROM value will be calculated as relative to the current one + + + Changes a TO tween into a FROM tween: sets the tween's starting value to the given one + and eventually sets the tween's target to that value immediately. + Value to start from + If TRUE sets the target to from value immediately, otherwise waits for the tween to start + If TRUE the FROM/TO values will be calculated as relative to the current ones + + + Changes a TO tween into a FROM tween: sets the tween's starting value to the given one + and eventually sets the tween's target to that value immediately. + Alpha value to start from (in case of Fade tweens) + If TRUE sets the target to from value immediately, otherwise waits for the tween to start + If TRUE the FROM/TO values will be calculated as relative to the current ones + + + Changes a TO tween into a FROM tween: sets the tween's starting value to the given one + and eventually sets the tween's target to that value immediately. + Value to start from (in case of Vector tweens that act on a single coordinate or scale tweens) + If TRUE sets the target to from value immediately, otherwise waits for the tween to start + If TRUE the FROM/TO values will be calculated as relative to the current ones + + + Changes a TO tween into a FROM tween: sets the tween's starting value to the given one + and eventually sets the tween's target to that value immediately. + Value to start from (in case of Vector tweens that act on a single coordinate or scale tweens) + If TRUE sets the target to from value immediately, otherwise waits for the tween to start + If TRUE the FROM/TO values will be calculated as relative to the current ones + + + Sets a delayed startup for the tween. + In case of Sequences behaves the same as , + which means the delay will repeat in case of loops (while with tweens it's ignored after the first loop cycle). + Has no effect if the tween has already started + + + EXPERIMENTAL: implemented in v1.2.340. + Sets a delayed startup for the tween with options to choose how the delay is applied in case of Sequences. + Has no effect if the tween has already started + Only used by types: If FALSE sets the delay as a one-time occurrence + (defaults to this for types), + otherwise as a Sequence interval which will repeat at the beginning of every loop cycle + + + Sets the tween as relative + (the endValue will be calculated as startValue + endValue instead than being used directly). + Has no effect on Sequences or if the tween has already started + + + If isRelative is TRUE sets the tween as relative + (the endValue will be calculated as startValue + endValue instead than being used directly). + Has no effect on Sequences or if the tween has already started + + + If isSpeedBased is TRUE sets the tween as speed based + (the duration will represent the number of units the tween moves x second). + Has no effect on Sequences, nested tweens, or if the tween has already started + + + If isSpeedBased is TRUE sets the tween as speed based + (the duration will represent the number of units the tween moves x second). + Has no effect on Sequences, nested tweens, or if the tween has already started + + + Options for float tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector2 tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector2 tweens + Selecting an axis will tween the vector only on that axis, leaving the others untouched + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector3 tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector3 tweens + Selecting an axis will tween the vector only on that axis, leaving the others untouched + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector4 tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector4 tweens + Selecting an axis will tween the vector only on that axis, leaving the others untouched + If TRUE the tween will smoothly snap all values to integers + + + Options for Quaternion tweens + If TRUE (default) the rotation will take the shortest route, and will not rotate more than 360°. + If FALSE the rotation will be fully accounted. Is always FALSE if the tween is set as relative + + + Options for Color tweens + If TRUE only the alpha value of the color will be tweened + + + Options for Vector4 tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector4 tweens + If TRUE, rich text will be interpreted correctly while animated, + otherwise all tags will be considered as normal text + The type of scramble to use, if any + A string containing the characters to use for scrambling. + Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. + Leave it to NULL to use default ones + + + Options for Vector3Array tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector3Array tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for ShapeCircle tweens + If TRUE the center you set in the DOTween.To method will be considered as relative + to the starting position of the target + If TRUE the tween will smoothly snap all values to integers + + + Options for Path tweens (created via the DOPath shortcut) + The eventual movement axis to lock. You can input multiple axis if you separate them like this: + AxisConstrain.X | AxisConstraint.Y + The eventual rotation axis to lock. You can input multiple axis if you separate them like this: + AxisConstrain.X | AxisConstraint.Y + + + Options for Path tweens (created via the DOPath shortcut) + If TRUE the path will be automatically closed + The eventual movement axis to lock. You can input multiple axis if you separate them like this: + AxisConstrain.X | AxisConstraint.Y + The eventual rotation axis to lock. You can input multiple axis if you separate them like this: + AxisConstrain.X | AxisConstraint.Y + + + Additional LookAt options for Path tweens (created via the DOPath shortcut). + Orients the target towards the given position. + Must be chained directly to the tween creation method or to a SetOptions + The position to look at + The eventual direction to consider as "forward". + If left to NULL defaults to the regular forward side of the transform + The vector that defines in which direction up is (default: Vector3.up) + + + Additional LookAt options for Path tweens (created via the DOPath shortcut). + Orients the target towards the given position with options to keep the Z rotation stable. + Must be chained directly to the tween creation method or to a SetOptions + The position to look at + If TRUE doesn't rotate the target along the Z axis + + + Additional LookAt options for Path tweens (created via the DOPath shortcut). + Orients the target towards another transform. + Must be chained directly to the tween creation method or to a SetOptions + The transform to look at + The eventual direction to consider as "forward". + If left to NULL defaults to the regular forward side of the transform + The vector that defines in which direction up is (default: Vector3.up) + + + Additional LookAt options for Path tweens (created via the DOPath shortcut). + Orients the target towards another transform with options to keep the Z rotation stable. + Must be chained directly to the tween creation method or to a SetOptions + The transform to look at + If TRUE doesn't rotate the target along the Z axis + + + Additional LookAt options for Path tweens (created via the DOPath shortcut). + Orients the target to the path, with the given lookAhead. + Must be chained directly to the tween creation method or to a SetOptions + The percentage of lookAhead to use (0 to 1) + The eventual direction to consider as "forward". + If left to NULL defaults to the regular forward side of the transform + The vector that defines in which direction up is (default: Vector3.up) + + + Additional LookAt options for Path tweens (created via the DOPath shortcut). + Orients the path with options to keep the Z rotation stable. + Must be chained directly to the tween creation method or to a SetOptions + The percentage of lookAhead to use (0 to 1) + If TRUE doesn't rotate the target along the Z axis + + + + Types of log behaviours + + + + Log only warnings and errors + + + Log warnings, errors and additional infos + + + Log only errors + + + + Indicates either a Tweener or a Sequence + + + + TimeScale for the tween + + + If TRUE the tween will play backwards + + + If TRUE the tween is completely inverted but without playing it backwards + (play backwards will actually play the tween in the original direction) + + + Object ID (usable for filtering with DOTween static methods). Can be anything except a string or an int + (use or for those) + + + String ID (usable for filtering with DOTween static methods). 2X faster than using an object id + + + Int ID (usable for filtering with DOTween static methods). 4X faster than using an object id, 2X faster than using a string id. + Default is -999 so avoid using an ID like that or it will capture all unset intIds + + + Tween target (usable for filtering with DOTween static methods). Automatically set by tween creation shortcuts + + + Called when the tween is set in a playing state, after any eventual delay. + Also called each time the tween resumes playing from a paused state + + + Called when the tween state changes from playing to paused. + If the tween has autoKill set to FALSE, this is called also when the tween reaches completion. + + + Called when the tween is rewinded, + either by calling Rewind or by reaching the start position while playing backwards. + Rewinding a tween that is already rewinded will not fire this callback + + + Called each time the tween updates + + + Called the moment the tween completes one loop cycle + + + Called the moment the tween reaches completion (loops included) + + + Called the moment the tween is killed + + + Called when a path tween's current waypoint changes + + + Tweeners-only (ignored by Sequences), returns TRUE if the tween was set as relative + + + + Set by SetTarget if DOTween's Debug Mode is on (see DOTween Utility Panel -> "Store GameObject's ID" debug option + + + + FALSE when tween is (or should be) despawned - set only by TweenManager + + + Gets and sets the time position (loops included, delays excluded) of the tween + + + Returns TRUE if the tween is set to loop (either a set number of times or infinitely) + + + TRUE after the tween was set in a play state at least once, AFTER any delay is elapsed + + + Time position within a single loop cycle + + + + Animates a single value + + + + Changes the start value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new start value + If bigger than 0 applies it as the new tween duration + + + Changes the end value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new end value + If bigger than 0 applies it as the new tween duration + If TRUE the start value will become the current target's value, otherwise it will stay the same + + + Changes the end value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new end value + If TRUE the start value will become the current target's value, otherwise it will stay the same + + + Changes the start and end value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new start value + The new end value + If bigger than 0 applies it as the new tween duration + + + + Used internally + + + + + Update type + + + + Updates every frame during Update calls + + + Updates every frame during LateUpdate calls + + + Updates using FixedUpdate calls + + + Updates using manual update calls + +
+
diff --git a/Assets/Plugins/Demigiant/DOTween/DOTween.XML.meta b/Assets/Plugins/Demigiant/DOTween/DOTween.XML.meta new file mode 100644 index 0000000..7a866b5 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/DOTween.XML.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 34192c5e0d14aee43a0e86cc4823268a +TextScriptImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/DOTween.dll b/Assets/Plugins/Demigiant/DOTween/DOTween.dll new file mode 100644 index 0000000..57112d3 Binary files /dev/null and b/Assets/Plugins/Demigiant/DOTween/DOTween.dll differ diff --git a/Assets/Plugins/Demigiant/DOTween/DOTween.dll.meta b/Assets/Plugins/Demigiant/DOTween/DOTween.dll.meta new file mode 100644 index 0000000..482dbb8 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/DOTween.dll.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a811bde74b26b53498b4f6d872b09b6d +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 1 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DOTween/Editor.meta b/Assets/Plugins/Demigiant/DOTween/Editor.meta new file mode 100644 index 0000000..532edfb --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Editor.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: b27f58ae5d5c33a4bb2d1f4f34bd036d +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenEditor.XML b/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenEditor.XML new file mode 100644 index 0000000..690bfc4 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenEditor.XML @@ -0,0 +1,144 @@ + + + + DOTweenEditor + + + + + Contains compatibility methods taken from DemiEditor (for when DOTween is without it) + + + + + Warning: some versions of this method don't have the includeInactive parameter so it won't be taken into account + + + + + Warning: some versions of this method don't have the includeInactive parameter so it won't be taken into account + + + + + Warning: some versions of this method don't have the includeInactive parameter so it won't be taken into account + + + + + Warning: some versions of this method don't have the includeInactive parameter so it won't be taken into account + + + + + Starts the update loop of tween in the editor. Has no effect during playMode. + + Eventual callback to call after every update + + + + Stops the update loop and clears the onPreviewUpdated callback. + + If TRUE also resets the tweened objects to their original state. + Note that this works by calling Rewind on all tweens, so it will work correctly + only if you have a single tween type per object and it wasn't killed + If TRUE also kills any cached tween + + + + Readies the tween for editor preview by setting its UpdateType to Manual plus eventual extra settings. + + The tween to ready + If TRUE (recommended) removes all callbacks (OnComplete/Rewind/etc) + If TRUE prevents the tween from being auto-killed at completion + If TRUE starts playing the tween immediately + + + Full major version + first minor version (ex: 2018.1f) + + + Major version + + + First minor version (ex: in 2018.1 it would be 1) + + + + Checks that the given editor texture use the correct import settings, + and applies them if they're incorrect. + + + + + Returns TRUE if setup is required + + + + + Returns TRUE if the file/directory at the given path exists. + + Path, relative to Unity's project folder + + + + + Converts the given project-relative path to a full path, + with backward (\) slashes). + + + + + Converts the given full path to a path usable with AssetDatabase methods + (relative to Unity's project folder, and with the correct Unity forward (/) slashes). + + + + + Connects to a asset. + If the asset already exists at the given path, loads it and returns it. + Otherwise, either returns NULL or automatically creates it before loading and returning it + (depending on the given parameters). + + Asset type + File path (relative to Unity's project folder) + If TRUE and the requested asset doesn't exist, forces its creation + + + + Full path for the given loaded assembly, assembly file included + + + + + Adds the given global define if it's not already present + + + + + Removes the given global define if it's present + + + + + Returns TRUE if the given global define is present in all the + or only in the given , depending on passed parameters. + + + to use. Leave NULL to check in all of them. + + + + Not used as menu item anymore, but as a utility function + + + + Full major version + first minor version (ex: 2018.1f) + + + Major version + + + First minor version (ex: in 2018.1 it would be 1) + + + diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenEditor.XML.meta b/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenEditor.XML.meta new file mode 100644 index 0000000..7cec113 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenEditor.XML.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 2e2c6224d345d9249acfa6e8ef40bb2d +TextScriptImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenEditor.dll b/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenEditor.dll new file mode 100644 index 0000000..4911a86 Binary files /dev/null and b/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenEditor.dll differ diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenEditor.dll.meta b/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenEditor.dll.meta new file mode 100644 index 0000000..53590f3 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenEditor.dll.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 45d5034162d6cf04dbe46da84fc7d074 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/Imgs.meta b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs.meta new file mode 100644 index 0000000..a81ba5f --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0034ebae0c2a9344e897db1160d71b6d +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/DOTweenIcon.png b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/DOTweenIcon.png new file mode 100644 index 0000000..d06fc7c Binary files /dev/null and b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/DOTweenIcon.png differ diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/DOTweenIcon.png.meta b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/DOTweenIcon.png.meta new file mode 100644 index 0000000..61c3cce --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/DOTweenIcon.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 8da095e39e9b4df488dfd436f81116d6 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/DOTweenMiniIcon.png b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/DOTweenMiniIcon.png new file mode 100644 index 0000000..7cd74c1 Binary files /dev/null and b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/DOTweenMiniIcon.png differ diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/DOTweenMiniIcon.png.meta b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/DOTweenMiniIcon.png.meta new file mode 100644 index 0000000..c343a61 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/DOTweenMiniIcon.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: 61521df2e071645488ba3d05e49289ae +timeCreated: 1602317874 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Footer.png b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Footer.png new file mode 100644 index 0000000..e29d02f Binary files /dev/null and b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Footer.png differ diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Footer.png.meta b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Footer.png.meta new file mode 100644 index 0000000..7ca1911 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Footer.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 7051dba417b3d53409f2918f1ea4938d +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Footer_dark.png b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Footer_dark.png new file mode 100644 index 0000000..e48db5e Binary files /dev/null and b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Footer_dark.png differ diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Footer_dark.png.meta b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Footer_dark.png.meta new file mode 100644 index 0000000..f12a1a7 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Footer_dark.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 519694efe2bb2914788b151fbd8c01f4 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Header.jpg b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Header.jpg new file mode 100644 index 0000000..4d710d7 Binary files /dev/null and b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Header.jpg differ diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Header.jpg.meta b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Header.jpg.meta new file mode 100644 index 0000000..26e4255 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Editor/Imgs/Header.jpg.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 78a59ca99f8987941adb61f9e14a06a7 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 512 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/Modules.meta b/Assets/Plugins/Demigiant/DOTween/Modules.meta new file mode 100644 index 0000000..24cd2ac --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 143604b8bad857d47a6f7cc7a533e2dc +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleAudio.cs b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleAudio.cs new file mode 100644 index 0000000..d958ae0 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleAudio.cs @@ -0,0 +1,198 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2018/07/13 + +#if true // MODULE_MARKER +using System; +using DG.Tweening.Core; +using DG.Tweening.Plugins.Options; +using UnityEngine; +using UnityEngine.Audio; // Required for AudioMixer + +#pragma warning disable 1591 +namespace DG.Tweening +{ + public static class DOTweenModuleAudio + { + #region Shortcuts + + #region Audio + + /// Tweens an AudioSource's volume to the given value. + /// Also stores the AudioSource as the tween's target so it can be used for filtered operations + /// The end value to reach (0 to 1)The duration of the tween + public static TweenerCore DOFade(this AudioSource target, float endValue, float duration) + { + if (endValue < 0) endValue = 0; + else if (endValue > 1) endValue = 1; + TweenerCore t = DOTween.To(() => target.volume, x => target.volume = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens an AudioSource's pitch to the given value. + /// Also stores the AudioSource as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOPitch(this AudioSource target, float endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.pitch, x => target.pitch = x, endValue, duration); + t.SetTarget(target); + return t; + } + + #endregion + + #region AudioMixer + + /// Tweens an AudioMixer's exposed float to the given value. + /// Also stores the AudioMixer as the tween's target so it can be used for filtered operations. + /// Note that you need to manually expose a float in an AudioMixerGroup in order to be able to tween it from an AudioMixer. + /// Name given to the exposed float to set + /// The end value to reachThe duration of the tween + public static TweenerCore DOSetFloat(this AudioMixer target, string floatName, float endValue, float duration) + { + TweenerCore t = DOTween.To(()=> { + float currVal; + target.GetFloat(floatName, out currVal); + return currVal; + }, x=> target.SetFloat(floatName, x), endValue, duration); + t.SetTarget(target); + return t; + } + + #region Operation Shortcuts + + /// + /// Completes all tweens that have this target as a reference + /// (meaning tweens that were started from this target, or that had this target added as an Id) + /// and returns the total number of tweens completed + /// (meaning the tweens that don't have infinite loops and were not already complete) + /// + /// For Sequences only: if TRUE also internal Sequence callbacks will be fired, + /// otherwise they will be ignored + public static int DOComplete(this AudioMixer target, bool withCallbacks = false) + { + return DOTween.Complete(target, withCallbacks); + } + + /// + /// Kills all tweens that have this target as a reference + /// (meaning tweens that were started from this target, or that had this target added as an Id) + /// and returns the total number of tweens killed. + /// + /// If TRUE completes the tween before killing it + public static int DOKill(this AudioMixer target, bool complete = false) + { + return DOTween.Kill(target, complete); + } + + /// + /// Flips the direction (backwards if it was going forward or viceversa) of all tweens that have this target as a reference + /// (meaning tweens that were started from this target, or that had this target added as an Id) + /// and returns the total number of tweens flipped. + /// + public static int DOFlip(this AudioMixer target) + { + return DOTween.Flip(target); + } + + /// + /// Sends to the given position all tweens that have this target as a reference + /// (meaning tweens that were started from this target, or that had this target added as an Id) + /// and returns the total number of tweens involved. + /// + /// Time position to reach + /// (if higher than the whole tween duration the tween will simply reach its end) + /// If TRUE will play the tween after reaching the given position, otherwise it will pause it + public static int DOGoto(this AudioMixer target, float to, bool andPlay = false) + { + return DOTween.Goto(target, to, andPlay); + } + + /// + /// Pauses all tweens that have this target as a reference + /// (meaning tweens that were started from this target, or that had this target added as an Id) + /// and returns the total number of tweens paused. + /// + public static int DOPause(this AudioMixer target) + { + return DOTween.Pause(target); + } + + /// + /// Plays all tweens that have this target as a reference + /// (meaning tweens that were started from this target, or that had this target added as an Id) + /// and returns the total number of tweens played. + /// + public static int DOPlay(this AudioMixer target) + { + return DOTween.Play(target); + } + + /// + /// Plays backwards all tweens that have this target as a reference + /// (meaning tweens that were started from this target, or that had this target added as an Id) + /// and returns the total number of tweens played. + /// + public static int DOPlayBackwards(this AudioMixer target) + { + return DOTween.PlayBackwards(target); + } + + /// + /// Plays forward all tweens that have this target as a reference + /// (meaning tweens that were started from this target, or that had this target added as an Id) + /// and returns the total number of tweens played. + /// + public static int DOPlayForward(this AudioMixer target) + { + return DOTween.PlayForward(target); + } + + /// + /// Restarts all tweens that have this target as a reference + /// (meaning tweens that were started from this target, or that had this target added as an Id) + /// and returns the total number of tweens restarted. + /// + public static int DORestart(this AudioMixer target) + { + return DOTween.Restart(target); + } + + /// + /// Rewinds all tweens that have this target as a reference + /// (meaning tweens that were started from this target, or that had this target added as an Id) + /// and returns the total number of tweens rewinded. + /// + public static int DORewind(this AudioMixer target) + { + return DOTween.Rewind(target); + } + + /// + /// Smoothly rewinds all tweens that have this target as a reference + /// (meaning tweens that were started from this target, or that had this target added as an Id) + /// and returns the total number of tweens rewinded. + /// + public static int DOSmoothRewind(this AudioMixer target) + { + return DOTween.SmoothRewind(target); + } + + /// + /// Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference + /// (meaning tweens that were started from this target, or that had this target added as an Id) + /// and returns the total number of tweens involved. + /// + public static int DOTogglePause(this AudioMixer target) + { + return DOTween.TogglePause(target); + } + + #endregion + + #endregion + + #endregion + } +} +#endif diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleAudio.cs.meta b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleAudio.cs.meta new file mode 100644 index 0000000..50aa010 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleAudio.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b766d08851589514b97afb23c6f30a70 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleEPOOutline.cs b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleEPOOutline.cs new file mode 100644 index 0000000..2ab3775 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleEPOOutline.cs @@ -0,0 +1,146 @@ +using UnityEngine; + +#if false || EPO_DOTWEEN // MODULE_MARKER + +using EPOOutline; +using DG.Tweening.Plugins.Options; +using DG.Tweening; +using DG.Tweening.Core; + +namespace DG.Tweening +{ + public static class DOTweenModuleEPOOutline + { + public static int DOKill(this SerializedPass target, bool complete) + { + return DOTween.Kill(target, complete); + } + + public static TweenerCore DOFloat(this SerializedPass target, string propertyName, float endValue, float duration) + { + var tweener = DOTween.To(() => target.GetFloat(propertyName), x => target.SetFloat(propertyName, x), endValue, duration); + tweener.SetOptions(true).SetTarget(target); + return tweener; + } + + public static TweenerCore DOFade(this SerializedPass target, string propertyName, float endValue, float duration) + { + var tweener = DOTween.ToAlpha(() => target.GetColor(propertyName), x => target.SetColor(propertyName, x), endValue, duration); + tweener.SetOptions(true).SetTarget(target); + return tweener; + } + + public static TweenerCore DOColor(this SerializedPass target, string propertyName, Color endValue, float duration) + { + var tweener = DOTween.To(() => target.GetColor(propertyName), x => target.SetColor(propertyName, x), endValue, duration); + tweener.SetOptions(false).SetTarget(target); + return tweener; + } + + public static TweenerCore DOVector(this SerializedPass target, string propertyName, Vector4 endValue, float duration) + { + var tweener = DOTween.To(() => target.GetVector(propertyName), x => target.SetVector(propertyName, x), endValue, duration); + tweener.SetOptions(false).SetTarget(target); + return tweener; + } + + public static TweenerCore DOFloat(this SerializedPass target, int propertyId, float endValue, float duration) + { + var tweener = DOTween.To(() => target.GetFloat(propertyId), x => target.SetFloat(propertyId, x), endValue, duration); + tweener.SetOptions(true).SetTarget(target); + return tweener; + } + + public static TweenerCore DOFade(this SerializedPass target, int propertyId, float endValue, float duration) + { + var tweener = DOTween.ToAlpha(() => target.GetColor(propertyId), x => target.SetColor(propertyId, x), endValue, duration); + tweener.SetOptions(true).SetTarget(target); + return tweener; + } + + public static TweenerCore DOColor(this SerializedPass target, int propertyId, Color endValue, float duration) + { + var tweener = DOTween.To(() => target.GetColor(propertyId), x => target.SetColor(propertyId, x), endValue, duration); + tweener.SetOptions(false).SetTarget(target); + return tweener; + } + + public static TweenerCore DOVector(this SerializedPass target, int propertyId, Vector4 endValue, float duration) + { + var tweener = DOTween.To(() => target.GetVector(propertyId), x => target.SetVector(propertyId, x), endValue, duration); + tweener.SetOptions(false).SetTarget(target); + return tweener; + } + + public static int DOKill(this Outlinable.OutlineProperties target, bool complete = false) + { + return DOTween.Kill(target, complete); + } + + public static int DOKill(this Outliner target, bool complete = false) + { + return DOTween.Kill(target, complete); + } + + /// + /// Controls the alpha (transparency) of the outline + /// + public static TweenerCore DOFade(this Outlinable.OutlineProperties target, float endValue, float duration) + { + var tweener = DOTween.ToAlpha(() => target.Color, x => target.Color = x, endValue, duration); + tweener.SetOptions(true).SetTarget(target); + return tweener; + } + + /// + /// Controls the color of the outline + /// + public static TweenerCore DOColor(this Outlinable.OutlineProperties target, Color endValue, float duration) + { + var tweener = DOTween.To(() => target.Color, x => target.Color = x, endValue, duration); + tweener.SetOptions(false).SetTarget(target); + return tweener; + } + + /// + /// Controls the amount of blur applied to the outline + /// + public static TweenerCore DOBlurShift(this Outlinable.OutlineProperties target, float endValue, float duration, bool snapping = false) + { + var tweener = DOTween.To(() => target.BlurShift, x => target.BlurShift = x, endValue, duration); + tweener.SetOptions(snapping).SetTarget(target); + return tweener; + } + + /// + /// Controls the amount of blur applied to the outline + /// + public static TweenerCore DOBlurShift(this Outliner target, float endValue, float duration, bool snapping = false) + { + var tweener = DOTween.To(() => target.BlurShift, x => target.BlurShift = x, endValue, duration); + tweener.SetOptions(snapping).SetTarget(target); + return tweener; + } + + /// + /// Controls the amount of dilation applied to the outline + /// + public static TweenerCore DODilateShift(this Outlinable.OutlineProperties target, float endValue, float duration, bool snapping = false) + { + var tweener = DOTween.To(() => target.DilateShift, x => target.DilateShift = x, endValue, duration); + tweener.SetOptions(snapping).SetTarget(target); + return tweener; + } + + /// + /// Controls the amount of dilation applied to the outline + /// + public static TweenerCore DODilateShift(this Outliner target, float endValue, float duration, bool snapping = false) + { + var tweener = DOTween.To(() => target.DilateShift, x => target.DilateShift = x, endValue, duration); + tweener.SetOptions(snapping).SetTarget(target); + return tweener; + } + } +} +#endif diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleEPOOutline.cs.meta b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleEPOOutline.cs.meta new file mode 100644 index 0000000..4b8991f --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleEPOOutline.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e944529dcaee98f4e9498d80e541d93e +timeCreated: 1602593330 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModulePhysics.cs b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModulePhysics.cs new file mode 100644 index 0000000..08b0700 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModulePhysics.cs @@ -0,0 +1,216 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2018/07/13 + +#if true // MODULE_MARKER +using System; +using DG.Tweening.Core; +using DG.Tweening.Core.Enums; +using DG.Tweening.Plugins; +using DG.Tweening.Plugins.Core.PathCore; +using DG.Tweening.Plugins.Options; +using UnityEngine; + +#pragma warning disable 1591 +namespace DG.Tweening +{ + public static class DOTweenModulePhysics + { + #region Shortcuts + + #region Rigidbody + + /// Tweens a Rigidbody's position to the given value. + /// Also stores the rigidbody as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOMove(this Rigidbody target, Vector3 endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.position, target.MovePosition, endValue, duration); + t.SetOptions(snapping).SetTarget(target); + return t; + } + + /// Tweens a Rigidbody's X position to the given value. + /// Also stores the rigidbody as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOMoveX(this Rigidbody target, float endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.position, target.MovePosition, new Vector3(endValue, 0, 0), duration); + t.SetOptions(AxisConstraint.X, snapping).SetTarget(target); + return t; + } + + /// Tweens a Rigidbody's Y position to the given value. + /// Also stores the rigidbody as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOMoveY(this Rigidbody target, float endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.position, target.MovePosition, new Vector3(0, endValue, 0), duration); + t.SetOptions(AxisConstraint.Y, snapping).SetTarget(target); + return t; + } + + /// Tweens a Rigidbody's Z position to the given value. + /// Also stores the rigidbody as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOMoveZ(this Rigidbody target, float endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.position, target.MovePosition, new Vector3(0, 0, endValue), duration); + t.SetOptions(AxisConstraint.Z, snapping).SetTarget(target); + return t; + } + + /// Tweens a Rigidbody's rotation to the given value. + /// Also stores the rigidbody as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// Rotation mode + public static TweenerCore DORotate(this Rigidbody target, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast) + { + TweenerCore t = DOTween.To(() => target.rotation, target.MoveRotation, endValue, duration); + t.SetTarget(target); + t.plugOptions.rotateMode = mode; + return t; + } + + /// Tweens a Rigidbody's rotation so that it will look towards the given position. + /// Also stores the rigidbody as the tween's target so it can be used for filtered operations + /// The position to look atThe duration of the tween + /// Eventual axis constraint for the rotation + /// The vector that defines in which direction up is (default: Vector3.up) + public static TweenerCore DOLookAt(this Rigidbody target, Vector3 towards, float duration, AxisConstraint axisConstraint = AxisConstraint.None, Vector3? up = null) + { + TweenerCore t = DOTween.To(() => target.rotation, target.MoveRotation, towards, duration) + .SetTarget(target).SetSpecialStartupMode(SpecialStartupMode.SetLookAt); + t.plugOptions.axisConstraint = axisConstraint; + t.plugOptions.up = (up == null) ? Vector3.up : (Vector3)up; + return t; + } + + #region Special + + /// Tweens a Rigidbody's position to the given value, while also applying a jump effect along the Y axis. + /// Returns a Sequence instead of a Tweener. + /// Also stores the Rigidbody as the tween's target so it can be used for filtered operations + /// The end value to reach + /// Power of the jump (the max height of the jump is represented by this plus the final Y offset) + /// Total number of jumps + /// The duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static Sequence DOJump(this Rigidbody target, Vector3 endValue, float jumpPower, int numJumps, float duration, bool snapping = false) + { + if (numJumps < 1) numJumps = 1; + float startPosY = 0; + float offsetY = -1; + bool offsetYSet = false; + Sequence s = DOTween.Sequence(); + Tween yTween = DOTween.To(() => target.position, target.MovePosition, new Vector3(0, jumpPower, 0), duration / (numJumps * 2)) + .SetOptions(AxisConstraint.Y, snapping).SetEase(Ease.OutQuad).SetRelative() + .SetLoops(numJumps * 2, LoopType.Yoyo) + .OnStart(() => startPosY = target.position.y); + s.Append(DOTween.To(() => target.position, target.MovePosition, new Vector3(endValue.x, 0, 0), duration) + .SetOptions(AxisConstraint.X, snapping).SetEase(Ease.Linear) + ).Join(DOTween.To(() => target.position, target.MovePosition, new Vector3(0, 0, endValue.z), duration) + .SetOptions(AxisConstraint.Z, snapping).SetEase(Ease.Linear) + ).Join(yTween) + .SetTarget(target).SetEase(DOTween.defaultEaseType); + yTween.OnUpdate(() => { + if (!offsetYSet) { + offsetYSet = true; + offsetY = s.isRelative ? endValue.y : endValue.y - startPosY; + } + Vector3 pos = target.position; + pos.y += DOVirtual.EasedValue(0, offsetY, yTween.ElapsedPercentage(), Ease.OutQuad); + target.MovePosition(pos); + }); + return s; + } + + /// Tweens a Rigidbody's position through the given path waypoints, using the chosen path algorithm. + /// Also stores the Rigidbody as the tween's target so it can be used for filtered operations. + /// NOTE: to tween a rigidbody correctly it should be set to kinematic at least while being tweened. + /// BEWARE: doesn't work on Windows Phone store (waiting for Unity to fix their own bug). + /// If you plan to publish there you should use a regular transform.DOPath. + /// The waypoints to go through + /// The duration of the tween + /// The type of path: Linear (straight path), CatmullRom (curved CatmullRom path) or CubicBezier (curved with control points) + /// The path mode: 3D, side-scroller 2D, top-down 2D + /// The resolution of the path (useless in case of Linear paths): higher resolutions make for more detailed curved paths but are more expensive. + /// Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints + /// The color of the path (shown when gizmos are active in the Play panel and the tween is running) + public static TweenerCore DOPath( + this Rigidbody target, Vector3[] path, float duration, PathType pathType = PathType.Linear, + PathMode pathMode = PathMode.Full3D, int resolution = 10, Color? gizmoColor = null + ) + { + if (resolution < 1) resolution = 1; + TweenerCore t = DOTween.To(PathPlugin.Get(), () => target.position, target.MovePosition, new Path(pathType, path, resolution, gizmoColor), duration) + .SetTarget(target).SetUpdate(UpdateType.Fixed); + + t.plugOptions.isRigidbody = true; + t.plugOptions.mode = pathMode; + return t; + } + /// Tweens a Rigidbody's localPosition through the given path waypoints, using the chosen path algorithm. + /// Also stores the Rigidbody as the tween's target so it can be used for filtered operations + /// NOTE: to tween a rigidbody correctly it should be set to kinematic at least while being tweened. + /// BEWARE: doesn't work on Windows Phone store (waiting for Unity to fix their own bug). + /// If you plan to publish there you should use a regular transform.DOLocalPath. + /// The waypoint to go through + /// The duration of the tween + /// The type of path: Linear (straight path), CatmullRom (curved CatmullRom path) or CubicBezier (curved with control points) + /// The path mode: 3D, side-scroller 2D, top-down 2D + /// The resolution of the path: higher resolutions make for more detailed curved paths but are more expensive. + /// Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints + /// The color of the path (shown when gizmos are active in the Play panel and the tween is running) + public static TweenerCore DOLocalPath( + this Rigidbody target, Vector3[] path, float duration, PathType pathType = PathType.Linear, + PathMode pathMode = PathMode.Full3D, int resolution = 10, Color? gizmoColor = null + ) + { + if (resolution < 1) resolution = 1; + Transform trans = target.transform; + TweenerCore t = DOTween.To(PathPlugin.Get(), () => trans.localPosition, x => target.MovePosition(trans.parent == null ? x : trans.parent.TransformPoint(x)), new Path(pathType, path, resolution, gizmoColor), duration) + .SetTarget(target).SetUpdate(UpdateType.Fixed); + + t.plugOptions.isRigidbody = true; + t.plugOptions.mode = pathMode; + t.plugOptions.useLocalPosition = true; + return t; + } + // Used by path editor when creating the actual tween, so it can pass a pre-compiled path + internal static TweenerCore DOPath( + this Rigidbody target, Path path, float duration, PathMode pathMode = PathMode.Full3D + ) + { + TweenerCore t = DOTween.To(PathPlugin.Get(), () => target.position, target.MovePosition, path, duration) + .SetTarget(target); + + t.plugOptions.isRigidbody = true; + t.plugOptions.mode = pathMode; + return t; + } + internal static TweenerCore DOLocalPath( + this Rigidbody target, Path path, float duration, PathMode pathMode = PathMode.Full3D + ) + { + Transform trans = target.transform; + TweenerCore t = DOTween.To(PathPlugin.Get(), () => trans.localPosition, x => target.MovePosition(trans.parent == null ? x : trans.parent.TransformPoint(x)), path, duration) + .SetTarget(target); + + t.plugOptions.isRigidbody = true; + t.plugOptions.mode = pathMode; + t.plugOptions.useLocalPosition = true; + return t; + } + + #endregion + + #endregion + + #endregion + } +} +#endif diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModulePhysics.cs.meta b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModulePhysics.cs.meta new file mode 100644 index 0000000..0ce0d75 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModulePhysics.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dae9aa560b4242648a3affa2bfabc365 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModulePhysics2D.cs b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModulePhysics2D.cs new file mode 100644 index 0000000..8ce2b56 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModulePhysics2D.cs @@ -0,0 +1,193 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2018/07/13 + +#if true // MODULE_MARKER +using System; +using DG.Tweening.Core; +using DG.Tweening.Plugins; +using DG.Tweening.Plugins.Core.PathCore; +using DG.Tweening.Plugins.Options; +using UnityEngine; + +#pragma warning disable 1591 +namespace DG.Tweening +{ + public static class DOTweenModulePhysics2D + { + #region Shortcuts + + #region Rigidbody2D Shortcuts + + /// Tweens a Rigidbody2D's position to the given value. + /// Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOMove(this Rigidbody2D target, Vector2 endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.position, target.MovePosition, endValue, duration); + t.SetOptions(snapping).SetTarget(target); + return t; + } + + /// Tweens a Rigidbody2D's X position to the given value. + /// Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOMoveX(this Rigidbody2D target, float endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.position, target.MovePosition, new Vector2(endValue, 0), duration); + t.SetOptions(AxisConstraint.X, snapping).SetTarget(target); + return t; + } + + /// Tweens a Rigidbody2D's Y position to the given value. + /// Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOMoveY(this Rigidbody2D target, float endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.position, target.MovePosition, new Vector2(0, endValue), duration); + t.SetOptions(AxisConstraint.Y, snapping).SetTarget(target); + return t; + } + + /// Tweens a Rigidbody2D's rotation to the given value. + /// Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DORotate(this Rigidbody2D target, float endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.rotation, target.MoveRotation, endValue, duration); + t.SetTarget(target); + return t; + } + + #region Special + + /// Tweens a Rigidbody2D's position to the given value, while also applying a jump effect along the Y axis. + /// Returns a Sequence instead of a Tweener. + /// Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations. + /// IMPORTANT: a rigidbody2D can't be animated in a jump arc using MovePosition, so the tween will directly set the position + /// The end value to reach + /// Power of the jump (the max height of the jump is represented by this plus the final Y offset) + /// Total number of jumps + /// The duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static Sequence DOJump(this Rigidbody2D target, Vector2 endValue, float jumpPower, int numJumps, float duration, bool snapping = false) + { + if (numJumps < 1) numJumps = 1; + float startPosY = 0; + float offsetY = -1; + bool offsetYSet = false; + Sequence s = DOTween.Sequence(); + Tween yTween = DOTween.To(() => target.position, x => target.position = x, new Vector2(0, jumpPower), duration / (numJumps * 2)) + .SetOptions(AxisConstraint.Y, snapping).SetEase(Ease.OutQuad).SetRelative() + .SetLoops(numJumps * 2, LoopType.Yoyo) + .OnStart(() => startPosY = target.position.y); + s.Append(DOTween.To(() => target.position, x => target.position = x, new Vector2(endValue.x, 0), duration) + .SetOptions(AxisConstraint.X, snapping).SetEase(Ease.Linear) + ).Join(yTween) + .SetTarget(target).SetEase(DOTween.defaultEaseType); + yTween.OnUpdate(() => { + if (!offsetYSet) { + offsetYSet = true; + offsetY = s.isRelative ? endValue.y : endValue.y - startPosY; + } + Vector3 pos = target.position; + pos.y += DOVirtual.EasedValue(0, offsetY, yTween.ElapsedPercentage(), Ease.OutQuad); + target.MovePosition(pos); + }); + return s; + } + + /// Tweens a Rigidbody2D's position through the given path waypoints, using the chosen path algorithm. + /// Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations. + /// NOTE: to tween a Rigidbody2D correctly it should be set to kinematic at least while being tweened. + /// BEWARE: doesn't work on Windows Phone store (waiting for Unity to fix their own bug). + /// If you plan to publish there you should use a regular transform.DOPath. + /// The waypoints to go through + /// The duration of the tween + /// The type of path: Linear (straight path), CatmullRom (curved CatmullRom path) or CubicBezier (curved with control points) + /// The path mode: 3D, side-scroller 2D, top-down 2D + /// The resolution of the path (useless in case of Linear paths): higher resolutions make for more detailed curved paths but are more expensive. + /// Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints + /// The color of the path (shown when gizmos are active in the Play panel and the tween is running) + public static TweenerCore DOPath( + this Rigidbody2D target, Vector2[] path, float duration, PathType pathType = PathType.Linear, + PathMode pathMode = PathMode.Full3D, int resolution = 10, Color? gizmoColor = null + ) + { + if (resolution < 1) resolution = 1; + int len = path.Length; + Vector3[] path3D = new Vector3[len]; + for (int i = 0; i < len; ++i) path3D[i] = path[i]; + TweenerCore t = DOTween.To(PathPlugin.Get(), () => target.position, x => target.MovePosition(x), new Path(pathType, path3D, resolution, gizmoColor), duration) + .SetTarget(target).SetUpdate(UpdateType.Fixed); + + t.plugOptions.isRigidbody2D = true; + t.plugOptions.mode = pathMode; + return t; + } + /// Tweens a Rigidbody2D's localPosition through the given path waypoints, using the chosen path algorithm. + /// Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations + /// NOTE: to tween a Rigidbody2D correctly it should be set to kinematic at least while being tweened. + /// BEWARE: doesn't work on Windows Phone store (waiting for Unity to fix their own bug). + /// If you plan to publish there you should use a regular transform.DOLocalPath. + /// The waypoint to go through + /// The duration of the tween + /// The type of path: Linear (straight path), CatmullRom (curved CatmullRom path) or CubicBezier (curved with control points) + /// The path mode: 3D, side-scroller 2D, top-down 2D + /// The resolution of the path: higher resolutions make for more detailed curved paths but are more expensive. + /// Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints + /// The color of the path (shown when gizmos are active in the Play panel and the tween is running) + public static TweenerCore DOLocalPath( + this Rigidbody2D target, Vector2[] path, float duration, PathType pathType = PathType.Linear, + PathMode pathMode = PathMode.Full3D, int resolution = 10, Color? gizmoColor = null + ) + { + if (resolution < 1) resolution = 1; + int len = path.Length; + Vector3[] path3D = new Vector3[len]; + for (int i = 0; i < len; ++i) path3D[i] = path[i]; + Transform trans = target.transform; + TweenerCore t = DOTween.To(PathPlugin.Get(), () => trans.localPosition, x => target.MovePosition(trans.parent == null ? x : trans.parent.TransformPoint(x)), new Path(pathType, path3D, resolution, gizmoColor), duration) + .SetTarget(target).SetUpdate(UpdateType.Fixed); + + t.plugOptions.isRigidbody2D = true; + t.plugOptions.mode = pathMode; + t.plugOptions.useLocalPosition = true; + return t; + } + // Used by path editor when creating the actual tween, so it can pass a pre-compiled path + internal static TweenerCore DOPath( + this Rigidbody2D target, Path path, float duration, PathMode pathMode = PathMode.Full3D + ) + { + TweenerCore t = DOTween.To(PathPlugin.Get(), () => target.position, x => target.MovePosition(x), path, duration) + .SetTarget(target); + + t.plugOptions.isRigidbody2D = true; + t.plugOptions.mode = pathMode; + return t; + } + internal static TweenerCore DOLocalPath( + this Rigidbody2D target, Path path, float duration, PathMode pathMode = PathMode.Full3D + ) + { + Transform trans = target.transform; + TweenerCore t = DOTween.To(PathPlugin.Get(), () => trans.localPosition, x => target.MovePosition(trans.parent == null ? x : trans.parent.TransformPoint(x)), path, duration) + .SetTarget(target); + + t.plugOptions.isRigidbody2D = true; + t.plugOptions.mode = pathMode; + t.plugOptions.useLocalPosition = true; + return t; + } + + #endregion + + #endregion + + #endregion + } +} +#endif diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModulePhysics2D.cs.meta b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModulePhysics2D.cs.meta new file mode 100644 index 0000000..ca9ed29 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModulePhysics2D.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 230fe34542e175245ba74b4659dae700 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleSprite.cs b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleSprite.cs new file mode 100644 index 0000000..72afb7b --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleSprite.cs @@ -0,0 +1,93 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2018/07/13 + +#if true // MODULE_MARKER +using System; +using UnityEngine; +using DG.Tweening.Core; +using DG.Tweening.Plugins.Options; + +#pragma warning disable 1591 +namespace DG.Tweening +{ + public static class DOTweenModuleSprite + { + #region Shortcuts + + #region SpriteRenderer + + /// Tweens a SpriteRenderer's color to the given value. + /// Also stores the spriteRenderer as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOColor(this SpriteRenderer target, Color endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.color, x => target.color = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a Material's alpha color to the given value. + /// Also stores the spriteRenderer as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOFade(this SpriteRenderer target, float endValue, float duration) + { + TweenerCore t = DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a SpriteRenderer's color using the given gradient + /// (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). + /// Also stores the image as the tween's target so it can be used for filtered operations + /// The gradient to useThe duration of the tween + public static Sequence DOGradientColor(this SpriteRenderer target, Gradient gradient, float duration) + { + Sequence s = DOTween.Sequence(); + GradientColorKey[] colors = gradient.colorKeys; + int len = colors.Length; + for (int i = 0; i < len; ++i) { + GradientColorKey c = colors[i]; + if (i == 0 && c.time <= 0) { + target.color = c.color; + continue; + } + float colorDuration = i == len - 1 + ? duration - s.Duration(false) // Verifies that total duration is correct + : duration * (i == 0 ? c.time : c.time - colors[i - 1].time); + s.Append(target.DOColor(c.color, colorDuration).SetEase(Ease.Linear)); + } + s.SetTarget(target); + return s; + } + + #endregion + + #region Blendables + + #region SpriteRenderer + + /// Tweens a SpriteRenderer's color to the given value, + /// in a way that allows other DOBlendableColor tweens to work together on the same target, + /// instead than fight each other as multiple DOColor would do. + /// Also stores the SpriteRenderer as the tween's target so it can be used for filtered operations + /// The value to tween toThe duration of the tween + public static Tweener DOBlendableColor(this SpriteRenderer target, Color endValue, float duration) + { + endValue = endValue - target.color; + Color to = new Color(0, 0, 0, 0); + return DOTween.To(() => to, x => { + Color diff = x - to; + to = x; + target.color += diff; + }, endValue, duration) + .Blendable().SetTarget(target); + } + + #endregion + + #endregion + + #endregion + } +} +#endif diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleSprite.cs.meta b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleSprite.cs.meta new file mode 100644 index 0000000..a0c67c4 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleSprite.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 188918ab119d93148aa0de59ccf5286b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUI.cs b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUI.cs new file mode 100644 index 0000000..2381f4c --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUI.cs @@ -0,0 +1,662 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2018/07/13 + +#if true // MODULE_MARKER + +using System; +using System.Globalization; +using UnityEngine; +using UnityEngine.UI; +using DG.Tweening.Core; +using DG.Tweening.Core.Enums; +using DG.Tweening.Plugins; +using DG.Tweening.Plugins.Options; +using Outline = UnityEngine.UI.Outline; +using Text = UnityEngine.UI.Text; + +#pragma warning disable 1591 +namespace DG.Tweening +{ + public static class DOTweenModuleUI + { + #region Shortcuts + + #region CanvasGroup + + /// Tweens a CanvasGroup's alpha color to the given value. + /// Also stores the canvasGroup as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOFade(this CanvasGroup target, float endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.alpha, x => target.alpha = x, endValue, duration); + t.SetTarget(target); + return t; + } + + #endregion + + #region Graphic + + /// Tweens an Graphic's color to the given value. + /// Also stores the image as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOColor(this Graphic target, Color endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.color, x => target.color = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens an Graphic's alpha color to the given value. + /// Also stores the image as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOFade(this Graphic target, float endValue, float duration) + { + TweenerCore t = DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration); + t.SetTarget(target); + return t; + } + + #endregion + + #region Image + + /// Tweens an Image's color to the given value. + /// Also stores the image as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOColor(this Image target, Color endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.color, x => target.color = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens an Image's alpha color to the given value. + /// Also stores the image as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOFade(this Image target, float endValue, float duration) + { + TweenerCore t = DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens an Image's fillAmount to the given value. + /// Also stores the image as the tween's target so it can be used for filtered operations + /// The end value to reach (0 to 1)The duration of the tween + public static TweenerCore DOFillAmount(this Image target, float endValue, float duration) + { + if (endValue > 1) endValue = 1; + else if (endValue < 0) endValue = 0; + TweenerCore t = DOTween.To(() => target.fillAmount, x => target.fillAmount = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens an Image's colors using the given gradient + /// (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). + /// Also stores the image as the tween's target so it can be used for filtered operations + /// The gradient to useThe duration of the tween + public static Sequence DOGradientColor(this Image target, Gradient gradient, float duration) + { + Sequence s = DOTween.Sequence(); + GradientColorKey[] colors = gradient.colorKeys; + int len = colors.Length; + for (int i = 0; i < len; ++i) { + GradientColorKey c = colors[i]; + if (i == 0 && c.time <= 0) { + target.color = c.color; + continue; + } + float colorDuration = i == len - 1 + ? duration - s.Duration(false) // Verifies that total duration is correct + : duration * (i == 0 ? c.time : c.time - colors[i - 1].time); + s.Append(target.DOColor(c.color, colorDuration).SetEase(Ease.Linear)); + } + s.SetTarget(target); + return s; + } + + #endregion + + #region LayoutElement + + /// Tweens an LayoutElement's flexibleWidth/Height to the given value. + /// Also stores the LayoutElement as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOFlexibleSize(this LayoutElement target, Vector2 endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => new Vector2(target.flexibleWidth, target.flexibleHeight), x => { + target.flexibleWidth = x.x; + target.flexibleHeight = x.y; + }, endValue, duration); + t.SetOptions(snapping).SetTarget(target); + return t; + } + + /// Tweens an LayoutElement's minWidth/Height to the given value. + /// Also stores the LayoutElement as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOMinSize(this LayoutElement target, Vector2 endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => new Vector2(target.minWidth, target.minHeight), x => { + target.minWidth = x.x; + target.minHeight = x.y; + }, endValue, duration); + t.SetOptions(snapping).SetTarget(target); + return t; + } + + /// Tweens an LayoutElement's preferredWidth/Height to the given value. + /// Also stores the LayoutElement as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOPreferredSize(this LayoutElement target, Vector2 endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => new Vector2(target.preferredWidth, target.preferredHeight), x => { + target.preferredWidth = x.x; + target.preferredHeight = x.y; + }, endValue, duration); + t.SetOptions(snapping).SetTarget(target); + return t; + } + + #endregion + + #region Outline + + /// Tweens a Outline's effectColor to the given value. + /// Also stores the Outline as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOColor(this Outline target, Color endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.effectColor, x => target.effectColor = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a Outline's effectColor alpha to the given value. + /// Also stores the Outline as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOFade(this Outline target, float endValue, float duration) + { + TweenerCore t = DOTween.ToAlpha(() => target.effectColor, x => target.effectColor = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a Outline's effectDistance to the given value. + /// Also stores the Outline as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOScale(this Outline target, Vector2 endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.effectDistance, x => target.effectDistance = x, endValue, duration); + t.SetTarget(target); + return t; + } + + #endregion + + #region RectTransform + + /// Tweens a RectTransform's anchoredPosition to the given value. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOAnchorPos(this RectTransform target, Vector2 endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.anchoredPosition, x => target.anchoredPosition = x, endValue, duration); + t.SetOptions(snapping).SetTarget(target); + return t; + } + /// Tweens a RectTransform's anchoredPosition X to the given value. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOAnchorPosX(this RectTransform target, float endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.anchoredPosition, x => target.anchoredPosition = x, new Vector2(endValue, 0), duration); + t.SetOptions(AxisConstraint.X, snapping).SetTarget(target); + return t; + } + /// Tweens a RectTransform's anchoredPosition Y to the given value. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOAnchorPosY(this RectTransform target, float endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.anchoredPosition, x => target.anchoredPosition = x, new Vector2(0, endValue), duration); + t.SetOptions(AxisConstraint.Y, snapping).SetTarget(target); + return t; + } + + /// Tweens a RectTransform's anchoredPosition3D to the given value. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOAnchorPos3D(this RectTransform target, Vector3 endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.anchoredPosition3D, x => target.anchoredPosition3D = x, endValue, duration); + t.SetOptions(snapping).SetTarget(target); + return t; + } + /// Tweens a RectTransform's anchoredPosition3D X to the given value. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOAnchorPos3DX(this RectTransform target, float endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.anchoredPosition3D, x => target.anchoredPosition3D = x, new Vector3(endValue, 0, 0), duration); + t.SetOptions(AxisConstraint.X, snapping).SetTarget(target); + return t; + } + /// Tweens a RectTransform's anchoredPosition3D Y to the given value. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOAnchorPos3DY(this RectTransform target, float endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.anchoredPosition3D, x => target.anchoredPosition3D = x, new Vector3(0, endValue, 0), duration); + t.SetOptions(AxisConstraint.Y, snapping).SetTarget(target); + return t; + } + /// Tweens a RectTransform's anchoredPosition3D Z to the given value. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOAnchorPos3DZ(this RectTransform target, float endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.anchoredPosition3D, x => target.anchoredPosition3D = x, new Vector3(0, 0, endValue), duration); + t.SetOptions(AxisConstraint.Z, snapping).SetTarget(target); + return t; + } + + /// Tweens a RectTransform's anchorMax to the given value. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOAnchorMax(this RectTransform target, Vector2 endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.anchorMax, x => target.anchorMax = x, endValue, duration); + t.SetOptions(snapping).SetTarget(target); + return t; + } + + /// Tweens a RectTransform's anchorMin to the given value. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOAnchorMin(this RectTransform target, Vector2 endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.anchorMin, x => target.anchorMin = x, endValue, duration); + t.SetOptions(snapping).SetTarget(target); + return t; + } + + /// Tweens a RectTransform's pivot to the given value. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOPivot(this RectTransform target, Vector2 endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.pivot, x => target.pivot = x, endValue, duration); + t.SetTarget(target); + return t; + } + /// Tweens a RectTransform's pivot X to the given value. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOPivotX(this RectTransform target, float endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.pivot, x => target.pivot = x, new Vector2(endValue, 0), duration); + t.SetOptions(AxisConstraint.X).SetTarget(target); + return t; + } + /// Tweens a RectTransform's pivot Y to the given value. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOPivotY(this RectTransform target, float endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.pivot, x => target.pivot = x, new Vector2(0, endValue), duration); + t.SetOptions(AxisConstraint.Y).SetTarget(target); + return t; + } + + /// Tweens a RectTransform's sizeDelta to the given value. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOSizeDelta(this RectTransform target, Vector2 endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.sizeDelta, x => target.sizeDelta = x, endValue, duration); + t.SetOptions(snapping).SetTarget(target); + return t; + } + + /// Punches a RectTransform's anchoredPosition towards the given direction and then back to the starting one + /// as if it was connected to the starting position via an elastic. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The direction and strength of the punch (added to the RectTransform's current position) + /// The duration of the tween + /// Indicates how much will the punch vibrate + /// Represents how much (0 to 1) the vector will go beyond the starting position when bouncing backwards. + /// 1 creates a full oscillation between the punch direction and the opposite direction, + /// while 0 oscillates only between the punch and the start position + /// If TRUE the tween will smoothly snap all values to integers + public static Tweener DOPunchAnchorPos(this RectTransform target, Vector2 punch, float duration, int vibrato = 10, float elasticity = 1, bool snapping = false) + { + return DOTween.Punch(() => target.anchoredPosition, x => target.anchoredPosition = x, punch, duration, vibrato, elasticity) + .SetTarget(target).SetOptions(snapping); + } + + /// Shakes a RectTransform's anchoredPosition with the given values. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The duration of the tween + /// The shake strength + /// Indicates how much will the shake vibrate + /// Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + /// Setting it to 0 will shake along a single direction. + /// If TRUE the tween will smoothly snap all values to integers + /// If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + /// Randomness mode + public static Tweener DOShakeAnchorPos(this RectTransform target, float duration, float strength = 100, int vibrato = 10, float randomness = 90, bool snapping = false, bool fadeOut = true, ShakeRandomnessMode randomnessMode = ShakeRandomnessMode.Full) + { + return DOTween.Shake(() => target.anchoredPosition, x => target.anchoredPosition = x, duration, strength, vibrato, randomness, true, fadeOut, randomnessMode) + .SetTarget(target).SetSpecialStartupMode(SpecialStartupMode.SetShake).SetOptions(snapping); + } + /// Shakes a RectTransform's anchoredPosition with the given values. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The duration of the tween + /// The shake strength on each axis + /// Indicates how much will the shake vibrate + /// Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + /// Setting it to 0 will shake along a single direction. + /// If TRUE the tween will smoothly snap all values to integers + /// If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + /// Randomness mode + public static Tweener DOShakeAnchorPos(this RectTransform target, float duration, Vector2 strength, int vibrato = 10, float randomness = 90, bool snapping = false, bool fadeOut = true, ShakeRandomnessMode randomnessMode = ShakeRandomnessMode.Full) + { + return DOTween.Shake(() => target.anchoredPosition, x => target.anchoredPosition = x, duration, strength, vibrato, randomness, fadeOut, randomnessMode) + .SetTarget(target).SetSpecialStartupMode(SpecialStartupMode.SetShake).SetOptions(snapping); + } + + #region Special + + /// Tweens a RectTransform's anchoredPosition to the given value, while also applying a jump effect along the Y axis. + /// Returns a Sequence instead of a Tweener. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations + /// The end value to reach + /// Power of the jump (the max height of the jump is represented by this plus the final Y offset) + /// Total number of jumps + /// The duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static Sequence DOJumpAnchorPos(this RectTransform target, Vector2 endValue, float jumpPower, int numJumps, float duration, bool snapping = false) + { + if (numJumps < 1) numJumps = 1; + float startPosY = 0; + float offsetY = -1; + bool offsetYSet = false; + + // Separate Y Tween so we can elaborate elapsedPercentage on that insted of on the Sequence + // (in case users add a delay or other elements to the Sequence) + Sequence s = DOTween.Sequence(); + Tween yTween = DOTween.To(() => target.anchoredPosition, x => target.anchoredPosition = x, new Vector2(0, jumpPower), duration / (numJumps * 2)) + .SetOptions(AxisConstraint.Y, snapping).SetEase(Ease.OutQuad).SetRelative() + .SetLoops(numJumps * 2, LoopType.Yoyo) + .OnStart(()=> startPosY = target.anchoredPosition.y); + s.Append(DOTween.To(() => target.anchoredPosition, x => target.anchoredPosition = x, new Vector2(endValue.x, 0), duration) + .SetOptions(AxisConstraint.X, snapping).SetEase(Ease.Linear) + ).Join(yTween) + .SetTarget(target).SetEase(DOTween.defaultEaseType); + s.OnUpdate(() => { + if (!offsetYSet) { + offsetYSet = true; + offsetY = s.isRelative ? endValue.y : endValue.y - startPosY; + } + Vector2 pos = target.anchoredPosition; + pos.y += DOVirtual.EasedValue(0, offsetY, s.ElapsedDirectionalPercentage(), Ease.OutQuad); + target.anchoredPosition = pos; + }); + return s; + } + + #endregion + + #endregion + + #region ScrollRect + + /// Tweens a ScrollRect's horizontal/verticalNormalizedPosition to the given value. + /// Also stores the ScrollRect as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static Tweener DONormalizedPos(this ScrollRect target, Vector2 endValue, float duration, bool snapping = false) + { + return DOTween.To(() => new Vector2(target.horizontalNormalizedPosition, target.verticalNormalizedPosition), + x => { + target.horizontalNormalizedPosition = x.x; + target.verticalNormalizedPosition = x.y; + }, endValue, duration) + .SetOptions(snapping).SetTarget(target); + } + /// Tweens a ScrollRect's horizontalNormalizedPosition to the given value. + /// Also stores the ScrollRect as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static Tweener DOHorizontalNormalizedPos(this ScrollRect target, float endValue, float duration, bool snapping = false) + { + return DOTween.To(() => target.horizontalNormalizedPosition, x => target.horizontalNormalizedPosition = x, endValue, duration) + .SetOptions(snapping).SetTarget(target); + } + /// Tweens a ScrollRect's verticalNormalizedPosition to the given value. + /// Also stores the ScrollRect as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static Tweener DOVerticalNormalizedPos(this ScrollRect target, float endValue, float duration, bool snapping = false) + { + return DOTween.To(() => target.verticalNormalizedPosition, x => target.verticalNormalizedPosition = x, endValue, duration) + .SetOptions(snapping).SetTarget(target); + } + + #endregion + + #region Slider + + /// Tweens a Slider's value to the given value. + /// Also stores the Slider as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOValue(this Slider target, float endValue, float duration, bool snapping = false) + { + TweenerCore t = DOTween.To(() => target.value, x => target.value = x, endValue, duration); + t.SetOptions(snapping).SetTarget(target); + return t; + } + + #endregion + + #region Text + + /// Tweens a Text's color to the given value. + /// Also stores the Text as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOColor(this Text target, Color endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.color, x => target.color = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// + /// Tweens a Text's text from one integer to another, with options for thousands separators + /// + /// The value to start from + /// The end value to reach + /// The duration of the tween + /// If TRUE (default) also adds thousands separators + /// The to use (InvariantCulture if NULL) + public static TweenerCore DOCounter( + this Text target, int fromValue, int endValue, float duration, bool addThousandsSeparator = true, CultureInfo culture = null + ){ + int v = fromValue; + CultureInfo cInfo = !addThousandsSeparator ? null : culture ?? CultureInfo.InvariantCulture; + TweenerCore t = DOTween.To(() => v, x => { + v = x; + target.text = addThousandsSeparator + ? v.ToString("N0", cInfo) + : v.ToString(); + }, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a Text's alpha color to the given value. + /// Also stores the Text as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOFade(this Text target, float endValue, float duration) + { + TweenerCore t = DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a Text's text to the given value. + /// Also stores the Text as the tween's target so it can be used for filtered operations + /// The end string to tween toThe duration of the tween + /// If TRUE (default), rich text will be interpreted correctly while animated, + /// otherwise all tags will be considered as normal text + /// The type of scramble mode to use, if any + /// A string containing the characters to use for scrambling. + /// Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. + /// Leave it to NULL (default) to use default ones + public static TweenerCore DOText(this Text target, string endValue, float duration, bool richTextEnabled = true, ScrambleMode scrambleMode = ScrambleMode.None, string scrambleChars = null) + { + if (endValue == null) { + if (Debugger.logPriority > 0) Debugger.LogWarning("You can't pass a NULL string to DOText: an empty string will be used instead to avoid errors"); + endValue = ""; + } + TweenerCore t = DOTween.To(() => target.text, x => target.text = x, endValue, duration); + t.SetOptions(richTextEnabled, scrambleMode, scrambleChars) + .SetTarget(target); + return t; + } + + #endregion + + #region Blendables + + #region Graphic + + /// Tweens a Graphic's color to the given value, + /// in a way that allows other DOBlendableColor tweens to work together on the same target, + /// instead than fight each other as multiple DOColor would do. + /// Also stores the Graphic as the tween's target so it can be used for filtered operations + /// The value to tween toThe duration of the tween + public static Tweener DOBlendableColor(this Graphic target, Color endValue, float duration) + { + endValue = endValue - target.color; + Color to = new Color(0, 0, 0, 0); + return DOTween.To(() => to, x => { + Color diff = x - to; + to = x; + target.color += diff; + }, endValue, duration) + .Blendable().SetTarget(target); + } + + #endregion + + #region Image + + /// Tweens a Image's color to the given value, + /// in a way that allows other DOBlendableColor tweens to work together on the same target, + /// instead than fight each other as multiple DOColor would do. + /// Also stores the Image as the tween's target so it can be used for filtered operations + /// The value to tween toThe duration of the tween + public static Tweener DOBlendableColor(this Image target, Color endValue, float duration) + { + endValue = endValue - target.color; + Color to = new Color(0, 0, 0, 0); + return DOTween.To(() => to, x => { + Color diff = x - to; + to = x; + target.color += diff; + }, endValue, duration) + .Blendable().SetTarget(target); + } + + #endregion + + #region Text + + /// Tweens a Text's color BY the given value, + /// in a way that allows other DOBlendableColor tweens to work together on the same target, + /// instead than fight each other as multiple DOColor would do. + /// Also stores the Text as the tween's target so it can be used for filtered operations + /// The value to tween toThe duration of the tween + public static Tweener DOBlendableColor(this Text target, Color endValue, float duration) + { + endValue = endValue - target.color; + Color to = new Color(0, 0, 0, 0); + return DOTween.To(() => to, x => { + Color diff = x - to; + to = x; + target.color += diff; + }, endValue, duration) + .Blendable().SetTarget(target); + } + + #endregion + + #endregion + + #region Shapes + + /// Tweens a RectTransform's anchoredPosition so that it draws a circle around the given center. + /// Also stores the RectTransform as the tween's target so it can be used for filtered operations. + /// IMPORTANT: SetFrom(value) requires a instead of a float, where the X property represents the "from degrees value" + /// Circle-center/pivot around which to rotate (in UI anchoredPosition coordinates) + /// The end value degrees to reach (to rotate counter-clockwise pass a negative value) + /// The duration of the tween + /// If TRUE the coordinates will be considered as relative to the target's current anchoredPosition + /// If TRUE the tween will smoothly snap all values to integers + public static TweenerCore DOShapeCircle( + this RectTransform target, Vector2 center, float endValueDegrees, float duration, bool relativeCenter = false, bool snapping = false + ) + { + TweenerCore t = DOTween.To( + CirclePlugin.Get(), () => target.anchoredPosition, x => target.anchoredPosition = x, center, duration + ); + t.SetOptions(endValueDegrees, relativeCenter, snapping).SetTarget(target); + return t; + } + + #endregion + + #endregion + + // █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ + // ███ INTERNAL CLASSES ████████████████████████████████████████████████████████████████████████████████████████████████ + // █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ + + public static class Utils + { + /// + /// Converts the anchoredPosition of the first RectTransform to the second RectTransform, + /// taking into consideration offset, anchors and pivot, and returns the new anchoredPosition + /// + public static Vector2 SwitchToRectTransform(RectTransform from, RectTransform to) + { + Vector2 localPoint; + Vector2 fromPivotDerivedOffset = new Vector2(from.rect.width * 0.5f + from.rect.xMin, from.rect.height * 0.5f + from.rect.yMin); + Vector2 screenP = RectTransformUtility.WorldToScreenPoint(null, from.position); + screenP += fromPivotDerivedOffset; + RectTransformUtility.ScreenPointToLocalPointInRectangle(to, screenP, null, out localPoint); + Vector2 pivotDerivedOffset = new Vector2(to.rect.width * 0.5f + to.rect.xMin, to.rect.height * 0.5f + to.rect.yMin); + return to.anchoredPosition + localPoint - pivotDerivedOffset; + } + } + } +} +#endif diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUI.cs.meta b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUI.cs.meta new file mode 100644 index 0000000..60d55ef --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUI.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a060394c03331a64392db53a10e7f2d1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUnityVersion.cs b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUnityVersion.cs new file mode 100644 index 0000000..8f818ba --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUnityVersion.cs @@ -0,0 +1,389 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2018/07/13 + +using System; +using UnityEngine; +using DG.Tweening.Core; +using DG.Tweening.Plugins.Options; +//#if UNITY_2018_1_OR_NEWER && (NET_4_6 || NET_STANDARD_2_0) +//using Task = System.Threading.Tasks.Task; +//#endif + +#pragma warning disable 1591 +namespace DG.Tweening +{ + /// + /// Shortcuts/functions that are not strictly related to specific Modules + /// but are available only on some Unity versions + /// + public static class DOTweenModuleUnityVersion + { + #region Material + + /// Tweens a Material's color using the given gradient + /// (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). + /// Also stores the image as the tween's target so it can be used for filtered operations + /// The gradient to useThe duration of the tween + public static Sequence DOGradientColor(this Material target, Gradient gradient, float duration) + { + Sequence s = DOTween.Sequence(); + GradientColorKey[] colors = gradient.colorKeys; + int len = colors.Length; + for (int i = 0; i < len; ++i) { + GradientColorKey c = colors[i]; + if (i == 0 && c.time <= 0) { + target.color = c.color; + continue; + } + float colorDuration = i == len - 1 + ? duration - s.Duration(false) // Verifies that total duration is correct + : duration * (i == 0 ? c.time : c.time - colors[i - 1].time); + s.Append(target.DOColor(c.color, colorDuration).SetEase(Ease.Linear)); + } + s.SetTarget(target); + return s; + } + /// Tweens a Material's named color property using the given gradient + /// (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). + /// Also stores the image as the tween's target so it can be used for filtered operations + /// The gradient to use + /// The name of the material property to tween (like _Tint or _SpecColor) + /// The duration of the tween + public static Sequence DOGradientColor(this Material target, Gradient gradient, string property, float duration) + { + Sequence s = DOTween.Sequence(); + GradientColorKey[] colors = gradient.colorKeys; + int len = colors.Length; + for (int i = 0; i < len; ++i) { + GradientColorKey c = colors[i]; + if (i == 0 && c.time <= 0) { + target.SetColor(property, c.color); + continue; + } + float colorDuration = i == len - 1 + ? duration - s.Duration(false) // Verifies that total duration is correct + : duration * (i == 0 ? c.time : c.time - colors[i - 1].time); + s.Append(target.DOColor(c.color, property, colorDuration).SetEase(Ease.Linear)); + } + s.SetTarget(target); + return s; + } + + #endregion + + #region CustomYieldInstructions + + /// + /// Returns a that waits until the tween is killed or complete. + /// It can be used inside a coroutine as a yield. + /// Example usage:yield return myTween.WaitForCompletion(true); + /// + public static CustomYieldInstruction WaitForCompletion(this Tween t, bool returnCustomYieldInstruction) + { + if (!t.active) { + if (Debugger.logPriority > 0) Debugger.LogInvalidTween(t); + return null; + } + return new DOTweenCYInstruction.WaitForCompletion(t); + } + + /// + /// Returns a that waits until the tween is killed or rewinded. + /// It can be used inside a coroutine as a yield. + /// Example usage:yield return myTween.WaitForRewind(); + /// + public static CustomYieldInstruction WaitForRewind(this Tween t, bool returnCustomYieldInstruction) + { + if (!t.active) { + if (Debugger.logPriority > 0) Debugger.LogInvalidTween(t); + return null; + } + return new DOTweenCYInstruction.WaitForRewind(t); + } + + /// + /// Returns a that waits until the tween is killed. + /// It can be used inside a coroutine as a yield. + /// Example usage:yield return myTween.WaitForKill(); + /// + public static CustomYieldInstruction WaitForKill(this Tween t, bool returnCustomYieldInstruction) + { + if (!t.active) { + if (Debugger.logPriority > 0) Debugger.LogInvalidTween(t); + return null; + } + return new DOTweenCYInstruction.WaitForKill(t); + } + + /// + /// Returns a that waits until the tween is killed or has gone through the given amount of loops. + /// It can be used inside a coroutine as a yield. + /// Example usage:yield return myTween.WaitForElapsedLoops(2); + /// + /// Elapsed loops to wait for + public static CustomYieldInstruction WaitForElapsedLoops(this Tween t, int elapsedLoops, bool returnCustomYieldInstruction) + { + if (!t.active) { + if (Debugger.logPriority > 0) Debugger.LogInvalidTween(t); + return null; + } + return new DOTweenCYInstruction.WaitForElapsedLoops(t, elapsedLoops); + } + + /// + /// Returns a that waits until the tween is killed + /// or has reached the given time position (loops included, delays excluded). + /// It can be used inside a coroutine as a yield. + /// Example usage:yield return myTween.WaitForPosition(2.5f); + /// + /// Position (loops included, delays excluded) to wait for + public static CustomYieldInstruction WaitForPosition(this Tween t, float position, bool returnCustomYieldInstruction) + { + if (!t.active) { + if (Debugger.logPriority > 0) Debugger.LogInvalidTween(t); + return null; + } + return new DOTweenCYInstruction.WaitForPosition(t, position); + } + + /// + /// Returns a that waits until the tween is killed or started + /// (meaning when the tween is set in a playing state the first time, after any eventual delay). + /// It can be used inside a coroutine as a yield. + /// Example usage:yield return myTween.WaitForStart(); + /// + public static CustomYieldInstruction WaitForStart(this Tween t, bool returnCustomYieldInstruction) + { + if (!t.active) { + if (Debugger.logPriority > 0) Debugger.LogInvalidTween(t); + return null; + } + return new DOTweenCYInstruction.WaitForStart(t); + } + + #endregion + +#if UNITY_2018_1_OR_NEWER + #region Unity 2018.1 or Newer + + #region Material + + /// Tweens a Material's named texture offset property with the given ID to the given value. + /// Also stores the material as the tween's target so it can be used for filtered operations + /// The end value to reach + /// The ID of the material property to tween (also called nameID in Unity's manual) + /// The duration of the tween + public static TweenerCore DOOffset(this Material target, Vector2 endValue, int propertyID, float duration) + { + if (!target.HasProperty(propertyID)) { + if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(propertyID); + return null; + } + TweenerCore t = DOTween.To(() => target.GetTextureOffset(propertyID), x => target.SetTextureOffset(propertyID, x), endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a Material's named texture scale property with the given ID to the given value. + /// Also stores the material as the tween's target so it can be used for filtered operations + /// The end value to reach + /// The ID of the material property to tween (also called nameID in Unity's manual) + /// The duration of the tween + public static TweenerCore DOTiling(this Material target, Vector2 endValue, int propertyID, float duration) + { + if (!target.HasProperty(propertyID)) { + if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(propertyID); + return null; + } + TweenerCore t = DOTween.To(() => target.GetTextureScale(propertyID), x => target.SetTextureScale(propertyID, x), endValue, duration); + t.SetTarget(target); + return t; + } + + #endregion + + #region .NET 4.6 or Newer + +#if UNITY_2018_1_OR_NEWER && (NET_4_6 || NET_STANDARD_2_0) + + #region Async Instructions + + /// + /// Returns an async that waits until the tween is killed or complete. + /// It can be used inside an async operation. + /// Example usage:await myTween.WaitForCompletion(); + /// + public static async System.Threading.Tasks.Task AsyncWaitForCompletion(this Tween t) + { + if (!t.active) { + if (Debugger.logPriority > 0) Debugger.LogInvalidTween(t); + return; + } + while (t.active && !t.IsComplete()) await System.Threading.Tasks.Task.Yield(); + } + + /// + /// Returns an async that waits until the tween is killed or rewinded. + /// It can be used inside an async operation. + /// Example usage:await myTween.AsyncWaitForRewind(); + /// + public static async System.Threading.Tasks.Task AsyncWaitForRewind(this Tween t) + { + if (!t.active) { + if (Debugger.logPriority > 0) Debugger.LogInvalidTween(t); + return; + } + while (t.active && (!t.playedOnce || t.position * (t.CompletedLoops() + 1) > 0)) await System.Threading.Tasks.Task.Yield(); + } + + /// + /// Returns an async that waits until the tween is killed. + /// It can be used inside an async operation. + /// Example usage:await myTween.AsyncWaitForKill(); + /// + public static async System.Threading.Tasks.Task AsyncWaitForKill(this Tween t) + { + if (!t.active) { + if (Debugger.logPriority > 0) Debugger.LogInvalidTween(t); + return; + } + while (t.active) await System.Threading.Tasks.Task.Yield(); + } + + /// + /// Returns an async that waits until the tween is killed or has gone through the given amount of loops. + /// It can be used inside an async operation. + /// Example usage:await myTween.AsyncWaitForElapsedLoops(); + /// + /// Elapsed loops to wait for + public static async System.Threading.Tasks.Task AsyncWaitForElapsedLoops(this Tween t, int elapsedLoops) + { + if (!t.active) { + if (Debugger.logPriority > 0) Debugger.LogInvalidTween(t); + return; + } + while (t.active && t.CompletedLoops() < elapsedLoops) await System.Threading.Tasks.Task.Yield(); + } + + /// + /// Returns an async that waits until the tween is killed or started + /// (meaning when the tween is set in a playing state the first time, after any eventual delay). + /// It can be used inside an async operation. + /// Example usage:await myTween.AsyncWaitForPosition(); + /// + /// Position (loops included, delays excluded) to wait for + public static async System.Threading.Tasks.Task AsyncWaitForPosition(this Tween t, float position) + { + if (!t.active) { + if (Debugger.logPriority > 0) Debugger.LogInvalidTween(t); + return; + } + while (t.active && t.position * (t.CompletedLoops() + 1) < position) await System.Threading.Tasks.Task.Yield(); + } + + /// + /// Returns an async that waits until the tween is killed. + /// It can be used inside an async operation. + /// Example usage:await myTween.AsyncWaitForKill(); + /// + public static async System.Threading.Tasks.Task AsyncWaitForStart(this Tween t) + { + if (!t.active) { + if (Debugger.logPriority > 0) Debugger.LogInvalidTween(t); + return; + } + while (t.active && !t.playedOnce) await System.Threading.Tasks.Task.Yield(); + } + + #endregion +#endif + + #endregion + + #endregion +#endif + } + + // █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ + // ███ CLASSES █████████████████████████████████████████████████████████████████████████████████████████████████████████ + // █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ + + public static class DOTweenCYInstruction + { + public class WaitForCompletion : CustomYieldInstruction + { + public override bool keepWaiting { get { + return t.active && !t.IsComplete(); + }} + readonly Tween t; + public WaitForCompletion(Tween tween) + { + t = tween; + } + } + + public class WaitForRewind : CustomYieldInstruction + { + public override bool keepWaiting { get { + return t.active && (!t.playedOnce || t.position * (t.CompletedLoops() + 1) > 0); + }} + readonly Tween t; + public WaitForRewind(Tween tween) + { + t = tween; + } + } + + public class WaitForKill : CustomYieldInstruction + { + public override bool keepWaiting { get { + return t.active; + }} + readonly Tween t; + public WaitForKill(Tween tween) + { + t = tween; + } + } + + public class WaitForElapsedLoops : CustomYieldInstruction + { + public override bool keepWaiting { get { + return t.active && t.CompletedLoops() < elapsedLoops; + }} + readonly Tween t; + readonly int elapsedLoops; + public WaitForElapsedLoops(Tween tween, int elapsedLoops) + { + t = tween; + this.elapsedLoops = elapsedLoops; + } + } + + public class WaitForPosition : CustomYieldInstruction + { + public override bool keepWaiting { get { + return t.active && t.position * (t.CompletedLoops() + 1) < position; + }} + readonly Tween t; + readonly float position; + public WaitForPosition(Tween tween, float position) + { + t = tween; + this.position = position; + } + } + + public class WaitForStart : CustomYieldInstruction + { + public override bool keepWaiting { get { + return t.active && !t.playedOnce; + }} + readonly Tween t; + public WaitForStart(Tween tween) + { + t = tween; + } + } + } +} diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUnityVersion.cs.meta b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUnityVersion.cs.meta new file mode 100644 index 0000000..290189f --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUnityVersion.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 63c02322328255542995bd02b47b0457 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUtils.cs b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUtils.cs new file mode 100644 index 0000000..12a365d --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUtils.cs @@ -0,0 +1,167 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2018/07/13 + +using System; +using System.Reflection; +using UnityEngine; +using DG.Tweening.Core; +using DG.Tweening.Plugins.Core.PathCore; +using DG.Tweening.Plugins.Options; + +#pragma warning disable 1591 +namespace DG.Tweening +{ + /// + /// Utility functions that deal with available Modules. + /// Modules defines: + /// - DOTAUDIO + /// - DOTPHYSICS + /// - DOTPHYSICS2D + /// - DOTSPRITE + /// - DOTUI + /// Extra defines set and used for implementation of external assets: + /// - DOTWEEN_TMP ► TextMesh Pro + /// - DOTWEEN_TK2D ► 2D Toolkit + /// + public static class DOTweenModuleUtils + { + static bool _initialized; + + #region Reflection + + /// + /// Called via Reflection by DOTweenComponent on Awake + /// +#if UNITY_2018_1_OR_NEWER + [UnityEngine.Scripting.Preserve] +#endif + public static void Init() + { + if (_initialized) return; + + _initialized = true; + DOTweenExternalCommand.SetOrientationOnPath += Physics.SetOrientationOnPath; + +#if UNITY_EDITOR +#if UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5 || UNITY_2017_1 + UnityEditor.EditorApplication.playmodeStateChanged += PlaymodeStateChanged; +#else + UnityEditor.EditorApplication.playModeStateChanged += PlaymodeStateChanged; +#endif +#endif + } + +#if UNITY_2018_1_OR_NEWER +#pragma warning disable + [UnityEngine.Scripting.Preserve] + // Just used to preserve methods when building, never called + static void Preserver() + { + Assembly[] loadedAssemblies = AppDomain.CurrentDomain.GetAssemblies(); + MethodInfo mi = typeof(MonoBehaviour).GetMethod("Stub"); + } +#pragma warning restore +#endif + + #endregion + +#if UNITY_EDITOR + // Fires OnApplicationPause in DOTweenComponent even when Editor is paused (otherwise it's only fired at runtime) +#if UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5 || UNITY_2017_1 + static void PlaymodeStateChanged() + #else + static void PlaymodeStateChanged(UnityEditor.PlayModeStateChange state) +#endif + { + if (DOTween.instance == null) return; + DOTween.instance.OnApplicationPause(UnityEditor.EditorApplication.isPaused); + } +#endif + + // █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ + // ███ INTERNAL CLASSES ████████████████████████████████████████████████████████████████████████████████████████████████ + // █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ + + public static class Physics + { + // Called via DOTweenExternalCommand callback + public static void SetOrientationOnPath(PathOptions options, Tween t, Quaternion newRot, Transform trans) + { +#if true // PHYSICS_MARKER + if (options.isRigidbody) ((Rigidbody)t.target).rotation = newRot; + else trans.rotation = newRot; +#else + trans.rotation = newRot; +#endif + } + + // Returns FALSE if the DOTween's Physics2D Module is disabled, or if there's no Rigidbody2D attached + public static bool HasRigidbody2D(Component target) + { +#if true // PHYSICS2D_MARKER + return target.GetComponent() != null; +#else + return false; +#endif + } + + #region Called via Reflection + + + // Called via Reflection by DOTweenPathInspector + // Returns FALSE if the DOTween's Physics Module is disabled, or if there's no rigidbody attached +#if UNITY_2018_1_OR_NEWER + [UnityEngine.Scripting.Preserve] +#endif + public static bool HasRigidbody(Component target) + { +#if true // PHYSICS_MARKER + return target.GetComponent() != null; +#else + return false; +#endif + } + + // Called via Reflection by DOTweenPath +#if UNITY_2018_1_OR_NEWER + [UnityEngine.Scripting.Preserve] +#endif + public static TweenerCore CreateDOTweenPathTween( + MonoBehaviour target, bool tweenRigidbody, bool isLocal, Path path, float duration, PathMode pathMode + ){ + TweenerCore t = null; + bool rBodyFoundAndTweened = false; +#if true // PHYSICS_MARKER + if (tweenRigidbody) { + Rigidbody rBody = target.GetComponent(); + if (rBody != null) { + rBodyFoundAndTweened = true; + t = isLocal + ? rBody.DOLocalPath(path, duration, pathMode) + : rBody.DOPath(path, duration, pathMode); + } + } +#endif +#if true // PHYSICS2D_MARKER + if (!rBodyFoundAndTweened && tweenRigidbody) { + Rigidbody2D rBody2D = target.GetComponent(); + if (rBody2D != null) { + rBodyFoundAndTweened = true; + t = isLocal + ? rBody2D.DOLocalPath(path, duration, pathMode) + : rBody2D.DOPath(path, duration, pathMode); + } + } +#endif + if (!rBodyFoundAndTweened) { + t = isLocal + ? target.transform.DOLocalPath(path, duration, pathMode) + : target.transform.DOPath(path, duration, pathMode); + } + return t; + } + + #endregion + } + } +} diff --git a/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUtils.cs.meta b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUtils.cs.meta new file mode 100644 index 0000000..ab62186 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/Modules/DOTweenModuleUtils.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7bcaf917d9cf5b84090421a5a2abe42e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/Demigiant/DOTween/readme.txt b/Assets/Plugins/Demigiant/DOTween/readme.txt new file mode 100644 index 0000000..37ff7ef --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/readme.txt @@ -0,0 +1,29 @@ +DOTween and DOTween Pro are copyright (c) 2014-2018 Daniele Giardini - Demigiant + +// IMPORTANT!!! ///////////////////////////////////////////// +// Upgrading DOTween from versions older than 1.2.000 /////// +// (or DOTween Pro older than 1.0.000) ////////////////////// +------------------------------------------------------------- +If you're upgrading your project from a version of DOTween older than 1.2.000 (or DOTween Pro older than 1.0.000) please follow these instructions carefully. +1) Import the new version in the same folder as the previous one, overwriting old files. A lot of errors will appear but don't worry +2) Close and reopen Unity (and your project). This is fundamental: skipping this step will cause a bloodbath +3) Open DOTween's Utility Panel (Tools > Demigiant > DOTween Utility Panel) if it doesn't open automatically, then press "Setup DOTween...": this will run the upgrade setup +4) From the Add/Remove Modules panel that opens, activate/deactivate Modules for Unity systems and for external assets (Pro version only) + +// GET STARTED ////////////////////////////////////////////// + +- After importing a new DOTween update, select DOTween's Utility Panel from the "Tools/Demigiant" menu (if it doesn't open automatically) and press the "Setup DOTween..." button to activate/deactivate Modules. You can also access a Preferences Tab from there to choose default settings for DOTween. +- In your code, add "using DG.Tweening" to each class where you want to use DOTween. +- You're ready to tween. Check out the links below for full documentation and license info. + + +// LINKS /////////////////////////////////////////////////////// + +DOTween website (documentation, examples, etc): http://dotween.demigiant.com +DOTween license: http://dotween.demigiant.com/license.php +DOTween repository (Google Code): https://code.google.com/p/dotween/ +Demigiant website (documentation, examples, etc): http://www.demigiant.com + +// NOTES ////////////////////////////////////////////////////// + +- DOTween's Utility Panel can be found under "Tools > Demigiant > DOTween Utility Panel" and also contains other useful options, plus a tab to set DOTween's preferences \ No newline at end of file diff --git a/Assets/Plugins/Demigiant/DOTween/readme.txt.meta b/Assets/Plugins/Demigiant/DOTween/readme.txt.meta new file mode 100644 index 0000000..3799165 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTween/readme.txt.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: fccfc62abf2eb0a4db614853430894fd +TextScriptImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DOTweenPro.meta b/Assets/Plugins/Demigiant/DOTweenPro.meta new file mode 100644 index 0000000..659537c --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: af55cfd0e7084ab4884c5a4f29b62d9f +labels: +- Tween +- Tweening +- Animation +- HOTween +- Paths +- VisualScripting +- VisualEditor +- iTween +- DFTween +- LeanTween +- Ease +- Easing +- Shake +- Punch +- 2DToolkit +- TextMeshPro +- Text +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenAnimation.cs b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenAnimation.cs new file mode 100644 index 0000000..6580554 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenAnimation.cs @@ -0,0 +1,917 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2015/03/12 15:55 + +using System; +using System.Collections.Generic; +using DG.Tweening.Core; +using UnityEngine; +#if true // UI_MARKER +using UnityEngine.UI; +#endif +#if true // TEXTMESHPRO_MARKER +using TMPro; +#endif + +#pragma warning disable 1591 +namespace DG.Tweening +{ + /// + /// Attach this to a GameObject to create a tween + /// + [AddComponentMenu("DOTween/DOTween Animation")] + public class DOTweenAnimation : ABSAnimationComponent + { + public enum AnimationType + { + None, + Move, LocalMove, + Rotate, LocalRotate, + Scale, + Color, Fade, + Text, + PunchPosition, PunchRotation, PunchScale, + ShakePosition, ShakeRotation, ShakeScale, + CameraAspect, CameraBackgroundColor, CameraFieldOfView, CameraOrthoSize, CameraPixelRect, CameraRect, + UIWidthHeight, + FillAmount + } + + public enum TargetType + { + Unset, + + Camera, + CanvasGroup, + Image, + Light, + RectTransform, + Renderer, SpriteRenderer, + Rigidbody, Rigidbody2D, + Text, + Transform, + + tk2dBaseSprite, + tk2dTextMesh, + + TextMeshPro, + TextMeshProUGUI + } + + #region EVENTS - EDITOR-ONLY + + /// Used internally by the editor + public static event Action OnReset; + static void Dispatch_OnReset(DOTweenAnimation anim) { if (OnReset != null) OnReset(anim); } + + #endregion + + public bool targetIsSelf = true; // If FALSE allows to set the target manually + public GameObject targetGO = null; // Used in case targetIsSelf is FALSE + // If FALSE always uses the GO containing this DOTweenAnimation (and not the one containing the target) as DOTween's SetTarget target + public bool tweenTargetIsTargetGO = true; + + public float delay; + public float duration = 1; + public Ease easeType = Ease.OutQuad; + public AnimationCurve easeCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)); + public LoopType loopType = LoopType.Restart; + public int loops = 1; + public string id = ""; + public bool isRelative; + public bool isFrom; + public bool isIndependentUpdate = false; + public bool autoKill = true; + public bool autoGenerate = true; // If TRUE automatically creates the tween at startup + + public bool isActive = true; + public bool isValid; + public Component target; + public AnimationType animationType; + public TargetType targetType; + public TargetType forcedTargetType; // Used when choosing between multiple targets + public bool autoPlay = true; + public bool useTargetAsV3; + + public float endValueFloat; + public Vector3 endValueV3; + public Vector2 endValueV2; + public Color endValueColor = new Color(1, 1, 1, 1); + public string endValueString = ""; + public Rect endValueRect = new Rect(0, 0, 0, 0); + public Transform endValueTransform; + + public bool optionalBool0, optionalBool1; + public float optionalFloat0; + public int optionalInt0; + public RotateMode optionalRotationMode = RotateMode.Fast; + public ScrambleMode optionalScrambleMode = ScrambleMode.None; + public ShakeRandomnessMode optionalShakeRandomnessMode = ShakeRandomnessMode.Full; + public string optionalString; + + bool _tweenAutoGenerationCalled; // TRUE after the tweens have been autoGenerated + int _playCount = -1; // Used when calling DOPlayNext + readonly List _tmpTweens = new List(); + + #region Unity Methods + + void Awake() + { + if (!isActive || !autoGenerate) return; + + if (animationType != AnimationType.Move || !useTargetAsV3) { + // Don't create tweens if we're using a RectTransform as a Move target, + // because that will work only inside Start + CreateTween(false, autoPlay); + _tweenAutoGenerationCalled = true; + } + } + + void Start() + { + if (_tweenAutoGenerationCalled || !isActive || !autoGenerate) return; + + CreateTween(false, autoPlay); + _tweenAutoGenerationCalled = true; + } + + void Reset() + { + Dispatch_OnReset(this); + } + + void OnDestroy() + { + if (tween != null && tween.active) tween.Kill(); + tween = null; + } + + /// + /// Creates/recreates the tween without playing it, but first rewinding and killing the existing one if present. + /// + public void RewindThenRecreateTween() + { + if (tween != null && tween.active) tween.Rewind(); + CreateTween(true, false); + } + /// + /// Creates/recreates the tween and plays it, first rewinding and killing the existing one if present. + /// + public void RewindThenRecreateTweenAndPlay() + { + if (tween != null && tween.active) tween.Rewind(); + CreateTween(true, true); + } + /// + /// Creates/recreates the tween from its target's current value without playing it, but first killing the existing one if present. + /// + public void RecreateTween() + { CreateTween(true, false); } + /// + /// Creates/recreates the tween from its target's current value and plays it, first killing the existing one if present. + /// + public void RecreateTweenAndPlay() + { CreateTween(true, true); } + // Used also by DOTweenAnimationInspector when applying runtime changes and restarting + /// + /// Creates the tween manually (called automatically if AutoGenerate is set in the Inspector) + /// from its target's current value. + /// + /// If TRUE and an existing tween was already created (and not killed), kills it and recreates it with the current + /// parameters. Otherwise, if a tween already exists, does nothing. + /// If TRUE also plays the tween, otherwise only creates it + public void CreateTween(bool regenerateIfExists = false, bool andPlay = true) + { + if (!isValid) { + if (regenerateIfExists) { // Called manually: warn users + Debug.LogWarning(string.Format("{0} :: This DOTweenAnimation isn't valid and its tween won't be created", this.gameObject.name), this.gameObject); + } + return; + } + if (tween != null) { + if (tween.active) { + if (regenerateIfExists) tween.Kill(); + else return; + } + tween = null; + } + +// if (target == null) { +// Debug.LogWarning(string.Format("{0} :: This DOTweenAnimation's target is NULL, because the animation was created with a DOTween Pro version older than 0.9.255. To fix this, exit Play mode then simply select this object, and it will update automatically", this.gameObject.name), this.gameObject); +// return; +// } + + GameObject tweenGO = GetTweenGO(); + if (target == null || tweenGO == null) { + if (targetIsSelf && target == null) { + // Old error caused during upgrade from DOTween Pro 0.9.255 + Debug.LogWarning(string.Format("{0} :: This DOTweenAnimation's target is NULL, because the animation was created with a DOTween Pro version older than 0.9.255. To fix this, exit Play mode then simply select this object, and it will update automatically", this.gameObject.name), this.gameObject); + } else { + // Missing non-self target + Debug.LogWarning(string.Format("{0} :: This DOTweenAnimation's target/GameObject is unset: the tween will not be created.", this.gameObject.name), this.gameObject); + } + return; + } + + if (forcedTargetType != TargetType.Unset) targetType = forcedTargetType; + if (targetType == TargetType.Unset) { + // Legacy DOTweenAnimation (made with a version older than 0.9.450) without stored targetType > assign it now + targetType = TypeToDOTargetType(target.GetType()); + } + + switch (animationType) { + case AnimationType.None: + break; + case AnimationType.Move: + if (useTargetAsV3) { + isRelative = false; + if (endValueTransform == null) { + Debug.LogWarning(string.Format("{0} :: This tween's TO target is NULL, a Vector3 of (0,0,0) will be used instead", this.gameObject.name), this.gameObject); + endValueV3 = Vector3.zero; + } else { +#if true // UI_MARKER + if (targetType == TargetType.RectTransform) { + RectTransform endValueT = endValueTransform as RectTransform; + if (endValueT == null) { + Debug.LogWarning(string.Format("{0} :: This tween's TO target should be a RectTransform, a Vector3 of (0,0,0) will be used instead", this.gameObject.name), this.gameObject); + endValueV3 = Vector3.zero; + } else { + RectTransform rTarget = target as RectTransform; + if (rTarget == null) { + Debug.LogWarning(string.Format("{0} :: This tween's target and TO target are not of the same type. Please reassign the values", this.gameObject.name), this.gameObject); + } else { + // Problem: doesn't work inside Awake (ararargh!) + endValueV3 = DOTweenModuleUI.Utils.SwitchToRectTransform(endValueT, rTarget); + } + } + } else +#endif + endValueV3 = endValueTransform.position; + } + } + switch (targetType) { + case TargetType.Transform: + tween = ((Transform)target).DOMove(endValueV3, duration, optionalBool0); + break; + case TargetType.RectTransform: +#if true // UI_MARKER + tween = ((RectTransform)target).DOAnchorPos3D(endValueV3, duration, optionalBool0); +#else + tween = ((Transform)target).DOMove(endValueV3, duration, optionalBool0); +#endif + break; + case TargetType.Rigidbody: +#if true // PHYSICS_MARKER + tween = ((Rigidbody)target).DOMove(endValueV3, duration, optionalBool0); +#else + tween = ((Transform)target).DOMove(endValueV3, duration, optionalBool0); +#endif + break; + case TargetType.Rigidbody2D: +#if true // PHYSICS2D_MARKER + tween = ((Rigidbody2D)target).DOMove(endValueV3, duration, optionalBool0); +#else + tween = ((Transform)target).DOMove(endValueV3, duration, optionalBool0); +#endif + break; + } + break; + case AnimationType.LocalMove: + tween = tweenGO.transform.DOLocalMove(endValueV3, duration, optionalBool0); + break; + case AnimationType.Rotate: + switch (targetType) { + case TargetType.Transform: + tween = ((Transform)target).DORotate(endValueV3, duration, optionalRotationMode); + break; + case TargetType.Rigidbody: +#if true // PHYSICS_MARKER + tween = ((Rigidbody)target).DORotate(endValueV3, duration, optionalRotationMode); +#else + tween = ((Transform)target).DORotate(endValueV3, duration, optionalRotationMode); +#endif + break; + case TargetType.Rigidbody2D: +#if true // PHYSICS2D_MARKER + tween = ((Rigidbody2D)target).DORotate(endValueFloat, duration); +#else + tween = ((Transform)target).DORotate(endValueV3, duration, optionalRotationMode); +#endif + break; + } + break; + case AnimationType.LocalRotate: + tween = tweenGO.transform.DOLocalRotate(endValueV3, duration, optionalRotationMode); + break; + case AnimationType.Scale: + switch (targetType) { +#if false // TK2D_MARKER + case TargetType.tk2dTextMesh: + tween = ((tk2dTextMesh)target).DOScale(optionalBool0 ? new Vector3(endValueFloat, endValueFloat, endValueFloat) : endValueV3, duration); + break; + case TargetType.tk2dBaseSprite: + tween = ((tk2dBaseSprite)target).DOScale(optionalBool0 ? new Vector3(endValueFloat, endValueFloat, endValueFloat) : endValueV3, duration); + break; +#endif + default: + tween = tweenGO.transform.DOScale(optionalBool0 ? new Vector3(endValueFloat, endValueFloat, endValueFloat) : endValueV3, duration); + break; + } + break; +#if true // UI_MARKER + case AnimationType.UIWidthHeight: + tween = ((RectTransform)target).DOSizeDelta(optionalBool0 ? new Vector2(endValueFloat, endValueFloat) : endValueV2, duration); + break; + case AnimationType.FillAmount: + tween = ((Image)target).DOFillAmount(endValueFloat, duration); + break; +#endif + case AnimationType.Color: + isRelative = false; + switch (targetType) { + case TargetType.Renderer: + tween = ((Renderer)target).material.DOColor(endValueColor, duration); + break; + case TargetType.Light: + tween = ((Light)target).DOColor(endValueColor, duration); + break; +#if true // SPRITE_MARKER + case TargetType.SpriteRenderer: + tween = ((SpriteRenderer)target).DOColor(endValueColor, duration); + break; +#endif +#if true // UI_MARKER + case TargetType.Image: + tween = ((Graphic)target).DOColor(endValueColor, duration); + break; + case TargetType.Text: + tween = ((Text)target).DOColor(endValueColor, duration); + break; +#endif +#if false // TK2D_MARKER + case TargetType.tk2dTextMesh: + tween = ((tk2dTextMesh)target).DOColor(endValueColor, duration); + break; + case TargetType.tk2dBaseSprite: + tween = ((tk2dBaseSprite)target).DOColor(endValueColor, duration); + break; +#endif +#if true // TEXTMESHPRO_MARKER + case TargetType.TextMeshProUGUI: + tween = ((TextMeshProUGUI)target).DOColor(endValueColor, duration); + break; + case TargetType.TextMeshPro: + tween = ((TextMeshPro)target).DOColor(endValueColor, duration); + break; +#endif + } + break; + case AnimationType.Fade: + isRelative = false; + switch (targetType) { + case TargetType.Renderer: + tween = ((Renderer)target).material.DOFade(endValueFloat, duration); + break; + case TargetType.Light: + tween = ((Light)target).DOIntensity(endValueFloat, duration); + break; +#if true // SPRITE_MARKER + case TargetType.SpriteRenderer: + tween = ((SpriteRenderer)target).DOFade(endValueFloat, duration); + break; +#endif +#if true // UI_MARKER + case TargetType.Image: + tween = ((Graphic)target).DOFade(endValueFloat, duration); + break; + case TargetType.Text: + tween = ((Text)target).DOFade(endValueFloat, duration); + break; + case TargetType.CanvasGroup: + tween = ((CanvasGroup)target).DOFade(endValueFloat, duration); + break; +#endif +#if false // TK2D_MARKER + case TargetType.tk2dTextMesh: + tween = ((tk2dTextMesh)target).DOFade(endValueFloat, duration); + break; + case TargetType.tk2dBaseSprite: + tween = ((tk2dBaseSprite)target).DOFade(endValueFloat, duration); + break; +#endif +#if true // TEXTMESHPRO_MARKER + case TargetType.TextMeshProUGUI: + tween = ((TextMeshProUGUI)target).DOFade(endValueFloat, duration); + break; + case TargetType.TextMeshPro: + tween = ((TextMeshPro)target).DOFade(endValueFloat, duration); + break; +#endif + } + break; + case AnimationType.Text: +#if true // UI_MARKER + switch (targetType) { + case TargetType.Text: + tween = ((Text)target).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); + break; + } +#endif +#if false // TK2D_MARKER + switch (targetType) { + case TargetType.tk2dTextMesh: + tween = ((tk2dTextMesh)target).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); + break; + } +#endif +#if true // TEXTMESHPRO_MARKER + switch (targetType) { + case TargetType.TextMeshProUGUI: + tween = ((TextMeshProUGUI)target).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); + break; + case TargetType.TextMeshPro: + tween = ((TextMeshPro)target).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); + break; + } +#endif + break; + case AnimationType.PunchPosition: + switch (targetType) { + case TargetType.Transform: + tween = ((Transform)target).DOPunchPosition(endValueV3, duration, optionalInt0, optionalFloat0, optionalBool0); + break; +#if true // UI_MARKER + case TargetType.RectTransform: + tween = ((RectTransform)target).DOPunchAnchorPos(endValueV3, duration, optionalInt0, optionalFloat0, optionalBool0); + break; +#endif + } + break; + case AnimationType.PunchScale: + tween = tweenGO.transform.DOPunchScale(endValueV3, duration, optionalInt0, optionalFloat0); + break; + case AnimationType.PunchRotation: + tween = tweenGO.transform.DOPunchRotation(endValueV3, duration, optionalInt0, optionalFloat0); + break; + case AnimationType.ShakePosition: + switch (targetType) { + case TargetType.Transform: + tween = ((Transform)target).DOShakePosition(duration, endValueV3, optionalInt0, optionalFloat0, optionalBool0, optionalBool1, optionalShakeRandomnessMode); + break; +#if true // UI_MARKER + case TargetType.RectTransform: + tween = ((RectTransform)target).DOShakeAnchorPos(duration, endValueV3, optionalInt0, optionalFloat0, optionalBool0, optionalBool1, optionalShakeRandomnessMode); + break; +#endif + } + break; + case AnimationType.ShakeScale: + tween = tweenGO.transform.DOShakeScale(duration, endValueV3, optionalInt0, optionalFloat0, optionalBool1, optionalShakeRandomnessMode); + break; + case AnimationType.ShakeRotation: + tween = tweenGO.transform.DOShakeRotation(duration, endValueV3, optionalInt0, optionalFloat0, optionalBool1, optionalShakeRandomnessMode); + break; + case AnimationType.CameraAspect: + tween = ((Camera)target).DOAspect(endValueFloat, duration); + break; + case AnimationType.CameraBackgroundColor: + tween = ((Camera)target).DOColor(endValueColor, duration); + break; + case AnimationType.CameraFieldOfView: + tween = ((Camera)target).DOFieldOfView(endValueFloat, duration); + break; + case AnimationType.CameraOrthoSize: + tween = ((Camera)target).DOOrthoSize(endValueFloat, duration); + break; + case AnimationType.CameraPixelRect: + tween = ((Camera)target).DOPixelRect(endValueRect, duration); + break; + case AnimationType.CameraRect: + tween = ((Camera)target).DORect(endValueRect, duration); + break; + } + + if (tween == null) return; + + // Created + + if (isFrom) { + ((Tweener)tween).From(isRelative); + } else { + tween.SetRelative(isRelative); + } + GameObject setTarget = GetTweenTarget(); + tween.SetTarget(setTarget).SetDelay(delay).SetLoops(loops, loopType).SetAutoKill(autoKill) + .OnKill(()=> tween = null); + if (isSpeedBased) tween.SetSpeedBased(); + if (easeType == Ease.INTERNAL_Custom) tween.SetEase(easeCurve); + else tween.SetEase(easeType); + if (!string.IsNullOrEmpty(id)) tween.SetId(id); + tween.SetUpdate(isIndependentUpdate); + + if (hasOnStart) { + if (onStart != null) tween.OnStart(onStart.Invoke); + } else onStart = null; + if (hasOnPlay) { + if (onPlay != null) tween.OnPlay(onPlay.Invoke); + } else onPlay = null; + if (hasOnUpdate) { + if (onUpdate != null) tween.OnUpdate(onUpdate.Invoke); + } else onUpdate = null; + if (hasOnStepComplete) { + if (onStepComplete != null) tween.OnStepComplete(onStepComplete.Invoke); + } else onStepComplete = null; + if (hasOnComplete) { + if (onComplete != null) tween.OnComplete(onComplete.Invoke); + } else onComplete = null; + if (hasOnRewind) { + if (onRewind != null) tween.OnRewind(onRewind.Invoke); + } else onRewind = null; + + if (andPlay) tween.Play(); + else tween.Pause(); + + if (hasOnTweenCreated && onTweenCreated != null) onTweenCreated.Invoke(); + } + + #endregion + + #region Public Methods + + #region Special + + /// + /// Returns the tweens (if generated and not killed) created by all DOTweenAnimations on this gameObject, + /// in the same order as they appear in the Inspector (top to bottom). + /// Note that a tween is generated inside the Awake call (except RectTransform tweens which are generated inside Start), + /// so this method won't return them before that + /// + public List GetTweens() + { + List result = new List(); + DOTweenAnimation[] anims = this.GetComponents(); + foreach (DOTweenAnimation anim in anims) { + if (anim.tween != null && anim.tween.active) result.Add(anim.tween); + } + return result; + } + + /// + /// Sets the animation target (which must be of the same type of the one set in the Inspector). + /// This is useful if you want to change it BEFORE this + /// creates a tween, while after that it won't have any effect. + /// Consider that a creates its tween inside its Awake (except for special tweens), + /// so you will need to sure your code runs before this object's Awake (via ScriptExecutionOrder or enabling/disabling methods) + /// + /// + /// New target for the animation (must be of the same type of the previous one) + /// If TRUE also uses tweenTarget's gameObject when settings the target-ID of the tween + /// (which is used with DOPlay/DORestart/etc to apply the same operation on all tweens that have the same target-id). + /// You should usually leave this to TRUE if you change the target. + /// + public void SetAnimationTarget(Component tweenTarget, bool useTweenTargetGameObjectForGroupOperations = true) + { + TargetType newTargetType = TypeToDOTargetType(target.GetType()); + if (newTargetType != targetType) { + Debug.LogError("DOTweenAnimation ► SetAnimationTarget: the new target is of a different type from the one set in the Inspector"); + return; + } + target = tweenTarget; + targetGO = target.gameObject; + tweenTargetIsTargetGO = useTweenTargetGameObjectForGroupOperations; + } + + #endregion + + /// + /// Plays all tweens whose target-id is the same as the one set by this animation + /// + public override void DOPlay() + { + DOTween.Play(GetTweenTarget()); + } + + /// + /// Plays backwards all tweens whose target-id is the same as the one set by this animation + /// + public override void DOPlayBackwards() + { + DOTween.PlayBackwards(GetTweenTarget()); + } + + /// + /// Plays foward all tweens whose target-id is the same as the one set by this animation + /// + public override void DOPlayForward() + { + DOTween.PlayForward(GetTweenTarget()); + } + + /// + /// Pauses all tweens whose target-id is the same as the one set by this animation + /// + public override void DOPause() + { + DOTween.Pause(GetTweenTarget()); + } + + /// + /// Pauses/unpauses (depending on the current state) all tweens whose target-id is the same as the one set by this animation + /// + public override void DOTogglePause() + { + DOTween.TogglePause(GetTweenTarget()); + } + + /// + /// Rewinds all tweens created by this animation in the correct order + /// + public override void DORewind() + { + _playCount = -1; + // Rewind using Components order (in case there are multiple animations on the same property) + DOTweenAnimation[] anims = this.gameObject.GetComponents(); + for (int i = anims.Length - 1; i > -1; --i) { + Tween t = anims[i].tween; + if (t != null && t.IsInitialized()) anims[i].tween.Rewind(); + } + // DOTween.Rewind(GetTweenTarget()); + } + + /// + /// Restarts all tweens whose target-id is the same as the one set by this animation + /// + public override void DORestart() + { DORestart(false); } + /// + /// Restarts all tweens whose target-id is the same as the one set by this animation + /// + /// If TRUE, re-evaluates the tween's start and end values from its current position. + /// Set it to TRUE when spawning the same DOTweenAnimation in different positions (like when using a pooling system) + public override void DORestart(bool fromHere) + { + _playCount = -1; + if (tween == null) { + if (Debugger.logPriority > 1) Debugger.LogNullTween(tween); return; + } + if (fromHere && isRelative) ReEvaluateRelativeTween(); + DOTween.Restart(GetTweenTarget()); + } + + /// + /// Completes all tweens whose target-id is the same as the one set by this animation + /// + public override void DOComplete() + { + DOTween.Complete(GetTweenTarget()); + } + + /// + /// Sends to the given time (and pauses) all the tweens whose target-id is the one set by this animation + /// + /// Time to send the tween to + public override void DOGotoAndPause(float time) + { DOGoto(time, false); } + /// + /// Sends to the given time (and plays) all the tweens whose target-id is the one set by this animation + /// + /// Time to send the tween to + public override void DOGotoAndPlay(float time) + { DOGoto(time, true); } + void DOGoto(float time, bool andPlay) + { + _tmpTweens.Clear(); + DOTween.TweensByTarget(GetTweenTarget(), false, _tmpTweens); + int len = _tmpTweens.Count; + if (len == 0) { + Debugger.LogWarning((andPlay ? "DOGotoAndPlay" : "DoGotoAndPause") + " ► tween doesn't exist"); + } else { + for (int i = 0; i < _tmpTweens.Count; ++i) { + _tmpTweens[i].Goto(time, andPlay); + } + } + _tmpTweens.Clear(); + } + + /// + /// Kills all tweens whose target-id is the same as the one set by this animation + /// + public override void DOKill() + { + DOTween.Kill(GetTweenTarget()); + tween = null; + } + + #region Specifics + + /// + /// Plays all tweens with the given ID and whose target-id is the same as the one set by this animation + /// + public void DOPlayById(string id) + { + DOTween.Play(GetTweenTarget(), id); + } + /// + /// Plays all tweens with the given ID (regardless of their target gameObject) + /// + public void DOPlayAllById(string id) + { + DOTween.Play(id); + } + + /// + /// Pauses all tweens that with the given ID (regardless of their target gameObject) + /// + public void DOPauseAllById(string id) + { + DOTween.Pause(id); + } + + /// + /// Plays backwards all tweens with the given ID and whose target-id is the same as the one set by this animation + /// + public void DOPlayBackwardsById(string id) + { + DOTween.PlayBackwards(GetTweenTarget(), id); + } + /// + /// Plays backwards all tweens with the given ID (regardless of their target gameObject) + /// + public void DOPlayBackwardsAllById(string id) + { + DOTween.PlayBackwards(id); + } + + /// + /// Plays forward all tweens with the given ID and whose target-id is the same as the one set by this animation + /// + public void DOPlayForwardById(string id) + { + DOTween.PlayForward(GetTweenTarget(), id); + } + /// + /// Plays forward all tweens with the given ID (regardless of their target gameObject) + /// + public void DOPlayForwardAllById(string id) + { + DOTween.PlayForward(id); + } + + /// + /// Plays the next animation on this animation's gameObject (if any) + /// + public void DOPlayNext() + { + DOTweenAnimation[] anims = this.GetComponents(); + while (_playCount < anims.Length - 1) { + _playCount++; + DOTweenAnimation anim = anims[_playCount]; + if (anim != null && anim.tween != null && anim.tween.active && !anim.tween.IsPlaying() && !anim.tween.IsComplete()) { + anim.tween.Play(); + break; + } + } + } + + /// + /// Rewinds all tweens with the given ID and whose target-id is the same as the one set by this animation, + /// then plays the next animation on this animation's gameObject (if any) + /// + public void DORewindAndPlayNext() + { + _playCount = -1; + DOTween.Rewind(GetTweenTarget()); + DOPlayNext(); + } + + /// + /// Rewinds all tweens with the given ID (regardless of their target gameObject) + /// + public void DORewindAllById(string id) + { + _playCount = -1; + DOTween.Rewind(id); + } + + /// + /// Restarts all tweens with the given ID and whose target-id is the same as the one set by this animation + /// + public void DORestartById(string id) + { + _playCount = -1; + DOTween.Restart(GetTweenTarget(), id); + } + /// + /// Restarts all tweens with the given ID (regardless of their target gameObject) + /// + public void DORestartAllById(string id) + { + _playCount = -1; + DOTween.Restart(id); + } + + /// + /// Kills all tweens with the given ID and whose target-id is the same as the one set by this animation + /// + public void DOKillById(string id) + { + DOTween.Kill(GetTweenTarget(), id); + } + /// + /// Kills all tweens with the given ID (regardless of their target gameObject) + /// + public void DOKillAllById(string id) + { + DOTween.Kill(id); + } + + #endregion + + #region Internal (also used by Inspector) + + public static TargetType TypeToDOTargetType(Type t) + { + string str = t.ToString(); + int dotIndex = str.LastIndexOf("."); + if (dotIndex != -1) str = str.Substring(dotIndex + 1); + if (str.IndexOf("Renderer") != -1 && (str != "SpriteRenderer")) str = "Renderer"; +//#if true // PHYSICS_MARKER +// if (str == "Rigidbody") str = "Transform"; +//#endif +//#if true // PHYSICS2D_MARKER +// if (str == "Rigidbody2D") str = "Transform"; +//#endif +#if true // UI_MARKER +// if (str == "RectTransform") str = "Transform"; + if (str == "RawImage" || str == "Graphic") str = "Image"; // RawImages/Graphics are managed like Images for DOTweenAnimation (color and fade use Graphic target anyway) +#endif + return (TargetType)Enum.Parse(typeof(TargetType), str); + } + + // Editor preview system + /// + /// Previews the tween in the editor. Only for DOTween internal usage: don't use otherwise. + /// + public Tween CreateEditorPreview() + { + if (Application.isPlaying) return null; + + // CHANGE: first param switched to TRUE otherwise changing an animation and replaying in editor would still play old one + CreateTween(true, autoPlay); + return tween; + } + + #endregion + + #endregion + + #region Private + + /// + /// Returns the gameObject whose target component should be animated + /// + /// + GameObject GetTweenGO() + { + return targetIsSelf ? this.gameObject : targetGO; + } + + /// + /// Returns the GameObject which should be used/retrieved for SetTarget + /// + GameObject GetTweenTarget() + { + return targetIsSelf || !tweenTargetIsTargetGO ? this.gameObject : targetGO; + } + + // Re-evaluate relative position of path + void ReEvaluateRelativeTween() + { + GameObject tweenGO = GetTweenGO(); + if (tweenGO == null) { + Debug.LogWarning(string.Format("{0} :: This DOTweenAnimation's target/GameObject is unset: the tween will not be created.", this.gameObject.name), this.gameObject); + return; + } + if (animationType == AnimationType.Move) { + ((Tweener)tween).ChangeEndValue(tweenGO.transform.position + endValueV3, true); + } else if (animationType == AnimationType.LocalMove) { + ((Tweener)tween).ChangeEndValue(tweenGO.transform.localPosition + endValueV3, true); + } + } + + #endregion + } + + public static class DOTweenAnimationExtensions + { +// // Doesn't work on Win 8.1 +// public static bool IsSameOrSubclassOf(this Type t, Type tBase) +// { +// return t.IsSubclassOf(tBase) || t == tBase; +// } + + public static bool IsSameOrSubclassOf(this Component t) + { + return t is T; + } + } +} diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenAnimation.cs.meta b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenAnimation.cs.meta new file mode 100644 index 0000000..a10ceea --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenAnimation.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4d0390bd8b8ffd640b34fe25065ff1df +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenDeAudio.cs b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenDeAudio.cs new file mode 100644 index 0000000..c9df396 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenDeAudio.cs @@ -0,0 +1,9 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2015/03/27 19:02 +// +// License Copyright (c) Daniele Giardini. +// This work is subject to the terms at http://dotween.demigiant.com/license.php + + +#if false // MODULE_MARKER +#endif diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenDeAudio.cs.meta b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenDeAudio.cs.meta new file mode 100644 index 0000000..32c1ec8 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenDeAudio.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1d1aa01bacf85c04ea18116651a7f0db +timeCreated: 1587116610 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenDeUnityExtended.cs b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenDeUnityExtended.cs new file mode 100644 index 0000000..c9df396 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenDeUnityExtended.cs @@ -0,0 +1,9 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2015/03/27 19:02 +// +// License Copyright (c) Daniele Giardini. +// This work is subject to the terms at http://dotween.demigiant.com/license.php + + +#if false // MODULE_MARKER +#endif diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenDeUnityExtended.cs.meta b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenDeUnityExtended.cs.meta new file mode 100644 index 0000000..9cba4ea --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenDeUnityExtended.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0a0cc3e90c4a6ea41bb14d7f35c577c3 +timeCreated: 1587116610 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenPro.XML b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenPro.XML new file mode 100644 index 0000000..8179cfe --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenPro.XML @@ -0,0 +1,80 @@ + + + + DOTweenPro + + + + + Restarts the tween + + + + + Restarts the tween + + If TRUE, re-evaluates the tween's start and end values from its current position. + Set it to TRUE when spawning the same DOTweenPath in different positions (like when using a pooling system) + + + + Attach this to a GameObject to create and assign a path to it + + + + Used internally by the editor + + + + Restarts the tween + + + + + Restarts the tween + + If TRUE, re-evaluates the tween's start and end values from its current position. + Set it to TRUE when spawning the same DOTweenPath in different positions (like when using a pooling system) + + + + Sends the tween to the given time then pauses it + + Time to send the tween to + + + + Sends the tween to the given time then plays it + + Time to send the tween to + + + + Kills all tweens (path/animations/etc.) with the given ID (regardless of their target gameObject) + + + + + Returns a list of points that are used to draw the path inside the editor, + or NULL if the path hasn't been initialized yet or if its tween has been killed + + + + + Tweens a Vector3 along a spiral. + EndValue represents the direction of the spiral + + + + + Spiral tween mode + + + + The spiral motion will expand outwards for the whole the tween + + + The spiral motion will expand outwards for half the tween and then will spiral back to the starting position + + + diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenPro.XML.meta b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenPro.XML.meta new file mode 100644 index 0000000..ddc78e5 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenPro.XML.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: db7d7ef84c388bc4fbc3835d31a15306 +TextScriptImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenPro.dll b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenPro.dll new file mode 100644 index 0000000..1c37602 Binary files /dev/null and b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenPro.dll differ diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenPro.dll.meta b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenPro.dll.meta new file mode 100644 index 0000000..9ecbfd3 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenPro.dll.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: aa0b1eebb5db27a419fa4564bbe5c9c5 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 1 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenProShortcuts.cs b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenProShortcuts.cs new file mode 100644 index 0000000..12ee7ef --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenProShortcuts.cs @@ -0,0 +1,90 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2018/07/13 + +using System; +using DG.Tweening.Core; +using DG.Tweening.Plugins; +using UnityEngine; + +#pragma warning disable 1591 +namespace DG.Tweening +{ + public static class DOTweenProShortcuts + { + static DOTweenProShortcuts() + { + // Create stub instances of custom plugins, in order to allow IL2CPP to understand they must be included in the build +#pragma warning disable 219 + SpiralPlugin stub = new SpiralPlugin(); +#pragma warning restore 219 + } + + #region Shortcuts + + #region Transform + + /// Tweens a Transform's localPosition in a spiral shape. + /// Also stores the transform as the tween's target so it can be used for filtered operations + /// The duration of the tween + /// The axis around which the spiral will rotate + /// The type of spiral movement + /// Speed of the rotations + /// Frequency of the rotation. Lower values lead to wider spirals + /// Indicates how much the tween should move along the spiral's axis + /// If TRUE the tween will smoothly snap all values to integers + public static Tweener DOSpiral( + this Transform target, float duration, Vector3? axis = null, SpiralMode mode = SpiralMode.Expand, + float speed = 1, float frequency = 10, float depth = 0, bool snapping = false + ) { + if (Mathf.Approximately(speed, 0)) speed = 1; + if (axis == null || axis == Vector3.zero) axis = Vector3.forward; + + TweenerCore t = DOTween.To(SpiralPlugin.Get(), () => target.localPosition, x => target.localPosition = x, (Vector3)axis, duration) + .SetTarget(target); + + t.plugOptions.mode = mode; + t.plugOptions.speed = speed; + t.plugOptions.frequency = frequency; + t.plugOptions.depth = depth; + t.plugOptions.snapping = snapping; + return t; + } + + #endregion + +#if true // PHYSICS_MARKER + #region Rigidbody + + /// Tweens a Rigidbody's position in a spiral shape. + /// Also stores the transform as the tween's target so it can be used for filtered operations + /// The duration of the tween + /// The axis around which the spiral will rotate + /// The type of spiral movement + /// Speed of the rotations + /// Frequency of the rotation. Lower values lead to wider spirals + /// Indicates how much the tween should move along the spiral's axis + /// If TRUE the tween will smoothly snap all values to integers + public static Tweener DOSpiral( + this Rigidbody target, float duration, Vector3? axis = null, SpiralMode mode = SpiralMode.Expand, + float speed = 1, float frequency = 10, float depth = 0, bool snapping = false + ) { + if (Mathf.Approximately(speed, 0)) speed = 1; + if (axis == null || axis == Vector3.zero) axis = Vector3.forward; + + TweenerCore t = DOTween.To(SpiralPlugin.Get(), () => target.position, target.MovePosition, (Vector3)axis, duration) + .SetTarget(target); + + t.plugOptions.mode = mode; + t.plugOptions.speed = speed; + t.plugOptions.frequency = frequency; + t.plugOptions.depth = depth; + t.plugOptions.snapping = snapping; + return t; + } + + #endregion +#endif + + #endregion + } +} diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenProShortcuts.cs.meta b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenProShortcuts.cs.meta new file mode 100644 index 0000000..bc6e863 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenProShortcuts.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1c3190a1a1c53f449926f6d5542b4ce5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenTextMeshPro.cs b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenTextMeshPro.cs new file mode 100644 index 0000000..cdfd47d --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenTextMeshPro.cs @@ -0,0 +1,1037 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2015/03/27 19:02 +// +// License Copyright (c) Daniele Giardini. +// This work is subject to the terms at http://dotween.demigiant.com/license.php + + +#if true // MODULE_MARKER +using System; +using System.Globalization; +using System.Collections.Generic; +using DG.Tweening.Core; +using DG.Tweening.Plugins.Options; +using UnityEngine; +using TMPro; +using Object = UnityEngine.Object; + +namespace DG.Tweening +{ + public enum TMPSkewSpanMode + { + /// Applies the skew as-is (like normal skew works): the longer the text-span the higher the last character will be + Default, + /// Applies the skew scaled by the size of the text-span: the max skew/displacement will be the given skew factor + AsMaxSkewFactor + } + + /// + /// Methods that extend TMP_Text objects and allow to directly create and control tweens from their instances. + /// + public static class ShortcutExtensionsTMPText + { + #region Colors + + /// Tweens a TextMeshPro's color to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOColor(this TMP_Text target, Color endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.color, x => target.color = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a TextMeshPro's faceColor to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOFaceColor(this TMP_Text target, Color32 endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.faceColor, x => target.faceColor = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a TextMeshPro's outlineColor to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOOutlineColor(this TMP_Text target, Color32 endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.outlineColor, x => target.outlineColor = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a TextMeshPro's glow color to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE will use the fontSharedMaterial instead than the fontMaterial + public static TweenerCore DOGlowColor(this TMP_Text target, Color endValue, float duration, bool useSharedMaterial = false) + { + TweenerCore t = useSharedMaterial + ? target.fontSharedMaterial.DOColor(endValue, "_GlowColor", duration) + : target.fontMaterial.DOColor(endValue, "_GlowColor", duration); + t.SetTarget(target); + return t; + } + + /// Tweens a TextMeshPro's alpha color to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOFade(this TMP_Text target, float endValue, float duration) + { + TweenerCore t = DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a TextMeshPro faceColor's alpha to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOFaceFade(this TMP_Text target, float endValue, float duration) + { + TweenerCore t = DOTween.ToAlpha(() => target.faceColor, x => target.faceColor = x, endValue, duration); + t.SetTarget(target); + return t; + } + + #endregion + + #region Other + + /// Tweens a TextMeshPro's scale to the given value (using correct uniform scale as TMP requires). + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOScale(this TMP_Text target, float endValue, float duration) + { + Transform trans = target.transform; + Vector3 endValueV3 = new Vector3(endValue, endValue, endValue); + TweenerCore t = DOTween.To(() => trans.localScale, x => trans.localScale = x, endValueV3, duration); + t.SetTarget(target); + return t; + } + + /// + /// Tweens a TextMeshPro's text from one integer to another, with options for thousands separators + /// + /// The value to start from + /// The end value to reach + /// The duration of the tween + /// If TRUE (default) also adds thousands separators + /// The to use (InvariantCulture if NULL) + public static TweenerCore DOCounter( + this TMP_Text target, int fromValue, int endValue, float duration, bool addThousandsSeparator = true, CultureInfo culture = null + ){ + int v = fromValue; + CultureInfo cInfo = !addThousandsSeparator ? null : culture ?? CultureInfo.InvariantCulture; + TweenerCore t = DOTween.To(() => v, x => { + v = x; + target.text = addThousandsSeparator + ? v.ToString("N0", cInfo) + : v.ToString(); + }, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a TextMeshPro's fontSize to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOFontSize(this TMP_Text target, float endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.fontSize, x => target.fontSize = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a TextMeshPro's maxVisibleCharacters to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOMaxVisibleCharacters(this TMP_Text target, int endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.maxVisibleCharacters, x => target.maxVisibleCharacters = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a TextMeshPro's text to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end string to tween toThe duration of the tween + /// If TRUE (default), rich text will be interpreted correctly while animated, + /// otherwise all tags will be considered as normal text + /// The type of scramble mode to use, if any + /// A string containing the characters to use for scrambling. + /// Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. + /// Leave it to NULL (default) to use default ones + public static TweenerCore DOText(this TMP_Text target, string endValue, float duration, bool richTextEnabled = true, ScrambleMode scrambleMode = ScrambleMode.None, string scrambleChars = null) + { + TweenerCore t = DOTween.To(() => target.text, x => target.text = x, endValue, duration); + t.SetOptions(richTextEnabled, scrambleMode, scrambleChars) + .SetTarget(target); + return t; + } + + #endregion + } + + #region DOTweenTMPAnimator + + // █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ + // ███ CLASS ███████████████████████████████████████████████████████████████████████████████████████████████████████████ + // █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ + + /// + /// Wrapper for objects that enables per-character tweening + /// (you don't need this if instead you want to animate the whole text object). + /// It also contains various handy methods to simply deform text without animating it ;) + /// EXAMPLE: + /// DOTweenTMPAnimator animator = new DOTweenTMPAnimator(myTextMeshProTextField); + /// Tween tween = animator.DOCharScale(characterIndex, scaleValue, duration); + /// + /// + public class DOTweenTMPAnimator : IDisposable + { + static readonly Dictionary _targetToAnimator = new Dictionary(); + + /// that this animator is linked to + public TMP_Text target { get; private set; } + public TMP_TextInfo textInfo { get; private set; } + readonly List _charTransforms = new List(); + TMP_MeshInfo[] _cachedMeshInfos; + bool _ignoreTextChangedEvent; + + /// + /// Creates a new instance of the , which is necessary to animate by single characters. + /// If a already exists for the same object it will be disposed + /// (but not its tweens, those you will have to kill manually). + /// If you want to animate the whole text object you don't need this, and you can use direct DO shortcuts instead. + /// IMPORTANT: the target must have been enabled/activated at least once before you can use it with this + /// + /// The that will be linked to this animator + public DOTweenTMPAnimator(TMP_Text target) + { + if (target == null) { + Debugger.LogError("DOTweenTMPAnimator target can't be null"); + return; + } + if (!target.gameObject.activeInHierarchy) { + Debugger.LogError("You can't create a DOTweenTMPAnimator if its target is disabled"); + return; + } + // Verify that there's no other animators for the same target, and in case dispose them + if (_targetToAnimator.ContainsKey(target)) { + if (Debugger.logPriority >= 2) { + Debugger.Log(string.Format( + "A DOTweenTMPAnimator for \"{0}\" already exists: disposing it because you can't have more than one DOTweenTMPAnimator" + + " for the same TextMesh Pro object. If you have tweens running on the disposed DOTweenTMPAnimator you should kill them manually", + target + )); + } + _targetToAnimator[target].Dispose(); + _targetToAnimator.Remove(target); + } + // + this.target = target; + _targetToAnimator.Add(target, this); + Refresh(); + // Listeners + TMPro_EventManager.TEXT_CHANGED_EVENT.Add(OnTextChanged); + } + + /// + /// If a instance exists for the given target disposes it + /// + public static void DisposeInstanceFor(TMP_Text target) + { + if (!_targetToAnimator.ContainsKey(target)) return; + _targetToAnimator[target].Dispose(); + _targetToAnimator.Remove(target); + } + + /// + /// Clears and disposes of this object + /// + public void Dispose() + { + target = null; + _charTransforms.Clear(); + textInfo = null; + _cachedMeshInfos = null; + TMPro_EventManager.TEXT_CHANGED_EVENT.Remove(OnTextChanged); + } + + /// + /// Refreshes the animator text data and resets all transformation data. Call this after you change the target + /// + public void Refresh() + { + _ignoreTextChangedEvent = true; + target.ForceMeshUpdate(true); + textInfo = target.textInfo; + _cachedMeshInfos = textInfo.CopyMeshInfoVertexData(); + int totChars = textInfo.characterCount; + int totCurrent = _charTransforms.Count; + if (totCurrent > totChars) { + _charTransforms.RemoveRange(totChars, totCurrent - totChars); + totCurrent = totChars; + } + for (int i = 0; i < totCurrent; ++i) { + CharTransform c = _charTransforms[i]; + c.ResetTransformationData(); + c.Refresh(textInfo, _cachedMeshInfos); + _charTransforms[i] = c; + } + for (int i = totCurrent; i < totChars; ++i) _charTransforms.Add(new CharTransform(i, textInfo, _cachedMeshInfos)); + _ignoreTextChangedEvent = false; + } + + /// + /// Resets all deformations + /// + public void Reset() + { + int totCurrent = _charTransforms.Count; + for (int i = 0; i < totCurrent; ++i) _charTransforms[i].ResetAll(target, textInfo.meshInfo, _cachedMeshInfos); + } + + void OnTextChanged(Object obj) + { + if (_ignoreTextChangedEvent || target == null || obj != target) return; + Refresh(); + } + + bool ValidateChar(int charIndex, bool isTween = true) + { + if (textInfo.characterCount <= charIndex) { + Debugger.LogError(string.Format("CharIndex {0} doesn't exist", charIndex)); + return false; + } + if (!textInfo.characterInfo[charIndex].isVisible) { + if (Debugger.logPriority > 1) { + if (isTween) { + Debugger.Log(string.Format( + "CharIndex {0} isn't visible, ignoring it and returning an empty tween (TextMesh Pro will behave weirdly if invisible chars are included in the animation)", + charIndex + )); + } else { + Debugger.Log(string.Format("CharIndex {0} isn't visible, ignoring it", charIndex)); + } + } + return false; + } + return true; + } + + bool ValidateSpan(int fromCharIndex, int toCharIndex, out int firstVisibleCharIndex, out int lastVisibleCharIndex) + { + firstVisibleCharIndex = -1; // First visible/existing charIndex from given index + lastVisibleCharIndex = -1; // Last visible/existing charIndex backwards from given index + int charCount = textInfo.characterCount; + if (fromCharIndex >= charCount) return false; + if (toCharIndex >= charCount) toCharIndex = charCount - 1; + for (int i = fromCharIndex; i < toCharIndex + 1; ++i) { + if (!_charTransforms[i].isVisible) continue; + firstVisibleCharIndex = i; + break; + } + if (firstVisibleCharIndex == -1) return false; + for (int i = toCharIndex; i > firstVisibleCharIndex - 1; --i) { + if (!_charTransforms[i].isVisible) continue; + lastVisibleCharIndex = i; + break; + } + if (lastVisibleCharIndex == -1) return false; + return true; + } + + #region Word Setters + + /// + /// Skews a span of characters uniformly (like normal skew works in graphic applications) + /// + /// First char index of the span to skew + /// Last char index of the span to skew + /// Skew factor + /// If TRUE skews the top side of the span, otherwise the bottom one + public void SkewSpanX(int fromCharIndex, int toCharIndex, float skewFactor, bool skewTop = true) + { + int firstVisibleCharIndex, lastVisibleCharIndex; + if (!ValidateSpan(fromCharIndex, toCharIndex, out firstVisibleCharIndex, out lastVisibleCharIndex)) return; + for (int i = firstVisibleCharIndex; i < lastVisibleCharIndex + 1; ++i) { + if (!_charTransforms[i].isVisible) continue; + CharVertices v = _charTransforms[i].GetVertices(); + float skew = SkewCharX(i, skewFactor, skewTop); + } + } + + /// + /// Skews a span of characters uniformly (like normal skew works in graphic applications) + /// + /// First char index of the span to skew + /// Last char index of the span to skew + /// Skew factor + /// Skew mode + /// If TRUE skews the right side of the span, otherwise the left one + public void SkewSpanY( + int fromCharIndex, int toCharIndex, float skewFactor, + TMPSkewSpanMode mode = TMPSkewSpanMode.Default, bool skewRight = true + ){ + int firstVisibleCharIndex, lastVisibleCharIndex; + if (!ValidateSpan(fromCharIndex, toCharIndex, out firstVisibleCharIndex, out lastVisibleCharIndex)) return; + if (mode == TMPSkewSpanMode.AsMaxSkewFactor) { + CharVertices firstVisibleCharVertices = _charTransforms[firstVisibleCharIndex].GetVertices(); + CharVertices lastVisibleCharVertices = _charTransforms[lastVisibleCharIndex].GetVertices(); + float spanW = Mathf.Abs(lastVisibleCharVertices.bottomRight.x - firstVisibleCharVertices.bottomLeft.x); + float spanH = Mathf.Abs(lastVisibleCharVertices.topRight.y - lastVisibleCharVertices.bottomRight.y); + float ratio = spanH / spanW; + skewFactor *= ratio; + } + float offsetY = 0; + CharVertices prevCharVertices = new CharVertices(); + float prevCharSkew = 0; + if (skewRight) { + for (int i = firstVisibleCharIndex; i < lastVisibleCharIndex + 1; ++i) { + if (!_charTransforms[i].isVisible) continue; + CharVertices v = _charTransforms[i].GetVertices(); + float skew = SkewCharY(i, skewFactor, skewRight); + if (i > firstVisibleCharIndex) { + float prevCharW = Mathf.Abs(prevCharVertices.bottomLeft.x - prevCharVertices.bottomRight.x); + float charsDist = Mathf.Abs(v.bottomLeft.x - prevCharVertices.bottomRight.x); + offsetY += prevCharSkew + (prevCharSkew * charsDist) / prevCharW; + SetCharOffset(i, new Vector3(0, _charTransforms[i].offset.y + offsetY, 0)); + } + prevCharVertices = v; + prevCharSkew = skew; + } + } else { + for (int i = lastVisibleCharIndex; i > firstVisibleCharIndex - 1; --i) { + if (!_charTransforms[i].isVisible) continue; + CharVertices v = _charTransforms[i].GetVertices(); + float skew = SkewCharY(i, skewFactor, skewRight); + if (i < lastVisibleCharIndex) { + float prevCharW = Mathf.Abs(prevCharVertices.bottomLeft.x - prevCharVertices.bottomRight.x); + float charsDist = Mathf.Abs(v.bottomRight.x - prevCharVertices.bottomLeft.x); + offsetY += prevCharSkew + (prevCharSkew * charsDist) / prevCharW; + SetCharOffset(i, new Vector3(0, _charTransforms[i].offset.y + offsetY, 0)); + } + prevCharVertices = v; + prevCharSkew = skew; + } + } + } + + #endregion + + #region Char Getters + + /// + /// Returns the current color of the given character, if it exists and is visible. + /// + /// Character index + public Color GetCharColor(int charIndex) + { + if (!ValidateChar(charIndex)) return Color.white; + return _charTransforms[charIndex].GetColor(textInfo.meshInfo); + } + + /// + /// Returns the current offset of the given character, if it exists and is visible. + /// + /// Character index + public Vector3 GetCharOffset(int charIndex) + { + if (!ValidateChar(charIndex)) return Vector3.zero; + return _charTransforms[charIndex].offset; + } + + /// + /// Returns the current rotation of the given character, if it exists and is visible. + /// + /// Character index + public Vector3 GetCharRotation(int charIndex) + { + if (!ValidateChar(charIndex)) return Vector3.zero; + return _charTransforms[charIndex].rotation.eulerAngles; + } + + /// + /// Returns the current scale of the given character, if it exists and is visible. + /// + /// Character index + public Vector3 GetCharScale(int charIndex) + { + if (!ValidateChar(charIndex)) return Vector3.zero; + return _charTransforms[charIndex].scale; + } + + #endregion + + #region Char Setters + + /// + /// Immediately sets the color of the given character. + /// Will do nothing if the is invalid or the character isn't visible + /// + /// Character index + /// Color to set + public void SetCharColor(int charIndex, Color32 color) + { + if (!ValidateChar(charIndex)) return; + CharTransform c = _charTransforms[charIndex]; + c.UpdateColor(target, color, textInfo.meshInfo); + _charTransforms[charIndex] = c; + } + + /// + /// Immediately sets the offset of the given character. + /// Will do nothing if the is invalid or the character isn't visible + /// + /// Character index + /// Offset to set + public void SetCharOffset(int charIndex, Vector3 offset) + { + if (!ValidateChar(charIndex)) return; + CharTransform c = _charTransforms[charIndex]; + c.UpdateGeometry(target, offset, c.rotation, c.scale, _cachedMeshInfos); + _charTransforms[charIndex] = c; + } + + /// + /// Immediately sets the rotation of the given character. + /// Will do nothing if the is invalid or the character isn't visible + /// + /// Character index + /// Rotation to set + public void SetCharRotation(int charIndex, Vector3 rotation) + { + if (!ValidateChar(charIndex)) return; + CharTransform c = _charTransforms[charIndex]; + c.UpdateGeometry(target, c.offset, Quaternion.Euler(rotation), c.scale, _cachedMeshInfos); + _charTransforms[charIndex] = c; + } + + /// + /// Immediately sets the scale of the given character. + /// Will do nothing if the is invalid or the character isn't visible + /// + /// Character index + /// Scale to set + public void SetCharScale(int charIndex, Vector3 scale) + { + if (!ValidateChar(charIndex)) return; + CharTransform c = _charTransforms[charIndex]; + c.UpdateGeometry(target, c.offset, c.rotation, scale, _cachedMeshInfos); + _charTransforms[charIndex] = c; + } + + /// + /// Immediately shifts the vertices of the given character by the given factor. + /// Will do nothing if the is invalid or the character isn't visible + /// + /// Character index + /// Top left offset + /// Top right offset + /// Bottom left offset + /// Bottom right offset + public void ShiftCharVertices(int charIndex, Vector3 topLeftShift, Vector3 topRightShift, Vector3 bottomLeftShift, Vector3 bottomRightShift) + { + if (!ValidateChar(charIndex)) return; + CharTransform c = _charTransforms[charIndex]; + c.ShiftVertices(target, topLeftShift, topRightShift, bottomLeftShift, bottomRightShift); + _charTransforms[charIndex] = c; + } + + /// + /// Skews the given character horizontally along the X axis and returns the skew amount applied (based on the character's size) + /// + /// Character index + /// skew amount + /// If TRUE skews the top side of the character, otherwise the bottom one + public float SkewCharX(int charIndex, float skewFactor, bool skewTop = true) + { + if (!ValidateChar(charIndex)) return 0; + Vector3 skewV = new Vector3(skewFactor, 0, 0); + CharTransform c = _charTransforms[charIndex]; + if (skewTop) c.ShiftVertices(target, skewV, skewV, Vector3.zero, Vector3.zero); + else c.ShiftVertices(target, Vector3.zero, Vector3.zero, skewV, skewV); + _charTransforms[charIndex] = c; + return skewFactor; + } + + /// + /// Skews the given character vertically along the Y axis and returns the skew amount applied (based on the character's size) + /// + /// Character index + /// skew amount + /// If TRUE skews the right side of the character, otherwise the left one + /// If TRUE applies exactly the given , + /// otherwise modifies it based on the aspectRation of the character + public float SkewCharY(int charIndex, float skewFactor, bool skewRight = true, bool fixedSkew = false) + { + if (!ValidateChar(charIndex)) return 0; + float skew = fixedSkew ? skewFactor : skewFactor * textInfo.characterInfo[charIndex].aspectRatio; + Vector3 skewV = new Vector3(0, skew, 0); + CharTransform c = _charTransforms[charIndex]; + if (skewRight) c.ShiftVertices(target, Vector3.zero, skewV, Vector3.zero, skewV); + else c.ShiftVertices(target, skewV, Vector3.zero, skewV, Vector3.zero); + _charTransforms[charIndex] = c; + return skew; + } + + /// + /// Resets the eventual vertices shift applied to the given character via . + /// Will do nothing if the is invalid or the character isn't visible + /// + /// Character index + public void ResetVerticesShift(int charIndex) + { + if (!ValidateChar(charIndex)) return; + CharTransform c = _charTransforms[charIndex]; + c.ResetVerticesShift(target); + _charTransforms[charIndex] = c; + } + + #endregion + + #region Char Tweens + + /// Tweens a character's alpha to the given value and returns the . + /// Will return NULL if the is invalid or the character isn't visible. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The end value to reachThe duration of the tween + public TweenerCore DOFadeChar(int charIndex, float endValue, float duration) + { + if (!ValidateChar(charIndex)) return null; + TweenerCore t = DOTween.ToAlpha(() => _charTransforms[charIndex].GetColor(textInfo.meshInfo), x => { + _charTransforms[charIndex].UpdateAlpha(target, x, textInfo.meshInfo); + }, endValue, duration); + return t; + } + + /// Tweens a character's color to the given value and returns the . + /// Will return NULL if the is invalid or the character isn't visible. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The end value to reachThe duration of the tween + public TweenerCore DOColorChar(int charIndex, Color endValue, float duration) + { + if (!ValidateChar(charIndex)) return null; + TweenerCore t = DOTween.To(() => _charTransforms[charIndex].GetColor(textInfo.meshInfo), x => { + _charTransforms[charIndex].UpdateColor(target, x, textInfo.meshInfo); + }, endValue, duration); + return t; + } + + /// Tweens a character's offset to the given value and returns the . + /// Will return NULL if the is invalid or the character isn't visible. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The end value to reachThe duration of the tween + public TweenerCore DOOffsetChar(int charIndex, Vector3 endValue, float duration) + { + if (!ValidateChar(charIndex)) return null; + TweenerCore t = DOTween.To(() => _charTransforms[charIndex].offset, x => { + CharTransform charT = _charTransforms[charIndex]; + charT.UpdateGeometry(target, x, charT.rotation, charT.scale, _cachedMeshInfos); + _charTransforms[charIndex] = charT; + }, endValue, duration); + return t; + } + + /// Tweens a character's rotation to the given value and returns the . + /// Will return NULL if the is invalid or the character isn't visible. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The end value to reachThe duration of the tween + /// Rotation mode + public TweenerCore DORotateChar(int charIndex, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast) + { + if (!ValidateChar(charIndex)) return null; + TweenerCore t = DOTween.To(() => _charTransforms[charIndex].rotation, x => { + CharTransform charT = _charTransforms[charIndex]; + charT.UpdateGeometry(target, charT.offset, x, charT.scale, _cachedMeshInfos); + _charTransforms[charIndex] = charT; + }, endValue, duration); + t.plugOptions.rotateMode = mode; + return t; + } + + /// Tweens a character's scale to the given value and returns the . + /// Will return NULL if the is invalid or the character isn't visible. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The end value to reachThe duration of the tween + public TweenerCore DOScaleChar(int charIndex, float endValue, float duration) + { + return DOScaleChar(charIndex, new Vector3(endValue, endValue, endValue), duration); + } + /// Tweens a character's color to the given value and returns the . + /// Will return NULL if the is invalid or the character isn't visible. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The end value to reachThe duration of the tween + public TweenerCore DOScaleChar(int charIndex, Vector3 endValue, float duration) + { + if (!ValidateChar(charIndex)) return null; + TweenerCore t = DOTween.To(() => _charTransforms[charIndex].scale, x => { + CharTransform charT = _charTransforms[charIndex]; + charT.UpdateGeometry(target, charT.offset, charT.rotation, x, _cachedMeshInfos); + _charTransforms[charIndex] = charT; + }, endValue, duration); + return t; + } + + /// Punches a character's offset towards the given direction and then back to the starting one + /// as if it was connected to the starting position via an elastic. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The punch strength + /// The duration of the tween + /// Indicates how much will the punch vibrate per second + /// Represents how much (0 to 1) the vector will go beyond the starting size when bouncing backwards. + /// 1 creates a full oscillation between the punch offset and the opposite offset, + /// while 0 oscillates only between the punch offset and the start offset + public Tweener DOPunchCharOffset(int charIndex, Vector3 punch, float duration, int vibrato = 10, float elasticity = 1) + { + if (!ValidateChar(charIndex)) return null; + if (duration <= 0) { + if (Debugger.logPriority > 0) Debug.LogWarning("Duration can't be 0, returning NULL without creating a tween"); + return null; + } + return DOTween.Punch(() => _charTransforms[charIndex].offset, x => { + CharTransform charT = _charTransforms[charIndex]; + charT.UpdateGeometry(target, x, charT.rotation, charT.scale, _cachedMeshInfos); + _charTransforms[charIndex] = charT; + }, punch, duration, vibrato, elasticity); + } + + /// Punches a character's rotation towards the given direction and then back to the starting one + /// as if it was connected to the starting position via an elastic. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The punch strength + /// The duration of the tween + /// Indicates how much will the punch vibrate per second + /// Represents how much (0 to 1) the vector will go beyond the starting size when bouncing backwards. + /// 1 creates a full oscillation between the punch rotation and the opposite rotation, + /// while 0 oscillates only between the punch rotation and the start rotation + public Tweener DOPunchCharRotation(int charIndex, Vector3 punch, float duration, int vibrato = 10, float elasticity = 1) + { + if (!ValidateChar(charIndex)) return null; + if (duration <= 0) { + if (Debugger.logPriority > 0) Debug.LogWarning("Duration can't be 0, returning NULL without creating a tween"); + return null; + } + return DOTween.Punch(() => _charTransforms[charIndex].rotation.eulerAngles, x => { + CharTransform charT = _charTransforms[charIndex]; + charT.UpdateGeometry(target, charT.offset, Quaternion.Euler(x), charT.scale, _cachedMeshInfos); + _charTransforms[charIndex] = charT; + }, punch, duration, vibrato, elasticity); + } + + /// Punches a character's scale towards the given direction and then back to the starting one + /// as if it was connected to the starting position via an elastic. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The punch strength (added to the character's current scale) + /// The duration of the tween + /// Indicates how much will the punch vibrate per second + /// Represents how much (0 to 1) the vector will go beyond the starting size when bouncing backwards. + /// 1 creates a full oscillation between the punch scale and the opposite scale, + /// while 0 oscillates only between the punch scale and the start scale + public Tweener DOPunchCharScale(int charIndex, float punch, float duration, int vibrato = 10, float elasticity = 1) + { + return DOPunchCharScale(charIndex, new Vector3(punch, punch, punch), duration, vibrato, elasticity); + } + /// Punches a character's scale towards the given direction and then back to the starting one + /// as if it was connected to the starting position via an elastic. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The punch strength (added to the character's current scale) + /// The duration of the tween + /// Indicates how much will the punch vibrate per second + /// Represents how much (0 to 1) the vector will go beyond the starting size when bouncing backwards. + /// 1 creates a full oscillation between the punch scale and the opposite scale, + /// while 0 oscillates only between the punch scale and the start scale + public Tweener DOPunchCharScale(int charIndex, Vector3 punch, float duration, int vibrato = 10, float elasticity = 1) + { + if (!ValidateChar(charIndex)) return null; + if (duration <= 0) { + if (Debugger.logPriority > 0) Debug.LogWarning("Duration can't be 0, returning NULL without creating a tween"); + return null; + } + return DOTween.Punch(() => _charTransforms[charIndex].scale, x => { + CharTransform charT = _charTransforms[charIndex]; + charT.UpdateGeometry(target, charT.offset, charT.rotation, x, _cachedMeshInfos); + _charTransforms[charIndex] = charT; + }, punch, duration, vibrato, elasticity); + } + + /// Shakes a character's offset with the given values. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The duration of the tween + /// The shake strength + /// Indicates how much will the shake vibrate + /// Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + /// Setting it to 0 will shake along a single direction. + /// If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + public Tweener DOShakeCharOffset(int charIndex, float duration, float strength, int vibrato = 10, float randomness = 90, bool fadeOut = true) + { + return DOShakeCharOffset(charIndex, duration, new Vector3(strength, strength, strength), vibrato, randomness, fadeOut); + } + /// Shakes a character's offset with the given values. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The duration of the tween + /// The shake strength + /// Indicates how much will the shake vibrate + /// Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + /// Setting it to 0 will shake along a single direction. + /// If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + public Tweener DOShakeCharOffset(int charIndex, float duration, Vector3 strength, int vibrato = 10, float randomness = 90, bool fadeOut = true) + { + if (!ValidateChar(charIndex)) return null; + if (duration <= 0) { + if (Debugger.logPriority > 0) Debug.LogWarning("Duration can't be 0, returning NULL without creating a tween"); + return null; + } + return DOTween.Shake(() => _charTransforms[charIndex].offset, x => { + CharTransform charT = _charTransforms[charIndex]; + charT.UpdateGeometry(target, x, charT.rotation, charT.scale, _cachedMeshInfos); + _charTransforms[charIndex] = charT; + }, duration, strength, vibrato, randomness, fadeOut); + } + + /// Shakes a character's rotation with the given values. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The duration of the tween + /// The shake strength + /// Indicates how much will the shake vibrate + /// Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + /// Setting it to 0 will shake along a single direction. + /// If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + public Tweener DOShakeCharRotation(int charIndex, float duration, Vector3 strength, int vibrato = 10, float randomness = 90, bool fadeOut = true) + { + if (!ValidateChar(charIndex)) return null; + if (duration <= 0) { + if (Debugger.logPriority > 0) Debug.LogWarning("Duration can't be 0, returning NULL without creating a tween"); + return null; + } + return DOTween.Shake(() => _charTransforms[charIndex].rotation.eulerAngles, x => { + CharTransform charT = _charTransforms[charIndex]; + charT.UpdateGeometry(target, charT.offset, Quaternion.Euler(x), charT.scale, _cachedMeshInfos); + _charTransforms[charIndex] = charT; + }, duration, strength, vibrato, randomness, fadeOut); + } + + /// Shakes a character's scale with the given values. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The duration of the tween + /// The shake strength + /// Indicates how much will the shake vibrate + /// Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + /// Setting it to 0 will shake along a single direction. + /// If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + public Tweener DOShakeCharScale(int charIndex, float duration, float strength, int vibrato = 10, float randomness = 90, bool fadeOut = true) + { + return DOShakeCharScale(charIndex, duration, new Vector3(strength, strength, strength), vibrato, randomness, fadeOut); + } + /// Shakes a character's scale with the given values. + /// The index of the character to tween (will throw an error if it doesn't exist) + /// The duration of the tween + /// The shake strength + /// Indicates how much will the shake vibrate + /// Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + /// Setting it to 0 will shake along a single direction. + /// If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not + public Tweener DOShakeCharScale(int charIndex, float duration, Vector3 strength, int vibrato = 10, float randomness = 90, bool fadeOut = true) + { + if (!ValidateChar(charIndex)) return null; + if (duration <= 0) { + if (Debugger.logPriority > 0) Debug.LogWarning("Duration can't be 0, returning NULL without creating a tween"); + return null; + } + return DOTween.Shake(() => _charTransforms[charIndex].scale, x => { + CharTransform charT = _charTransforms[charIndex]; + charT.UpdateGeometry(target, charT.offset, charT.rotation, x, _cachedMeshInfos); + _charTransforms[charIndex] = charT; + }, duration, strength, vibrato, randomness, fadeOut); + } + + #endregion + + // ███ INTERNAL CLASSES ████████████████████████████████████████████████████████████████████████████████████████████████ + + struct CharVertices + { + public Vector3 bottomLeft, topLeft, topRight, bottomRight; + + public CharVertices(Vector3 bottomLeft, Vector3 topLeft, Vector3 topRight, Vector3 bottomRight) + { + this.bottomLeft = bottomLeft; + this.topLeft = topLeft; + this.topRight = topRight; + this.bottomRight = bottomRight; + } + } + + // █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ + + // Vertices of each character are: + // 0 : bottom left, 1 : top left, 2 : top right, 3 : bottom right + struct CharTransform + { + public int charIndex; + public bool isVisible { get; private set; } // FALSE both if it's invisible or if it's a space + public Vector3 offset; + public Quaternion rotation; + public Vector3 scale; + Vector3 _topLeftShift, _topRightShift, _bottomLeftShift, _bottomRightShift; + Vector3 _charMidBaselineOffset; + int _matIndex, _firstVertexIndex; + TMP_MeshInfo _meshInfo; + + public CharTransform(int charIndex, TMP_TextInfo textInfo, TMP_MeshInfo[] cachedMeshInfos) : this() + { + this.charIndex = charIndex; + offset = Vector3.zero; + rotation = Quaternion.identity; + scale = Vector3.one; + Refresh(textInfo, cachedMeshInfos); + } + + public void Refresh(TMP_TextInfo textInfo, TMP_MeshInfo[] cachedMeshInfos) + { + TMP_CharacterInfo charInfo = textInfo.characterInfo[charIndex]; + bool isSpaceChar = charInfo.character == ' '; + isVisible = charInfo.isVisible && !isSpaceChar; + _matIndex = charInfo.materialReferenceIndex; + _firstVertexIndex = charInfo.vertexIndex; + _meshInfo = textInfo.meshInfo[_matIndex]; + Vector3[] cachedVertices = cachedMeshInfos[_matIndex].vertices; + _charMidBaselineOffset = isSpaceChar + ? Vector3.zero + : (cachedVertices[_firstVertexIndex] + cachedVertices[_firstVertexIndex + 2]) * 0.5f; + } + + public void ResetAll(TMP_Text target, TMP_MeshInfo[] meshInfos, TMP_MeshInfo[] cachedMeshInfos) + { + ResetGeometry(target, cachedMeshInfos); + ResetColors(target, meshInfos); + } + + public void ResetTransformationData() + { + offset = Vector3.zero; + rotation = Quaternion.identity; + scale = Vector3.one; + _topLeftShift = _topRightShift = _bottomLeftShift = _bottomRightShift = Vector3.zero; + } + + public void ResetGeometry(TMP_Text target, TMP_MeshInfo[] cachedMeshInfos) + { + ResetTransformationData(); + Vector3[] destinationVertices = _meshInfo.vertices; + Vector3[] cachedVertices = cachedMeshInfos[_matIndex].vertices; + destinationVertices[_firstVertexIndex + 0] = cachedVertices[_firstVertexIndex + 0]; + destinationVertices[_firstVertexIndex + 1] = cachedVertices[_firstVertexIndex + 1]; + destinationVertices[_firstVertexIndex + 2] = cachedVertices[_firstVertexIndex + 2]; + destinationVertices[_firstVertexIndex + 3] = cachedVertices[_firstVertexIndex + 3]; + _meshInfo.mesh.vertices = _meshInfo.vertices; + target.UpdateGeometry(_meshInfo.mesh, _matIndex); + } + + public void ResetColors(TMP_Text target, TMP_MeshInfo[] meshInfos) + { + Color color = target.color; + Color32[] vertexCols = meshInfos[_matIndex].colors32; + vertexCols[_firstVertexIndex] = color; + vertexCols[_firstVertexIndex + 1] = color; + vertexCols[_firstVertexIndex + 2] = color; + vertexCols[_firstVertexIndex + 3] = color; + target.UpdateVertexData(TMP_VertexDataUpdateFlags.Colors32); + } + + public Color32 GetColor(TMP_MeshInfo[] meshInfos) + { + return meshInfos[_matIndex].colors32[_firstVertexIndex]; + } + + public CharVertices GetVertices() + { + return new CharVertices( + _meshInfo.vertices[_firstVertexIndex], _meshInfo.vertices[_firstVertexIndex + 1], + _meshInfo.vertices[_firstVertexIndex + 2], _meshInfo.vertices[_firstVertexIndex + 3] + ); + } + + public void UpdateAlpha(TMP_Text target, Color alphaColor, TMP_MeshInfo[] meshInfos, bool apply = true) + { + byte alphaByte = (byte)(alphaColor.a * 255); + Color32[] vertexCols = meshInfos[_matIndex].colors32; + vertexCols[_firstVertexIndex].a = alphaByte; + vertexCols[_firstVertexIndex + 1].a = alphaByte; + vertexCols[_firstVertexIndex + 2].a = alphaByte; + vertexCols[_firstVertexIndex + 3].a = alphaByte; + if (apply) target.UpdateVertexData(TMP_VertexDataUpdateFlags.Colors32); + } + + public void UpdateColor(TMP_Text target, Color32 color, TMP_MeshInfo[] meshInfos, bool apply = true) + { + Color32[] vertexCols = meshInfos[_matIndex].colors32; + vertexCols[_firstVertexIndex] = color; + vertexCols[_firstVertexIndex + 1] = color; + vertexCols[_firstVertexIndex + 2] = color; + vertexCols[_firstVertexIndex + 3] = color; + if (apply) target.UpdateVertexData(TMP_VertexDataUpdateFlags.Colors32); + } + + public void UpdateGeometry(TMP_Text target, Vector3 offset, Quaternion rotation, Vector3 scale, TMP_MeshInfo[] cachedMeshInfos, bool apply = true) + { + this.offset = offset; + this.rotation = rotation; + this.scale = scale; + + if (!apply) return; + + Vector3[] destinationVertices = _meshInfo.vertices; + Vector3[] cachedVertices = cachedMeshInfos[_matIndex].vertices; + destinationVertices[_firstVertexIndex] = cachedVertices[_firstVertexIndex + 0] - _charMidBaselineOffset; + destinationVertices[_firstVertexIndex + 1] = cachedVertices[_firstVertexIndex + 1] - _charMidBaselineOffset; + destinationVertices[_firstVertexIndex + 2] = cachedVertices[_firstVertexIndex + 2] - _charMidBaselineOffset; + destinationVertices[_firstVertexIndex + 3] = cachedVertices[_firstVertexIndex + 3] - _charMidBaselineOffset; + Matrix4x4 matrix = Matrix4x4.TRS(this.offset, this.rotation, this.scale); + destinationVertices[_firstVertexIndex] + = matrix.MultiplyPoint3x4(destinationVertices[_firstVertexIndex + 0]) + _charMidBaselineOffset + _bottomLeftShift; + destinationVertices[_firstVertexIndex + 1] + = matrix.MultiplyPoint3x4(destinationVertices[_firstVertexIndex + 1]) + _charMidBaselineOffset + _topLeftShift; + destinationVertices[_firstVertexIndex + 2] + = matrix.MultiplyPoint3x4(destinationVertices[_firstVertexIndex + 2]) + _charMidBaselineOffset + _topRightShift; + destinationVertices[_firstVertexIndex + 3] + = matrix.MultiplyPoint3x4(destinationVertices[_firstVertexIndex + 3]) + _charMidBaselineOffset + _bottomRightShift; + _meshInfo.mesh.vertices = _meshInfo.vertices; + target.UpdateGeometry(_meshInfo.mesh, _matIndex); + } + + public void ShiftVertices(TMP_Text target, Vector3 topLeftShift, Vector3 topRightShift, Vector3 bottomLeftShift, Vector3 bottomRightShift) + { + _topLeftShift += topLeftShift; + _topRightShift += topRightShift; + _bottomLeftShift += bottomLeftShift; + _bottomRightShift += bottomRightShift; + Vector3[] destinationVertices = _meshInfo.vertices; + destinationVertices[_firstVertexIndex] = destinationVertices[_firstVertexIndex] + _bottomLeftShift; + destinationVertices[_firstVertexIndex + 1] = destinationVertices[_firstVertexIndex + 1] + _topLeftShift; + destinationVertices[_firstVertexIndex + 2] = destinationVertices[_firstVertexIndex + 2] + _topRightShift; + destinationVertices[_firstVertexIndex + 3] = destinationVertices[_firstVertexIndex + 3] + _bottomRightShift; + _meshInfo.mesh.vertices = _meshInfo.vertices; + target.UpdateGeometry(_meshInfo.mesh, _matIndex); + } + + public void ResetVerticesShift(TMP_Text target) + { + Vector3[] destinationVertices = _meshInfo.vertices; + destinationVertices[_firstVertexIndex] = destinationVertices[_firstVertexIndex] - _bottomLeftShift; + destinationVertices[_firstVertexIndex + 1] = destinationVertices[_firstVertexIndex + 1] - _topLeftShift; + destinationVertices[_firstVertexIndex + 2] = destinationVertices[_firstVertexIndex + 2] - _topRightShift; + destinationVertices[_firstVertexIndex + 3] = destinationVertices[_firstVertexIndex + 3] - _bottomRightShift; + _meshInfo.mesh.vertices = _meshInfo.vertices; + target.UpdateGeometry(_meshInfo.mesh, _matIndex); + _topLeftShift = _topRightShift = _bottomLeftShift = _bottomRightShift = Vector3.zero; + } + } + } + + #endregion +} +#endif diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenTextMeshPro.cs.meta b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenTextMeshPro.cs.meta new file mode 100644 index 0000000..613cdbc --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenTextMeshPro.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8fb0d65aa5b048649a3a785b82b8f8db +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenTk2d.cs b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenTk2d.cs new file mode 100644 index 0000000..0c57bfe --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenTk2d.cs @@ -0,0 +1,247 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2014/10/27 15:59 +// +// License Copyright (c) Daniele Giardini. +// This work is subject to the terms at http://dotween.demigiant.com/license.php + +#if false // MODULE_MARKER +using DG.Tweening.Core; +using DG.Tweening.Plugins.Options; +using UnityEngine; + +namespace DG.Tweening +{ + /// + /// Methods that extend 2D Toolkit objects and allow to directly create and control tweens from their instances. + /// + public static class ShortcutExtensionsTk2d + { + #region Sprite + + /// Tweens a 2D Toolkit Sprite's dimensions to the given value. + /// Also stores the Sprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOScale(this tk2dBaseSprite target, Vector3 endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.scale, x => target.scale = x, endValue, duration); + t.SetTarget(target); + return t; + } + /// Tweens a Sprite's dimensions to the given value. + /// Also stores the Sprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOScaleX(this tk2dBaseSprite target, float endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.scale, x => target.scale = x, new Vector3(endValue, 0, 0), duration); + t.SetOptions(AxisConstraint.X) + .SetTarget(target); + return t; + } + /// Tweens a Sprite's dimensions to the given value. + /// Also stores the Sprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOScaleY(this tk2dBaseSprite target, float endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.scale, x => target.scale = x, new Vector3(0, endValue, 0), duration); + t.SetOptions(AxisConstraint.Y) + .SetTarget(target); + return t; + } + /// Tweens a Sprite's dimensions to the given value. + /// Also stores the Sprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOScaleZ(this tk2dBaseSprite target, float endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.scale, x => target.scale = x, new Vector3(0, 0, endValue), duration); + t.SetOptions(AxisConstraint.Z) + .SetTarget(target); + return t; + } + + /// Tweens a 2D Toolkit Sprite's color to the given value. + /// Also stores the Sprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOColor(this tk2dBaseSprite target, Color endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.color, x => target.color = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a 2D Toolkit Sprite's alpha color to the given value. + /// Also stores the Sprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOFade(this tk2dBaseSprite target, float endValue, float duration) + { + TweenerCore t = DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a 2D Toolkit Sprite's color using the given gradient + /// (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). + /// Also stores the image as the tween's target so it can be used for filtered operations + /// The gradient to useThe duration of the tween + public static Sequence DOGradientColor(this tk2dBaseSprite target, Gradient gradient, float duration) + { + Sequence s = DOTween.Sequence(); + GradientColorKey[] colors = gradient.colorKeys; + int len = colors.Length; + for (int i = 0; i < len; ++i) { + GradientColorKey c = colors[i]; + if (i == 0 && c.time <= 0) { + target.color = c.color; + continue; + } + float colorDuration = i == len - 1 + ? duration - s.Duration(false) // Verifies that total duration is correct + : duration * (i == 0 ? c.time : c.time - colors[i - 1].time); + s.Append(target.DOColor(c.color, colorDuration).SetEase(Ease.Linear)); + } + s.SetTarget(target); + return s; + } + + #endregion + + #region tk2dSlicedSprite + + /// Tweens a 2D Toolkit SlicedSprite's dimensions to the given value. + /// Also stores the SlicedSprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOScaleDimensions(this tk2dSlicedSprite target, Vector2 endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.dimensions, x => target.dimensions = x, endValue, duration); + t.SetTarget(target); + return t; + } + /// Tweens a SlicedSprite's dimensions to the given value. + /// Also stores the SlicedSprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOScaleDimensionsX(this tk2dSlicedSprite target, float endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.dimensions, x => target.dimensions = x, new Vector2(endValue, 0), duration); + t.SetOptions(AxisConstraint.X) + .SetTarget(target); + return t; + } + /// Tweens a SlicedSprite's dimensions to the given value. + /// Also stores the SlicedSprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOScaleDimensionsY(this tk2dSlicedSprite target, float endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.dimensions, x => target.dimensions = x, new Vector2(0, endValue), duration); + t.SetOptions(AxisConstraint.Y) + .SetTarget(target); + return t; + } + + #endregion + + #region TextMesh + + /// Tweens a 2D Toolkit TextMesh's dimensions to the given value. + /// Also stores the TextMesh as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOScale(this tk2dTextMesh target, Vector3 endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.scale, x => target.scale = x, endValue, duration); + t.SetTarget(target); + return t; + } + /// Tweens a 2D Toolkit TextMesh's dimensions to the given value. + /// Also stores the TextMesh as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOScaleX(this tk2dTextMesh target, float endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.scale, x => target.scale = x, new Vector3(endValue, 0, 0), duration); + t.SetOptions(AxisConstraint.X) + .SetTarget(target); + return t; + } + /// Tweens a 2D Toolkit TextMesh's dimensions to the given value. + /// Also stores the TextMesh as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOScaleY(this tk2dTextMesh target, float endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.scale, x => target.scale = x, new Vector3(0, endValue, 0), duration); + t.SetOptions(AxisConstraint.Y) + .SetTarget(target); + return t; + } + /// Tweens a 2D Toolkit TextMesh's dimensions to the given value. + /// Also stores the TextMesh as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOScaleZ(this tk2dTextMesh target, float endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.scale, x => target.scale = x, new Vector3(0, 0, endValue), duration); + t.SetOptions(AxisConstraint.Z) + .SetTarget(target); + return t; + } + + /// Tweens a 2D Toolkit TextMesh's color to the given value. + /// Also stores the TextMesh as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOColor(this tk2dTextMesh target, Color endValue, float duration) + { + TweenerCore t = DOTween.To(() => target.color, x => target.color = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a 2D Toolkit TextMesh's alpha color to the given value. + /// Also stores the TextMesh as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static TweenerCore DOFade(this tk2dTextMesh target, float endValue, float duration) + { + TweenerCore t = DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration); + t.SetTarget(target); + return t; + } + + /// Tweens a 2D Toolkit TextMesh's color using the given gradient + /// (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). + /// Also stores the image as the tween's target so it can be used for filtered operations + /// The gradient to useThe duration of the tween + public static Sequence DOGradientColor(this tk2dTextMesh target, Gradient gradient, float duration) + { + Sequence s = DOTween.Sequence(); + GradientColorKey[] colors = gradient.colorKeys; + int len = colors.Length; + for (int i = 0; i < len; ++i) { + GradientColorKey c = colors[i]; + if (i == 0 && c.time <= 0) { + target.color = c.color; + continue; + } + float colorDuration = i == len - 1 + ? duration - s.Duration(false) // Verifies that total duration is correct + : duration * (i == 0 ? c.time : c.time - colors[i - 1].time); + s.Append(target.DOColor(c.color, colorDuration).SetEase(Ease.Linear)); + } + s.SetTarget(target); + return s; + } + + /// Tweens a tk2dTextMesh's text to the given value. + /// Also stores the tk2dTextMesh as the tween's target so it can be used for filtered operations + /// The end string to tween toThe duration of the tween + /// If TRUE (default), rich text will be interpreted correctly while animated, + /// otherwise all tags will be considered as normal text + /// The type of scramble mode to use, if any + /// A string containing the characters to use for scrambling. + /// Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. + /// Leave it to NULL (default) to use default ones + public static TweenerCore DOText(this tk2dTextMesh target, string endValue, float duration, bool richTextEnabled = true, ScrambleMode scrambleMode = ScrambleMode.None, string scrambleChars = null) + { + TweenerCore t = DOTween.To(() => target.text, x => target.text = x, endValue, duration); + t.SetOptions(richTextEnabled, scrambleMode, scrambleChars) + .SetTarget(target); + return t; + } + + #endregion + } +} +#endif diff --git a/Assets/Plugins/Demigiant/DOTweenPro/DOTweenTk2d.cs.meta b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenTk2d.cs.meta new file mode 100644 index 0000000..c909f96 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/DOTweenTk2d.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b590cd7c24ffa5d4faa5b6fa993cccad +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/Demigiant/DOTweenPro/Editor.meta b/Assets/Plugins/Demigiant/DOTweenPro/Editor.meta new file mode 100644 index 0000000..e9164f7 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/Editor.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 34ca5bde92f87fa4dbeb9593d201fde2 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenAnimationInspector.cs b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenAnimationInspector.cs new file mode 100644 index 0000000..0ac6e9a --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenAnimationInspector.cs @@ -0,0 +1,764 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2015/03/12 16:03 + +using System; +using System.Collections.Generic; +using System.IO; +using DG.DemiEditor; +using DG.DOTweenEditor.Core; +using DG.DOTweenEditor.UI; +using DG.Tweening; +using DG.Tweening.Core; +using UnityEditor; +using UnityEngine; +using DOTweenSettings = DG.Tweening.Core.DOTweenSettings; +#if true // UI_MARKER +using UnityEngine.UI; +#endif +#if true // TEXTMESHPRO_MARKER + using TMPro; +#endif + +namespace DG.DOTweenEditor +{ + [CustomEditor(typeof(DOTweenAnimation))] + public class DOTweenAnimationInspector : ABSAnimationInspector + { + enum FadeTargetType + { + CanvasGroup, + Image + } + + enum ChooseTargetMode + { + None, + BetweenCanvasGroupAndImage + } + + static readonly Dictionary _AnimationTypeToComponent = new Dictionary() { + { DOTweenAnimation.AnimationType.Move, new[] { +#if true // PHYSICS_MARKER + typeof(Rigidbody), +#endif +#if true // PHYSICS2D_MARKER + typeof(Rigidbody2D), +#endif +#if true // UI_MARKER + typeof(RectTransform), +#endif + typeof(Transform) + }}, + { DOTweenAnimation.AnimationType.Rotate, new[] { +#if true // PHYSICS_MARKER + typeof(Rigidbody), +#endif +#if true // PHYSICS2D_MARKER + typeof(Rigidbody2D), +#endif + typeof(Transform) + }}, + { DOTweenAnimation.AnimationType.LocalMove, new[] { typeof(Transform) } }, + { DOTweenAnimation.AnimationType.LocalRotate, new[] { typeof(Transform) } }, + { DOTweenAnimation.AnimationType.Scale, new[] { typeof(Transform) } }, + { DOTweenAnimation.AnimationType.Color, new[] { + typeof(Light), +#if true // SPRITE_MARKER + typeof(SpriteRenderer), +#endif +#if true // UI_MARKER + typeof(Image), typeof(Text), typeof(RawImage), typeof(Graphic), +#endif + typeof(Renderer), + }}, + { DOTweenAnimation.AnimationType.Fade, new[] { + typeof(Light), +#if true // SPRITE_MARKER + typeof(SpriteRenderer), +#endif +#if true // UI_MARKER + typeof(Image), typeof(Text), typeof(CanvasGroup), typeof(RawImage), typeof(Graphic), +#endif + typeof(Renderer), + }}, +#if true // UI_MARKER + { DOTweenAnimation.AnimationType.Text, new[] { typeof(Text) } }, +#endif + { DOTweenAnimation.AnimationType.PunchPosition, new[] { +#if true // UI_MARKER + typeof(RectTransform), +#endif + typeof(Transform) + }}, + { DOTweenAnimation.AnimationType.PunchRotation, new[] { typeof(Transform) } }, + { DOTweenAnimation.AnimationType.PunchScale, new[] { typeof(Transform) } }, + { DOTweenAnimation.AnimationType.ShakePosition, new[] { +#if true // UI_MARKER + typeof(RectTransform), +#endif + typeof(Transform) + }}, + { DOTweenAnimation.AnimationType.ShakeRotation, new[] { typeof(Transform) } }, + { DOTweenAnimation.AnimationType.ShakeScale, new[] { typeof(Transform) } }, + { DOTweenAnimation.AnimationType.CameraAspect, new[] { typeof(Camera) } }, + { DOTweenAnimation.AnimationType.CameraBackgroundColor, new[] { typeof(Camera) } }, + { DOTweenAnimation.AnimationType.CameraFieldOfView, new[] { typeof(Camera) } }, + { DOTweenAnimation.AnimationType.CameraOrthoSize, new[] { typeof(Camera) } }, + { DOTweenAnimation.AnimationType.CameraPixelRect, new[] { typeof(Camera) } }, + { DOTweenAnimation.AnimationType.CameraRect, new[] { typeof(Camera) } }, +#if true // UI_MARKER + { DOTweenAnimation.AnimationType.UIWidthHeight, new[] { typeof(RectTransform) } }, + { DOTweenAnimation.AnimationType.FillAmount, new[] { typeof(Image) } }, +#endif + }; + +#if false // TK2D_MARKER + static readonly Dictionary _Tk2dAnimationTypeToComponent = new Dictionary() { + { DOTweenAnimation.AnimationType.Scale, new[] { typeof(tk2dBaseSprite), typeof(tk2dTextMesh) } }, + { DOTweenAnimation.AnimationType.Color, new[] { typeof(tk2dBaseSprite), typeof(tk2dTextMesh) } }, + { DOTweenAnimation.AnimationType.Fade, new[] { typeof(tk2dBaseSprite), typeof(tk2dTextMesh) } }, + { DOTweenAnimation.AnimationType.Text, new[] { typeof(tk2dTextMesh) } } + }; +#endif +#if true // TEXTMESHPRO_MARKER + static readonly Dictionary _TMPAnimationTypeToComponent = new Dictionary() { + { DOTweenAnimation.AnimationType.Color, new[] { typeof(TextMeshPro), typeof(TextMeshProUGUI) } }, + { DOTweenAnimation.AnimationType.Fade, new[] { typeof(TextMeshPro), typeof(TextMeshProUGUI) } }, + { DOTweenAnimation.AnimationType.Text, new[] { typeof(TextMeshPro), typeof(TextMeshProUGUI) } } + }; +#endif + + static readonly string[] _AnimationType = new[] { + "None", + "Move", "LocalMove", + "Rotate", "LocalRotate", + "Scale", + "Color", "Fade", +#if true // UI_MARKER + "FillAmount", + "Text", +#endif +#if false // TK2D_MARKER + "Text", +#endif +#if true // TEXTMESHPRO_MARKER + "Text", +#endif +#if true // UI_MARKER + "UIWidthHeight", +#endif + "Punch/Position", "Punch/Rotation", "Punch/Scale", + "Shake/Position", "Shake/Rotation", "Shake/Scale", + "Camera/Aspect", "Camera/BackgroundColor", "Camera/FieldOfView", "Camera/OrthoSize", "Camera/PixelRect", "Camera/Rect" + }; + static string[] _animationTypeNoSlashes; // _AnimationType list without slashes in values + static string[] _datString; // String representation of DOTweenAnimation enum (here for caching reasons) + + DOTweenAnimation _src; + DOTweenSettings _settings; + bool _runtimeEditMode; // If TRUE allows to change and save stuff at runtime + bool _refreshRequired; // If TRUE refreshes components data + int _totComponentsOnSrc; // Used to determine if a Component is added or removed from the source + bool _isLightSrc; // Used to determine if we're tweening a Light, to set the max Fade value to more than 1 +#pragma warning disable 414 + ChooseTargetMode _chooseTargetMode = ChooseTargetMode.None; +#pragma warning restore 414 + + static readonly GUIContent _GuiC_selfTarget_true = new GUIContent( + "SELF", "Will animate components on this gameObject" + ); + static readonly GUIContent _GuiC_selfTarget_false = new GUIContent( + "OTHER", "Will animate components on the given gameObject instead than on this one" + ); + static readonly GUIContent _GuiC_tweenTargetIsTargetGO_true = new GUIContent( + "Use As Tween Target", "Will set the tween target (via SetTarget, used to control a tween directly from a target) to the \"OTHER\" gameObject" + ); + static readonly GUIContent _GuiC_tweenTargetIsTargetGO_false = new GUIContent( + "Use As Tween Target", "Will set the tween target (via SetTarget, used to control a tween directly from a target) to the gameObject containing this animation, not the \"OTHER\" one" + ); + + #region MonoBehaviour Methods + + void OnEnable() + { + _src = target as DOTweenAnimation; + _settings = DOTweenUtilityWindow.GetDOTweenSettings(); + + onStartProperty = base.serializedObject.FindProperty("onStart"); + onPlayProperty = base.serializedObject.FindProperty("onPlay"); + onUpdateProperty = base.serializedObject.FindProperty("onUpdate"); + onStepCompleteProperty = base.serializedObject.FindProperty("onStepComplete"); + onCompleteProperty = base.serializedObject.FindProperty("onComplete"); + onRewindProperty = base.serializedObject.FindProperty("onRewind"); + onTweenCreatedProperty = base.serializedObject.FindProperty("onTweenCreated"); + + // Convert _AnimationType to _animationTypeNoSlashes + int len = _AnimationType.Length; + _animationTypeNoSlashes = new string[len]; + for (int i = 0; i < len; ++i) { + string a = _AnimationType[i]; + a = a.Replace("/", ""); + _animationTypeNoSlashes[i] = a; + } + } + + void OnDisable() + { + DOTweenPreviewManager.StopAllPreviews(); + } + + override public void OnInspectorGUI() + { + base.OnInspectorGUI(); + + GUILayout.Space(3); + EditorGUIUtils.SetGUIStyles(); + + bool playMode = Application.isPlaying; + _runtimeEditMode = _runtimeEditMode && playMode; + + GUILayout.BeginHorizontal(); + EditorGUIUtils.InspectorLogo(); + GUILayout.Label(_src.animationType.ToString() + (string.IsNullOrEmpty(_src.id) ? "" : " [" + _src.id + "]"), EditorGUIUtils.sideLogoIconBoldLabelStyle); + // Up-down buttons + GUILayout.FlexibleSpace(); + if (GUILayout.Button("▲", DeGUI.styles.button.toolIco)) UnityEditorInternal.ComponentUtility.MoveComponentUp(_src); + if (GUILayout.Button("▼", DeGUI.styles.button.toolIco)) UnityEditorInternal.ComponentUtility.MoveComponentDown(_src); + GUILayout.EndHorizontal(); + + if (playMode) { + if (_runtimeEditMode) { + + } else { + GUILayout.Space(8); + GUILayout.Label("Animation Editor disabled while in play mode", EditorGUIUtils.wordWrapLabelStyle); + if (!_src.isActive) { + GUILayout.Label("This animation has been toggled as inactive and won't be generated", EditorGUIUtils.wordWrapLabelStyle); + GUI.enabled = false; + } + if (GUILayout.Button(new GUIContent("Activate Edit Mode", "Switches to Runtime Edit Mode, where you can change animations values and restart them"))) { + _runtimeEditMode = true; + } + GUILayout.Label("NOTE: when using DOPlayNext, the sequence is determined by the DOTweenAnimation Components order in the target GameObject's Inspector", EditorGUIUtils.wordWrapLabelStyle); + GUILayout.Space(10); + if (!_runtimeEditMode) return; + } + } + + Undo.RecordObject(_src, "DOTween Animation"); + Undo.RecordObject(_settings, "DOTween Animation"); + +// _src.isValid = Validate(); // Moved down + + EditorGUIUtility.labelWidth = 110; + + if (playMode) { + GUILayout.Space(4); + DeGUILayout.Toolbar("Edit Mode Commands"); + DeGUILayout.BeginVBox(DeGUI.styles.box.stickyTop); + GUILayout.BeginHorizontal(); + if (GUILayout.Button("TogglePause")) _src.tween.TogglePause(); + if (GUILayout.Button("Rewind")) _src.tween.Rewind(); + if (GUILayout.Button("Restart")) _src.tween.Restart(); + GUILayout.EndHorizontal(); + if (GUILayout.Button("Commit changes and restart")) { + _src.tween.Rewind(); + _src.tween.Kill(); + if (_src.isValid) { + _src.CreateTween(); + _src.tween.Play(); + } + } + GUILayout.Label("To apply your changes when exiting Play mode, use the Component's upper right menu and choose \"Copy Component\", then \"Paste Component Values\" after exiting Play mode", DeGUI.styles.label.wordwrap); + DeGUILayout.EndVBox(); + } else { + GUILayout.BeginHorizontal(); + bool hasManager = _src.GetComponent() != null; + EditorGUI.BeginChangeCheck(); + _settings.showPreviewPanel = hasManager + ? DeGUILayout.ToggleButton(_settings.showPreviewPanel, "Preview Controls", styles.custom.inlineToggle) + : DeGUILayout.ToggleButton(_settings.showPreviewPanel, "Preview Controls", styles.custom.inlineToggle, GUILayout.Width(120)); + if (EditorGUI.EndChangeCheck()) { + EditorUtility.SetDirty(_settings); + DOTweenPreviewManager.StopAllPreviews(); + } + if (!hasManager) { + if (GUILayout.Button(new GUIContent("Add Manager", "Adds a manager component which allows you to choose additional options for this gameObject"))) { + _src.gameObject.AddComponent(); + } + } + GUILayout.EndHorizontal(); + } + + // Preview in editor + bool isPreviewing = _settings.showPreviewPanel ? DOTweenPreviewManager.PreviewGUI(_src) : false; + + EditorGUI.BeginDisabledGroup(isPreviewing); + // Choose target + GUILayout.BeginHorizontal(); + _src.isActive = EditorGUILayout.Toggle(new GUIContent("", "If unchecked, this animation will not be created"), _src.isActive, GUILayout.Width(14)); + EditorGUI.BeginChangeCheck(); + EditorGUI.BeginChangeCheck(); + _src.targetIsSelf = DeGUILayout.ToggleButton( + _src.targetIsSelf, _src.targetIsSelf ? _GuiC_selfTarget_true : _GuiC_selfTarget_false, + new Color(1f, 0.78f, 0f), DeGUI.colors.bg.toggleOn, new Color(0.33f, 0.14f, 0.02f), DeGUI.colors.content.toggleOn, + null, GUILayout.Width(47) + ); + bool innerChanged = EditorGUI.EndChangeCheck(); + if (innerChanged) { + _src.targetGO = null; + GUI.changed = true; + } + if (_src.targetIsSelf) GUILayout.Label(_GuiC_selfTarget_true.tooltip); + else { + using (new DeGUI.ColorScope(null, null, _src.targetGO == null ? Color.red : Color.white)) { + _src.targetGO = (GameObject)EditorGUILayout.ObjectField(_src.targetGO, typeof(GameObject), true); + } + _src.tweenTargetIsTargetGO = DeGUILayout.ToggleButton( + _src.tweenTargetIsTargetGO, _src.tweenTargetIsTargetGO ? _GuiC_tweenTargetIsTargetGO_true : _GuiC_tweenTargetIsTargetGO_false, + GUILayout.Width(131) + ); + } + bool check = EditorGUI.EndChangeCheck(); + if (check) _refreshRequired = true; + GUILayout.EndHorizontal(); + + GameObject targetGO = _src.targetIsSelf ? _src.gameObject : _src.targetGO; + + if (targetGO == null) { + // Uses external target gameObject but it's not set + if (_src.targetGO != null || _src.target != null) { + _src.targetGO = null; + _src.target = null; + GUI.changed = true; + } + } else { + GUILayout.BeginHorizontal(); + DOTweenAnimation.AnimationType prevAnimType = _src.animationType; +// _src.animationType = (DOTweenAnimation.AnimationType)EditorGUILayout.EnumPopup(_src.animationType, EditorGUIUtils.popupButton); + GUI.enabled = GUI.enabled && _src.isActive; + _src.animationType = AnimationToDOTweenAnimationType(_AnimationType[EditorGUILayout.Popup(DOTweenAnimationTypeToPopupId(_src.animationType), _AnimationType)]); + _src.autoGenerate = DeGUILayout.ToggleButton(_src.autoGenerate, new GUIContent("AutoGenerate", "If selected, the tween will be generated at startup (during Start for RectTransform position tween, Awake for all the others)")); + if (_src.autoGenerate) { + _src.autoPlay = DeGUILayout.ToggleButton(_src.autoPlay, new GUIContent("AutoPlay", "If selected, the tween will play automatically")); + } + _src.autoKill = DeGUILayout.ToggleButton(_src.autoKill, new GUIContent("AutoKill", "If selected, the tween will be killed when it completes, and won't be reusable")); + GUILayout.EndHorizontal(); + if (prevAnimType != _src.animationType) { + // Set default optional values based on animation type + _src.endValueTransform = null; + _src.useTargetAsV3 = false; + switch (_src.animationType) { + case DOTweenAnimation.AnimationType.Move: + case DOTweenAnimation.AnimationType.LocalMove: + case DOTweenAnimation.AnimationType.Rotate: + case DOTweenAnimation.AnimationType.LocalRotate: + case DOTweenAnimation.AnimationType.Scale: + _src.endValueV3 = Vector3.zero; + _src.endValueFloat = 0; + _src.optionalBool0 = _src.animationType == DOTweenAnimation.AnimationType.Scale; + break; + case DOTweenAnimation.AnimationType.UIWidthHeight: + _src.endValueV3 = Vector3.zero; + _src.endValueFloat = 0; + _src.optionalBool0 = _src.animationType == DOTweenAnimation.AnimationType.UIWidthHeight; + break; + case DOTweenAnimation.AnimationType.FillAmount: + _src.endValueFloat = 1; + break; + case DOTweenAnimation.AnimationType.Color: + case DOTweenAnimation.AnimationType.Fade: + _isLightSrc = targetGO.GetComponent() != null; + _src.endValueFloat = 0; + break; + case DOTweenAnimation.AnimationType.Text: + _src.optionalBool0 = true; + break; + case DOTweenAnimation.AnimationType.PunchPosition: + case DOTweenAnimation.AnimationType.PunchRotation: + case DOTweenAnimation.AnimationType.PunchScale: + _src.endValueV3 = _src.animationType == DOTweenAnimation.AnimationType.PunchRotation ? new Vector3(0, 180, 0) : Vector3.one; + _src.optionalFloat0 = 1; + _src.optionalInt0 = 10; + _src.optionalBool0 = false; + break; + case DOTweenAnimation.AnimationType.ShakePosition: + case DOTweenAnimation.AnimationType.ShakeRotation: + case DOTweenAnimation.AnimationType.ShakeScale: + _src.endValueV3 = _src.animationType == DOTweenAnimation.AnimationType.ShakeRotation ? new Vector3(90, 90, 90) : Vector3.one; + _src.optionalInt0 = 10; + _src.optionalFloat0 = 90; + _src.optionalBool0 = false; + _src.optionalBool1 = true; + break; + case DOTweenAnimation.AnimationType.CameraAspect: + case DOTweenAnimation.AnimationType.CameraFieldOfView: + case DOTweenAnimation.AnimationType.CameraOrthoSize: + _src.endValueFloat = 0; + break; + case DOTweenAnimation.AnimationType.CameraPixelRect: + case DOTweenAnimation.AnimationType.CameraRect: + _src.endValueRect = new Rect(0, 0, 0, 0); + break; + } + } + if (_src.animationType == DOTweenAnimation.AnimationType.None) { + _src.isValid = false; + if (GUI.changed) EditorUtility.SetDirty(_src); + return; + } + + if (_refreshRequired || prevAnimType != _src.animationType || ComponentsChanged()) { + _refreshRequired = false; + _src.isValid = Validate(targetGO); + // See if we need to choose between multiple targets +#if true // UI_MARKER + if (_src.animationType == DOTweenAnimation.AnimationType.Fade && targetGO.GetComponent() != null && targetGO.GetComponent() != null) { + _chooseTargetMode = ChooseTargetMode.BetweenCanvasGroupAndImage; + // Reassign target and forcedTargetType if lost + if (_src.forcedTargetType == DOTweenAnimation.TargetType.Unset) _src.forcedTargetType = _src.targetType; + switch (_src.forcedTargetType) { + case DOTweenAnimation.TargetType.CanvasGroup: + _src.target = targetGO.GetComponent(); + break; + case DOTweenAnimation.TargetType.Image: + _src.target = targetGO.GetComponent(); + break; + } + } else { +#endif + _chooseTargetMode = ChooseTargetMode.None; + _src.forcedTargetType = DOTweenAnimation.TargetType.Unset; +#if true // UI_MARKER + } +#endif + } + + if (!_src.isValid) { + GUI.color = Color.red; + GUILayout.BeginVertical(GUI.skin.box); + GUILayout.Label("No valid Component was found for the selected animation", EditorGUIUtils.wordWrapLabelStyle); + GUILayout.EndVertical(); + GUI.color = Color.white; + if (GUI.changed) EditorUtility.SetDirty(_src); + return; + } + +#if true // UI_MARKER + // Special cases in which multiple target types could be used (set after validation) + if (_chooseTargetMode == ChooseTargetMode.BetweenCanvasGroupAndImage && _src.forcedTargetType != DOTweenAnimation.TargetType.Unset) { + FadeTargetType fadeTargetType = (FadeTargetType)Enum.Parse(typeof(FadeTargetType), _src.forcedTargetType.ToString()); + DOTweenAnimation.TargetType prevTargetType = _src.forcedTargetType; + _src.forcedTargetType = (DOTweenAnimation.TargetType)Enum.Parse(typeof(DOTweenAnimation.TargetType), EditorGUILayout.EnumPopup(_src.animationType + " Target", fadeTargetType).ToString()); + if (_src.forcedTargetType != prevTargetType) { + // Target type change > assign correct target + switch (_src.forcedTargetType) { + case DOTweenAnimation.TargetType.CanvasGroup: + _src.target = targetGO.GetComponent(); + break; + case DOTweenAnimation.TargetType.Image: + _src.target = targetGO.GetComponent(); + break; + } + } + } +#endif + + GUILayout.BeginHorizontal(); + _src.duration = EditorGUILayout.FloatField("Duration", _src.duration); + if (_src.duration < 0) _src.duration = 0; + _src.isSpeedBased = DeGUILayout.ToggleButton(_src.isSpeedBased, new GUIContent("SpeedBased", "If selected, the duration will count as units/degree x second"), DeGUI.styles.button.tool, GUILayout.Width(75)); + GUILayout.EndHorizontal(); + _src.delay = EditorGUILayout.FloatField("Delay", _src.delay); + if (_src.delay < 0) _src.delay = 0; + _src.isIndependentUpdate = EditorGUILayout.Toggle("Ignore TimeScale", _src.isIndependentUpdate); + _src.easeType = EditorGUIUtils.FilteredEasePopup("Ease", _src.easeType); + if (_src.easeType == Ease.INTERNAL_Custom) { + _src.easeCurve = EditorGUILayout.CurveField(" Ease Curve", _src.easeCurve); + } + _src.loops = EditorGUILayout.IntField(new GUIContent("Loops", "Set to -1 for infinite loops"), _src.loops); + if (_src.loops < -1) _src.loops = -1; + if (_src.loops > 1 || _src.loops == -1) + _src.loopType = (LoopType)EditorGUILayout.EnumPopup(" Loop Type", _src.loopType); + _src.id = EditorGUILayout.TextField("ID", _src.id); + + bool canBeRelative = true; + // End value and eventual specific options + switch (_src.animationType) { + case DOTweenAnimation.AnimationType.Move: + case DOTweenAnimation.AnimationType.LocalMove: + GUIEndValueV3(targetGO, _src.animationType == DOTweenAnimation.AnimationType.Move); + _src.optionalBool0 = EditorGUILayout.Toggle(" Snapping", _src.optionalBool0); + canBeRelative = !_src.useTargetAsV3; + break; + case DOTweenAnimation.AnimationType.Rotate: + case DOTweenAnimation.AnimationType.LocalRotate: + bool isRigidbody2D = DOTweenModuleUtils.Physics.HasRigidbody2D(_src); + if (isRigidbody2D) GUIEndValueFloat(); + else { + GUIEndValueV3(targetGO); + _src.optionalRotationMode = (RotateMode)EditorGUILayout.EnumPopup(" Rotation Mode", _src.optionalRotationMode); + } + break; + case DOTweenAnimation.AnimationType.Scale: + if (_src.optionalBool0) GUIEndValueFloat(); + else GUIEndValueV3(targetGO); + _src.optionalBool0 = EditorGUILayout.Toggle("Uniform Scale", _src.optionalBool0); + break; + case DOTweenAnimation.AnimationType.UIWidthHeight: + if (_src.optionalBool0) GUIEndValueFloat(); + else GUIEndValueV2(); + _src.optionalBool0 = EditorGUILayout.Toggle("Uniform Scale", _src.optionalBool0); + break; + case DOTweenAnimation.AnimationType.FillAmount: + GUIEndValueFloat(); + if (_src.endValueFloat < 0) _src.endValueFloat = 0; + if (_src.endValueFloat > 1) _src.endValueFloat = 1; + canBeRelative = false; + break; + case DOTweenAnimation.AnimationType.Color: + GUIEndValueColor(); + canBeRelative = false; + break; + case DOTweenAnimation.AnimationType.Fade: + GUIEndValueFloat(); + if (_src.endValueFloat < 0) _src.endValueFloat = 0; + if (!_isLightSrc && _src.endValueFloat > 1) _src.endValueFloat = 1; + canBeRelative = false; + break; + case DOTweenAnimation.AnimationType.Text: + GUIEndValueString(); + _src.optionalBool0 = EditorGUILayout.Toggle("Rich Text Enabled", _src.optionalBool0); + _src.optionalScrambleMode = (ScrambleMode)EditorGUILayout.EnumPopup("Scramble Mode", _src.optionalScrambleMode); + _src.optionalString = EditorGUILayout.TextField(new GUIContent("Custom Scramble", "Custom characters to use in case of ScrambleMode.Custom"), _src.optionalString); + break; + case DOTweenAnimation.AnimationType.PunchPosition: + case DOTweenAnimation.AnimationType.PunchRotation: + case DOTweenAnimation.AnimationType.PunchScale: + GUIEndValueV3(targetGO); + canBeRelative = false; + _src.optionalInt0 = EditorGUILayout.IntSlider(new GUIContent(" Vibrato", "How much will the punch vibrate"), _src.optionalInt0, 1, 50); + _src.optionalFloat0 = EditorGUILayout.Slider(new GUIContent(" Elasticity", "How much the vector will go beyond the starting position when bouncing backwards"), _src.optionalFloat0, 0, 1); + if (_src.animationType == DOTweenAnimation.AnimationType.PunchPosition) _src.optionalBool0 = EditorGUILayout.Toggle(" Snapping", _src.optionalBool0); + break; + case DOTweenAnimation.AnimationType.ShakePosition: + case DOTweenAnimation.AnimationType.ShakeRotation: + case DOTweenAnimation.AnimationType.ShakeScale: + GUIEndValueV3(targetGO); + canBeRelative = false; + _src.optionalInt0 = EditorGUILayout.IntSlider(new GUIContent(" Vibrato", "How much will the shake vibrate"), _src.optionalInt0, 1, 50); + using (new GUILayout.HorizontalScope()) { + _src.optionalFloat0 = EditorGUILayout.Slider(new GUIContent(" Randomness", "The shake randomness"), _src.optionalFloat0, 0, 90); + _src.optionalShakeRandomnessMode = (ShakeRandomnessMode)EditorGUILayout.EnumPopup(_src.optionalShakeRandomnessMode, GUILayout.Width(70)); + } + _src.optionalBool1 = EditorGUILayout.Toggle(new GUIContent(" FadeOut", "If selected the shake will fade out, otherwise it will constantly play with full force"), _src.optionalBool1); + if (_src.animationType == DOTweenAnimation.AnimationType.ShakePosition) _src.optionalBool0 = EditorGUILayout.Toggle(" Snapping", _src.optionalBool0); + break; + case DOTweenAnimation.AnimationType.CameraAspect: + case DOTweenAnimation.AnimationType.CameraFieldOfView: + case DOTweenAnimation.AnimationType.CameraOrthoSize: + GUIEndValueFloat(); + canBeRelative = false; + break; + case DOTweenAnimation.AnimationType.CameraBackgroundColor: + GUIEndValueColor(); + canBeRelative = false; + break; + case DOTweenAnimation.AnimationType.CameraPixelRect: + case DOTweenAnimation.AnimationType.CameraRect: + GUIEndValueRect(); + canBeRelative = false; + break; + } + + // Final settings + if (canBeRelative) _src.isRelative = EditorGUILayout.Toggle(" Relative", _src.isRelative); + + // Events + AnimationInspectorGUI.AnimationEvents(this, _src); + } + EditorGUI.EndDisabledGroup(); + + if (GUI.changed) EditorUtility.SetDirty(_src); + } + + #endregion + + #region Methods + + // Returns TRUE if the Component layout on the src gameObject changed (a Component was added or removed) + bool ComponentsChanged() + { + int prevTotComponentsOnSrc = _totComponentsOnSrc; + _totComponentsOnSrc = _src.gameObject.GetComponents().Length; + return prevTotComponentsOnSrc != _totComponentsOnSrc; + } + + // Checks if a Component that can be animated with the given animationType is attached to the src + bool Validate(GameObject targetGO) + { + if (_src.animationType == DOTweenAnimation.AnimationType.None) return false; + + Component srcTarget; + // First check for external plugins +#if false // TK2D_MARKER + if (_Tk2dAnimationTypeToComponent.ContainsKey(_src.animationType)) { + foreach (Type t in _Tk2dAnimationTypeToComponent[_src.animationType]) { + srcTarget = targetGO.GetComponent(t); + if (srcTarget != null) { + _src.target = srcTarget; + _src.targetType = DOTweenAnimation.TypeToDOTargetType(t); + return true; + } + } + } +#endif +#if true // TEXTMESHPRO_MARKER + if (_TMPAnimationTypeToComponent.ContainsKey(_src.animationType)) { + foreach (Type t in _TMPAnimationTypeToComponent[_src.animationType]) { + srcTarget = targetGO.GetComponent(t); + if (srcTarget != null) { + _src.target = srcTarget; + _src.targetType = DOTweenAnimation.TypeToDOTargetType(t); + return true; + } + } + } +#endif + // Then check for regular stuff + if (_AnimationTypeToComponent.ContainsKey(_src.animationType)) { + foreach (Type t in _AnimationTypeToComponent[_src.animationType]) { + srcTarget = targetGO.GetComponent(t); + if (srcTarget != null) { + _src.target = srcTarget; + _src.targetType = DOTweenAnimation.TypeToDOTargetType(t); + return true; + } + } + } + return false; + } + + DOTweenAnimation.AnimationType AnimationToDOTweenAnimationType(string animation) + { + if (_datString == null) _datString = Enum.GetNames(typeof(DOTweenAnimation.AnimationType)); + animation = animation.Replace("/", ""); + return (DOTweenAnimation.AnimationType)(Array.IndexOf(_datString, animation)); + } + int DOTweenAnimationTypeToPopupId(DOTweenAnimation.AnimationType animation) + { + return Array.IndexOf(_animationTypeNoSlashes, animation.ToString()); + } + + #endregion + + #region GUI Draw Methods + + void GUIEndValueFloat() + { + GUILayout.BeginHorizontal(); + GUIToFromButton(); + _src.endValueFloat = EditorGUILayout.FloatField(_src.endValueFloat); + GUILayout.EndHorizontal(); + } + + void GUIEndValueColor() + { + GUILayout.BeginHorizontal(); + GUIToFromButton(); + _src.endValueColor = EditorGUILayout.ColorField(_src.endValueColor); + GUILayout.EndHorizontal(); + } + + void GUIEndValueV3(GameObject targetGO, bool optionalTransform = false) + { + GUILayout.BeginHorizontal(); + GUIToFromButton(); + if (_src.useTargetAsV3) { + Transform prevT = _src.endValueTransform; + _src.endValueTransform = EditorGUILayout.ObjectField(_src.endValueTransform, typeof(Transform), true) as Transform; + if (_src.endValueTransform != prevT && _src.endValueTransform != null) { +#if true // UI_MARKER + // Check that it's a Transform for a Transform or a RectTransform for a RectTransform + if (targetGO.GetComponent() != null) { + if (_src.endValueTransform.GetComponent() == null) { + EditorUtility.DisplayDialog("DOTween Pro", "For Unity UI elements, the target must also be a UI element", "Ok"); + _src.endValueTransform = null; + } + } else if (_src.endValueTransform.GetComponent() != null) { + EditorUtility.DisplayDialog("DOTween Pro", "You can't use a UI target for a non UI object", "Ok"); + _src.endValueTransform = null; + } +#endif + } + } else { + _src.endValueV3 = EditorGUILayout.Vector3Field("", _src.endValueV3, GUILayout.Height(16)); + } + if (optionalTransform) { + if (GUILayout.Button(_src.useTargetAsV3 ? "target" : "value", EditorGUIUtils.sideBtStyle, GUILayout.Width(44))) _src.useTargetAsV3 = !_src.useTargetAsV3; + } + GUILayout.EndHorizontal(); +#if true // UI_MARKER + if (_src.useTargetAsV3 && _src.endValueTransform != null && _src.target is RectTransform) { + EditorGUILayout.HelpBox("NOTE: when using a UI target, the tween will be created during Start instead of Awake", MessageType.Info); + } +#endif + } + + void GUIEndValueV2() + { + GUILayout.BeginHorizontal(); + GUIToFromButton(); + _src.endValueV2 = EditorGUILayout.Vector2Field("", _src.endValueV2, GUILayout.Height(16)); + GUILayout.EndHorizontal(); + } + + void GUIEndValueString() + { + GUILayout.BeginHorizontal(); + GUIToFromButton(); + _src.endValueString = EditorGUILayout.TextArea(_src.endValueString, EditorGUIUtils.wordWrapTextArea); + GUILayout.EndHorizontal(); + } + + void GUIEndValueRect() + { + GUILayout.BeginHorizontal(); + GUIToFromButton(); + _src.endValueRect = EditorGUILayout.RectField(_src.endValueRect); + GUILayout.EndHorizontal(); + } + + void GUIToFromButton() + { + if (GUILayout.Button(_src.isFrom ? "FROM" : "TO", EditorGUIUtils.sideBtStyle, GUILayout.Width(90))) _src.isFrom = !_src.isFrom; + GUILayout.Space(16); + } + + #endregion + } + + // █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ + // ███ INTERNAL CLASSES ████████████████████████████████████████████████████████████████████████████████████████████████ + // █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ + + [InitializeOnLoad] + static class Initializer + { + static Initializer() + { + DOTweenAnimation.OnReset += OnReset; + } + + static void OnReset(DOTweenAnimation src) + { + DOTweenSettings settings = DOTweenUtilityWindow.GetDOTweenSettings(); + if (settings == null) return; + + Undo.RecordObject(src, "DOTweenAnimation"); + src.autoPlay = settings.defaultAutoPlay == AutoPlay.All || settings.defaultAutoPlay == AutoPlay.AutoPlayTweeners; + src.autoKill = settings.defaultAutoKill; + EditorUtility.SetDirty(src); + } + } +} diff --git a/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenAnimationInspector.cs.meta b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenAnimationInspector.cs.meta new file mode 100644 index 0000000..d2d7eee --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenAnimationInspector.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e0203fd81362bab4d842d87ad09ee76e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenPreviewManager.cs b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenPreviewManager.cs new file mode 100644 index 0000000..73d8a6b --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenPreviewManager.cs @@ -0,0 +1,265 @@ +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2015/03/12 16:03 + +using System; +using System.Collections.Generic; +using DG.DemiEditor; +using DG.DemiLib; +using DG.Tweening; +using DG.Tweening.Core; +using UnityEditor; +using UnityEditorInternal; +using UnityEngine; +using Object = UnityEngine.Object; + +namespace DG.DOTweenEditor +{ + public static class DOTweenPreviewManager + { + static bool _previewOnlyIfSetToAutoPlay = true; + static readonly Dictionary _AnimationToTween = new Dictionary(); + static readonly List _TmpKeys = new List(); + + #region Public Methods & GUI + + /// + /// Returns TRUE if its actually previewing animations + /// + public static bool PreviewGUI(DOTweenAnimation src) + { + if (EditorApplication.isPlaying) return false; + + Styles.Init(); + + bool isPreviewing = _AnimationToTween.Count > 0; + bool isPreviewingThis = isPreviewing && _AnimationToTween.ContainsKey(src); + + // Preview in editor + GUI.backgroundColor = isPreviewing + ? new DeSkinColor(new Color(0.49f, 0.8f, 0.86f), new Color(0.15f, 0.26f, 0.35f)) + : new DeSkinColor(Color.white, new Color(0.13f, 0.13f, 0.13f)); + GUILayout.BeginVertical(Styles.previewBox); + DeGUI.ResetGUIColors(); + GUILayout.BeginHorizontal(); + GUILayout.Label("Preview Mode - Experimental", Styles.previewLabel); + _previewOnlyIfSetToAutoPlay = DeGUILayout.ToggleButton( + _previewOnlyIfSetToAutoPlay, + new GUIContent("AutoPlay only", "If toggled only previews animations that have AutoPlay turned ON"), + Styles.btOption + ); + GUILayout.EndHorizontal(); + GUILayout.Space(1); + // Preview - Play + GUILayout.BeginHorizontal(); + EditorGUI.BeginDisabledGroup( + isPreviewingThis || src.animationType == DOTweenAnimation.AnimationType.None + || !src.isActive || _previewOnlyIfSetToAutoPlay && !src.autoPlay + ); + if (GUILayout.Button("► Play", Styles.btPreview)) { + if (!isPreviewing) StartupGlobalPreview(); + AddAnimationToGlobalPreview(src); + } + EditorGUI.EndDisabledGroup(); + EditorGUI.BeginDisabledGroup(isPreviewing); + if (GUILayout.Button("► Play All on GameObject", Styles.btPreview)) { + if (!isPreviewing) StartupGlobalPreview(); + DOTweenAnimation[] anims = src.gameObject.GetComponents(); + foreach (DOTweenAnimation anim in anims) AddAnimationToGlobalPreview(anim); + } + if (GUILayout.Button("► Play All in Scene", Styles.btPreview)) { + if (!isPreviewing) StartupGlobalPreview(); + // DOTweenAnimation[] anims = Object.FindObjectsOfType(); // OBSOLETE + DOTweenAnimation[] anims = DeEditorCompatibilityUtils.FindObjectsOfType(); + foreach (DOTweenAnimation anim in anims) AddAnimationToGlobalPreview(anim); + } + EditorGUI.EndDisabledGroup(); + GUILayout.EndHorizontal(); + // Preview - Stop + GUILayout.BeginHorizontal(); + EditorGUI.BeginDisabledGroup(!isPreviewingThis); + if (GUILayout.Button("■ Stop", Styles.btPreview)) { + if (_AnimationToTween.ContainsKey(src)) StopPreview(_AnimationToTween[src].tween); + } + EditorGUI.EndDisabledGroup(); + EditorGUI.BeginDisabledGroup(!isPreviewing); + if (GUILayout.Button("■ Stop All on GameObject", Styles.btPreview)) { + StopPreview(src.gameObject); + } + if (GUILayout.Button("■ Stop All in Scene", Styles.btPreview)) { + StopAllPreviews(); + } + EditorGUI.EndDisabledGroup(); + GUILayout.EndHorizontal(); + if (isPreviewing) { + int playingTweens = 0; + int completedTweens = 0; + int pausedTweens = 0; + foreach (KeyValuePair kvp in _AnimationToTween) { + Tween t = kvp.Value.tween; + if (t.IsPlaying()) playingTweens++; + else if (t.IsComplete()) completedTweens++; + else pausedTweens++; + } + GUILayout.Label("Playing Tweens: " + playingTweens, Styles.previewStatusLabel); + GUILayout.Label("Completed Tweens: " + completedTweens, Styles.previewStatusLabel); +// GUILayout.Label("Paused Tweens: " + playingTweens); + } + GUILayout.EndVertical(); + + return isPreviewing; + } + +#if !(UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5) + public static void StopAllPreviews(PlayModeStateChange state) + { + StopAllPreviews(); + } +#endif + + public static void StopAllPreviews() + { + _TmpKeys.Clear(); + foreach (KeyValuePair kvp in _AnimationToTween) { + _TmpKeys.Add(kvp.Key); + } + StopPreview(_TmpKeys); + _TmpKeys.Clear(); + _AnimationToTween.Clear(); + + DOTweenEditorPreview.Stop(); +#if UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5 + UnityEditor.EditorApplication.playmodeStateChanged -= StopAllPreviews; +#else + UnityEditor.EditorApplication.playModeStateChanged -= StopAllPreviews; +#endif +// EditorApplication.playmodeStateChanged -= StopAllPreviews; + + InternalEditorUtility.RepaintAllViews(); + } + +#endregion + +#region Methods + + static void StartupGlobalPreview() + { + DOTweenEditorPreview.Start(); +#if UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5 + UnityEditor.EditorApplication.playmodeStateChanged += StopAllPreviews; +#else + UnityEditor.EditorApplication.playModeStateChanged += StopAllPreviews; +#endif +// EditorApplication.playmodeStateChanged += StopAllPreviews; + } + + static void AddAnimationToGlobalPreview(DOTweenAnimation src) + { + if (!src.isActive) return; // Ignore sources whose tweens have been set to inactive + if (_previewOnlyIfSetToAutoPlay && !src.autoPlay) return; + + Tween t = src.CreateEditorPreview(); + if (t == null) return; + _AnimationToTween.Add(src, new TweenInfo(src, t, src.isFrom)); + // Tween setup + DOTweenEditorPreview.PrepareTweenForPreview(t); + } + + static void StopPreview(GameObject go) + { + _TmpKeys.Clear(); + foreach (KeyValuePair kvp in _AnimationToTween) { + if (kvp.Key.gameObject != go) continue; + _TmpKeys.Add(kvp.Key); + } + StopPreview(_TmpKeys); + _TmpKeys.Clear(); + + if (_AnimationToTween.Count == 0) StopAllPreviews(); + else InternalEditorUtility.RepaintAllViews(); + } + + static void StopPreview(Tween t) + { + TweenInfo tInfo = null; + foreach (KeyValuePair kvp in _AnimationToTween) { + if (kvp.Value.tween != t) continue; + tInfo = kvp.Value; + _AnimationToTween.Remove(kvp.Key); + break; + } + if (tInfo == null) { + Debug.LogWarning("DOTween Preview ► Couldn't find tween to stop"); + return; + } + if (tInfo.isFrom) { + int totLoops = tInfo.tween.Loops(); + if (totLoops < 0 || totLoops > 1) { + tInfo.tween.Goto(tInfo.tween.Duration(false)); + } else tInfo.tween.Complete(); + } else tInfo.tween.Rewind(); + tInfo.tween.Kill(); + EditorUtility.SetDirty(tInfo.animation); // Refresh views + + if (_AnimationToTween.Count == 0) StopAllPreviews(); + else InternalEditorUtility.RepaintAllViews(); + } + + // Stops while iterating inversely, which deals better with tweens that overwrite each other + static void StopPreview(List keys) + { + for (int i = keys.Count - 1; i > -1; --i) { + DOTweenAnimation anim = keys[i]; + TweenInfo tInfo = _AnimationToTween[anim]; + if (tInfo.isFrom) { + int totLoops = tInfo.tween.Loops(); + if (totLoops < 0 || totLoops > 1) { + tInfo.tween.Goto(tInfo.tween.Duration(false)); + } else tInfo.tween.Complete(); + } else tInfo.tween.Rewind(); + tInfo.tween.Kill(); + EditorUtility.SetDirty(anim); // Refresh views + _AnimationToTween.Remove(anim); + } + } + +#endregion + + // █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ + // ███ INTERNAL CLASSES ████████████████████████████████████████████████████████████████████████████████████████████████ + // █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ + + class TweenInfo + { + public DOTweenAnimation animation; + public Tween tween; + public bool isFrom; + public TweenInfo(DOTweenAnimation animation, Tween tween, bool isFrom) + { + this.animation = animation; + this.tween = tween; + this.isFrom = isFrom; + } + } + + static class Styles + { + static bool _initialized; + + public static GUIStyle previewBox, previewLabel, btOption, btPreview, previewStatusLabel; + + public static void Init() + { + if (_initialized) return; + + _initialized = true; + + previewBox = new GUIStyle(GUI.skin.box).Clone().Padding(1, 1, 0, 3) + .Background(DeStylePalette.squareBorderCurved_darkBorders).Border(7, 7, 7, 7); + previewLabel = new GUIStyle(GUI.skin.label).Clone(10, FontStyle.Bold).Padding(1, 0, 3, 0).Margin(3, 6, 0, 0).StretchWidth(false); + btOption = DeGUI.styles.button.bBlankBorderCompact.MarginBottom(2).MarginRight(4); + btPreview = EditorStyles.miniButton.Clone(Format.RichText); + previewStatusLabel = EditorStyles.miniLabel.Clone().Padding(4, 0, 0, 0).Margin(0); + } + } + } +} diff --git a/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenPreviewManager.cs.meta b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenPreviewManager.cs.meta new file mode 100644 index 0000000..53780cc --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenPreviewManager.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22292a5f27a9a644ba9e6ad1bf863531 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.XML b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.XML new file mode 100644 index 0000000..ad80aef --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.XML @@ -0,0 +1,18 @@ + + + + DOTweenProEditor + + + + + Custom colors + + + + + Needs to be overridden in order to initialize new styles added from inherited classes + + + + diff --git a/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.XML.meta b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.XML.meta new file mode 100644 index 0000000..f37a133 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.XML.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 753a4f4ed73b17143923101226957756 +TextScriptImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.dll b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.dll new file mode 100644 index 0000000..a97f9a2 Binary files /dev/null and b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.dll differ diff --git a/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.dll.meta b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.dll.meta new file mode 100644 index 0000000..62ab8c0 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.dll.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a6402d4311c862b4eb1325590d6466af +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DOTweenPro/readme.txt b/Assets/Plugins/Demigiant/DOTweenPro/readme.txt new file mode 100644 index 0000000..9837c95 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/readme.txt @@ -0,0 +1,35 @@ +DOTween and DOTween Pro are copyright (c) 2014-2018 Daniele Giardini - Demigiant + +// IMPORTANT!!! ///////////////////////////////////////////// +// Upgrading DOTween from versions older than 1.2.000 /////// +// (or DOTween Pro older than 1.0.000) ////////////////////// +------------------------------------------------------------- +If you're upgrading your project from a version of DOTween older than 1.2.000 (or DOTween Pro older than 1.0.000) please follow these instructions carefully. +1) Import the new version in the same folder as the previous one, overwriting old files. A lot of errors will appear but don't worry +2) Close and reopen Unity (and your project). This is fundamental: skipping this step will cause a bloodbath +3) Open DOTween's Utility Panel (Tools > Demigiant > DOTween Utility Panel) if it doesn't open automatically, then press "Setup DOTween...": this will run the upgrade setup +4) From the Add/Remove Modules panel that opens, activate/deactivate Modules for Unity systems and for external assets (like TextMesh Pro) + +// GET STARTED ////////////////////////////////////////////// + +- After importing a new DOTween update, select DOTween's Utility Panel from the "Tools/Demigiant" menu (if it doesn't open automatically) and press the "Setup DOTween..." button to activate/deactivate Modules. You can also access a Preferences Tab from there to choose default settings for DOTween. + +// VISUAL SCRIPTING (PRO ONLY) +- To animate a gameObject, select it and choose "Add Component > DOTween > DOTween Animation" +- To animate a gameObject along a path, select it and choose "Add Component > DOTween > DOTween Path" + +// SCRIPTING +- In your code, add "using DG.Tweening" to each class where you want to use DOTween. +- You're ready to tween. Check out the links below for full documentation and license info. + + +// LINKS /////////////////////////////////////////////////////// + +DOTween website (documentation, examples, etc): http://dotween.demigiant.com +DOTween license: http://dotween.demigiant.com/license.php +DOTween repository (Google Code): https://code.google.com/p/dotween/ +Demigiant website (documentation, examples, etc): http://www.demigiant.com + +// NOTES ////////////////////////////////////////////////////// + +- DOTween's Utility Panel can be found under "Tools > Demigiant > DOTween Utility Panel" and also contains other useful options, plus a tab to set DOTween's preferences \ No newline at end of file diff --git a/Assets/Plugins/Demigiant/DOTweenPro/readme.txt.meta b/Assets/Plugins/Demigiant/DOTweenPro/readme.txt.meta new file mode 100644 index 0000000..6a87c35 --- /dev/null +++ b/Assets/Plugins/Demigiant/DOTweenPro/readme.txt.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: aa8f07903bf128e44a7d0b91a63dedab +TextScriptImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib.meta b/Assets/Plugins/Demigiant/DemiLib.meta new file mode 100644 index 0000000..edcf2cc --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib.meta @@ -0,0 +1,21 @@ +fileFormatVersion: 2 +guid: 5a499e4809836274eb38cd99b370a2c1 +labels: +- Tween +- Tweening +- Animation +- HOTween +- Paths +- iTween +- DFTween +- LeanTween +- Ease +- Easing +- Shake +- Punch +- 2DToolkit +- TextMeshPro +- Text +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core.meta b/Assets/Plugins/Demigiant/DemiLib/Core.meta new file mode 100644 index 0000000..86e5075 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 03513cf143bb144409fbb3a51ec77b1b +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.dll b/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.dll new file mode 100644 index 0000000..4ab2cf3 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.dll differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.dll.meta b/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.dll.meta new file mode 100644 index 0000000..1ed9199 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.dll.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 54be29b67d0d29a478da2c6e5c62f091 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 1 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.xml b/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.xml new file mode 100644 index 0000000..6322fe3 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.xml @@ -0,0 +1,231 @@ + + + + DemiLib + + + + + Class attribute + Sets the script execution order index + + + + + Sets the script execution order for this class + + Script execution order index + + + + Set when calling DeGUI.BeginGUI + + + + + Stores a color palette, which can be passed to default DeGUI layouts when calling DeGUI.BeginGUI, + and changed at any time by calling DeGUI.ChangePalette. + You can inherit from this class to create custom color palettes with more hColor options. + + + + + Converts a HEX color to a Unity Color and returns it + + The HEX color, either with or without the initial # (accepts both regular and short format) + + + + Global colors + + + + + Background colors + + + + Editor background color + + + + Content colors + + + + + Toggle button specific colors + + + + + Various Input utils + + + + + Returns a number key int if a number key was pressed in this frame, or -1 otherwise + + + + + + Extend this to replicate Unity's Scope system with any Unity version. + Thanks to Dmitriy Yukhanov for pointing this out and creating an initial version. + Expand this class to create scopes. + Example: + public class VBoxScope : DeScope + { + public VBoxScope(GUIStyle style) + { + BeginVBox(style); + } + + protected override void CloseScope() + { + EndVBox(); + } + } + Usage: + using (new VBoxScope(myStyle) { + // Do something + } + + + + + Contains both free and pro skins color variations, + and automatically returns the correct one when converted to Color + + + + + Used by DeHierarchy + + + + + Returns a list of all items whose gameObject is NULL, or NULL if there's no missing gameObjects. + + + + + If the item exists sets it, otherwise first creates it and then sets it + + + + + If the item exists sets it, otherwise first creates it and then sets it + + + + + If the item exists sets it, otherwise first creates it and then sets it + + + + + Returns TRUE if the item existed and was removed. + + + + + Returns TRUE if the item existed and was changed. + + + + + Returns the customizedItem for the given gameObject, or NULL if none was found + + + + + Returns the color corresponding to the given + + + + Must be univocal + + + Node position in editor GUI + + + Ids of all forward connected nodes. Length indicates how many forward connections are allowed. + Min length represents available connections from node. + + + + A serializable struct including a min and a max int value + + + + Min value + + + Max value + + + + Creates a new Range + + + + + Returns a random value within this range (min/max included) + + + + + + + + A serializable struct including a min and a max float value + + + + Min value + + + Max value + + + + Creates a new Range + + + + + Returns a random value within this range (min/max included) + + + + + + + + Returns ONLY the Components in the children, and ignores the parent. + + If TRUE also includes inactive children + + + + Returns the Component only if it's in a child, and ignores the parent. + + If TRUE also searches inactive children + + + + Returns a HEX version of the given Unity Color, without the initial # + + If TRUE, also converts the alpha value and returns a hex of 8 characters, + otherwise doesn't and returns a hex of 6 characters + + + + Returns a HEX version of the given Unity Color, without the initial # + + If TRUE, also converts the alpha value and returns a hex of 8 characters, + otherwise doesn't and returns a hex of 6 characters + + + diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.xml.meta b/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.xml.meta new file mode 100644 index 0000000..473a9b5 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.xml.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 9bf2564c9817bb34988453ae948954d2 +TextScriptImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor.meta new file mode 100644 index 0000000..11f8e33 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 77fbbad1c51d68f4c844d26743104b07 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/DemiEditor.dll b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/DemiEditor.dll new file mode 100644 index 0000000..483f860 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/DemiEditor.dll differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/DemiEditor.dll.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/DemiEditor.dll.meta new file mode 100644 index 0000000..aa20ddf --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/DemiEditor.dll.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 202f9ddaf2c1a8a429504f7f3cd7b84f +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/DemiEditor.xml b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/DemiEditor.xml new file mode 100644 index 0000000..8e0fc4b --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/DemiEditor.xml @@ -0,0 +1,2405 @@ + + + + DemiEditor + + + + + Utils to use the correct method based on Unity's version + + + + + Encodes to PNG using reflection to use correct method depending if editor is version 2017 or earlier + + + + + Warning: some versions of this method don't have the includeInactive parameter so it won't be taken into account + + + + + Warning: some versions of this method don't have the includeInactive parameter so it won't be taken into account + + + + + Warning: some versions of this method don't have the includeInactive parameter so it won't be taken into account + + + + + Warning: some versions of this method don't have the includeInactive parameter so it won't be taken into account + + + + + Returns the prefab parent by using different code on Unity 2018 or later + + + + + Starts an editor coroutine. You can't use normal yield new WaitFor methods because + those are Unity runtime, but you can instead use . + Other than that, you can use normal yield null/etc. + Returns an (which you can use with to cancel the coroutine), + or NULL in case the coroutine completed immediately. + + + + + Stops the given coroutine generated by + + + + + To be used inside a coroutine as a yield instruction: waits for the given seconds + (replaces Unity's yield new WaitForSeconds because it's not available in-editor). + Example usage: + yield return DeEditorCoroutines.WaitForSeconds(1); + + + + + File utils + + + + Path slash for AssetDatabase format + + + Path slash to replace for AssetDatabase format + + + Current OS path slash + + + Path slash to replace on current OS + + + + Full path to project directory, without final slash. + + + + + Full path to project's Assets directory, without final slash. + + + + + Returns TRUE if the given path is an absolute path + + + + + Returns TRUE if the given path is an AssetDatabase path + + + + + Returns TRUE if the given GUID refers to a valid and existing project folder + + + + + Converts the given project-relative path to a full path + + + + + Converts the given full path to a project-relative path + + + + + Returns TRUE if the file/directory at the given path exists. + + Path, relative to Unity's project folder + + + + Validates the string as a valid fileName + (uses commonly accepted characters an all systems instead of system-specific ones). + BEWARE: doesn't check for reserved words + + string to replace + Minimum length for considering the string valid + + + + Returns TRUE if the given filepath is within this Unity project Assets folder + + Full file path + + + + Returns the given string stripped of any invalid filename characters. + BEWARE: doesn't check for reserved words + + string to replace + Character to use as replacement for invalid ones + + + + Returns the given path with all slashes converted to the correct ones used by the system + + + + + Returns the asset path of the given GUID (relative to Unity project's folder), + or an empty string if either the GUID is invalid or the related path doesn't exist. + + + + + Checks if the given directory (full path) is empty or not + + + + + Deletes all files and subdirectories from the given directory + + + + Returns the adb path to the given ScriptableObject + + + Returns the adb path to the given MonoBehaviour + + + Returns the adb directory that contains the given ScriptableObject without final slash + + + Returns the adb directory that contains the given MonoBehaviour without final slash + + + + Returns the adb paths to the selected folders in the Project panel, or NULL if there is none. + Contrary to Selection.activeObject, which only returns folders selected in the right side of the panel, + this method also works with folders selected in the left side. + + + + + Sets the script execution order of the given MonoBehaviour + + + + + Gets the script execution order of the given MonoBehaviour + + + + + Precisely returns the last controlId assigned to a GUI element + + + + + Framework used to fix missing monoScript reference in GameObjects when a script's meta guid changes + + + + + Retrieves the GUID in the given meta file and returns it, or NULL if it's not found + + Full filePath to the meta file + + + + Fixes all wrong Component GUIDs in scenes and prefabs + + objects to use for the operation + + + + Fixes all wrong Component GUIDs in the active scene and returns the total number of Components fixed + + objects to use for the operation + + + + Finds all MonoBehaviour/Behaviour/Component in the given scene/prefab file string + that contain the given + and replaces their GUID with the one passed (if different). + Returns the total number of Component GUIDs that were fixed + + + + + Dispatched when Unity has finished compiling code and updating the AssetDatabase + + + + + Utils to manage UnityPackages import/export and file mirroring + + + + + Stores all file paths (excluding metas) found in the given AssetDatabase directory and subdirectory + into the given AssetDatabase file (which will be created if missing), + writing them as relative to the given directory. + EXAMPLE: + adbReadFromDirPath = "Plugins/DOTween" + file "Assets/Plugins/DOTween/aScript.cs" stored as "aScript.cs" + file "Assets/Plugins/DOTween/Subdir/aScript.cs" stored as "Subdir/aScript.cs" + + + AssetDatabase path ("Assets/...") where the list should be written + AssetDatabase path ("Assets/...") from which the list of files should be retrieved, without final slash + If TRUE ignores ASMDEF files + + + + Parses a file list created via and removes any files not present in the list from the given directory + + Label to use when logging the result + AssetDatabase path ("Assets/...") to the file containing the list + AssetDatabase path ("Assets/...") to the directory to parse for extra files to remove + If TRUE ignores ASMDEF files + If TRUE only returns a report log and doesn't actually delete the files + + + + Utilities for Editor Panels. + + + + + Connects to a asset. + If the asset already exists at the given path, loads it and returns it. + Otherwise, depending on the given parameters, either returns NULL or automatically creates it before loading and returning it. + + Asset type + File path (relative to Unity's project folder) + If TRUE and the requested asset doesn't exist, forces its creation + If TRUE also creates the path folders if they don't exist + + + + Check if the at the given path exists and eventually if it's available + + File path (relative to Unity's project folder) + If TRUE also check if the file is available + (file can be unavailable if it was deleted outside Unity, or if Unity is just starting) + + + + + Returns TRUE if the given is dockable, FALSE if instead it's a utility window + + + + + + + Sets the icon and title of an editor window. Works with older versions of Unity, where the titleContent property wasn't available. + + Reference to the editor panel whose icon to set + Icon to apply + Title. If NULL doesn't change it + + + + Repaints the currently focues editor + + + + + Prefab utilities + + + + + Behaves as the Inspector's Apply button, applying any modification of this instance to the prefab parent + + + + + + Returns TRUe if a prefab instance has unapplied modifications, ignoring any modifications applied to the transform. + NOTE: this a somehow costly operation (since it generates GC) + + + + + Completely removes any prefab connection from the given prefab instances, by desotroing the original object and recreating it. + Returns a list with all the new elements created. + + Based on RodGreen's method (http://forum.unity3d.com/threads/82883-Breaking-connection-from-gameObject-to-prefab-for-good.?p=726602&viewfull=1#post726602) + + + + + + Completely removes any prefab connection from the given prefab instance, by desotroing the original object and recreating it. + + Based on RodGreen's method (http://forum.unity3d.com/threads/82883-Breaking-connection-from-gameObject-to-prefab-for-good.?p=726602&viewfull=1#post726602) + + + + + Returns TRUE if Unity editor is neither compiling code nor updating assets + + + Calls the given action after the given delay + + + + Return the size of the editor game view, eventual extra bars excluded (meaning the true size of the game area) + + + + + Returns a value from 1 to N (2 for 200% scaling) indicating the UI Scaling of Unity's editor. + The first time this is called it will store the scaling and keep it without refreshing, + since you need to restart Unity in order to apply a scaling change + + + + + Clears all logs from Unity's console + + + + + Adds the given global define (if it's not already present) to all the + or only to the given , depending on passed parameters, + and returns TRUE if it was added, FALSE otherwise. + NOTE: when adding to all of them some legacy warnings might appear, which you can ignore. + + + to use. Leave NULL to add to all of them. + + + + Adds the given list of global defines (if they're not already present) to all the + or only to the given , depending on passed parameters, + and returns TRUE if it was added, FALSE otherwise. + NOTE: when adding to all of them some legacy warnings might appear, which you can ignore. + + Defines to add + to use. Leave NULL to add to all of them. + + + + Removes the given global define (if present) from all the + or only from the given , depending on passed parameters, + and returns TRUE if it was removed, FALSE otherwise. + NOTE: when removing from all of them some legacy warnings might appear, which you can ignore. + + + to use. Leave NULL to remove from all of them. + + + + Removes the given global defines (if present) from all the + or only from the given , depending on passed parameters, + and returns TRUE if it was removed, FALSE otherwise. + NOTE: when removing from all of them some legacy warnings might appear, which you can ignore. + + Defines to remove + to use. Leave NULL to remove from all of them. + + + + Returns TRUE if the given global define is present in at least one of the + or only in the given , depending on passed parameters. + + + to use. Leave NULL to check in all of them for the first occurrence. + + + + Returns an array of all defines in the current . + + + + + Sets the gizmos icon visibility in the Scene and Game view for the given class names + + Visibility + Class names (no namespace), as many as you want separated by a comma + + + + Sets the gizmos icon visibility in the Scene and Game view for all custom icons + (for example icons created with HOTools) + + Visibility + + + + Returns all components of type T in the currently open scene, or NULL if none could be found. + If you're on Unity 5 or later, and have DeEditorTools, use DeEditorToolsUtils.FindAllComponentsOfType + instead, which is more efficient. + + + + + Shifts an item from an index to another, without modifying the list except than by moving elements around + + + + + Expands the given array and adds the given element as the last one + + + + + Removes the element at index from the given array, shifts everything after by -1 position and resizes the array + + + + Nothing is being dragged + + + Dragging + + + Dragging concluded and accepted + + + Dragging concluded but item position didn't change + + + Dragging canceled + + + Dragging concluced but not accepted because too short + + + Automatically determines if dragged elements are horizontal, vertical, or both + + + Forces vertical drag + + + Forces horizontal drag (useful to avoid initial wrong drag indicators + if the users starts dragging an horizontal system vertically) + + + + Manages the dragging of GUI elements + + + + + True if a GUI element is currently being dragged + + + + + Return the current item being dragged, or NULL if there is none + + + + + Type of current item being dragged, or NULL if there is none + + + + + Starting index of current item being dragged, or NULL if there is none + + + + + Retrieves the eventual optional data stored via the StartDrag method + + + + + Starts a drag operation on a GUI element. + + Reference to the current editor drawing the GUI (used when a Repaint is needed) + List containing the dragged item and all other relative draggable items + DraggableList index of the item being dragged + Optional data that can be retrieved via the static property + + + + Starts a drag operation on a GUI element. + + ID for this drag operation (must be the same for both StartDrag and Drag + Reference to the current editor drawing the GUI (used when a Repaint is needed) + List containing the dragged item and all other relative draggable items + DraggableList index of the item being dragged + Optional data that can be retrieved via the static property + + + + Starts a drag operation on a GUI element. + + Reference to the current editor drawing the GUI (used when a Repaint is needed) + List containing the dragged item and all other relative draggable items + DraggableList index of the item being dragged + Optional data that can be retrieved via the static property + + + + Starts a drag operation on a GUI element. + + ID for this drag operation (must be the same for both StartDrag and Drag + Reference to the current editor drawing the GUI (used when a Repaint is needed) + List containing the dragged item and all other relative draggable items + DraggableList index of the item being dragged + Optional data that can be retrieved via the static property + + + + Call this after each draggable GUI block, to calculate and draw the current drag state + (or complete it if the mouse was released). + + ID for this drag operation (must be the same for both StartDrag and Drag + List containing the draggable item and all other relative draggable items + Current index of the draggable item being drawn + If NULL will calculate this automatically using . + Pass this if you're creating a drag between elements that don't use GUILayout + Drag direction. You can leave it to + unless you want to skip eventual layout calculations + If TRUE (default) automatically reorders the given list + to reflect successful drag results. + Note that will be different if you apply the drag to the list or not + (in the former case it will reflect the current index after the change, in the latter it will reflect the desired position) + + + + Call this after each draggable GUI block, to calculate and draw the current drag state + (or complete it if the mouse was released). + + List containing the draggable item and all other relative draggable items + Current index of the draggable item being drawn + If NULL will calculate this automatically using . + Pass this if you're creating a drag between elements that don't use GUILayout + Drag direction. You can leave it to + unless you want to skip eventual layout calculations + If TRUE (default) automatically reorders the given list + to reflect successful drag results. + Note that will be different if you apply the drag to the list or not + (in the former case it will reflect the current index after the change, in the latter it will reflect the desired position) + + + + Call this after each draggable GUI block, to calculate and draw the current drag state + (or complete it if the mouse was released). + + ID for this drag operation (must be the same for both StartDrag and Drag + List containing the draggable item and all other relative draggable items + Current index of the draggable item being drawn + Color to use for drag divider and selection + If NULL will calculate this automatically using . + Pass this if you're creating a drag between elements that don't use GUILayout + Drag direction. You can leave it to + unless you want to skip eventual layout calculations + If TRUE (default) automatically reorders the given list + to reflect successful drag results. + Note that will be different if you apply the drag to the list or not + (in the former case it will reflect the current index after the change, in the latter it will reflect the desired position) + + + + Call this after each draggable GUI block, to calculate and draw the current drag state + (or complete it if the mouse was released). + + List containing the draggable item and all other relative draggable items + Current index of the draggable item being drawn + Color to use for drag divider and selection + If NULL will calculate this automatically using . + Pass this if you're creating a drag between elements that don't use GUILayout + Drag direction. You can leave it to + unless you want to skip eventual layout calculations + If TRUE (default) automatically reorders the given list + to reflect successful drag results. + Note that will be different if you apply the drag to the list or not + (in the former case it will reflect the current index after the change, in the latter it will reflect the desired position) + + + + Ends the drag operations, and eventually applies the drag outcome. + Returns TRUE if the position of the dragged item actually changed. + Called automatically by Drag method. Use it only if you want to force the end of a drag operation. + + If TRUE marks the drag as successful and applied it if set so, otherwise simply cancels the drag + If TRUE changes the list contents to reflect the drag result + + + + Abstract dynamic class used for every node of the same type + (meaning there is only a single recycled instance for all same-type nodes) + + + + Used to fill + + + Called when the node needs to be drawn + + + + The connectedNodesIds list will be automatically increased/decreased when adding/removing connections + (otherwise connectedNodesIds will have to be increased via custom code) + + + + + Requires only two connectedNodesIds (no more, no less), + uses regular CTRL+Drag to connect connection 0, CTRL+SPACE+Drag to connect connection 1 + + + + + Like , but with an extra connection as a last extra index, which is set when pressing CTRL+SPACE+Drag. + Must always have at least one element in connectedNodesIds + + + + Layout, Repaint, LayoutAndRepaint + + + + Stores cloned nodes for pasting + + + + + Returns a list of pasteable nodes, with their GUID recreated and their connections adapted + + + + + + Returns a deep clone of the given node but doesn't clone UnityEngine references. + A new ID will be automatically generated. + + + + + Always connects a node from BottomOrRight side to TopOrLeft side + + + + + Always connects from BottomOrRight side to TopOrLeft side. + If ALT is pressed shows the delete connection button. + Called during Repaint or MouseDown/Up. + Returns TRUE if the connection was deleted using the delete connection button. + + + + + Always connects a node from BottomOrRight side to TopOrLeft side + + + + + Always connects from BottomOrRight side to TopOrLeft side. + If ALT is pressed shows the delete connection button. + Called during Repaint or MouseDown/Up. + Returns TRUE if the connection was deleted using the delete connection button. + + + + + You can attach to this + + + + + Use this to add a content group to the Help Panel + + + + Regular note + + + Editable note (activated by setting to TRUE + (but you will have to save the result somewhere yourself) + + + If TRUE shows the textArea + + + + Add definition. Supports rich-text but also these special tags: + - [b][/b] + + + + + Add key, automatically formatting these special keys: + / + + + → + + If TRUE and there's other keys/targets, adds the new key on a new line preceded by a comma + + + + Recalculates all rects based on the given Y shift + + + + + One per . + Partially independent, mainly controlled by process. + + + + TRUE when read-to or dragging nodes + + + + Resets the interaction state + + + + Returns TRUE if the given node is currently being dragged + + + + Returns TRUE if a repaint is required + + + + + + Main class for DeGUI Node system. + Create it, then enclose your GUI node calls inside a . + CODING ORDER: + - Create a to use for your node system (create it once, obviously) + - Inside OnGUI, write all your nodes GUI code inside a + - To draw the nodes, loop through the list and call for each node + + + + Distance at which nodes will be placed when snapping next to each other + + + Full area without zeroed coordinates + + + Position with zeroed coordinates (used by all node GUI since it's inside a GUILayout(area)) + + + Contains the nodes passed to NodeProcessScope ordered by depth. + You should loop through this list when drawing nodes + + + + Creates a new NodeProcess. + + EditorWindow for this process + Callback called when one or more nodes are going to be deleted. + Return FALSE if you want the deletion to be canceled. + Can be NULL, in which case it will be ignored + Callback called when a node is cloned. + Return FALSE if you want the cloning to be canceled. + Can be NULL, in which case it will be ignored + + + + Needs to be called when loading a complete new series of nodes + + + + + Call this when the layout/size of one or more nodes changed because of external intervention + (if a whole new range of nodes has been loaded, just call instead) + + + + + Forces the refresh of the area calculations. Useful if you need them before the first GUI call has run + + + + + Shifts the visible are to the given coordinates and repaints on end + + + + + Shifts the visible are to the given coordinates and repaints on end + + + + + Resets the node process scale to 1 + + + + + Scales up the node process area (if not already at max scale) + + + + + Scales down the node process area (if not already at min scale) + + + + + Tells the process to repaint once the process has ended. + Calling this + + + + + Draws the given node using the given T editor GUINode type. + Returns the full area of the node + + + + + Opens the Help Panel + + + + + Closes the Help Panel + + + + + Opens or closes the Help panel based on its current state + + + + + Returns TRUE if the given area is visible (even if partially) inside the current nodeProcess area + + + + + Captures a screenshot of the node editor area and returns it when calling the onComplete method. + Sadly this requires a callback because if called immediately the capture will fail + with a "[d3d11] attempting to ReadPixels outside of RenderTexture bounds!" error in most cases + + Screenshot mode + A callback that accepts the generated Texture2D object + Screenshot scale factor (only used if screenshotMode is set to ) + If TRUE (default) displays a progress bar during the operation. + You'll want to set this to FALSE when you're already using a custom progressBar + and the screenshot is only part of a larger queue of operations + + + + Removes the node with the given ID from the list and removes all connections to it from other nodes. + Doesn't mark things dirty nor prepares them for undo + + + + + Use this to encapsulate node GUI operations. + Automatically manages various operations (press F1 to see them). + Sets GUI.changed to TRUE if the area is panned, a node is dragged, controlNodes change sorting or are deleted. + Wraps all content inside a GUILayout Area (nodeArea). + + The to use + Area within which the nodes will be drawn + Area shift (caused by dragging) + This list will be sorted based on current node draw order, + and changed in case one of its nodes is deleted. + IMPORTANT: this list should be part of your serialized class (MonoBehaviour or ScriptableObject), + so it will be stored as a reference and modifying one will modify the other. + Usually you want to pass all nodes to this except the eventual start node (or nodes that can't be sorted nor deleted). + + + + Set automatically when a selection ends up selecting a single node, + reset when deselecting all nodes, selecting multiple nodes, or resetting the + + + + + Returns TRUE if something was actually deselected, FALSE if there were no selected nodes + + + + + + Returns key modifiers currently pressed. + Requires to be updated at the beginning of every GUI call. + + + + Note: ALT isn't correctly interpreted as OPTION on OSX, contrary to what Unity manual states, + so using Command instead fixes that + + + + Call this method to update data required by softCtrl calculations. + Automatically called from within a . + Returns a object with the keys that were just pressed and just released + + Required to have the correct for the given target call + + + + Returns the given as an int, or -1 if it's not a number + + + + + Used code from Celtc on StackOverflow: https://stackoverflow.com/a/54044197/10151925 + + + + + Gets all fields from an object and its hierarchy inheritance + + + + + Perform a deep copy of the class + + + + + Does the copy + + + + + Returns by . + Contains properties and methods to manage non-layout scrollview better. + Remember to use or to increase or set the full content height + + + + Area used by ScrollView and its content + + + Full content area regardless if visible or not. Its height should be set manually based on the contents' height + + + Content area currently visible (scroll bars excluded) + + + Current scrollPosition + + + + Returns the current open, or an empty one if none is open. + + + + + Sets the width + + + + + Sets the height + + + + + Increase the height by the given amount + + + + + + Returns a Rect for a single line at the current scrollView yMax + + If less than 0 uses default line height, otherwise the value passed + if TRUE (default) automatically increases the height of the accordingly + + + + + Returns a Rect for a single line at the current scrollView yMax, as wide as the max visible rect width + + If less than 0 uses default line height, otherwise the value passed + if TRUE (default) automatically increases the height of the accordingly + + + + + Returns TRUE if the given rect is at least partially visible in the displayed scroll area + + + + + Contains both free and pro skins GUIStyle variations, + and automatically returns the correct one when converted to GUIStyle + + + + + Plays the given clip in the Editor + + + + + Stops playing the given clip. + + + + + Stops all clips playing. + + + + + A stopwatch whose time can be changed manually via + + + + + Start or resume playing + + + + + Stop the watch and reset the time + + + + + Restart measuring from zero + + + + + Pause the watch + + + + + Send the watch to the given time + + + + + Util to determine Unity editor version and store them as comparable numbers + + + + Full major version + first minor version (ex: 2018.1f) + + + Major version + + + First minor version (ex: in 2018.1 it would be 1) + + + + Assembly extensions + + + + + Full path to the assembly directory, without final slash + + + + + AssetDatabase path to the assembly directory, without final slash + + + + + GUI extension methods + + + + + Clones the style and adds the given formats to it. You can pass any of these types of values: + + Format:Rich-text, wordwrap + FontStyle:Font style + TextAnchor:Content anchor + int:Font size + Color/DeSkinColor:Font color + + + + + + Adds the given formats to the style. You can pass any of these types of values: + + Format:RichText, WordWrap + FontStyle:Font style + TextAnchor:Content anchor + int:Font size + Color/DeSkinColor:Font color + + + + + + Sets the border of the style + + + + + Sets the border of the style + + + + + Sets the border of the style + + + + + Sets the background of the style + + + + + Sets the background of the style + + + + + Sets the contentOffset of the style + + + + + Sets the contentOffset of the style + + + + + Sets the X contentOffset of the style + + + + + Sets the Y contentOffset of the style + + + + + Sets the margin of the style + + + + + Sets the margin of the style + + + + + Sets the margin of the style + + + + + Sets the left margin of the style + + + + + Sets the right margin of the style + + + + + Sets the top margin of the style + + + + + Sets the bottom margin of the style + + + + + Sets the overflow of the style + + + + + Sets the overflow of the style + + + + + Sets the overflow of the style + + + + + Sets the left overflow of the style + + + + + Sets the right overflow of the style + + + + + Sets the top overflow of the style + + + + + Sets the bottom overflow of the style + + + + + Sets the padding of the style + + + + + Sets the padding of the style + + + + + Sets the padding of the style + + + + + Sets the left padding of the style + + + + + Sets the right padding of the style + + + + + Sets the top padding of the style + + + + + Sets the bottom padding of the style + + + + + Sets the Y fixedWidth of the style + + + + + Sets the fixedHeight of the style + + + + + Sets the stretchHeight property of the style + + + + + Sets the stretchWidth property of the style + + + + + Stores a GUIStyle palette, which can be passed to default DeGUI layouts when calling DeGUI.BeginGUI, + and changed at any time by calling DeGUI.ChangePalette. + You can inherit from this class to create custom GUIStyle palettes with more options. + Each of the sub-options require a public Init method to initialize the styles, which will be called via Reflection. + + + + + Called automatically by DeGUI.BeginGUI. + Override when adding new style subclasses. + Returns TRUE if the styles were initialized or re-initialized + + + + + Extend any custom subpalettes from this, so they will be initialized correctly + + + + + GUILayout methods + + + + + A button that triggers an immediate repaint when hovered/pressed/unhovered + (which otherwise doesn't happen if you set a background to the button's GUIStyle). + Requires to be activated. + + + + + A button that triggers an immediate repaint when hovered/pressed/unhovered + (which otherwise doesn't happen if you set a background to the button's GUIStyle) + and also assigns different GUI colors based on the button's state and the given one. + Requires to be activated. + + Content + Default color + Style + GUILayout options + + + + A button that triggers an immediate repaint when hovered/pressed/unhovered + (which otherwise doesn't happen if you set a background to the button's GUIStyle) + and also assigns different GUI colors based on the button's state with options to eventually auto-generate them. + Requires to be activated. + + Content + Default color + Hover color (if NULL auto-generates it from the given one by making it brighter + Pressed color (if NULL auto-generates it from the given one by making it even brighter + Style + GUILayout options + + + Shaded button + + + Shaded button + + + Shaded button + + + Shaded button + + + Colored button + + + Colored button + + + Colored button + + + Colored button + + + + Draws a button that returns TRUE the first time it's pressed, instead than when its released. + + + + + Draws a button that returns TRUE the first time it's pressed, instead than when its released. + + + + + Draws a button that returns TRUE the first time the mouse moves over it while the mouse button is pressed, + even if it was pressed outside of the button first + + + + + Draws a button that returns TRUE the first time the mouse moves over it while the mouse button is pressed, + even if it was pressed outside of the button first + + + + Toolbar foldout button + + + Toolbar foldout button + + + Toolbar foldout button + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Begins an horizontal toolbar layout + + + Begins an horizontal toolbar layout + + + Begins an horizontal toolbar layout + + + Begins an horizontal toolbar layout + + + Ends an horizontal toolbar layout + + + A toolbar with a label + + + A toolbar with a label + + + A toolbar with a label + + + A toolbar with a label + + + A toolbar with a label + + + A toolbar with a label + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values. Auto-determines object type from the field's type + + + Returns TRUE if there's mixed values. Forces field to accept only objects of the given type + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Vertical box layout with style and color options + + + Vertical box layout with style and color options + + + End vertical box layout + + + Horizontal Divider + + + + A text field that becomes editable only on double-click + + EditorWindow reference + A unique ID to use in order to determine if the text is selected or not + Text + Style for default (non-editing mode) appearance + Style for editing mode + + + + A text field that becomes editable only on double-click + + Editor reference + A unique ID to use in order to determine if the text is selected or not + Text + Style for default (non-editing mode) appearance + Style for editing mode + + + + A text field that becomes editable only on double-click and can also be dragged + + EditorWindow reference + A unique ID to use in order to determine if the text is selected or not + Text + List containing the dragged item and all other relative draggable items + DraggableList index of the item being dragged + Style for default (non-editing mode) appearance + Style for editing mode + + + + + A text field that becomes editable only on double-click and can also be dragged + + Editor reference + A unique ID to use in order to determine if the text is selected or not + Text + List containing the dragged item and all other relative draggable items + DraggableList index of the item being dragged + Style for default (non-editing mode) appearance + Style for editing mode + + + + + Creates a Gradient field by using Unity 4.x hidden default one and Reflection. + + + + Scene field + + + + Draws a dropdown for choosing a SortingLayer ID + + + + + Draws a dropdown for choosing a SortingLayer ID + + + + + Global Demigiant GUI manager. Call to initialize it inside GUI calls. + + + + + Default color palette + + + + + Default style palette + + + + TRUE if we're using the PRO skin + + + + Call this at the beginning of GUI methods. + Returns TRUE if the styles were initialized or re-initialized + + Eventual to use + Eventual to use + + + + Better implementation of GUI.BeginScrollView. + Returns the modified scrollView struct. + Must be closed by a DeGUI.. +
EXAMPLE
+            Rect scrollViewArea = ...;
+            Rect drawArea = scrollViewArea;
+            // Decrease the full drawing area to exclude scrollbars if necessary
+            if (_scrollView.fullContentArea.height > scrollViewArea.height) drawArea = drawArea.Shift(0, 0, -11, 0);
+            // Begin scrollView
+            _scrollView = DeGUI.BeginScrollView(scrollViewArea, _scrollView);
+            // Increase scrollView area correctly (or directly set it with SetFullContentHeight
+            _scrollView.IncreaseContentHeightBy(...)
+            // End
+            DeGUI.EndScrollView();
+            
+
+ Visible area used by the scrollView + target. You'll need to set its size to the correct full content height + (either within the Begin/ENd ScrollView calls or before them) + If TRUE (default) resets .height to 0 + after beginning the ScrollView +
+ + + Closes a DeGUI. correctly + + + + + Exits the current event correctly, also taking care of eventual drag operations + + + + + Removes focus from any GUI button/text/element that has focus + + + + + Changes the active palettes to the given ones + (or resets them to the default ones if NULL). + Returns TRUE if the styles were initialized or re-initialized + + + + + Resets the GUI colors to the default ones (only available if BeginGUI was called first) + + + + + Sets the GUI colors to the given ones + + + + + Opens a panel that previews the given texture (if not NULL) + + + + + Gets either black or white, depending on the color that would be most visible on the given one + + + + + Gets either black or white, depending on the color that would be most visible on the given one + + + + + Sets the GUI cursor color to the given ones + + + + + Sets the GUI matrix to the given ones + + + + + Wrapper to set serialized fields with multiple sources selected: automatically sets GUI to show mixed values when necessary + and contains a fieldInfo which is set within the wrapper. + Note that you must set the property within the wrapper so that it's assigned correctly when closing the scope. + + + + Multi property scope + Name of the field so it can be found and set/get via Reflection + List of the sources containing the given field + If TRUE validates EditorGUI.EndChangeCheck before calling it + (fixes an issue which happens with advanced Undo usage in DOTween Timeline and ColorFields) + + + + A button that triggers an immediate repaint when hovered/pressed/unhovered + (which otherwise doesn't happen if you apply a background to the button's GUIStyle). + Requires to be activated. + + + + + A button that triggers an immediate repaint when hovered/pressed/unhovered + (which otherwise doesn't happen if you apply a background to the button's GUIStyle) + and also assigns different GUI colors based on the button's state and the given one. + Requires to be activated. + + Rect + Content + Default color + Style + + + + A button that triggers an immediate repaint when hovered/pressed/unhovered + (which otherwise doesn't happen if you apply a background to the button's GUIStyle) + and also assigns different GUI colors based on the button's state with options to eventually auto-generate them. + Requires to be activated. + + Rect + Content + Default color + Hover color (if NULL auto-generates it from the given one by making it brighter + Pressed color (if NULL auto-generates it from the given one by making it even brighter + Style + + + Shaded button + + + Shaded button + + + Shaded button + + + Shaded button + + + Colored button + + + Colored button + + + Colored button + + + Colored button + + + Toolbar foldout button which allows clicking even on its label + + + Foldout button + label (not intended to be used in toolbar) which allows click-to-foldout/foldin + + + + Draws a button that returns TRUE the first time it's pressed, instead than when its released. + + + + + Draws a button that returns TRUE the first time it's pressed, instead than when its released. + + + + + Draws a button that returns TRUE the first time the mouse moves over it while the mouse button is pressed, + even if it was pressed outside of the button first + + + + + Draws a button that returns TRUE the first time the mouse moves over it while the mouse button is pressed, + even if it was pressed outside of the button first + + + + Toolbar foldout button + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Scene field + + + + Draws a background grid using the given grid texture + + Area rect + Offset from 0, 0 position (used when area has been dragged) + Texture to use for the grid + Eventual scale to apply to the grid + + + + Draws a background grid using default grid textures + + Area rect + Offset from 0, 0 position (used when area has been dragged) + If TRUE forces a dark skin, otherwise uses a skin that fits with the current Unity's one + Eventual scale to apply to the grid + + + Box with style and color options + + + + Can be used instead of EditorGUI.PropertyField, to draw a serializedProperty without its attributes + (very useful in case you want to use this from within a PropertyDrawer for that same property, + since otherwise bad infinite loops might happen) + + + + Draws a colored square + + + Draws the given texture tiled within the given rect + Rect + Texture + Eventual scale to apply + If not NULL, colorizes the texture with this color + + + + A text field that becomes editable only on double-click + + Area + EditorWindow reference + A unique ID to use in order to determine if the text is selected or not + Text + Style for default (non-editing mode) appearance + Style for editing mode + + + + A text field that becomes editable only on double-click + + Area + Editor reference + A unique ID to use in order to determine if the text is selected or not + Text + Style for default (non-editing mode) appearance + Style for editing mode + + + + A text field that becomes editable only on double-click and can also be dragged + + Area + EditorWindow reference + A unique ID to use in order to determine if the text is selected or not + Text + List containing the dragged item and all other relative draggable items + DraggableList index of the item being dragged + Style for default (non-editing mode) appearance + Style for editing mode + + + + A text field that becomes editable only on double-click and can also be dragged + + Area + Editor reference + A unique ID to use in order to determine if the text is selected or not + Text + List containing the dragged item and all other relative draggable items + DraggableList index of the item being dragged + Style for default (non-editing mode) appearance + Style for editing mode + + + + A textArea that becomes editable only on double-click + + Area + EditorWindow reference + A unique ID to use in order to determine if the text is selected or not + Text + Style for default (non-editing mode) appearance + Style for editing mode + + + + A textArea that becomes editable only on double-click + + Area + Editor reference + A unique ID to use in order to determine if the text is selected or not + Text + Style for default (non-editing mode) appearance + Style for editing mode + + + Divider + + + + Draws a dropdown for choosing a SortingLayer ID + + + + + Draws a dropdown for choosing a SortingLayer ID + + + + Draws a Vector3Field that can have single axes disabled + + + Draws a Vector3Field that can have single axes disabled + + + Draws a Vector3Field that can have single axes disabled + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values. Supports using an int as an enum + + + Returns TRUE if there's mixed values. Supports using an int as an enum + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values. Supports also uint fields + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values. Auto-determines object type from the field's type + + + Returns TRUE if there's mixed values. Forces field to accept only objects of the given type + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values. Supports passing int values as bool (1 = true, 0 = false) + + + Returns TRUE if there's mixed values. Supports passing int values as bool (1 = true, 0 = false) + + + Returns TRUE if there's mixed values. Supports passing int values as bool (1 = true, 0 = false) + + + Returns TRUE if there's mixed values. Requires a SerializedProperty representation of each UnityEven field + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + Returns TRUE if there's mixed values + + + + Returns a new color equal to the given one with changed brightness + + Color to evaluate + Brightness factor (multiplied by current brightness) + If set applies this alpha value + + + + Returns a new color equal to the given one with changed saturation + + Color to evaluate + Saturation factor (multiplied by current brightness) + If set applies this alpha value + + + + Changes the alpha of this color and returns it + + + + + Returns a new color equal to the given one with changed alpha + + + + + Returns a HEX version of the given Unity Color, without the initial # + + If TRUE, also converts the alpha value and returns a hex of 8 characters, + otherwise doesn't and returns a hex of 6 characters + + + + Returns a HEX version of the given Unity Color, without the initial # + + If TRUE, also converts the alpha value and returns a hex of 8 characters, + otherwise doesn't and returns a hex of 6 characters + + + + Replicates parts of DeExtensions.ListExtensions for internal usage + + + + + Shifts an item from an index to another, without modifying the list except than by moving elements around + + + + + Shuffles the list + + + + + Replicates DeExtensions.RectExtensions for internal usage + + + + + Adds one rect into another, and returns the resulting a + + + + + Returns a copy or the Rect expanded around its center by the given amount + + Indicates how much to expand the rect on each size + + + + Returns a copy or the Rect expanded around its center by the given amount + + Indicates how much to expand the rect on each horizontal side + Indicates how much to expand the rect on each vertical side + + + + Returns a copy or the Rect contracted around its center by the given amount + + Indicates how much to contract the rect on each size + + + + Returns a copy or the Rect contracted around its center by the given amount + + Indicates how much to contract the rect on each horizontal side + Indicates how much to contract the rect on each vertical side + + + + Returns a copy of the Rect resized so it fits proportionally within the given size limits + + Width to fit + Height to fit + If TRUE (default) only shrinks the rect if needed, if FALSE also enlarges it to fit + + + + + Returns TRUE if the first rect includes the second one + + If TRUE, returns TRUE only if the second rect is fully included, + otherwise just if some part of it is included + + + + Returns TRUE if this rect intersects the given one, and also outputs the intersection area + + Intersection area + + + + Returns a copy of the Rect with its X/Y coordinates set to 0 + + + + + Sets this rect to the left of the given x position, with options for margin and width resize + + Distance between this rect and the given x position + If greater than zero resizes this rect to the given size + + + + Sets this rect to the right of the given x position and resizes it so that its xMax remains the same. + + Distance between this rect and the given x position + Extra offset to add to the resulting width + + + + Returns a copy of the Rect with its values shifted according the the given parameters + + + + + Returns a copy of the Rect with its X value shifted by the given value + + + + + Returns a copy of the Rect with its Y value shifted by the given value + + + + + Returns a copy of the Rect with its x shifted by the given value and its width shrinked/expanded accordingly + (so that the xMax value will stay the same as before) + + + + + Returns a copy of the Rect with its y shifted by the given value and its height shrinked/expanded accordingly + (so that the yMax value will stay the same as before) + + + + + Returns a copy of the Rect with its X property set to the given value + + + + + Returns a copy of the Rect with its Y property set to the given value + + + + + Returns a copy of the Rect with its height property set to the given value + + + + + Returns a copy of the Rect with its width property set to the given value + + + + + Returns a copy of the Rect with its X,Y properties set so the rect center corresponds to the given values + + + + + Returns a copy of the Rect with its X property set so the rect X center corresponds to the given value + + + + + Returns a copy of the Rect with its Y property set so the rect Y center corresponds to the given value + + + + + Returns the value of the given property (works like a cast to type). + Improved from HiddenMonk's functions (http://answers.unity3d.com/questions/627090/convert-serializedproperty-to-custom-class.html) + + + + + Returns TRUE if this property is inside an array + + + + + Returns -1 if the property is not inside an array, otherwise returns its index inside the array + + + + + Returns the height of a UnityEvent serializedProperty + + + + + Uses code from FlaShG's GitMerge: https://github.com/FlaShG/GitMerge-for-Unity/blob/master/Editor/SerializedPropertyExtensions.cs + + + + + Uses code from FlaShG's GitMerge: https://github.com/FlaShG/GitMerge-for-Unity/blob/master/Editor/SerializedPropertyExtensions.cs + + + + + String extensions + + + + + Returns TRUE if the string is null or empty + + If TRUE (default) and the string contains only spaces, considers it empty + + + + Compares a version string (in format #.#.###) with another of the same format, + and return TRUE if this one is minor. Boths trings must have the same number of dot separators. + + + + + Converts a HEX color to a Unity Color and returns it + + The HEX color, either with or without the initial # (accepts both regular and short format) + + + + Nicifies a string, replacing underscores with spaces, and adding a space before Uppercase letters (except the first character) + + + + + If the given string is a directory path, returns its parent + with or without final slash depending on the original directory format + + + + + If the string is a directory, returns the directory name, + if instead it's a file returns its name without extension. + Works better than Path.GetDirectoryName, which kind of sucks imho + + + + + Evaluates the string as a property or field and returns its value. + + If NULL considers the string as a static property, otherwise uses obj as the starting instance + + + + Texture extensions + + + + + Returns the full Rect of this texture, with options for position and scale + + + + + Checks that the texture uses the correct import settings, and applies them if they're incorrect. + + + + + Returns a clone of the event + + + + + Utility class. You can either use it as is via its constructor, which automatically retrieves all serializedProperties in the instance, + or you can extend it so you can add as many public SerializedProperties as the SerializedProperties you want to access + (their name must be the same as the serialized field they refer to) + + + + + Automatically retrieves all serializable properties on the given serializedObject, + or only specific ones if propNames is specified + + + + + Draws all property fields. Remember to wrap this within serializedObject.Update + and serializedObject.ApplyModifiedProperties + + +
+
diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/DemiEditor.xml.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/DemiEditor.xml.meta new file mode 100644 index 0000000..d199425 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/DemiEditor.xml.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: d4a42b2e4e6f64d4ba01d35c5a3dafed +TextScriptImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs.meta new file mode 100644 index 0000000..24b1340 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 1efb03f507a60b949a70ed828ac18eb8 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquare.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquare.png new file mode 100644 index 0000000..6fbcc51 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquare.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquare.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquare.png.meta new file mode 100644 index 0000000..ca9400a --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquare.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 7ba4b2810f605d945af87e032ca2957b +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha10.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha10.png new file mode 100644 index 0000000..21afc7b Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha10.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha10.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha10.png.meta new file mode 100644 index 0000000..488d14c --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha10.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 8c9cfa1dbe00a1d41ae9d14f5ac543ec +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha15.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha15.png new file mode 100644 index 0000000..3097db8 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha15.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha15.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha15.png.meta new file mode 100644 index 0000000..e907551 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha15.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 53d696c01f6ca524383f11fcc34dd13c +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha25.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha25.png new file mode 100644 index 0000000..521e6dc Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha25.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha25.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha25.png.meta new file mode 100644 index 0000000..2d94303 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha25.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: f7ff421f40d548444864a01cd7f47112 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha50.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha50.png new file mode 100644 index 0000000..700b9de Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha50.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha50.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha50.png.meta new file mode 100644 index 0000000..e3040e1 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha50.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: aa1d42dc6ff3e894da2208c6929d2165 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha80.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha80.png new file mode 100644 index 0000000..f4a47c3 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha80.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha80.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha80.png.meta new file mode 100644 index 0000000..ce709e4 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blackSquareAlpha80.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 595b166389c8db546a199430284ebc9b +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blueSquare.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blueSquare.png new file mode 100644 index 0000000..9d8a19a Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blueSquare.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blueSquare.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blueSquare.png.meta new file mode 100644 index 0000000..490a921 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/blueSquare.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 05cfe010378336646ad6c721f66543d1 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/circle.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/circle.png new file mode 100644 index 0000000..3ed059a Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/circle.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/circle.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/circle.png.meta new file mode 100644 index 0000000..bc2ac36 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/circle.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: af28470bd0e2e9543a6dfa9a1a4b348d +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/circle_dashedBorderEmpty.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/circle_dashedBorderEmpty.png new file mode 100644 index 0000000..f829461 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/circle_dashedBorderEmpty.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/circle_dashedBorderEmpty.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/circle_dashedBorderEmpty.png.meta new file mode 100644 index 0000000..0055f30 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/circle_dashedBorderEmpty.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: 522b0133a9838674ca9a12e0c6e5a59c +timeCreated: 1625322295 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/greenSquare.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/greenSquare.png new file mode 100644 index 0000000..63ef49a Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/greenSquare.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/greenSquare.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/greenSquare.png.meta new file mode 100644 index 0000000..774d702 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/greenSquare.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 789ef07ba2573f6448fa8b5dc5224c44 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/grid_bright.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/grid_bright.png new file mode 100644 index 0000000..5c2feae Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/grid_bright.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/grid_bright.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/grid_bright.png.meta new file mode 100644 index 0000000..ccb4643 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/grid_bright.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 93b1287b4a087f84c95c72f49ec94e83 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/grid_dark.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/grid_dark.png new file mode 100644 index 0000000..5dc9a72 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/grid_dark.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/grid_dark.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/grid_dark.png.meta new file mode 100644 index 0000000..9baf726 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/grid_dark.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: d542f997a51000946873268e3546b6ba +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alert.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alert.png new file mode 100644 index 0000000..9242a22 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alert.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alert.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alert.png.meta new file mode 100644 index 0000000..f84830d --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alert.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 39cacc93c6c183f44992bf2421362f78 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignB.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignB.png new file mode 100644 index 0000000..c06e167 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignB.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignB.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignB.png.meta new file mode 100644 index 0000000..dff6533 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignB.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 8b6b31f71cd528243b053cfc488e73f5 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBC.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBC.png new file mode 100644 index 0000000..3118ab1 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBC.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBC.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBC.png.meta new file mode 100644 index 0000000..b623d58 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBC.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 2cdc0bc527f7a434496c6be9236e636f +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBL.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBL.png new file mode 100644 index 0000000..3ee1a48 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBL.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBL.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBL.png.meta new file mode 100644 index 0000000..fd7ccf1 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBL.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: abf8a615f379ef44b9ac872a13b7712f +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBR.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBR.png new file mode 100644 index 0000000..ce4cf47 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBR.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBR.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBR.png.meta new file mode 100644 index 0000000..c3dd648 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignBR.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: eeac3acbf7d1cd54fabfb1c4a12f9fc8 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCC.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCC.png new file mode 100644 index 0000000..c5f85cc Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCC.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCC.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCC.png.meta new file mode 100644 index 0000000..75090ea --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCC.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 8f0cb66458819764b94b93250bae94b6 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCL.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCL.png new file mode 100644 index 0000000..39e1546 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCL.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCL.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCL.png.meta new file mode 100644 index 0000000..b0e188a --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCL.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 2a8208d8e80f90944b8ff2978292b03b +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCR.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCR.png new file mode 100644 index 0000000..9ec5557 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCR.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCR.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCR.png.meta new file mode 100644 index 0000000..6223c1c --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignCR.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 6f504a3fa8848264bb4fb9bb7d582dd5 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignHC.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignHC.png new file mode 100644 index 0000000..dc638a7 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignHC.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignHC.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignHC.png.meta new file mode 100644 index 0000000..7f4d729 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignHC.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: b9e0e5a8836018e4c810fbceba55a1b4 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignL.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignL.png new file mode 100644 index 0000000..93c1812 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignL.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignL.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignL.png.meta new file mode 100644 index 0000000..c7e801b --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignL.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: d18ceface0c20014b8db4bba05a41b83 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignR.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignR.png new file mode 100644 index 0000000..c1aca04 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignR.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignR.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignR.png.meta new file mode 100644 index 0000000..884fe5f --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignR.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 727ba41e4cc95fe4a98b07301e3ebfc8 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignT.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignT.png new file mode 100644 index 0000000..b4397c6 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignT.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignT.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignT.png.meta new file mode 100644 index 0000000..30bc025 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignT.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: b4785ec6d937dab4fa59da70b69afc9d +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTC.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTC.png new file mode 100644 index 0000000..de6a933 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTC.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTC.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTC.png.meta new file mode 100644 index 0000000..0d20edc --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTC.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 0f79253104349f44cb73978f6c8e93de +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTL.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTL.png new file mode 100644 index 0000000..627b907 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTL.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTL.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTL.png.meta new file mode 100644 index 0000000..cf3e9ab --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTL.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 6efe1c8569d975640ba0c9f2ac4a9d61 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTR.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTR.png new file mode 100644 index 0000000..6a0d89d Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTR.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTR.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTR.png.meta new file mode 100644 index 0000000..bb1b90d --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignTR.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: e01c0b07c87513844ab88bb432bcf85a +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignVC.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignVC.png new file mode 100644 index 0000000..ec87ccf Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignVC.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignVC.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignVC.png.meta new file mode 100644 index 0000000..52134bf --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_alignVC.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: d1d45eadab0e41c4a82cdffb6396b1d7 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_camera.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_camera.png new file mode 100644 index 0000000..f146516 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_camera.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_camera.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_camera.png.meta new file mode 100644 index 0000000..e362a81 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_camera.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 37639be6148186645bca3fce45d5aa22 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_camera_border.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_camera_border.png new file mode 100644 index 0000000..bab977d Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_camera_border.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_camera_border.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_camera_border.png.meta new file mode 100644 index 0000000..234280c --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_camera_border.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 358cddede8023574191e0aae610a4645 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_cog.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_cog.png new file mode 100644 index 0000000..b7f481e Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_cog.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_cog.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_cog.png.meta new file mode 100644 index 0000000..2a9bf06 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_cog.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 7c83a08052c9e2f49b47897a637994de +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_cog_border.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_cog_border.png new file mode 100644 index 0000000..30bdb8b Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_cog_border.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_cog_border.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_cog_border.png.meta new file mode 100644 index 0000000..d9323e2 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_cog_border.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 6862027f2176eae40a3143c562466a1b +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_comment.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_comment.png new file mode 100644 index 0000000..8735b7c Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_comment.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_comment.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_comment.png.meta new file mode 100644 index 0000000..1e64e47 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_comment.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 622fdb780ae13e840938631c5ed708f2 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_comment_border.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_comment_border.png new file mode 100644 index 0000000..d61a35d Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_comment_border.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_comment_border.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_comment_border.png.meta new file mode 100644 index 0000000..2f10151 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_comment_border.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: d98b8847646169c4fb5af28dd84c4179 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_delete.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_delete.png new file mode 100644 index 0000000..85bb248 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_delete.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_delete.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_delete.png.meta new file mode 100644 index 0000000..31ad788 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_delete.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 6b1f9e1e1c2cf004b8e3bdd3033a8e75 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_demigiant.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_demigiant.png new file mode 100644 index 0000000..3445065 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_demigiant.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_demigiant.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_demigiant.png.meta new file mode 100644 index 0000000..6bac83d --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_demigiant.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 229d0d11465a822449f78a50dbf7104d +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_distributeHAlignT.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_distributeHAlignT.png new file mode 100644 index 0000000..90dc9de Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_distributeHAlignT.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_distributeHAlignT.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_distributeHAlignT.png.meta new file mode 100644 index 0000000..d5af1eb --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_distributeHAlignT.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 1ccb12a4b0bf8f447b2cc114851732f5 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_distributeVAlignL.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_distributeVAlignL.png new file mode 100644 index 0000000..a762110 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_distributeVAlignL.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_distributeVAlignL.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_distributeVAlignL.png.meta new file mode 100644 index 0000000..50dfd23 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_distributeVAlignL.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 32eaa0efb2b38774ea9705b40fdcc00a +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_doing.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_doing.png new file mode 100644 index 0000000..ed34625 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_doing.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_doing.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_doing.png.meta new file mode 100644 index 0000000..9d3c5d9 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_doing.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: 4dd24a9f658e7a3438d4fa08fb85aba3 +timeCreated: 1648211899 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_end.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_end.png new file mode 100644 index 0000000..b71eefe Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_end.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_end.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_end.png.meta new file mode 100644 index 0000000..3580f68 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_end.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: a248c8288afb9184f953d9aa07a696b0 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_flipV.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_flipV.png new file mode 100644 index 0000000..f4525da Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_flipV.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_flipV.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_flipV.png.meta new file mode 100644 index 0000000..0708f25 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_flipV.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: c44ae4a96937e2c4b8be481648364682 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_foldout_closed.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_foldout_closed.png new file mode 100644 index 0000000..df26539 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_foldout_closed.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_foldout_closed.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_foldout_closed.png.meta new file mode 100644 index 0000000..fab01a6 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_foldout_closed.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 301c130dbb4bbba4e87072804939c861 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 100 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_foldout_open.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_foldout_open.png new file mode 100644 index 0000000..50a913a Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_foldout_open.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_foldout_open.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_foldout_open.png.meta new file mode 100644 index 0000000..cc34f91 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_foldout_open.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 18a5a7cde794cc04b9b446f0feedb3a0 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 100 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_heart.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_heart.png new file mode 100644 index 0000000..7ea0c06 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_heart.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_heart.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_heart.png.meta new file mode 100644 index 0000000..072d281 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_heart.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: d173388c1d9c32a418b5b777dd89d71a +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_heart_border.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_heart_border.png new file mode 100644 index 0000000..a533084 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_heart_border.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_heart_border.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_heart_border.png.meta new file mode 100644 index 0000000..f7b7f22 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_heart_border.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 669c487f3c9c5fe4abb6459f9c2628f0 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_light.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_light.png new file mode 100644 index 0000000..5a60bd0 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_light.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_light.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_light.png.meta new file mode 100644 index 0000000..849e0ad --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_light.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 4f69b96f9308d8f4ea239773ef5b55c4 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_light_border.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_light_border.png new file mode 100644 index 0000000..a29a859 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_light_border.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_light_border.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_light_border.png.meta new file mode 100644 index 0000000..bd76a57 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_light_border.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 252f207d01ecc87419cdba1d1c0ab1ea +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_lock.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_lock.png new file mode 100644 index 0000000..7b718a2 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_lock.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_lock.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_lock.png.meta new file mode 100644 index 0000000..b7bc6d4 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_lock.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: e3d0592dad579e141924133869455c53 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_lock_open.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_lock_open.png new file mode 100644 index 0000000..be85443 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_lock_open.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_lock_open.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_lock_open.png.meta new file mode 100644 index 0000000..a870de6 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_lock_open.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 8d60feae84bdb2d4eb16a0037056c588 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_nodeArrow.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_nodeArrow.png new file mode 100644 index 0000000..e236c92 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_nodeArrow.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_nodeArrow.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_nodeArrow.png.meta new file mode 100644 index 0000000..aabc040 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_nodeArrow.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 4aa34055b1d36ef479af3d7b5701b28a +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ok.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ok.png new file mode 100644 index 0000000..b4d864a Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ok.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ok.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ok.png.meta new file mode 100644 index 0000000..029aabf --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ok.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 34f39b5a760ddbb4d8b8749852868335 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_optionsDropdown.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_optionsDropdown.png new file mode 100644 index 0000000..1d89e2a Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_optionsDropdown.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_optionsDropdown.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_optionsDropdown.png.meta new file mode 100644 index 0000000..560af25 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_optionsDropdown.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 62a48d93e78c63b4ea9b46537c7c0091 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_play.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_play.png new file mode 100644 index 0000000..0608dcb Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_play.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_play.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_play.png.meta new file mode 100644 index 0000000..483c5b7 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_play.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 2a563a43c33f0f3428d02b3a43886fc2 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_play_border.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_play_border.png new file mode 100644 index 0000000..db4ac28 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_play_border.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_play_border.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_play_border.png.meta new file mode 100644 index 0000000..e57aa67 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_play_border.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 45e128e1cf00555479ee7934ab11cadf +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_skull.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_skull.png new file mode 100644 index 0000000..7e53975 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_skull.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_skull.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_skull.png.meta new file mode 100644 index 0000000..8d4e226 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_skull.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 01976ad42d31f494e8040d3e32e283dc +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_skull_border.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_skull_border.png new file mode 100644 index 0000000..6cc1c5f Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_skull_border.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_skull_border.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_skull_border.png.meta new file mode 100644 index 0000000..ae28986 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_skull_border.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 6dfd924c0ba23844fb5d04ad1560de22 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_star.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_star.png new file mode 100644 index 0000000..d280684 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_star.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_star.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_star.png.meta new file mode 100644 index 0000000..59f2768 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_star.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 645aafe2260b2884a9df05b4bc01b1ec +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_star_border.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_star_border.png new file mode 100644 index 0000000..4615829 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_star_border.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_star_border.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_star_border.png.meta new file mode 100644 index 0000000..955bf42 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_star_border.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 18f3a26aa87fccc4cb5e211d4c6de662 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_todo.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_todo.png new file mode 100644 index 0000000..8214de5 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_todo.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_todo.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_todo.png.meta new file mode 100644 index 0000000..6f04add --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_todo.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: c561c878c05ceb1448966fe706740008 +timeCreated: 1648211899 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ui.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ui.png new file mode 100644 index 0000000..afdcff3 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ui.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ui.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ui.png.meta new file mode 100644 index 0000000..0d3bf2e --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ui.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: cb46e1d925af22d43a6f8bf0e1d459e6 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ui_border.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ui_border.png new file mode 100644 index 0000000..6613a3d Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ui_border.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ui_border.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ui_border.png.meta new file mode 100644 index 0000000..2ee6aab --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_ui_border.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: c0c40ceac3c6df146a0fcd4e6b226540 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_visibility.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_visibility.png new file mode 100644 index 0000000..56a1324 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_visibility.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_visibility.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_visibility.png.meta new file mode 100644 index 0000000..8dced06 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_visibility.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 55c2b426022dac44f9b25f0cba28aa45 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_visibility_off.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_visibility_off.png new file mode 100644 index 0000000..e1a2c91 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_visibility_off.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_visibility_off.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_visibility_off.png.meta new file mode 100644 index 0000000..a0db454 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/ico_visibility_off.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 0c0132429106c8a4d89d9d0a6b723ec3 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/orangeSquare.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/orangeSquare.png new file mode 100644 index 0000000..c272180 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/orangeSquare.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/orangeSquare.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/orangeSquare.png.meta new file mode 100644 index 0000000..012525b --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/orangeSquare.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 3e730492361eb6e45be5c5fdafac23be +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 100 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project.meta new file mode 100644 index 0000000..8ddc4ff --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 52bdbb53205da074d9937b996806e2e2 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_atlas.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_atlas.png new file mode 100644 index 0000000..80dc387 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_atlas.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_atlas.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_atlas.png.meta new file mode 100644 index 0000000..eddd2e8 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_atlas.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: e2279677842a8064fbae0bc889fb85ab +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_audio.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_audio.png new file mode 100644 index 0000000..90c5212 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_audio.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_audio.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_audio.png.meta new file mode 100644 index 0000000..30cc40c --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_audio.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: e1af8927fb6f5634896d59aed409a589 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_bundle.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_bundle.png new file mode 100644 index 0000000..c418038 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_bundle.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_bundle.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_bundle.png.meta new file mode 100644 index 0000000..66ef715 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_bundle.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 58676a985ae875646b7be748cf4499fd +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_cog.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_cog.png new file mode 100644 index 0000000..fd589a0 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_cog.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_cog.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_cog.png.meta new file mode 100644 index 0000000..fa51749 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_cog.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: fb605a2688b31194887f2e7a6769235b +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_cross.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_cross.png new file mode 100644 index 0000000..a34a3e8 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_cross.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_cross.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_cross.png.meta new file mode 100644 index 0000000..529d85c --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_cross.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 3b67e53c8c2f8114b966c0e70d452419 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_demigiant.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_demigiant.png new file mode 100644 index 0000000..99d0cf9 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_demigiant.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_demigiant.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_demigiant.png.meta new file mode 100644 index 0000000..8276473 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_demigiant.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: f36ab42cc6fcdfd4187033279d3d14a9 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_folder.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_folder.png new file mode 100644 index 0000000..9bba7d0 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_folder.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_folder.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_folder.png.meta new file mode 100644 index 0000000..e0a5072 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_folder.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 4f2c4b43188596b47866d41e1dc13c8a +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_fonts.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_fonts.png new file mode 100644 index 0000000..9ce1a4d Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_fonts.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_fonts.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_fonts.png.meta new file mode 100644 index 0000000..996c26e --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_fonts.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: cf986943c88c2254780c17b2b5e3bc2f +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_heart.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_heart.png new file mode 100644 index 0000000..f7ebe72 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_heart.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_heart.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_heart.png.meta new file mode 100644 index 0000000..ead0de6 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_heart.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 20794834c0a413f408b80110d0fc73b8 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_materials.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_materials.png new file mode 100644 index 0000000..5a4b7eb Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_materials.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_materials.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_materials.png.meta new file mode 100644 index 0000000..8e57f77 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_materials.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: e02713e10d7aced44a7a651231f0adef +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_models.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_models.png new file mode 100644 index 0000000..42f1f23 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_models.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_models.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_models.png.meta new file mode 100644 index 0000000..0195fcf --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_models.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 09a0cde07b4d75f49b4c817932791b81 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_particles.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_particles.png new file mode 100644 index 0000000..3ffa475 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_particles.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_particles.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_particles.png.meta new file mode 100644 index 0000000..560f0dd --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_particles.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 8003873ab749935489bb11f23f830856 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_play.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_play.png new file mode 100644 index 0000000..c441add Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_play.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_play.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_play.png.meta new file mode 100644 index 0000000..2bef6e5 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_play.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: d8306b1e159c72c4ebc9a4fc31debe60 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_prefab.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_prefab.png new file mode 100644 index 0000000..abc4353 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_prefab.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_prefab.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_prefab.png.meta new file mode 100644 index 0000000..47f7775 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_prefab.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: ed3789262161efa4fa33c85ca534590e +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_scripts.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_scripts.png new file mode 100644 index 0000000..c79b668 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_scripts.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_scripts.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_scripts.png.meta new file mode 100644 index 0000000..2b2bbf9 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_scripts.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 96cbdf605b8ddb34da384703f2d0b849 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_shaders.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_shaders.png new file mode 100644 index 0000000..ed3b4bb Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_shaders.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_shaders.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_shaders.png.meta new file mode 100644 index 0000000..1d860ee --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_shaders.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: f252c69cd0163714eba038403f61b09e +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_skull.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_skull.png new file mode 100644 index 0000000..22930f4 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_skull.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_skull.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_skull.png.meta new file mode 100644 index 0000000..68df579 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_skull.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: d563d6ce25cd2ca48b185ec47a74a3fb +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_star.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_star.png new file mode 100644 index 0000000..90483b3 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_star.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_star.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_star.png.meta new file mode 100644 index 0000000..f872413 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_star.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 21820ec6fc9dd0b4fbf42a3b93fdad4e +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_terrains.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_terrains.png new file mode 100644 index 0000000..750996d Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_terrains.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_terrains.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_terrains.png.meta new file mode 100644 index 0000000..946cabd --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_terrains.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 4a091a7609ef2d34bbdfaa1a886deb18 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_textures.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_textures.png new file mode 100644 index 0000000..6aae964 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_textures.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_textures.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_textures.png.meta new file mode 100644 index 0000000..c18d4ea --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/project/ico_textures.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 3e6b96a975eba1c43b2bad66fb7f8b4a +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/purpleSquare.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/purpleSquare.png new file mode 100644 index 0000000..dd219ac Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/purpleSquare.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/purpleSquare.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/purpleSquare.png.meta new file mode 100644 index 0000000..96df50f --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/purpleSquare.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: dc0ca9b32ae9fd049911671cf1a480bf +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/redSquare.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/redSquare.png new file mode 100644 index 0000000..798457f Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/redSquare.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/redSquare.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/redSquare.png.meta new file mode 100644 index 0000000..299f17b --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/redSquare.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: fbdd7ecf39c13bf48a5bd02a1159c90b +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorder.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorder.png new file mode 100644 index 0000000..51afe67 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorder.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorder.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorder.png.meta new file mode 100644 index 0000000..50cd914 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorder.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: afd7d0ddb1d6c744b9cb87ae49b2ce62 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderAlpha15.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderAlpha15.png new file mode 100644 index 0000000..7000d8f Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderAlpha15.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderAlpha15.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderAlpha15.png.meta new file mode 100644 index 0000000..0488aae --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderAlpha15.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: dfd33662d9f6f3849bd92f6e159ca226 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved.png new file mode 100644 index 0000000..768cc82 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved.png.meta new file mode 100644 index 0000000..32d19bd --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 4896b5aa9d63dec498136c21ffce735b +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 100 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved02.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved02.png new file mode 100644 index 0000000..a1ed49d Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved02.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved02.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved02.png.meta new file mode 100644 index 0000000..180331a --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved02.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: ff88be84254fb1f4b9a81a27ae0b2e81 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved02_darkBorders.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved02_darkBorders.png new file mode 100644 index 0000000..2b313e4 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved02_darkBorders.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved02_darkBorders.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved02_darkBorders.png.meta new file mode 100644 index 0000000..dd83662 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved02_darkBorders.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: e3ae01f12865ad54ba365963bda55759 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedAlpha.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedAlpha.png new file mode 100644 index 0000000..e56d3b7 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedAlpha.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedAlpha.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedAlpha.png.meta new file mode 100644 index 0000000..44abb4e --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedAlpha.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: a1606d34a052ed3449da93edd229743e +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmpty.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmpty.png new file mode 100644 index 0000000..bbd3158 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmpty.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmpty.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmpty.png.meta new file mode 100644 index 0000000..a156e1a --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmpty.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 4578222ee7a511446b0c340551bf8740 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 100 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmpty02.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmpty02.png new file mode 100644 index 0000000..57714a5 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmpty02.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmpty02.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmpty02.png.meta new file mode 100644 index 0000000..72910c0 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmpty02.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 7d504312fad10f040b95bd8836dc6fc6 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmptyThick.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmptyThick.png new file mode 100644 index 0000000..47b177f Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmptyThick.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmptyThick.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmptyThick.png.meta new file mode 100644 index 0000000..e9a6d7d --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurvedEmptyThick.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: fc3b86627d5fe1c4d865b80627e2e37c +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 100 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved_darkBorders.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved_darkBorders.png new file mode 100644 index 0000000..b9450f2 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved_darkBorders.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved_darkBorders.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved_darkBorders.png.meta new file mode 100644 index 0000000..db7c113 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved_darkBorders.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 25da15ac84743244ab4c860cf8798ec8 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 100 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved_darkBordersAlpha.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved_darkBordersAlpha.png new file mode 100644 index 0000000..4ddd37a Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved_darkBordersAlpha.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved_darkBordersAlpha.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved_darkBordersAlpha.png.meta new file mode 100644 index 0000000..a248e7c --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderCurved_darkBordersAlpha.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: f536c51d3da3f2e4ca93ac8773ec2ad8 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty.png new file mode 100644 index 0000000..188ed94 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty.png.meta new file mode 100644 index 0000000..365f54f --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 8db54efcce998554c86b796b37a7cdfa +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty01.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty01.png new file mode 100644 index 0000000..188ed94 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty01.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty01.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty01.png.meta new file mode 100644 index 0000000..c86a60d --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty01.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: aa8dc9238ab21e54ca88fa22698e4679 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 100 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty02.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty02.png new file mode 100644 index 0000000..ec9ead7 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty02.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty02.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty02.png.meta new file mode 100644 index 0000000..b2dcd93 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty02.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 29b0e8156f6fb774faf129c83bc9ee33 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 100 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty03.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty03.png new file mode 100644 index 0000000..ca376a8 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty03.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty03.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty03.png.meta new file mode 100644 index 0000000..e9f14fb --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderEmpty03.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: c0a56b88a1b449045b3fe5f561aa12fa +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 100 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderThickEmpty.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderThickEmpty.png new file mode 100644 index 0000000..ec9ead7 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderThickEmpty.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderThickEmpty.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderThickEmpty.png.meta new file mode 100644 index 0000000..89331d1 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderThickEmpty.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: c456d5ac01d2aa843a63985497b04931 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderThickerEmpty.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderThickerEmpty.png new file mode 100644 index 0000000..ca376a8 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderThickerEmpty.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderThickerEmpty.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderThickerEmpty.png.meta new file mode 100644 index 0000000..7365c26 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareBorderThickerEmpty.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 7acc6bd588627b046bc1c9b3cd78a6c7 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareCorners03.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareCorners03.png new file mode 100644 index 0000000..38dc1bb Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareCorners03.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareCorners03.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareCorners03.png.meta new file mode 100644 index 0000000..17c7922 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareCorners03.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: dec3ea647707588408ec0d11ab130b73 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareCornersEmpty02.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareCornersEmpty02.png new file mode 100644 index 0000000..facdba9 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareCornersEmpty02.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareCornersEmpty02.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareCornersEmpty02.png.meta new file mode 100644 index 0000000..7f51fb8 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/squareCornersEmpty02.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: ca2f91cc405eb144dad970eb23db2f72 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_empty.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_empty.png new file mode 100644 index 0000000..8e17561 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_empty.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_empty.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_empty.png.meta new file mode 100644 index 0000000..890be39 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_empty.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: d1278357b25e10442b6ca6c24edc9781 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_slanted.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_slanted.png new file mode 100644 index 0000000..c8cfc7f Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_slanted.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_slanted.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_slanted.png.meta new file mode 100644 index 0000000..7edd20d --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_slanted.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: c99a391f381fe534c80a193fe9f307a0 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_slanted_alpha.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_slanted_alpha.png new file mode 100644 index 0000000..7763091 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_slanted_alpha.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_slanted_alpha.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_slanted_alpha.png.meta new file mode 100644 index 0000000..b26261d --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileBars_slanted_alpha.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 018a5623a46db1d49b1e6ff2482b07ab +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileCheckerboard.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileCheckerboard.png new file mode 100644 index 0000000..10755e3 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileCheckerboard.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileCheckerboard.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileCheckerboard.png.meta new file mode 100644 index 0000000..acb7d17 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/tileCheckerboard.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 1954196ce2bc5c3478b215b39212c3cd +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + 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: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 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: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/transparentSquare.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/transparentSquare.png new file mode 100644 index 0000000..c745068 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/transparentSquare.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/transparentSquare.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/transparentSquare.png.meta new file mode 100644 index 0000000..cdc61f9 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/transparentSquare.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 4d338c631fa36f345b72a36f1c91ff9a +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 100 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot.png new file mode 100644 index 0000000..768a2da Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot.png.meta new file mode 100644 index 0000000..afcc984 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: ed7cb8f9a27664e48896c904189f0e2c +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot_darkBorder.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot_darkBorder.png new file mode 100644 index 0000000..705c72b Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot_darkBorder.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot_darkBorder.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot_darkBorder.png.meta new file mode 100644 index 0000000..2758634 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot_darkBorder.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 27df4ca974a8eaf40803907859421506 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot_whiteBorderAlpha.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot_whiteBorderAlpha.png new file mode 100644 index 0000000..2a081f6 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot_whiteBorderAlpha.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot_whiteBorderAlpha.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot_whiteBorderAlpha.png.meta new file mode 100644 index 0000000..8bfeba8 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteDot_whiteBorderAlpha.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 039dc89c76661c344b7776f8a47cc5a4 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare.png new file mode 100644 index 0000000..afc2459 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare.png.meta new file mode 100644 index 0000000..2a4aa36 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: dfe6e0ac3e5f24740a17e14b65e08406 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 100 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha10.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha10.png new file mode 100644 index 0000000..6480ee2 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha10.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha10.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha10.png.meta new file mode 100644 index 0000000..1134262 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha10.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 93b68213089b05943a651574eb7e2fb5 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 100 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha15.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha15.png new file mode 100644 index 0000000..e6f3c42 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha15.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha15.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha15.png.meta new file mode 100644 index 0000000..8dfc149 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha15.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 5510cdd48a6aaaa439c95ef5b2fe9e28 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha25.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha25.png new file mode 100644 index 0000000..5219f2a Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha25.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha25.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha25.png.meta new file mode 100644 index 0000000..cdfa23e --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha25.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 511f6b24c50557a40a09633b12b8b8ef +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 100 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha50.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha50.png new file mode 100644 index 0000000..ad90433 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha50.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha50.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha50.png.meta new file mode 100644 index 0000000..103bbf1 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha50.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: ef40b00a83f7bd34f84851386b3321f0 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha80.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha80.png new file mode 100644 index 0000000..def9ea9 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha80.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha80.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha80.png.meta new file mode 100644 index 0000000..4dd7287 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareAlpha80.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 11848dd30e516d846a02cd302634d317 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareCurved.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareCurved.png new file mode 100644 index 0000000..fb54c9f Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareCurved.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareCurved.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareCurved.png.meta new file mode 100644 index 0000000..8a6304e --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareCurved.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: 070edb62059c27b408e16f28cb87f941 +timeCreated: 1604057757 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareCurved02.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareCurved02.png new file mode 100644 index 0000000..c7ed49b Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareCurved02.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareCurved02.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareCurved02.png.meta new file mode 100644 index 0000000..45fdb5f --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquareCurved02.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: 282d742ce2ddf9f458812ab84ea6fa88 +timeCreated: 1604057757 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare_fadeOut_bt.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare_fadeOut_bt.png new file mode 100644 index 0000000..0f754e5 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare_fadeOut_bt.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare_fadeOut_bt.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare_fadeOut_bt.png.meta new file mode 100644 index 0000000..27a1460 --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare_fadeOut_bt.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: a40dc0d6372a9084fb45976308087290 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/yellowSquare.png b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/yellowSquare.png new file mode 100644 index 0000000..c41f635 Binary files /dev/null and b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/yellowSquare.png differ diff --git a/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/yellowSquare.png.meta b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/yellowSquare.png.meta new file mode 100644 index 0000000..54af05b --- /dev/null +++ b/Assets/Plugins/Demigiant/DemiLib/Core/Editor/Imgs/yellowSquare.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 517a5bfe18f2ee04d9925db10be034e2 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/Demigiant/readme_DOTweenPro.txt b/Assets/Plugins/Demigiant/readme_DOTweenPro.txt new file mode 100644 index 0000000..9837c95 --- /dev/null +++ b/Assets/Plugins/Demigiant/readme_DOTweenPro.txt @@ -0,0 +1,35 @@ +DOTween and DOTween Pro are copyright (c) 2014-2018 Daniele Giardini - Demigiant + +// IMPORTANT!!! ///////////////////////////////////////////// +// Upgrading DOTween from versions older than 1.2.000 /////// +// (or DOTween Pro older than 1.0.000) ////////////////////// +------------------------------------------------------------- +If you're upgrading your project from a version of DOTween older than 1.2.000 (or DOTween Pro older than 1.0.000) please follow these instructions carefully. +1) Import the new version in the same folder as the previous one, overwriting old files. A lot of errors will appear but don't worry +2) Close and reopen Unity (and your project). This is fundamental: skipping this step will cause a bloodbath +3) Open DOTween's Utility Panel (Tools > Demigiant > DOTween Utility Panel) if it doesn't open automatically, then press "Setup DOTween...": this will run the upgrade setup +4) From the Add/Remove Modules panel that opens, activate/deactivate Modules for Unity systems and for external assets (like TextMesh Pro) + +// GET STARTED ////////////////////////////////////////////// + +- After importing a new DOTween update, select DOTween's Utility Panel from the "Tools/Demigiant" menu (if it doesn't open automatically) and press the "Setup DOTween..." button to activate/deactivate Modules. You can also access a Preferences Tab from there to choose default settings for DOTween. + +// VISUAL SCRIPTING (PRO ONLY) +- To animate a gameObject, select it and choose "Add Component > DOTween > DOTween Animation" +- To animate a gameObject along a path, select it and choose "Add Component > DOTween > DOTween Path" + +// SCRIPTING +- In your code, add "using DG.Tweening" to each class where you want to use DOTween. +- You're ready to tween. Check out the links below for full documentation and license info. + + +// LINKS /////////////////////////////////////////////////////// + +DOTween website (documentation, examples, etc): http://dotween.demigiant.com +DOTween license: http://dotween.demigiant.com/license.php +DOTween repository (Google Code): https://code.google.com/p/dotween/ +Demigiant website (documentation, examples, etc): http://www.demigiant.com + +// NOTES ////////////////////////////////////////////////////// + +- DOTween's Utility Panel can be found under "Tools > Demigiant > DOTween Utility Panel" and also contains other useful options, plus a tab to set DOTween's preferences \ No newline at end of file diff --git a/Assets/Plugins/Demigiant/readme_DOTweenPro.txt.meta b/Assets/Plugins/Demigiant/readme_DOTweenPro.txt.meta new file mode 100644 index 0000000..ef7a8e9 --- /dev/null +++ b/Assets/Plugins/Demigiant/readme_DOTweenPro.txt.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 24123b2fcdc15c943bed44e0c6beeec7 +labels: +- Tween +- Tweening +- Animation +- HOTween +- Paths +- VisualScripting +- VisualEditor +- iTween +- LeanTween +- DFTween +- Ease +- Easing +- Shake +- Punch +TextScriptImporter: + userData: diff --git a/Assets/Plugins/HighlightPlus.meta b/Assets/Plugins/HighlightPlus.meta new file mode 100644 index 0000000..a3bbead --- /dev/null +++ b/Assets/Plugins/HighlightPlus.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 5db7164e964ae4c6b82d2283320ad13d +folderAsset: yes +timeCreated: 1557315954 +licenseType: Store +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo.meta b/Assets/Plugins/HighlightPlus/Demo.meta new file mode 100644 index 0000000..c699cd3 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b0c676f447c26429db5c9404720e279c +folderAsset: yes +timeCreated: 1542876294 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Demo1_HighlightExample.unity b/Assets/Plugins/HighlightPlus/Demo/Demo1_HighlightExample.unity new file mode 100644 index 0000000..05cdaee --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Demo1_HighlightExample.unity @@ -0,0 +1,2132 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 2 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44717538, g: 0.49709505, b: 0.5751526, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 1 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 112000000, guid: 334c1ca31d9f941d69425982909406b3, + type: 2} + m_UseShadowmask: 0 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &165230857 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 102722, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 165230858} + m_Layer: 0 + m_Name: CalibrationWalls + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &165230858 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 431536, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 165230857} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1165184421} + - {fileID: 181859161} + - {fileID: 1435719952} + - {fileID: 1525858954} + m_Father: {fileID: 1694850532} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &181859160 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 125776, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 181859161} + - component: {fileID: 181859164} + - component: {fileID: 181859163} + - component: {fileID: 181859162} + m_Layer: 0 + m_Name: CalibrationWallRearRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &181859161 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 494730, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5000001, w: 0.49999994} + m_LocalPosition: {x: -2.5, y: 2.5, z: 0} + m_LocalScale: {x: 0.5, y: 1, z: 0.49999997} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &181859162 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2304408, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &181859163 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6442406, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &181859164 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3378452, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &472769855 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 472769856} + - component: {fileID: 472769857} + - component: {fileID: 472769858} + m_Layer: 0 + m_Name: DirectionalLight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &472769856 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472769855} + m_LocalRotation: {x: -0.5596046, y: 0.71660864, z: -0.3668599, w: -0.19679597} + m_LocalPosition: {x: 0, y: 2, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 48.249, y: 168.87, z: -80.97} +--- !u!108 &472769857 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 10800000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472769855} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.9885849, b: 0.95686275, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.802082 + m_CookieSize: 10 + m_Shadows: + m_Type: 1 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 0.5 + m_Bias: 1 + m_NormalBias: 1 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!114 &472769858 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472769855} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UsePipelineSettings: 1 +--- !u!1 &567592204 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 567592205} + - component: {fileID: 567592208} + - component: {fileID: 567592207} + - component: {fileID: 567592206} + m_Layer: 0 + m_Name: SmallWall + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &567592205 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_LocalRotation: {x: 0, y: 0.34513432, z: 0, w: 0.93855333} + m_LocalPosition: {x: 1.42, y: 0.34, z: -0.77} + m_LocalScale: {x: 2, y: 1, z: 0.2} + m_Children: [] + m_Father: {fileID: 1694850532} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 40.38, z: 0} +--- !u!23 &567592206 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &567592207 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &567592208 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &613470776 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 613470777} + - component: {fileID: 613470779} + - component: {fileID: 613470778} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &613470777 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1605869163} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.1} + m_AnchorMax: {x: 1, y: 0.9} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &613470778 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 90 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'HIGHLIGHT PLUS (OUTLINE, GLOW AND SEE-THROUGH) DEMO + + Click + or hover spheres to show effect. Press C to randomize glow color on gold sphere. + + This + asset requires Universal Rendering Pipeline. Please check README for setup instructions.' +--- !u!222 &613470779 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_CullTransparentMesh: 0 +--- !u!1 &617211756 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 195550, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 617211757} + - component: {fileID: 617211762} + - component: {fileID: 617211761} + - component: {fileID: 617211760} + - component: {fileID: 617211759} + - component: {fileID: 617211758} + m_Layer: 1 + m_Name: SilkSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &617211757 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 403562, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1, y: 0.325, z: 0} + m_LocalScale: {x: 0.65, y: 0.65, z: 0.65} + m_Children: [] + m_Father: {fileID: 1202089666} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &617211758 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 1 + previewInEditor: 1 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0.5 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureScale: 1 + outline: 1 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineWidth: 0.62 + outlineQuality: 0 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 1.71 + glowWidth: 0.14 + glowQuality: 1 + glowDownsampling: 2 + glowHQColor: {r: 1, g: 0.52205884, b: 0.52205884, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + innerGlow: 0.79 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 30 + targetFXInitialScale: 2 + targetFXEndScale: 1.1 + targetFXScaleToRenderBounds: 0 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 2 + targetFXVisibility: 1 + seeThrough: 1 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + rmsCount: 1 + hitFxInitialIntensity: 1 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &617211759 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + highlightOnHover: 1 + triggerMode: 1 + raycastCamera: {fileID: 965526243} + raycastSource: 0 + minDistance: 0 + maxDistance: 0 + respectUI: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 0 + selectOnClick: 0 + selectedProfile: {fileID: 0} + selectedAndHighlightedProfile: {fileID: 0} + singleSelection: 0 + toggle: 0 +--- !u!23 &617211760 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2319362, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 3134ae80e55101b468fe9ea362327f28, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 617211757} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!135 &617211761 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 13518414, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &617211762 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3336432, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &656694097 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 158430, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 656694098} + - component: {fileID: 656694104} + - component: {fileID: 656694103} + - component: {fileID: 656694102} + - component: {fileID: 656694101} + - component: {fileID: 656694100} + - component: {fileID: 656694099} + m_Layer: 1 + m_Name: GoldSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &656694098 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 494476, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.85, y: 0.325, z: 0.14} + m_LocalScale: {x: 0.65, y: 0.65, z: 0.65} + m_Children: + - {fileID: 1837449480} + m_Father: {fileID: 1202089666} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &656694099 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 36aa3934b8f65413188fabe723ded4da, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &656694100 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + previewInEditor: 1 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0.488 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureScale: 1 + outline: 1 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineWidth: 0.62 + outlineQuality: 0 + outlineDownsampling: 1 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 1.71 + glowWidth: 4.5 + glowQuality: 2 + glowDownsampling: 1 + glowHQColor: {r: 0.6392157, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowVisibility: 0 + targetFX: 1 + targetFXTexture: {fileID: 2800000, guid: 1de3c566a6c8c405b9f6f453137273ec, type: 3} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 1 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + rmsCount: 1 + hitFxInitialIntensity: 1 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &656694101 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + highlightOnHover: 1 + triggerMode: 1 + raycastCamera: {fileID: 965526243} + raycastSource: 0 + minDistance: 0 + maxDistance: 0 + respectUI: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 0 + selectOnClick: 0 + selectedProfile: {fileID: 0} + selectedAndHighlightedProfile: {fileID: 0} + singleSelection: 0 + toggle: 0 +--- !u!23 &656694102 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2319392, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 5b12cf4be3e7c5149a5f24108ee6a551, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!135 &656694103 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 13548954, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &656694104 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3351936, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &965526239 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 965526244} + - component: {fileID: 965526243} + - component: {fileID: 965526240} + - component: {fileID: 965526241} + m_Layer: 0 + m_Name: Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &965526240 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 8100000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 +--- !u!114 &965526241 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !u!20 &965526243 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2000000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.25, g: 0.25, b: 0.25, a: 0.003921569} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 20 + field of view: 40 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &965526244 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_LocalRotation: {x: 0.0010074005, y: 0.91790915, z: 0.0024223588, w: -0.39678213} + m_LocalPosition: {x: 2.4200273, y: 0.72167146, z: 2.4644732} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1165184420 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 182018, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1165184421} + - component: {fileID: 1165184424} + - component: {fileID: 1165184423} + - component: {fileID: 1165184422} + m_Layer: 0 + m_Name: CalibrationWallRearLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1165184421 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 464034, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0, y: 2.5, z: -2.5} + m_LocalScale: {x: 0.5, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1165184422 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2391912, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1165184423 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6494426, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1165184424 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3305810, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1179472412 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100006, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1179472413} + - component: {fileID: 1179472416} + - component: {fileID: 1179472415} + - component: {fileID: 1179472414} + m_Layer: 0 + m_Name: CalibrationFloor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1179472413 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400006, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 1694850532} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1179472414 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: d681c1d72c3c16149abd2f0f25ca628c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1179472415 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1179472416 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1202089665 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 190392, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1202089666} + m_Layer: 0 + m_Name: SampleSpheres + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1202089666 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 470018, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1202089665} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1392572691} + - {fileID: 656694098} + - {fileID: 617211757} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1392572690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 145214, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1392572691} + - component: {fileID: 1392572696} + - component: {fileID: 1392572695} + - component: {fileID: 1392572694} + - component: {fileID: 1392572693} + - component: {fileID: 1392572692} + m_Layer: 1 + m_Name: PlasticSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1392572691 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 473706, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.325, z: 1} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 1202089666} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1392572692 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 1 + previewInEditor: 1 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 1 + fadeOutDuration: 1 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 0 + overlayMinIntensity: 0 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureScale: 1 + outline: 1 + outlineColor: {r: 1, g: 1, b: 1, a: 1} + outlineWidth: 0.62 + outlineQuality: 0 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 5 + glowWidth: 0.14 + glowQuality: 1 + glowDownsampling: 2 + glowHQColor: {r: 0.19117647, g: 0.36409733, b: 1, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 2800000, guid: 1de3c566a6c8c405b9f6f453137273ec, type: 3} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 2 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 0 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 2 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + rmsCount: 1 + hitFxInitialIntensity: 1 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &1392572693 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + highlightOnHover: 1 + triggerMode: 1 + raycastCamera: {fileID: 965526243} + raycastSource: 0 + minDistance: 0 + maxDistance: 0 + respectUI: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 0 + selectOnClick: 0 + selectedProfile: {fileID: 0} + selectedAndHighlightedProfile: {fileID: 0} + singleSelection: 0 + toggle: 0 +--- !u!23 &1392572694 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2375834, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 958abb01761e1dc4ebf9ffdf8252d20e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!135 &1392572695 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 13564548, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1392572696 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3335484, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1435719951 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1435719952} + - component: {fileID: 1435719955} + - component: {fileID: 1435719954} + - component: {fileID: 1435719953} + m_Layer: 0 + m_Name: CalibrationWallFrontLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1435719952 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_LocalRotation: {x: 0.5000003, y: -0.5000001, z: -0.49999964, w: -0.50000006} + m_LocalPosition: {x: 2.4999998, y: 2.5, z: 0} + m_LocalScale: {x: 0.4999999, y: 1, z: 0.4999999} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1435719953 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1435719954 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1435719955 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1525858953 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1525858954} + - component: {fileID: 1525858957} + - component: {fileID: 1525858956} + - component: {fileID: 1525858955} + m_Layer: 0 + m_Name: CalibrationWallFrontRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1525858954 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_LocalRotation: {x: 0.70710695, y: 0.0000002682209, z: 0.00000021584746, w: -0.7071066} + m_LocalPosition: {x: 0, y: 2.500002, z: 2.5000014} + m_LocalScale: {x: 0.49999997, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1525858955 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1525858956 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1525858957 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1605869162 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1605869163} + - component: {fileID: 1605869165} + - component: {fileID: 1605869164} + m_Layer: 5 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1605869163 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 613470777} + m_Father: {fileID: 1819248545} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0.1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1605869164 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.641} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1605869165 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_CullTransparentMesh: 0 +--- !u!1 &1694850531 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1694850532} + m_Layer: 0 + m_Name: StaticGeometry + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 4294967295 + m_IsActive: 1 +--- !u!4 &1694850532 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1694850531} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1179472413} + - {fileID: 165230858} + - {fileID: 567592205} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1819248541 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1819248545} + - component: {fileID: 1819248544} + - component: {fileID: 1819248543} + - component: {fileID: 1819248542} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1819248542 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1819248543 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1819248544 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1819248545 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1605869163} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &1837449479 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1837449480} + - component: {fileID: 1837449481} + m_Layer: 0 + m_Name: Reflection Probe + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1837449480 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1837449479} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 656694098} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!215 &1837449481 +ReflectionProbe: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1837449479} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 1 + m_RefreshMode: 1 + m_TimeSlicingMode: 0 + m_Resolution: 512 + m_UpdateFrequency: 0 + m_BoxSize: {x: 5, y: 5, z: 5} + m_BoxOffset: {x: 0, y: 0, z: 0} + m_NearClip: 0.3 + m_FarClip: 20 + m_ShadowDistance: 20 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967293 + m_IntensityMultiplier: 1 + m_BlendDistance: 1 + m_HDR: 1 + m_BoxProjection: 0 + m_RenderDynamicObjects: 0 + m_UseOcclusionCulling: 0 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} diff --git a/Assets/Plugins/HighlightPlus/Demo/Demo1_HighlightExample.unity.meta b/Assets/Plugins/HighlightPlus/Demo/Demo1_HighlightExample.unity.meta new file mode 100644 index 0000000..ee3f98e --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Demo1_HighlightExample.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b18a9c16bcd174b1683d370384a8cab7 +timeCreated: 1542877475 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Demo2_SelectionExample.unity b/Assets/Plugins/HighlightPlus/Demo/Demo2_SelectionExample.unity new file mode 100644 index 0000000..c6f46d9 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Demo2_SelectionExample.unity @@ -0,0 +1,2106 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 2 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44717664, g: 0.49709702, b: 0.5751535, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 1 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 112000014, guid: 039bfaf33d1112a4d904b7d393a6e9bb, + type: 2} + m_LightingSettings: {fileID: 994670537} +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &54660272 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 54660274} + - component: {fileID: 54660273} + m_Layer: 0 + m_Name: ManualSelectionExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &54660273 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 54660272} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9dfa112658ab74560a6251002174910b, type: 3} + m_Name: + m_EditorClassIdentifier: + objectToSelect: {fileID: 656694098} +--- !u!4 &54660274 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 54660272} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 7.5509014, y: -4.251323, z: 28.678097} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 11 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &165230857 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 102722, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 165230858} + m_Layer: 0 + m_Name: CalibrationWalls + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &165230858 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 431536, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 165230857} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1165184421} + - {fileID: 181859161} + - {fileID: 1435719952} + - {fileID: 1525858954} + m_Father: {fileID: 1694850532} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &171019437 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 171019439} + - component: {fileID: 171019438} + m_Layer: 0 + m_Name: EventsExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &171019438 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 171019437} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dbe1fcf5ef14345779fec3adb4479bc3, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &171019439 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 171019437} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 7.5509014, y: -4.251323, z: 28.678097} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &181859160 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 125776, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 181859161} + - component: {fileID: 181859164} + - component: {fileID: 181859163} + - component: {fileID: 181859162} + m_Layer: 0 + m_Name: CalibrationWallRearRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &181859161 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 494730, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5000001, w: 0.49999994} + m_LocalPosition: {x: -2.5, y: 2.5, z: 0} + m_LocalScale: {x: 0.5, y: 1, z: 0.49999997} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &181859162 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2304408, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &181859163 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6442406, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &181859164 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3378452, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &207714439 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 207714440} + m_Layer: 0 + m_Name: --- SCENE --- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &207714440 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 207714439} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &472769855 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 472769856} + - component: {fileID: 472769857} + m_Layer: 0 + m_Name: DirectionalLight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &472769856 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472769855} + m_LocalRotation: {x: 0.4144551, y: -0.7420336, z: 0.5253307, w: -0.040507175} + m_LocalPosition: {x: 0, y: 2, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &472769857 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 10800000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472769855} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.9885849, b: 0.95686275, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.802082 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.01 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &613470776 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 613470777} + - component: {fileID: 613470779} + - component: {fileID: 613470778} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &613470777 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1605869163} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.1} + m_AnchorMax: {x: 1, y: 0.9} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &613470778 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 90 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'HIGHLIGHT PLUS SELECTION DEMO (USES HIGHLIGHT MANAGER) + + Click + on spheres to select them. Click outside to clear selection. Press 1/2/3 keys + to select, toggle and unselect gold sphere.' +--- !u!222 &613470779 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_CullTransparentMesh: 0 +--- !u!1 &617211756 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 195550, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 617211757} + - component: {fileID: 617211762} + - component: {fileID: 617211761} + - component: {fileID: 617211760} + m_Layer: 1 + m_Name: SilkSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &617211757 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 403562, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.17, y: 0.325, z: 0} + m_LocalScale: {x: 0.65, y: 0.65, z: 0.65} + m_Children: [] + m_Father: {fileID: 1202089666} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &617211760 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2319362, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 3134ae80e55101b468fe9ea362327f28, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 617211757} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!135 &617211761 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 13518414, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &617211762 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3336432, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &656694097 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 158430, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 656694098} + - component: {fileID: 656694104} + - component: {fileID: 656694103} + - component: {fileID: 656694102} + m_Layer: 1 + m_Name: GoldSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &656694098 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 494476, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.85, y: 0.325, z: 0} + m_LocalScale: {x: 0.65, y: 0.65, z: 0.65} + m_Children: + - {fileID: 1837449480} + m_Father: {fileID: 1202089666} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &656694102 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2319392, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 5b12cf4be3e7c5149a5f24108ee6a551, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!135 &656694103 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 13548954, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &656694104 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3351936, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &900649477 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 900649478} + m_Layer: 0 + m_Name: --- DEMO SCRIPTS --- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &900649478 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 900649477} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &965526239 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 965526244} + - component: {fileID: 965526243} + - component: {fileID: 965526240} + - component: {fileID: 965526241} + m_Layer: 0 + m_Name: Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &965526240 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 8100000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 +--- !u!114 &965526241 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !u!20 &965526243 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2000000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.25, g: 0.25, b: 0.25, a: 0.003921569} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 20 + field of view: 40 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294963199 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &965526244 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_LocalRotation: {x: 0.0010074005, y: 0.91790915, z: 0.0024223588, w: -0.39678213} + m_LocalPosition: {x: 2.4200273, y: 0.72167146, z: 2.4644732} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!850595691 &994670537 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Settings.lighting + serializedVersion: 3 + m_GIWorkflowMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 1 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 0 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_TextureCompression: 1 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 1 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 1024 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentMIS: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 +--- !u!1 &1016798143 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1016798146} + - component: {fileID: 1016798145} + - component: {fileID: 1016798144} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1016798144 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1016798143} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &1016798145 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1016798143} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &1016798146 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1016798143} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1165184420 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 182018, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1165184421} + - component: {fileID: 1165184424} + - component: {fileID: 1165184423} + - component: {fileID: 1165184422} + m_Layer: 0 + m_Name: CalibrationWallRearLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1165184421 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 464034, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0, y: 2.5, z: -2.5} + m_LocalScale: {x: 0.5, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1165184422 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2391912, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &1165184423 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6494426, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1165184424 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3305810, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1179472412 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100006, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1179472413} + - component: {fileID: 1179472416} + - component: {fileID: 1179472415} + - component: {fileID: 1179472414} + m_Layer: 0 + m_Name: CalibrationFloor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1179472413 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400006, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 1694850532} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1179472414 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: d681c1d72c3c16149abd2f0f25ca628c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &1179472415 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1179472416 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1202089665 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 190392, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1202089666} + m_Layer: 0 + m_Name: SampleSpheres + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1202089666 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 470018, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1202089665} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1392572691} + - {fileID: 656694098} + - {fileID: 617211757} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1392572690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 145214, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1392572691} + - component: {fileID: 1392572696} + - component: {fileID: 1392572695} + - component: {fileID: 1392572694} + m_Layer: 1 + m_Name: PlasticSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1392572691 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 473706, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.325, z: 1} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 1202089666} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1392572694 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2375834, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 958abb01761e1dc4ebf9ffdf8252d20e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!135 &1392572695 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 13564548, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1392572696 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3335484, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1435719951 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1435719952} + - component: {fileID: 1435719955} + - component: {fileID: 1435719954} + - component: {fileID: 1435719953} + m_Layer: 0 + m_Name: CalibrationWallFrontLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1435719952 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_LocalRotation: {x: 0.5000003, y: -0.5000001, z: -0.49999964, w: -0.50000006} + m_LocalPosition: {x: 2.4999998, y: 2.5, z: 0} + m_LocalScale: {x: 0.4999999, y: 1, z: 0.4999999} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1435719953 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &1435719954 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1435719955 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1525858953 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1525858954} + - component: {fileID: 1525858957} + - component: {fileID: 1525858956} + - component: {fileID: 1525858955} + m_Layer: 0 + m_Name: CalibrationWallFrontRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1525858954 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_LocalRotation: {x: 0.70710695, y: 0.0000002682209, z: 0.00000021584746, w: -0.7071066} + m_LocalPosition: {x: 0, y: 2.500002, z: 2.5000014} + m_LocalScale: {x: 0.49999997, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1525858955 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &1525858956 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1525858957 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1605869162 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1605869163} + - component: {fileID: 1605869165} + - component: {fileID: 1605869164} + m_Layer: 5 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1605869163 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 613470777} + m_Father: {fileID: 1819248545} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0.1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1605869164 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.641} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1605869165 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_CullTransparentMesh: 0 +--- !u!1 &1669838390 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1669838393} + - component: {fileID: 1669838392} + - component: {fileID: 1669838391} + m_Layer: 0 + m_Name: HighlightPlusManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1669838391 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669838390} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: af4d46fd89b9543e5be2358ac0c9ced0, type: 3} + m_Name: + m_EditorClassIdentifier: + highlightOnHover: 1 + layerMask: + serializedVersion: 2 + m_Bits: 2 + raycastCamera: {fileID: 0} + raycastSource: 0 + minDistance: 0 + maxDistance: 0 + respectUI: 1 + selectOnClick: 1 + selectedProfile: {fileID: 11400000, guid: e6e74f38237364260b68bef0cd1b8795, type: 2} + selectedAndHighlightedProfile: {fileID: 11400000, guid: 77128a10e40704023952e72c2046e685, + type: 2} + singleSelection: 0 + toggle: 0 + keepSelection: 0 +--- !u!114 &1669838392 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669838390} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + previewInEditor: 1 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0.5 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 0 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.45 + outlineQuality: 3 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0.5 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 0 + hitFxInitialIntensity: 1 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!4 &1669838393 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669838390} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1694850531 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1694850532} + m_Layer: 0 + m_Name: StaticGeometry + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 4294967295 + m_IsActive: 1 +--- !u!4 &1694850532 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1694850531} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1179472413} + - {fileID: 165230858} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1819248541 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1819248545} + - component: {fileID: 1819248544} + - component: {fileID: 1819248543} + - component: {fileID: 1819248542} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1819248542 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1819248543 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &1819248544 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1819248545 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1605869163} + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &1837449479 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1837449480} + - component: {fileID: 1837449481} + m_Layer: 0 + m_Name: Reflection Probe + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1837449480 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1837449479} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 656694098} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!215 &1837449481 +ReflectionProbe: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1837449479} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 1 + m_RefreshMode: 1 + m_TimeSlicingMode: 0 + m_Resolution: 512 + m_UpdateFrequency: 0 + m_BoxSize: {x: 5, y: 5, z: 5} + m_BoxOffset: {x: 0, y: 0, z: 0} + m_NearClip: 0.3 + m_FarClip: 20 + m_ShadowDistance: 20 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967293 + m_IntensityMultiplier: 1 + m_BlendDistance: 1 + m_HDR: 1 + m_BoxProjection: 0 + m_RenderDynamicObjects: 0 + m_UseOcclusionCulling: 0 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} +--- !u!1 &1925176807 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1925176808} + m_Layer: 0 + m_Name: --- HIGHLIGHT MANAGER --- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &1925176808 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1925176807} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Plugins/HighlightPlus/Demo/Demo2_SelectionExample.unity.meta b/Assets/Plugins/HighlightPlus/Demo/Demo2_SelectionExample.unity.meta new file mode 100644 index 0000000..5501c5d --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Demo2_SelectionExample.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: eb334622a9e1f41368317711b187e4c2 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Demo3_HitFXExample.unity b/Assets/Plugins/HighlightPlus/Demo/Demo3_HitFXExample.unity new file mode 100644 index 0000000..3d7ddb3 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Demo3_HitFXExample.unity @@ -0,0 +1,2116 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 2 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.4471771, g: 0.4970975, b: 0.57515424, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 1 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 112000014, guid: 039bfaf33d1112a4d904b7d393a6e9bb, + type: 2} + m_UseShadowmask: 0 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &165230857 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 102722, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 165230858} + m_Layer: 0 + m_Name: CalibrationWalls + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &165230858 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 431536, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 165230857} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1165184421} + - {fileID: 181859161} + - {fileID: 1435719952} + - {fileID: 1525858954} + m_Father: {fileID: 1694850532} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &181859160 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 125776, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 181859161} + - component: {fileID: 181859164} + - component: {fileID: 181859163} + - component: {fileID: 181859162} + m_Layer: 0 + m_Name: CalibrationWallRearRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &181859161 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 494730, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5000001, w: 0.49999994} + m_LocalPosition: {x: -2.5, y: 2.5, z: 0} + m_LocalScale: {x: 0.5, y: 1, z: 0.49999997} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &181859162 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2304408, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &181859163 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6442406, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &181859164 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3378452, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &271039439 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 271039440} + m_Layer: 0 + m_Name: --- Other Scene Stuff --- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &271039440 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 271039439} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -4.729038, y: -3.3103254, z: -4.729038} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &472769855 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 472769856} + - component: {fileID: 472769857} + m_Layer: 0 + m_Name: DirectionalLight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &472769856 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472769855} + m_LocalRotation: {x: 0.4144551, y: -0.7420336, z: 0.5253307, w: -0.040507175} + m_LocalPosition: {x: 0, y: 2, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &472769857 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 10800000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472769855} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.9885849, b: 0.95686275, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.802082 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.01 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &567592204 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 567592205} + - component: {fileID: 567592208} + - component: {fileID: 567592207} + - component: {fileID: 567592206} + m_Layer: 0 + m_Name: SmallWall + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &567592205 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_LocalRotation: {x: 0, y: 0.34513432, z: 0, w: 0.93855333} + m_LocalPosition: {x: 1.42, y: 0.34, z: -0.77} + m_LocalScale: {x: 2, y: 1, z: 0.2} + m_Children: [] + m_Father: {fileID: 1694850532} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 40.38, z: 0} +--- !u!23 &567592206 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &567592207 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &567592208 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &613470776 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 613470777} + - component: {fileID: 613470779} + - component: {fileID: 613470778} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &613470777 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1605869163} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.1} + m_AnchorMax: {x: 1, y: 0.9} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &613470778 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 90 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'HIGHLIGHT PLUS HIT FX DEMO + + Click on + any capsule to trigger the effect.' +--- !u!222 &613470779 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_CullTransparentMesh: 0 +--- !u!1 &617211756 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 195550, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 617211757} + - component: {fileID: 617211762} + - component: {fileID: 617211760} + - component: {fileID: 617211759} + - component: {fileID: 617211758} + - component: {fileID: 617211761} + m_Layer: 1 + m_Name: Target 3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &617211757 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 403562, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.97, y: 0.65, z: -0.97} + m_LocalScale: {x: 0.65, y: 0.65, z: 0.65} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &617211758 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 1 + previewInEditor: 1 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0.5 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureScale: 1 + outline: 1 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineWidth: 0.5 + outlineQuality: 0 + outlineDownsampling: 2 + outlineVisibility: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 1 + glowWidth: 0.89 + glowQuality: 2 + glowDownsampling: 2 + glowHQColor: {r: 1, g: 0.52205884, b: 0.52205884, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + innerGlow: 0.79 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 30 + targetFXInitialScale: 2 + targetFXEndScale: 1.1 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 2 + targetFXVisibility: 1 + seeThrough: 1 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + rmsCount: 1 + hitFxInitialIntensity: 1 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 0.83026266, b: 0, a: 1} + hitFxRadius: 0.5 +--- !u!114 &617211759 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + highlightOnHover: 1 + triggerMode: 1 + raycastCamera: {fileID: 965526243} + raycastSource: 0 + minDistance: 0 + maxDistance: 0 + respectUI: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 0 + selectOnClick: 0 + selectedProfile: {fileID: 0} + selectedAndHighlightedProfile: {fileID: 0} + singleSelection: 0 + toggle: 0 +--- !u!23 &617211760 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2319362, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 3134ae80e55101b468fe9ea362327f28, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 617211757} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!136 &617211761 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &617211762 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3336432, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &640476129 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 640476130} + m_Layer: 0 + m_Name: --- Sample Targets --- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &640476130 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 640476129} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -4.729038, y: -3.3103254, z: -4.729038} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &656694097 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 158430, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 656694098} + - component: {fileID: 656694104} + - component: {fileID: 656694102} + - component: {fileID: 656694101} + - component: {fileID: 656694100} + - component: {fileID: 656694099} + - component: {fileID: 656694103} + m_Layer: 1 + m_Name: Target 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &656694098 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 494476, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.85, y: 0.5, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &656694099 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 36aa3934b8f65413188fabe723ded4da, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &656694100 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 1 + previewInEditor: 1 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 1 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 18 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0.5 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0.05 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 0 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 2800000, guid: aeb7aff1c8c1241ee8bfdfc05e9a9e92, type: 3} + overlayTextureScale: 1 + outline: 1 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineWidth: 0.4 + outlineQuality: 0 + outlineDownsampling: 2 + outlineVisibility: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 1.78 + glowWidth: 3.42 + glowQuality: 2 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 0.2 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 2800000, guid: 1de3c566a6c8c405b9f6f453137273ec, type: 3} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 30 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 1 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + rmsCount: 1 + hitFxInitialIntensity: 1 + hitFxMode: 2 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 0.93333334, g: 1.1058824, b: 2, a: 1} + hitFxRadius: 0.5 +--- !u!114 &656694101 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + highlightOnHover: 1 + triggerMode: 1 + raycastCamera: {fileID: 965526243} + raycastSource: 0 + minDistance: 0 + maxDistance: 0 + respectUI: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 0 + selectOnClick: 0 + selectedProfile: {fileID: 0} + selectedAndHighlightedProfile: {fileID: 0} + singleSelection: 0 + toggle: 0 +--- !u!23 &656694102 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2319392, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 5b12cf4be3e7c5149a5f24108ee6a551, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!136 &656694103 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &656694104 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3351936, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &965526239 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 965526244} + - component: {fileID: 965526243} + - component: {fileID: 965526240} + - component: {fileID: 965526241} + m_Layer: 0 + m_Name: Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &965526240 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 8100000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 +--- !u!114 &965526241 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !u!20 &965526243 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2000000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.25, g: 0.25, b: 0.25, a: 0.003921569} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 20 + field of view: 40 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294963199 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &965526244 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_LocalRotation: {x: 0.0010074005, y: 0.91790915, z: 0.0024223588, w: -0.39678213} + m_LocalPosition: {x: 2.4200273, y: 0.72167146, z: 2.4644732} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1165184420 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 182018, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1165184421} + - component: {fileID: 1165184424} + - component: {fileID: 1165184423} + - component: {fileID: 1165184422} + m_Layer: 0 + m_Name: CalibrationWallRearLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1165184421 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 464034, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0, y: 2.5, z: -2.5} + m_LocalScale: {x: 0.5, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1165184422 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2391912, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1165184423 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6494426, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1165184424 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3305810, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1179472412 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100006, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1179472413} + - component: {fileID: 1179472416} + - component: {fileID: 1179472415} + - component: {fileID: 1179472414} + m_Layer: 0 + m_Name: CalibrationFloor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1179472413 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400006, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 1694850532} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1179472414 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: d681c1d72c3c16149abd2f0f25ca628c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1179472415 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1179472416 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1392572690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 145214, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1392572691} + - component: {fileID: 1392572696} + - component: {fileID: 1392572694} + - component: {fileID: 1392572693} + - component: {fileID: 1392572692} + - component: {fileID: 1392572695} + m_Layer: 1 + m_Name: Target 2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1392572691 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 473706, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.49, z: 1} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1392572692 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 1 + previewInEditor: 1 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 1 + fadeOutDuration: 1 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 0 + overlayMinIntensity: 0 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureScale: 1 + outline: 1 + outlineColor: {r: 1, g: 1, b: 1, a: 1} + outlineWidth: 0.4 + outlineQuality: 0 + outlineDownsampling: 2 + outlineVisibility: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 1.32 + glowWidth: 3 + glowQuality: 2 + glowDownsampling: 2 + glowHQColor: {r: 0.19117647, g: 0.36409733, b: 1, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 2800000, guid: 1de3c566a6c8c405b9f6f453137273ec, type: 3} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 2 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 2 + targetFXVisibility: 1 + seeThrough: 0 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + rmsCount: 1 + hitFxInitialIntensity: 1 + hitFxMode: 2 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &1392572693 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + highlightOnHover: 1 + triggerMode: 1 + raycastCamera: {fileID: 965526243} + raycastSource: 0 + minDistance: 0 + maxDistance: 0 + respectUI: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 0 + selectOnClick: 0 + selectedProfile: {fileID: 0} + selectedAndHighlightedProfile: {fileID: 0} + singleSelection: 0 + toggle: 0 +--- !u!23 &1392572694 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2375834, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 958abb01761e1dc4ebf9ffdf8252d20e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!136 &1392572695 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1392572696 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3335484, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1435719951 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1435719952} + - component: {fileID: 1435719955} + - component: {fileID: 1435719954} + - component: {fileID: 1435719953} + m_Layer: 0 + m_Name: CalibrationWallFrontLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1435719952 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_LocalRotation: {x: 0.5000003, y: -0.5000001, z: -0.49999964, w: -0.50000006} + m_LocalPosition: {x: 2.4999998, y: 2.5, z: 0} + m_LocalScale: {x: 0.4999999, y: 1, z: 0.4999999} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1435719953 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1435719954 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1435719955 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1525858953 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1525858954} + - component: {fileID: 1525858957} + - component: {fileID: 1525858956} + - component: {fileID: 1525858955} + m_Layer: 0 + m_Name: CalibrationWallFrontRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1525858954 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_LocalRotation: {x: 0.70710695, y: 0.0000002682209, z: 0.00000021584746, w: -0.7071066} + m_LocalPosition: {x: 0, y: 2.500002, z: 2.5000014} + m_LocalScale: {x: 0.49999997, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1525858955 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1525858956 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1525858957 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1605869162 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1605869163} + - component: {fileID: 1605869165} + - component: {fileID: 1605869164} + m_Layer: 5 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1605869163 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 613470777} + m_Father: {fileID: 1819248545} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0.1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1605869164 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.641} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1605869165 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_CullTransparentMesh: 0 +--- !u!1 &1694850531 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1694850532} + m_Layer: 0 + m_Name: StaticGeometry + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 4294967295 + m_IsActive: 1 +--- !u!4 &1694850532 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1694850531} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1179472413} + - {fileID: 165230858} + - {fileID: 567592205} + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1819248541 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1819248545} + - component: {fileID: 1819248544} + - component: {fileID: 1819248543} + - component: {fileID: 1819248542} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1819248542 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1819248543 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1819248544 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1819248545 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1605869163} + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &2118005892 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2118005894} + - component: {fileID: 2118005893} + m_Layer: 0 + m_Name: HitFx Script + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2118005893 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2118005892} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b2533fb71c5d747c58192bcd7d6cd276, type: 3} + m_Name: + m_EditorClassIdentifier: + hitSound: {fileID: 8300000, guid: 9c2f7decce97e409a8ecfc1181535dc2, type: 3} +--- !u!4 &2118005894 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2118005892} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -4.729038, y: -3.3103254, z: -4.729038} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Plugins/HighlightPlus/Demo/Demo3_HitFXExample.unity.meta b/Assets/Plugins/HighlightPlus/Demo/Demo3_HitFXExample.unity.meta new file mode 100644 index 0000000..37d1f5e --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Demo3_HitFXExample.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a9ed051e57e7249a89531758bd685c7f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Materials.meta b/Assets/Plugins/HighlightPlus/Demo/Materials.meta new file mode 100644 index 0000000..e3f2752 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d4f7bf313cad54255a94a5340731a311 +folderAsset: yes +timeCreated: 1542877572 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Materials/Floor.mat b/Assets/Plugins/HighlightPlus/Demo/Materials/Floor.mat new file mode 100644 index 0000000..22d5d63 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Materials/Floor.mat @@ -0,0 +1,139 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-8558442800701317947 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 5 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Floor + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_ValidKeywords: + - _NORMALMAP + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 2800000, guid: 13ea04b5d27644ccba761e09947624da, type: 3} + m_Scale: {x: 2, y: 2} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 2800000, guid: d398536e88a354ed3b3825173a7e092a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 10, y: 10} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 2, y: 2} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 13ea04b5d27644ccba761e09947624da, type: 3} + m_Scale: {x: 2, y: 2} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Occlusion: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 2800000, guid: 943181a31ab5a411496dc4b0d6a41630, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _AlphaTestRef: 0.5 + - _Blend: 0 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 0.02 + - _DstBlend: 0 + - _EmissionScaleUI: 1 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0.538 + - _Glossiness: 0.34 + - _GlossyReflections: 1 + - _Lightmapping: 1 + - _Metallic: 0.1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.0104 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.34 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 0.99999994} + - _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1} + - _SpecColor: {r: 1, g: 1, b: 1, a: 1} + - _SpecularColor: {r: 0.11764706, g: 0.11764706, b: 0.11764706, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Plugins/HighlightPlus/Demo/Materials/Floor.mat.meta b/Assets/Plugins/HighlightPlus/Demo/Materials/Floor.mat.meta new file mode 100644 index 0000000..9218940 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Materials/Floor.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: d681c1d72c3c16149abd2f0f25ca628c +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Plugins/HighlightPlus/Demo/Materials/Gold.mat b/Assets/Plugins/HighlightPlus/Demo/Materials/Gold.mat new file mode 100644 index 0000000..83a23b4 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Materials/Gold.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-5610605729892836785 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 5 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Gold + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Occlusion: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _AlphaTestRef: 0.5 + - _Blend: 0 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _EmissionScaleUI: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.9 + - _GlossyReflections: 1 + - _Lightmapping: 1 + - _Metallic: 1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.9 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.96078426, g: 0.8392157, b: 0.47450978, a: 1} + - _Color: {r: 0.96078426, g: 0.8392157, b: 0.47450978, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + - _SpecularColor: {r: 0.8088235, g: 0.6295969, b: 0.3033088, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Plugins/HighlightPlus/Demo/Materials/Gold.mat.meta b/Assets/Plugins/HighlightPlus/Demo/Materials/Gold.mat.meta new file mode 100644 index 0000000..dd5d382 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Materials/Gold.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 5b12cf4be3e7c5149a5f24108ee6a551 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Plugins/HighlightPlus/Demo/Materials/PlasticGlossy.mat b/Assets/Plugins/HighlightPlus/Demo/Materials/PlasticGlossy.mat new file mode 100644 index 0000000..ac1ac3f --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Materials/PlasticGlossy.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-2992342339722848979 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 5 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: PlasticGlossy + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Occlusion: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _AlphaTestRef: 0.5 + - _Blend: 0 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _EmissionScaleUI: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.8 + - _GlossyReflections: 1 + - _Lightmapping: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.8 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0, g: 0.78942597, b: 0.79607844, a: 1} + - _Color: {r: 0, g: 0.78942597, b: 0.79607844, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + - _SpecularColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Plugins/HighlightPlus/Demo/Materials/PlasticGlossy.mat.meta b/Assets/Plugins/HighlightPlus/Demo/Materials/PlasticGlossy.mat.meta new file mode 100644 index 0000000..e0d7375 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Materials/PlasticGlossy.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 958abb01761e1dc4ebf9ffdf8252d20e +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Plugins/HighlightPlus/Demo/Materials/Silk.mat b/Assets/Plugins/HighlightPlus/Demo/Materials/Silk.mat new file mode 100644 index 0000000..bb5bd74 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Materials/Silk.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Silk + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Occlusion: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _AlphaTestRef: 0.5 + - _Blend: 0 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _EmissionScaleUI: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.6 + - _GlossyReflections: 1 + - _Lightmapping: 1 + - _Metallic: 0.75 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.6 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.49411762, g: 0.145098, b: 0.16470584, a: 1} + - _Color: {r: 0.49411762, g: 0.14509797, b: 0.16470581, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} + - _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + - _SpecularColor: {r: 0.74264705, g: 0.20750435, b: 0.216731, a: 1} + m_BuildTextureStacks: [] +--- !u!114 &7254247028269435741 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 5 diff --git a/Assets/Plugins/HighlightPlus/Demo/Materials/Silk.mat.meta b/Assets/Plugins/HighlightPlus/Demo/Materials/Silk.mat.meta new file mode 100644 index 0000000..6bc0ff4 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Materials/Silk.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 3134ae80e55101b468fe9ea362327f28 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Plugins/HighlightPlus/Demo/Materials/Wall.mat b/Assets/Plugins/HighlightPlus/Demo/Materials/Wall.mat new file mode 100644 index 0000000..e9c855a --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Materials/Wall.mat @@ -0,0 +1,141 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-6803998695329737601 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 5 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Wall + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_ValidKeywords: + - _NORMALMAP + - _OCCLUSIONMAP + - _PARALLAXMAP + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 2800000, guid: dc645ec4f4eba40dd8f0e8b0c21b99b0, type: 3} + m_Scale: {x: 3, y: 3} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 2800000, guid: ebcd1fde239ed44bc808f7c571d8a6a9, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 10, y: 10} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 3, y: 3} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: dc645ec4f4eba40dd8f0e8b0c21b99b0, type: 3} + m_Scale: {x: 3, y: 3} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Occlusion: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 2800000, guid: 2fb008ff4214b4130a4f33cb385b6fa6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 2800000, guid: 4c5aaebe522004ddfbf0da83b147e635, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 2800000, guid: a1d43acc22aa4427f89ca56382ce5272, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _AlphaTestRef: 0.5 + - _Blend: 0 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 0.02 + - _DstBlend: 0 + - _EmissionScaleUI: 1 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0.325 + - _Glossiness: 0.311 + - _GlossyReflections: 1 + - _Lightmapping: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.0203 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.311 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 0.99999994} + - _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1} + - _SpecColor: {r: 1, g: 1, b: 1, a: 1} + - _SpecularColor: {r: 0.11764706, g: 0.11764706, b: 0.11764706, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Plugins/HighlightPlus/Demo/Materials/Wall.mat.meta b/Assets/Plugins/HighlightPlus/Demo/Materials/Wall.mat.meta new file mode 100644 index 0000000..4eee5df --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Materials/Wall.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0062779a7c303451ab69ea6fc7893dc8 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Plugins/HighlightPlus/Demo/Profiles.meta b/Assets/Plugins/HighlightPlus/Demo/Profiles.meta new file mode 100644 index 0000000..bbe2259 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Profiles.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 57d6d25f642564dc6a34dfaebd77480c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Profiles/Selected.asset b/Assets/Plugins/HighlightPlus/Demo/Profiles/Selected.asset new file mode 100644 index 0000000..8ccdb84 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Profiles/Selected.asset @@ -0,0 +1,91 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8e9253636bf2648bd813257f451f8486, type: 3} + m_Name: Selected + m_EditorClassIdentifier: + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + depthClip: 0 + normalsOption: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + constantWidth: 1 + overlay: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + outline: 1 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineWidth: 1.5 + outlineQuality: 1 + outlineDownsampling: 2 + outlineOptimalBlit: 1 + outlineVisibility: 0 + outlineIndependent: 0 + glow: 1 + glowWidth: 0.5 + glowQuality: 1 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowOptimalBlit: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + innerGlow: 0.5 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.4 + seeThroughOccluderCheckInterval: 1 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderWidth: 0.45 diff --git a/Assets/Plugins/HighlightPlus/Demo/Profiles/Selected.asset.meta b/Assets/Plugins/HighlightPlus/Demo/Profiles/Selected.asset.meta new file mode 100644 index 0000000..01010cd --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Profiles/Selected.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e6e74f38237364260b68bef0cd1b8795 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset b/Assets/Plugins/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset new file mode 100644 index 0000000..27ff791 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset @@ -0,0 +1,91 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8e9253636bf2648bd813257f451f8486, type: 3} + m_Name: SelectedAndHighlighted + m_EditorClassIdentifier: + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + depthClip: 0 + normalsOption: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + constantWidth: 1 + overlay: 0.5 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + outline: 1 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineWidth: 1.5 + outlineQuality: 1 + outlineDownsampling: 2 + outlineOptimalBlit: 1 + outlineVisibility: 0 + outlineIndependent: 0 + glow: 1 + glowWidth: 0.5 + glowQuality: 1 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowOptimalBlit: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + innerGlow: 0.5 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.4 + seeThroughOccluderCheckInterval: 1 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderWidth: 0.45 diff --git a/Assets/Plugins/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset.meta b/Assets/Plugins/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset.meta new file mode 100644 index 0000000..8235df4 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 77128a10e40704023952e72c2046e685 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Scripts.meta b/Assets/Plugins/HighlightPlus/Demo/Scripts.meta new file mode 100644 index 0000000..914c5e0 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0748038d48d9c48fc9f35f5d32dc985a +folderAsset: yes +timeCreated: 1544692068 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Scripts/HitFxDemo.cs b/Assets/Plugins/HighlightPlus/Demo/Scripts/HitFxDemo.cs new file mode 100644 index 0000000..b042385 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Scripts/HitFxDemo.cs @@ -0,0 +1,24 @@ +using UnityEngine; + +namespace HighlightPlus.Demos { + + public class HitFxDemo : MonoBehaviour { + + public AudioClip hitSound; + + void Update() { + + if (!InputProxy.GetMouseButtonDown(0)) return; + + Ray ray = Camera.main.ScreenPointToRay(InputProxy.mousePosition); + if (Physics.Raycast(ray, out RaycastHit hitInfo)) { + HighlightEffect effect = hitInfo.collider.GetComponent(); + if (effect == null) return; + AudioSource.PlayClipAtPoint(hitSound, hitInfo.point); + effect.HitFX(hitInfo.point); + } + + } + } + +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Demo/Scripts/HitFxDemo.cs.meta b/Assets/Plugins/HighlightPlus/Demo/Scripts/HitFxDemo.cs.meta new file mode 100644 index 0000000..5915f95 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Scripts/HitFxDemo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b2533fb71c5d747c58192bcd7d6cd276 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs b/Assets/Plugins/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs new file mode 100644 index 0000000..f731fb5 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs @@ -0,0 +1,28 @@ +using UnityEngine; +using HighlightPlus; + +namespace HighlightPlus.Demos { + + public class ManualSelectionDemo : MonoBehaviour { + + HighlightManager hm; + + public Transform objectToSelect; + + void Start() { + hm = FindObjectOfType(); + } + + void Update() { + if (Input.GetKeyDown(KeyCode.Alpha1)) { + hm.SelectObject(objectToSelect); + } + if (Input.GetKeyDown(KeyCode.Alpha2)) { + hm.ToggleObject(objectToSelect); + } + if (Input.GetKeyDown(KeyCode.Alpha3)) { + hm.UnselectObject(objectToSelect); + } + } + } +} diff --git a/Assets/Plugins/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs.meta b/Assets/Plugins/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs.meta new file mode 100644 index 0000000..37019e9 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9dfa112658ab74560a6251002174910b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs b/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs new file mode 100644 index 0000000..09300bd --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs @@ -0,0 +1,40 @@ +using UnityEngine; +using HighlightPlus; + +namespace HighlightPlus.Demos { + + public class SphereHighlightEventExample : MonoBehaviour { + + HighlightEffect effect; + + void Start() { + effect = GetComponent (); + effect.OnObjectHighlightStart += ValidateHighlightObject; + } + + + bool ValidateHighlightObject(GameObject obj) { + // You can return false to cancel highlight on this object + return true; + } + + void HighlightStart () { + Debug.Log ("Gold sphere highlighted!"); + } + + void HighlightEnd () { + Debug.Log ("Gold sphere not highlighted!"); + } + + void Update() { + if (InputProxy.GetKeyDown ("space")) { + effect.HitFX (Color.white, 0.2f); + } + if (InputProxy.GetKeyDown("c")) { + effect.SetGlowColor(new Color(Random.value, Random.value, Random.value)); + } + + } + } + +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs.meta b/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs.meta new file mode 100644 index 0000000..1e37e81 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 36aa3934b8f65413188fabe723ded4da +timeCreated: 1544692056 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs b/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs new file mode 100644 index 0000000..76d0dd5 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs @@ -0,0 +1,26 @@ +using UnityEngine; +using HighlightPlus; + +namespace HighlightPlus.Demos { + + public class SphereSelectionEventsExample : MonoBehaviour { + + void Start() { + HighlightManager.instance.OnObjectSelected += OnObjectSelected; + HighlightManager.instance.OnObjectUnSelected += OnObjectUnSelected; + } + + bool OnObjectSelected(GameObject go) { + Debug.Log(go.name + " selected!"); + return true; + } + + bool OnObjectUnSelected(GameObject go) { + Debug.Log(go.name + " un-selected!"); + return true; + } + + + } + +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs.meta b/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs.meta new file mode 100644 index 0000000..e0e58b2 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dbe1fcf5ef14345779fec3adb4479bc3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Sounds.meta b/Assets/Plugins/HighlightPlus/Demo/Sounds.meta new file mode 100644 index 0000000..bca913c --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Sounds.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 94906fdd445a54f2badd67d0d36a3d55 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Sounds/metalHit.wav b/Assets/Plugins/HighlightPlus/Demo/Sounds/metalHit.wav new file mode 100644 index 0000000..405c853 Binary files /dev/null and b/Assets/Plugins/HighlightPlus/Demo/Sounds/metalHit.wav differ diff --git a/Assets/Plugins/HighlightPlus/Demo/Sounds/metalHit.wav.meta b/Assets/Plugins/HighlightPlus/Demo/Sounds/metalHit.wav.meta new file mode 100644 index 0000000..a5b51f8 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Sounds/metalHit.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9c2f7decce97e409a8ecfc1181535dc2 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures.meta b/Assets/Plugins/HighlightPlus/Demo/Textures.meta new file mode 100644 index 0000000..9442ca0 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 13783dcd57d4d4977b6fa46c1be6a21d +folderAsset: yes +timeCreated: 1542901861 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png b/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png new file mode 100644 index 0000000..05469a0 Binary files /dev/null and b/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png differ diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png.meta b/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png.meta new file mode 100644 index 0000000..74e9e45 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: 13ea04b5d27644ccba761e09947624da +timeCreated: 1542918613 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png b/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png new file mode 100644 index 0000000..9bbac77 Binary files /dev/null and b/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png differ diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png.meta b/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png.meta new file mode 100644 index 0000000..6ec877c --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: d398536e88a354ed3b3825173a7e092a +timeCreated: 1542918925 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 1 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures/overlaySampleTex.png b/Assets/Plugins/HighlightPlus/Demo/Textures/overlaySampleTex.png new file mode 100644 index 0000000..32099ab Binary files /dev/null and b/Assets/Plugins/HighlightPlus/Demo/Textures/overlaySampleTex.png differ diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures/overlaySampleTex.png.meta b/Assets/Plugins/HighlightPlus/Demo/Textures/overlaySampleTex.png.meta new file mode 100644 index 0000000..59a80b2 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Textures/overlaySampleTex.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: aeb7aff1c8c1241ee8bfdfc05e9a9e92 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + 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: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 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: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png new file mode 100644 index 0000000..e4491ca Binary files /dev/null and b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png differ diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png.meta b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png.meta new file mode 100644 index 0000000..d6db09d --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: 2fb008ff4214b4130a4f33cb385b6fa6 +timeCreated: 1542918613 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png new file mode 100644 index 0000000..1f5d926 Binary files /dev/null and b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png differ diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png.meta b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png.meta new file mode 100644 index 0000000..9988515 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: ebcd1fde239ed44bc808f7c571d8a6a9 +timeCreated: 1542918741 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 1 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png new file mode 100644 index 0000000..1d80ba8 Binary files /dev/null and b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png differ diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png.meta b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png.meta new file mode 100644 index 0000000..ebd4111 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: 4c5aaebe522004ddfbf0da83b147e635 +timeCreated: 1542918717 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 1 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png new file mode 100644 index 0000000..10e299c Binary files /dev/null and b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png differ diff --git a/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png.meta b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png.meta new file mode 100644 index 0000000..025f6ed --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: dc645ec4f4eba40dd8f0e8b0c21b99b0 +timeCreated: 1542918615 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Documentation.meta b/Assets/Plugins/HighlightPlus/Documentation.meta new file mode 100644 index 0000000..640bc9b --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Documentation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d6b6ed63a44dd4e0b9e9de96d34d9930 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Documentation/Documentation Online.url b/Assets/Plugins/HighlightPlus/Documentation/Documentation Online.url new file mode 100644 index 0000000..e6b8bab --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Documentation/Documentation Online.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://kronnect.com/guides/highlight-plus-introduction/ \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Documentation/Documentation Online.url.meta b/Assets/Plugins/HighlightPlus/Documentation/Documentation Online.url.meta new file mode 100644 index 0000000..5ab1ff6 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Documentation/Documentation Online.url.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 05f4a9095f69c4ec6bc8fb97dcdbacfb +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Documentation/Documentation PDF.url b/Assets/Plugins/HighlightPlus/Documentation/Documentation PDF.url new file mode 100644 index 0000000..12209c0 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Documentation/Documentation PDF.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://www.dropbox.com/s/4nx9pv977wvvrv8/Documentation.pdf?dl=0 \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Documentation/Documentation PDF.url.meta b/Assets/Plugins/HighlightPlus/Documentation/Documentation PDF.url.meta new file mode 100644 index 0000000..9dced4a --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Documentation/Documentation PDF.url.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6e3af944b32d74aaa9bd0bb1850bed61 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Documentation/Kronnect Assets.pdf b/Assets/Plugins/HighlightPlus/Documentation/Kronnect Assets.pdf new file mode 100644 index 0000000..3d1fda1 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Documentation/Kronnect Assets.pdf @@ -0,0 +1,263 @@ +Don’t miss these other cool assets brought to you by + + BEAUTIFY 2 is an acclaimed full-screen image processing effect that improves the image quality in real time + + producing incredibly crisp and vivid scenes. Compatible with built-in, LWRP and URP pipelines. + In addition to this unique image enhancement filter, you will find in Beautify additional effects like high quality Bloom, + dirty lens effect, vignetting, night & thermal vision and more! + Get it on the Asset Store: + + https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/beautify-2-advanced-post-processing-163949?aid=1101lGsd + + DYNAMIC FOG & MIST 2 is a full-screen image effect that adds live, moving Fog, Mist and Sky Haze to your scenes + + making them less dull and boring. Compatible with built-in and URP pipelines. + Get it on the Asset Store: + + https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/dynamic-fog-mist-48200?aid=1101lGsd + + VOLUMETRIC FOG & MIST 2 is the enhanced version of Dynamic Fog & Mist (which is also included in the package) + + and has been designed to provide a better-looking fog and cloud formations with support of lighting and glow effects. + Compatible with built-in and URP pipelines. + It’s feature-rich with options like fog of war, Sun tracking, better transparent and sprite support, sun shafts and more. + Get it on the Asset Store: + + https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/volumetric-fog-mist-2-162694?aid=1101lGsd + WORLD POLITICAL MAP SERIES is a collection of professional mapping assets for Unity (2D and Globe Editions). Used by + + many companies and agencies across the world to visualize data, resources, interact with the user, etc. + Compatible with built-in and URP pipelines. + + Get it on the Asset Store (Globe Edition): + + https://assetstore.unity.com/packages/tools/gui/world-map-globe-edition-2-150643?aid=1101lGsd + + Get it on the Asset Store (2D Edition): + + https://assetstore.unity.com/packages/tools/gui/world-map-2d-edition-2-151238?aid=1101lGsd + +WORLD MAP STRATEGY KIT 2 is a complete framework for building AAA strategy games, including all world countries + +and provinces, +7000 cities, cool 3D PBS dynamic viewport for map, hexagonal grid, pathfinding, real elevation, and much +more. +Compatible with built-in and URP pipelines. + +Get it on the Asset Store: + +https://assetstore.unity.com/packages/tools/game-toolkits/world-map-strategy-kit-2-150938?aid=1101lGsd + + WORLD MAPS PRO BUNDLE 2 is our most complete and professional suite of maps for Unity platform for the best price. + + Compatible with built-in and URP pipelines. This bundle contains: + - World Political Map Globe Edition + - World Political Map 2D Edition + - World Map Strategy Kit + - World Flags and Weather Icons + + Purchase this bundle and save $$$! + + https://assetstore.unity.com/packages/tools/gui/world-maps-pro-bundle-2-151240?aid=1101lGsd + SHINY SSRR is our Screen Space Raytraced Reflections solution optimized for both forward and deferred rendering + +path. As with Beautify, this effect gives an instant boost to your scene by making light bounce on shiny surfaces, casting +gorgeous reflections on all kind of reflective surfaces. Compatible with built-in and URP pipelines. +Get it on the Asset Store: + +https://assetstore.unity.com/packages/slug/188638?aid=1101lGsd + +SKYBOX PLUS is an artist-driven replacement for Unity default skybox. Includes a lovely blend of procedural haze and + +hand-drawn clouds which mimic the style of Studio Ghibli. +Supports full day/night transition with moon, stars, several cloud layers with custom animation and lot of customization +options. . Compatible with built-in and URP pipelines. +Get it on the Asset Store: + +https://assetstore.unity.com/packages/2d/textures-materials/sky/skybox-plus-182966?aid=1101lGsd + +VOLUMETRIC LIGHTS is a powerful asset to add scattering effect to any number of Unity lights. Supports spot, point + +and area light types. Directional lights are also supported for localized areas. Includes advanced options like dust lit +particles and shadow occlusion. Compatible with built-in and URP pipelines. +Get it on the Asset Store: + +https://assetstore.unity.com/packages/vfx/shaders/volumetric-lights-164149?aid=1101lGsd + COMPASS NAVIGATOR PRO adds a “Skyrim”-like compass bar to your UI, including smooth fade in/out, various bar + +designs, +11 icons in two variations (+22 icons) and nice features like minimap and beam lights! +Compatible with all render pipelines. +Get it on the Asset Store: + +https://assetstore.unity.com/packages/tools/gui/compass-navigator-pro-59519?aid=1101lGsd + +X-FRAME FPS ACCELERATOR provides you extra frames per second in your mobile games (iOS and Android). It takes + +advantage of the huge screen resolution of these devices to sacrifice some pixels in Exchange of performance with flexible +and dynamic quality options. Compatible with built-in and URP pipelines. +Get it on the Asset Store: + +https://assetstore.unity.com/packages/tools/camera/x-frame-fps-accelerator-63965?aid=1101lGsd + +SHADER CONTROL is a tiny but powerful tool that will allow you to identify and manage shader keywords usage in your + +project, taking more control over the build size and compilation time. Compatible with all render pipelines. +Quickly locates and helps you disable keywords not needed, learn about the shaders used in your project and their keywords! +Get it on the Asset Store: + +https://assetstore.unity.com/packages/vfx/shaders/shader-control-74817?aid=1101lGsd + TERRAIN GRID SYSTEM is an advanced grid generator and territory/cell highlighter/fader for both Terrain and 2D grids. + + Compatible with all render pipelines. It can generate Voronoi, hexagonal and boxed grids dynamically on your terrain, with + flexible position options . Compatible with built-in and URP pipelines. + Get it on the Asset Store: + + https://assetstore.unity.com/packages/tools/terrain/terrain-grid-system-47215?aid=1101lGsd + +GRIDS 2D is similar to Terrain Grid System but only for flat 2D grids. It’s fast, convenient and easy to use. + +Compatible with all render pipelines. It can also generate Voronoi, hexagonal and boxed grids dynamically on your terrain, with +flexible API to integrate with your game. Compatible with built-in and URP pipelines. +Get it on the Asset Store: + +https://assetstore.unity.com/packages/tools/sprite-management/grids-2d-59981?aid=1101lGsd + +HEXASPHERE GRID SYSTEM leverages shader technologies like texture arrays and geometry shaders to render hundreds + +of thousands of interactive and customizable tiles in a spherical/hexagonal grid. +Fully interactive, with VR support and super-fast. Compatible with built-in and URP pipelines. +Get it on the Asset Store: + +https://assetstore.unity.com/packages/tools/modeling/hexasphere-grid-system-89112?aid=1101lGsd + TUNNEL FX 2 is a full-screen post image effect that creates stunning, colorful 3D animated tunnels. It does not create any + +real tunnel but just draw the tunnel as a post-effect behind any geometry or UI. +Compatible with built-in and URP pipelines. + +Get it on the Asset Store: + +https://assetstore.unity.com/packages/tools/particles-effects/tunnel-fx-2-86544?aid=1101lGsd + +GLOBAL SNOW renders your existing scene into a winter landscape with a couple of clicks. Just add a single script to your + +camera and customize the results. +Supports relief mapping for realistic snow effect + human footprints + terrain marks with automatic collision detection and +more! +Get it on the Asset Store: + +https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/global-snow-79795?aid=1101lGsd + +HIGHLIGHT PLUS adds outline, glow and see-through effects to any 3D object in the scene. + +It’s performant and designed for all platforms, including built-in and URP rendering pipelines. + +Get it on the Asset Store: + +https://assetstore.unity.com/packages/tools/particles-effects/highlight-plus-134149?aid=1101lGsd + VOXEL PLAY 2 is a procedural, fast environment based on cubes. It leverages highly optimized code, including + +geometry shaders and texture arrays, to generate beautiful, rich, vast infinite worlds which can be customized and +modified in many ways. Compatible with built-in and URP pipelines. +Get it on the Asset Store: + +https://assetstore.unity.com/packages/tools/game-toolkits/voxel-play-2-201234?aid=1101lGsd + +PIRATES OF VOXEL PLAY is a multiplayer game template built with Mirror and Voxel Play. It’s the perfect + +sample project to learn how to implement multiplayer games using these two frameworks. +Includes animated characters, a fully populated tropical island with 3 biomes, wild beasts, weapons, loots, cute +music and sound effects and of course plenty of commented code, documentation and video tutorials! +Get it on the Asset Store: + +https://assetstore.unity.com/packages/slug/189096?aid=1101lGsd + LIQUID VOLUME is a powerful and highly customizable shader that simulates realistic and animated liquid + +containers. Can be used in 3D scenes and 2D UI (demos included). +Liquid Volume is super easy and fun to use: just add the main script to any primitive (sphere, box, cylinder and +similar shape models) to convert it into a liquid container! +Get it on the Asset Store: + +https://assetstore.unity.com/packages/vfx/shaders/liquid-volume-70992?aid=1101lGsd + +LIQUID VOLUME PRO 2 includes all features of Liquid Volume and adds additional advanced options plus + +improved compatibility with more platforms. +Among the new options are multiple liquid layers support, miscible liquids, bubbles, better mesh options and full +WebGL support! Compatible with built-in and URP pipelines. +Get it on the Asset Store: + +https://assetstore.unity.com/packages/vfx/shaders/liquid-volume-pro-129967?aid=1101lGsd + HIGHLIGHT PLUS 2D adds outline, glow, see-through and other effects to any sprite in the scene. + +It’s performant and designed for all platforms, including standard and URP rendering pipelines. +Get it on the Asset Store: +https://assetstore.unity.com/packages/tools/particles-effects/highlight-plus-2d-138383?aid=1101lGsd + +TRAILS FX renders smooth, mesmerizing trails behind moving objects and characters. + +It’s performant thanks to the use of GPU instancing and use correct transparency order producing a fascinating effect. +Compatible with built-in and URP pipelines. +Get it on the Asset Store: + + https://assetstore.unity.com/packages/tools/particles-effects/trails-fx-146898?aid=1101lGsd + +COLOR STUDIO is an Editor Extension that allows you to create awesome color palettes and recolor objects, sprites and scenes + +easily in editor and runtime. Compatible with all render pipelines. +It comes with an interactive color wheel editor and a complete set of tools that let you also export color palettes as LUTs, +transform existing textures or specific colors from object materials. +Get it on the Asset Store: +https://assetstore.unity.com/packages/tools/painting/color-studio-151892?aid=1101lGsd + LUT PACK is a collection of +200 cinematic and artistic LUTs plus tints for Beautify. They can dramatically change the mood + +and look of your game scenes. Beautify includes a LUT Browser that let you quickly text each one of the included LUT in this +package. +Get it on the Asset Store: +https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/lut-pack-for-beautify-202502?aid=1101lGsd + +FRAME PACK is a collection of +75 film mattes and artistic borders that can be used with Beautify or Unity UI. This p + +Get it on the Asset Store: +https://assetstore.unity.com/packages/2d/gui/frame-pack-204058?aid=1101lGsd + + MILITARY UNITS – THE STYLIZED ART COLLECTION includes +100 hand-painted, stylized portraits of military units + + from ancient warriors to modern ships and aircraft. Great for decorating your game screens, unit sheets, icons, or prototyping. + Get it on the Asset Store: + https://assetstore.unity.com/packages/2d/textures-materials/military-units-the-stylized-art-collection- + 187769?aid=1101lGsd + Luma Based Ambient Occlusion is a full-screen image effect that simulates occlusion based solely on color + +information. +Get it on the Asset Store: +https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/luma-based-ambient-occlusion-ssao-2d- +93013?aid=1101lGsd + +RPG Starter Bundle includes a collection of visual, environment effects, navigation tools and assets to quickly build the + +foundation of a RPG/Fantasy game or prototype. Save 50% purchasing this bundle (total value: $150)! This package +features the following assets: Compass Navigator Pro, Skybox Plus, Dynamic Fog % Mist, Tunnel FX 2, Liquid Volume +Get it on the Asset Store: +https://assetstore.unity.com/packages/templates/packs/rpg-starter-bundle-213822?aid=1101lGsd + +Beautify HDRP is a post processing effect created for High Definition Rendering Pipeline that improves the image + +quality in real time producing incredibly crisp and vivid scenes. +Get it on the Asset Store: +https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/beautify-hdrp-165411?aid=1101lGsd + Potions & Volumetric Liquid contains 8 unique (16 variations), high detailed, PBR set of magic potions with + +advanced volumetric effect for the liquids inside the flasks. +This asset uses Liquid Volume Pro to render the liquids and its effects (Liquid Volume Pro license is included with this +asset). + +Get it on the Asset Store: +https://assetstore.unity.com/packages/3d/props/potions-volumetric-liquid-221221?aid=1101lGsd + +Split Screen Pro is a camera composing system that enables automatic screen split between two targets or players. + +This asset can automatically detect when the two targets are far from each other and show a dynamic split line which +separates and adapts the view in two halves, one per each target or player. + +Get it on the Asset Store: +https://assetstore.unity.com/packages/tools/camera/split-screen-pro-207149?aid=1101lGsd + diff --git a/Assets/Plugins/HighlightPlus/Documentation/Kronnect Assets.pdf.meta b/Assets/Plugins/HighlightPlus/Documentation/Kronnect Assets.pdf.meta new file mode 100644 index 0000000..90d0c87 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Documentation/Kronnect Assets.pdf.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 782ce379ea1624a349b1c53de1f90c95 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Editor.meta b/Assets/Plugins/HighlightPlus/Editor.meta new file mode 100644 index 0000000..dbe7402 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c1cfaabf0583f44b4871807a898aaf31 +folderAsset: yes +timeCreated: 1542886534 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Editor/HighlightEffectEditor.cs b/Assets/Plugins/HighlightPlus/Editor/HighlightEffectEditor.cs new file mode 100644 index 0000000..66324c5 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Editor/HighlightEffectEditor.cs @@ -0,0 +1,729 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +namespace HighlightPlus { + + [CustomEditor(typeof(HighlightEffect))] + [CanEditMultipleObjects] + public class HighlightEffectEditor : Editor { + +#pragma warning disable 0618 + + SerializedProperty profile, profileSync, camerasLayerMask, ignoreObjectVisibility, reflectionProbes, GPUInstancing, optimizeSkinnedMesh; + SerializedProperty ignore, effectGroup, effectGroupLayer, effectNameFilter, combineMeshes, alphaCutOff, cullBackFaces, normalsOption; + SerializedProperty highlighted, fadeInDuration, fadeOutDuration, flipY, constantWidth, subMeshMask; + SerializedProperty overlay, overlayMode, overlayColor, overlayAnimationSpeed, overlayMinIntensity, overlayBlending, overlayTexture, overlayTextureUVSpace, overlayTextureScale, overlayVisibility; + SerializedProperty outline, outlineColor, outlineColorStyle, outlineGradient, outlineGradientInLocalSpace, outlineBlurPasses, outlineWidth, outlineQuality, outlineEdgeMode, outlineEdgeThreshold, outlineDownsampling, outlineVisibility, outlineBlitDebug, outlineIndependent, outlineContourStyle; + SerializedProperty glow, glowWidth, glowQuality, glowBlurMethod, glowDownsampling, glowHQColor, glowDithering, glowMagicNumber1, glowMagicNumber2, glowAnimationSpeed; + SerializedProperty glowBlendPasses, glowPasses, glowVisibility, glowBlendMode, glowBlitDebug, glowIgnoreMask; + SerializedProperty innerGlow, innerGlowWidth, innerGlowColor, innerGlowBlendMode, innerGlowVisibility; + SerializedProperty seeThrough, seeThroughOccluderMask, seeThroughOccluderMaskAccurate, seeThroughOccluderThreshold, seeThroughOccluderCheckInterval, seeThroughOccluderCheckIndividualObjects, seeThroughDepthOffset, seeThroughMaxDepth; + SerializedProperty seeThroughIntensity, seeThroughTintAlpha, seeThroughTintColor, seeThroughNoise, seeThroughBorder, seeThroughBorderWidth, seeThroughBorderColor, seeThroughOrdered, seeThroughBorderOnly, seeThroughTexture, seeThroughTextureUVSpace, seeThroughTextureScale; + SerializedProperty targetFX, targetFXTexture, targetFXColor, targetFXCenter, targetFXRotationSpeed, targetFXInitialScale, targetFXEndScale, targetFXScaleToRenderBounds; + SerializedProperty targetFXAlignToGround, targetFXFadePower, targetFXGroundMaxDistance, targetFXGroundLayerMask, targetFXTransitionDuration, targetFXStayDuration, targetFXVisibility; + SerializedProperty hitFxInitialIntensity, hitFxMode, hitFxFadeOutDuration, hitFxColor, hitFxRadius; + SerializedProperty cameraDistanceFade, cameraDistanceFadeNear, cameraDistanceFadeFar; + HighlightEffect thisEffect; + bool profileChanged, enableProfileApply; + + UniversalRenderPipelineAsset pipe; + bool expandGeneralSettings, expandHighlightOptions; + bool showCurrentOccluders; + const string HP_GENERAL_SETTINGS = "HPGeneralSettings"; + const string HP_HIGHLIGHT_OPTIONS = "HPHighlightOptions"; + GUIStyle foldoutBold; + + void OnEnable() { + expandGeneralSettings = EditorPrefs.GetBool("HPGeneralSettings", true); + expandHighlightOptions = EditorPrefs.GetBool("HPHighlightOptions", true); + + profile = serializedObject.FindProperty("profile"); + profileSync = serializedObject.FindProperty("profileSync"); + camerasLayerMask = serializedObject.FindProperty("camerasLayerMask"); + ignoreObjectVisibility = serializedObject.FindProperty("ignoreObjectVisibility"); + reflectionProbes = serializedObject.FindProperty("reflectionProbes"); + optimizeSkinnedMesh = serializedObject.FindProperty("optimizeSkinnedMesh"); + normalsOption = serializedObject.FindProperty("normalsOption"); + GPUInstancing = serializedObject.FindProperty("GPUInstancing"); + ignore = serializedObject.FindProperty("ignore"); + effectGroup = serializedObject.FindProperty("effectGroup"); + effectGroupLayer = serializedObject.FindProperty("effectGroupLayer"); + effectNameFilter = serializedObject.FindProperty("effectNameFilter"); + combineMeshes = serializedObject.FindProperty("combineMeshes"); + alphaCutOff = serializedObject.FindProperty("alphaCutOff"); + cullBackFaces = serializedObject.FindProperty("cullBackFaces"); + highlighted = serializedObject.FindProperty("_highlighted"); + fadeInDuration = serializedObject.FindProperty("fadeInDuration"); + fadeOutDuration = serializedObject.FindProperty("fadeOutDuration"); + flipY = serializedObject.FindProperty("flipY"); + constantWidth = serializedObject.FindProperty("constantWidth"); + subMeshMask = serializedObject.FindProperty("subMeshMask"); + overlay = serializedObject.FindProperty("overlay"); + overlayMode = serializedObject.FindProperty("overlayMode"); + overlayColor = serializedObject.FindProperty("overlayColor"); + overlayAnimationSpeed = serializedObject.FindProperty("overlayAnimationSpeed"); + overlayMinIntensity = serializedObject.FindProperty("overlayMinIntensity"); + overlayBlending = serializedObject.FindProperty("overlayBlending"); + overlayTexture = serializedObject.FindProperty("overlayTexture"); + overlayTextureUVSpace = serializedObject.FindProperty("overlayTextureUVSpace"); + overlayTextureScale = serializedObject.FindProperty("overlayTextureScale"); + overlayVisibility = serializedObject.FindProperty("overlayVisibility"); + outline = serializedObject.FindProperty("outline"); + outlineColor = serializedObject.FindProperty("outlineColor"); + outlineColorStyle = serializedObject.FindProperty("outlineColorStyle"); + outlineGradient = serializedObject.FindProperty("outlineGradient"); + outlineGradientInLocalSpace = serializedObject.FindProperty("outlineGradientInLocalSpace"); + outlineWidth = serializedObject.FindProperty("outlineWidth"); + outlineBlurPasses = serializedObject.FindProperty("outlineBlurPasses"); + outlineQuality = serializedObject.FindProperty("outlineQuality"); + outlineEdgeMode = serializedObject.FindProperty("outlineEdgeMode"); + outlineEdgeThreshold = serializedObject.FindProperty("outlineEdgeThreshold"); + outlineDownsampling = serializedObject.FindProperty("outlineDownsampling"); + outlineVisibility = serializedObject.FindProperty("outlineVisibility"); + outlineBlitDebug = serializedObject.FindProperty("outlineBlitDebug"); + outlineIndependent = serializedObject.FindProperty("outlineIndependent"); + outlineContourStyle = serializedObject.FindProperty("outlineContourStyle"); + glow = serializedObject.FindProperty("glow"); + glowWidth = serializedObject.FindProperty("glowWidth"); + glowQuality = serializedObject.FindProperty("glowQuality"); + glowBlurMethod = serializedObject.FindProperty("glowBlurMethod"); + glowHQColor = serializedObject.FindProperty("glowHQColor"); + glowAnimationSpeed = serializedObject.FindProperty("glowAnimationSpeed"); + glowBlendPasses = serializedObject.FindProperty("glowBlendPasses"); + glowDithering = serializedObject.FindProperty("glowDithering"); + glowMagicNumber1 = serializedObject.FindProperty("glowMagicNumber1"); + glowMagicNumber2 = serializedObject.FindProperty("glowMagicNumber2"); + glowAnimationSpeed = serializedObject.FindProperty("glowAnimationSpeed"); + glowPasses = serializedObject.FindProperty("glowPasses"); + glowVisibility = serializedObject.FindProperty("glowVisibility"); + glowBlendMode = serializedObject.FindProperty("glowBlendMode"); + glowBlitDebug = serializedObject.FindProperty("glowBlitDebug"); + glowIgnoreMask = serializedObject.FindProperty("glowIgnoreMask"); + glowDownsampling = serializedObject.FindProperty("glowDownsampling"); + innerGlow = serializedObject.FindProperty("innerGlow"); + innerGlowColor = serializedObject.FindProperty("innerGlowColor"); + innerGlowWidth = serializedObject.FindProperty("innerGlowWidth"); + innerGlowBlendMode = serializedObject.FindProperty("innerGlowBlendMode"); + innerGlowVisibility = serializedObject.FindProperty("innerGlowVisibility"); + seeThrough = serializedObject.FindProperty("seeThrough"); + seeThroughOccluderMask = serializedObject.FindProperty("seeThroughOccluderMask"); + seeThroughOccluderMaskAccurate = serializedObject.FindProperty("seeThroughOccluderMaskAccurate"); + seeThroughOccluderThreshold = serializedObject.FindProperty("seeThroughOccluderThreshold"); + seeThroughOccluderCheckInterval = serializedObject.FindProperty("seeThroughOccluderCheckInterval"); + seeThroughOccluderCheckIndividualObjects = serializedObject.FindProperty("seeThroughOccluderCheckIndividualObjects"); + seeThroughDepthOffset = serializedObject.FindProperty("seeThroughDepthOffset"); + seeThroughMaxDepth = serializedObject.FindProperty("seeThroughMaxDepth"); + seeThroughIntensity = serializedObject.FindProperty("seeThroughIntensity"); + seeThroughTintAlpha = serializedObject.FindProperty("seeThroughTintAlpha"); + seeThroughTintColor = serializedObject.FindProperty("seeThroughTintColor"); + seeThroughNoise = serializedObject.FindProperty("seeThroughNoise"); + seeThroughBorder = serializedObject.FindProperty("seeThroughBorder"); + seeThroughBorderWidth = serializedObject.FindProperty("seeThroughBorderWidth"); + seeThroughBorderColor = serializedObject.FindProperty("seeThroughBorderColor"); + seeThroughOrdered = serializedObject.FindProperty("seeThroughOrdered"); + seeThroughBorderOnly = serializedObject.FindProperty("seeThroughBorderOnly"); + seeThroughTexture = serializedObject.FindProperty("seeThroughTexture"); + seeThroughTextureScale = serializedObject.FindProperty("seeThroughTextureScale"); + seeThroughTextureUVSpace = serializedObject.FindProperty("seeThroughTextureUVSpace"); + targetFX = serializedObject.FindProperty("targetFX"); + targetFXTexture = serializedObject.FindProperty("targetFXTexture"); + targetFXRotationSpeed = serializedObject.FindProperty("targetFXRotationSpeed"); + targetFXInitialScale = serializedObject.FindProperty("targetFXInitialScale"); + targetFXEndScale = serializedObject.FindProperty("targetFXEndScale"); + targetFXScaleToRenderBounds = serializedObject.FindProperty("targetFXScaleToRenderBounds"); + targetFXAlignToGround = serializedObject.FindProperty("targetFXAlignToGround"); + targetFXFadePower = serializedObject.FindProperty("targetFXFadePower"); + targetFXGroundMaxDistance = serializedObject.FindProperty("targetFXGroundMaxDistance"); + targetFXGroundLayerMask = serializedObject.FindProperty("targetFXGroundLayerMask"); + targetFXColor = serializedObject.FindProperty("targetFXColor"); + targetFXCenter = serializedObject.FindProperty("targetFXCenter"); + targetFXTransitionDuration = serializedObject.FindProperty("targetFXTransitionDuration"); + targetFXStayDuration = serializedObject.FindProperty("targetFXStayDuration"); + targetFXVisibility = serializedObject.FindProperty("targetFXVisibility"); + hitFxInitialIntensity = serializedObject.FindProperty("hitFxInitialIntensity"); + hitFxMode = serializedObject.FindProperty("hitFxMode"); + hitFxFadeOutDuration = serializedObject.FindProperty("hitFxFadeOutDuration"); + hitFxColor = serializedObject.FindProperty("hitFxColor"); + hitFxRadius = serializedObject.FindProperty("hitFxRadius"); + cameraDistanceFade = serializedObject.FindProperty("cameraDistanceFade"); + cameraDistanceFadeNear = serializedObject.FindProperty("cameraDistanceFadeNear"); + cameraDistanceFadeFar = serializedObject.FindProperty("cameraDistanceFadeFar"); + + thisEffect = (HighlightEffect)target; + thisEffect.Refresh(); + } + + + private void OnDisable() { + EditorPrefs.SetBool(HP_GENERAL_SETTINGS, expandGeneralSettings); + EditorPrefs.SetBool(HP_HIGHLIGHT_OPTIONS, expandHighlightOptions); + } + + + public override void OnInspectorGUI() { + + EditorGUILayout.Separator(); + + // URP setup helpers + pipe = GraphicsSettings.currentRenderPipeline as UniversalRenderPipelineAsset; + if (pipe == null) { + EditorGUILayout.HelpBox("You must assign the Universal Rendering Pipeline asset in Project Settings / Graphics. Then, add the Highlight Plus Scriptable Render Feature to the list of Renderer Features of the Forward Renderer.", MessageType.Error); + if (GUILayout.Button("Watch Setup Video Tutorial")) { + Application.OpenURL("https://youtu.be/EgyBs8v9aRI"); + } + return; + } + + if (!HighlightPlusRenderPassFeature.installed) { + EditorGUILayout.HelpBox("Highlight Plus Render Feature must be added to the list of features of the Forward Renderer in the Universal Rendering Pipeline asset.", MessageType.Warning); + if (GUILayout.Button("Watch Setup Video Tutorial")) { + Application.OpenURL("https://youtu.be/EgyBs8v9aRI"); + } + if (GUILayout.Button("Go to Universal Rendering Pipeline Asset")) { + Selection.activeObject = pipe; + } + EditorGUILayout.Separator(); + } + + bool isManager = IsDefaultEffectUsedByManager(); + serializedObject.Update(); + + bool isMeshObject = !thisEffect.spriteMode; + + if (foldoutBold == null) { + foldoutBold = new GUIStyle(EditorStyles.foldout); + foldoutBold.fontStyle = FontStyle.Bold; + } + + EditorGUILayout.BeginHorizontal(); + HighlightProfile prevProfile = (HighlightProfile)profile.objectReferenceValue; + EditorGUILayout.PropertyField(profile, new GUIContent("Profile", "Create or load stored presets.")); + if (profile.objectReferenceValue != null) { + + if (prevProfile != profile.objectReferenceValue) { + profileChanged = true; + } + + EditorGUILayout.EndHorizontal(); + EditorGUILayout.BeginHorizontal(); + GUILayout.Label("", GUILayout.Width(EditorGUIUtility.labelWidth)); + if (GUILayout.Button(new GUIContent("Create", "Creates a new profile which is a copy of the current settings."), GUILayout.Width(60))) { + CreateProfile(); + profileChanged = false; + enableProfileApply = false; + GUIUtility.ExitGUI(); + return; + } + if (GUILayout.Button(new GUIContent("Load", "Updates settings with the profile configuration."), GUILayout.Width(60))) { + profileChanged = true; + } + GUI.enabled = enableProfileApply; + if (GUILayout.Button(new GUIContent("Save", "Updates profile configuration with changes in this inspector."), GUILayout.Width(60))) { + enableProfileApply = false; + profileChanged = false; + thisEffect.profile.Save(thisEffect); + EditorUtility.SetDirty(thisEffect.profile); + GUIUtility.ExitGUI(); + return; + } + GUI.enabled = true; + if (GUILayout.Button(new GUIContent("Locate", "Finds the profile in the project"), GUILayout.Width(60))) { + if (thisEffect.profile != null) { + Selection.activeObject = thisEffect.profile; + EditorGUIUtility.PingObject(thisEffect.profile); + } + } + EditorGUILayout.EndHorizontal(); + EditorGUILayout.PropertyField(profileSync, new GUIContent("Sync With Profile", "If disabled, profile settings will only be loaded when clicking 'Load' which allows you to customize settings after loading a profile and keep those changes.")); + EditorGUILayout.BeginHorizontal(); + } else { + if (GUILayout.Button(new GUIContent("Create", "Creates a new profile which is a copy of the current settings."), GUILayout.Width(60))) { + CreateProfile(); + GUIUtility.ExitGUI(); + return; + } + } + EditorGUILayout.EndHorizontal(); + + + if (isManager) { + EditorGUILayout.HelpBox("These are default settings for highlighted objects. If the highlighted object already has a Highlight Effect component, those properties will be used.", MessageType.Info); + } + + expandGeneralSettings = EditorGUILayout.Foldout(expandGeneralSettings, "General Settings", true, foldoutBold); + if (expandGeneralSettings) { + EditorGUILayout.PropertyField(camerasLayerMask); + EditorGUILayout.PropertyField(ignoreObjectVisibility); + if (thisEffect.staticChildren) { + EditorGUILayout.HelpBox("This GameObject or one of its children is marked as static. If highlight is not visible, add a MeshCollider to them (the MeshCollider can be disabled).", MessageType.Warning); + } + + EditorGUILayout.PropertyField(reflectionProbes); + + if (isMeshObject) { + EditorGUILayout.PropertyField(normalsOption); + } + EditorGUILayout.PropertyField(optimizeSkinnedMesh); + if (isMeshObject || optimizeSkinnedMesh.boolValue) { + EditorGUILayout.PropertyField(GPUInstancing); + } + EditorGUILayout.Separator(); + } + + if (!isManager) { + EditorGUILayout.LabelField("State", EditorStyles.boldLabel); + if (isManager) { + EditorGUILayout.LabelField(new GUIContent("Highlighted", "Highlight state (controlled by Highlight Manager)."), new GUIContent(thisEffect.highlighted.ToString())); + } else { + EditorGUILayout.PropertyField(highlighted); + } + EditorGUILayout.LabelField(new GUIContent("Selected", "Selection state (used by Highlight Trigger or Manager) when using multi-selection option."), new GUIContent(thisEffect.isSelected.ToString())); + EditorGUILayout.Separator(); + } + + EditorGUILayout.BeginHorizontal(); + expandHighlightOptions = EditorGUILayout.Foldout(expandHighlightOptions, "Highlight Options", true, foldoutBold); + if (!isMeshObject) { + GUILayout.Label(new GUIContent("SPRITE MODE", "Highlight Effect over sprites. Some effects are not available in sprite mode"), EditorStyles.centeredGreyMiniLabel); + } + if (GUILayout.Button("Help", GUILayout.Width(50))) { + EditorUtility.DisplayDialog("Quick Help", "Move the mouse over a setting for a short description.\n\nVisit kronnect.com's forum for support, questions and more cool assets.\n\nIf you like Highlight Plus please rate it or leave a review on the Asset Store! Thanks.", "Ok"); + } + EditorGUILayout.EndHorizontal(); + if (expandHighlightOptions) { + EditorGUI.BeginChangeCheck(); + if (!isManager) { + EditorGUILayout.PropertyField(ignore, new GUIContent("Ignore", "This object won't be highlighted.")); + } + if (!ignore.boolValue) { + EditorGUILayout.PropertyField(effectGroup, new GUIContent("Include", "Additional objects to highlight. Pro tip: when highlighting multiple objects at the same time include them in the same layer or under the same parent.")); + if (effectGroup.intValue == (int)TargetOptions.LayerInScene || effectGroup.intValue == (int)TargetOptions.LayerInChildren) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(effectGroupLayer, new GUIContent("Layer")); + EditorGUI.indentLevel--; + } + if (effectGroup.intValue != (int)TargetOptions.OnlyThisObject && effectGroup.intValue != (int)TargetOptions.Scripting) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(effectNameFilter, new GUIContent("Object Name Filter")); + if (isMeshObject) { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(combineMeshes); + if (combineMeshes.boolValue) { + if (GUILayout.Button("Refresh", GUILayout.Width(70))) { + thisEffect.Refresh(true); + } + } + EditorGUILayout.EndHorizontal(); + } + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(alphaCutOff, new GUIContent("Alpha Cut Off", "Only for semi-transparent objects. Leave this to zero for normal opaque objects.")); + if (isMeshObject) { + EditorGUILayout.PropertyField(cullBackFaces); + } + EditorGUILayout.PropertyField(fadeInDuration); + EditorGUILayout.PropertyField(fadeOutDuration); + EditorGUILayout.PropertyField(cameraDistanceFade); + if (cameraDistanceFade.boolValue) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(cameraDistanceFadeNear, new GUIContent("Near Distance")); + EditorGUILayout.PropertyField(cameraDistanceFadeFar, new GUIContent("Far Distance")); + EditorGUI.indentLevel--; + } + if ((PlayerSettings.virtualRealitySupported && ((outlineQuality.intValue == (int)QualityLevel.Highest && outline.floatValue > 0) || (glowQuality.intValue == (int)QualityLevel.Highest && glow.floatValue > 0)))) { + EditorGUILayout.PropertyField(flipY, new GUIContent("Flip Y Fix", "Flips outline/glow effect to fix bug introduced in Unity 2019.1.0 when VR is enabled.")); + } + if (glowQuality.intValue != (int)QualityLevel.Highest || outlineQuality.intValue != (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(constantWidth, new GUIContent("Constant Width", "Compensates outline/glow width with depth increase.")); + } + if (isMeshObject) { + EditorGUILayout.PropertyField(subMeshMask); + EditorGUILayout.PropertyField(outlineIndependent, new GUIContent("Independent", "Do not combine outline or glow with other highlighted objects.")); + } + } + } + + if (!ignore.boolValue) { + EditorGUILayout.Separator(); + EditorGUILayout.LabelField("Effects", EditorStyles.boldLabel); + + EditorGUILayout.BeginVertical(GUI.skin.box); + DrawSectionField(outline, "Outline", outline.floatValue > 0); + if (outline.floatValue > 0) { + EditorGUI.indentLevel++; + if (isMeshObject) { + EditorGUILayout.BeginHorizontal(); + QualityPropertyField(outlineQuality); + if (outlineQuality.intValue == (int)QualityLevel.Highest) { + GUILayout.Label("(Screen-Space Effect)"); + } else { + GUILayout.Label("(Mesh-based Effect)"); + } + EditorGUILayout.EndHorizontal(); + } + CheckVRSupport(outlineQuality.intValue); + if (outlineQuality.intValue == (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(outlineEdgeMode, new GUIContent("Edges")); + if (outlineEdgeMode.intValue == (int)OutlineEdgeMode.Any) { + EditorGUILayout.PropertyField(outlineEdgeThreshold, new GUIContent("Edge Detection Threshold")); + } + EditorGUILayout.PropertyField(outlineContourStyle, new GUIContent("Contour Style")); + EditorGUILayout.PropertyField(outlineWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(outlineColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(outlineBlurPasses, new GUIContent("Blur Passes")); + } else { + EditorGUILayout.PropertyField(outlineWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(outlineColorStyle, new GUIContent("Color Style")); + switch ((ColorStyle)outlineColorStyle.intValue) { + case ColorStyle.SingleColor: + EditorGUILayout.PropertyField(outlineColor, new GUIContent("Color")); + break; + case ColorStyle.Gradient: + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(outlineGradient, new GUIContent("Gradient")); + EditorGUILayout.PropertyField(outlineGradientInLocalSpace, new GUIContent("In Local Space")); + EditorGUI.indentLevel--; + break; + } + } + if (outlineQuality.intValue == (int)QualityLevel.Highest && outlineEdgeMode.intValue != (int)OutlineEdgeMode.Any) { + CheckDepthTextureSupport("Highest Quality"); + EditorGUILayout.PropertyField(outlineDownsampling, new GUIContent("Downsampling")); + } + + if (outlineQuality.intValue == (int)QualityLevel.Highest && (glow.floatValue > 0 && glowQuality.intValue == (int)QualityLevel.Highest)) { + outlineVisibility.intValue = glowVisibility.intValue; + } + EditorGUILayout.PropertyField(outlineVisibility, new GUIContent("Visibility")); + if (outlineQuality.intValue == (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(outlineBlitDebug, new GUIContent("Debug View", "Shows the blitting rectangle on the screen.")); + if (!Application.isPlaying && outlineBlitDebug.boolValue && (!HighlightPlusRenderPassFeature.showingInEditMode || !highlighted.boolValue)) { + EditorGUILayout.HelpBox("Enable \"Preview In Editor\" in the Highlight Render Feature and \"Highlighted\" to display the outline Debug View.", MessageType.Warning); + } + } + + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + + EditorGUILayout.BeginVertical(GUI.skin.box); + DrawSectionField(glow, "Outer Glow", glow.floatValue > 0); + if (glow.floatValue > 0) { + EditorGUI.indentLevel++; + if (isMeshObject) { + EditorGUILayout.BeginHorizontal(); + QualityPropertyField(glowQuality); + if (glowQuality.intValue == (int)QualityLevel.Highest) { + GUILayout.Label("(Screen-Space Effect)"); + } else { + GUILayout.Label("(Mesh-based Effect)"); + } + EditorGUILayout.EndHorizontal(); + } + CheckVRSupport(glowQuality.intValue); + if (glowQuality.intValue == (int)QualityLevel.Highest) { + CheckDepthTextureSupport("Highest Quality"); + EditorGUILayout.PropertyField(outlineContourStyle, new GUIContent("Contour Style")); + EditorGUILayout.PropertyField(glowWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(glowHQColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(glowBlurMethod, new GUIContent("Blur Method", "Gaussian: better quality. Kawase: faster.")); + EditorGUILayout.PropertyField(glowDownsampling, new GUIContent("Downsampling")); + } else { + EditorGUILayout.PropertyField(glowWidth, new GUIContent("Width")); + } + if (glowQuality.intValue == (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility")); + EditorGUILayout.PropertyField(glowBlendMode, new GUIContent("Blend Mode")); + } else { + EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility")); + EditorGUILayout.PropertyField(glowDithering, new GUIContent("Dithering")); + if (glowDithering.boolValue) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(glowMagicNumber1, new GUIContent("Magic Number 1")); + EditorGUILayout.PropertyField(glowMagicNumber2, new GUIContent("Magic Number 2")); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(glowBlendPasses, new GUIContent("Blend Passes")); + if (!glowBlendPasses.boolValue) { + HighlightEffect ef = (HighlightEffect)target; + if (ef.glowPasses != null) { + for (int k = 0; k < ef.glowPasses.Length - 1; k++) { + if (ef.glowPasses[k].offset > ef.glowPasses[k + 1].offset) { + EditorGUILayout.HelpBox("Glow pass " + k + " has a greater offset than the next one. Reduce it to ensure the next glow pass is visible.", MessageType.Warning); + } + } + } + } + EditorGUILayout.PropertyField(glowPasses, true); + } + EditorGUILayout.PropertyField(glowAnimationSpeed, new GUIContent("Animation Speed")); + EditorGUILayout.PropertyField(glowIgnoreMask, new GUIContent("Ignore Mask")); + if (glowQuality.intValue == (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(glowBlitDebug, new GUIContent("Debug View", "Shows the blitting rectangle on the screen.")); + if (!Application.isPlaying && glowBlitDebug.boolValue && (!HighlightPlusRenderPassFeature.showingInEditMode || !highlighted.boolValue)) { + EditorGUILayout.HelpBox("Enable \"Preview In Editor\" in the Highlight Render Feature and \"Highlighted\" to display the glow Debug View.", MessageType.Warning); + } + } + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + + if (isMeshObject) { + EditorGUILayout.BeginVertical(GUI.skin.box); + DrawSectionField(innerGlow, "Inner Glow", innerGlow.floatValue > 0); + if (innerGlow.floatValue > 0) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(innerGlowColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(innerGlowWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(innerGlowBlendMode, new GUIContent("Blend Mode")); + EditorGUILayout.PropertyField(innerGlowVisibility, new GUIContent("Visibility")); + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + } + + EditorGUILayout.BeginVertical(GUI.skin.box); + DrawSectionField(overlay, "Overlay", overlay.floatValue > 0); + if (overlay.floatValue > 0) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(overlayMode, new GUIContent("Mode")); + EditorGUILayout.PropertyField(overlayColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(overlayTexture, new GUIContent("Texture")); + if (overlayTexture.objectReferenceValue != null) { + EditorGUILayout.PropertyField(overlayTextureUVSpace, new GUIContent("UV Space")); + EditorGUILayout.PropertyField(overlayTextureScale, new GUIContent("Texture Scale")); + } + EditorGUILayout.PropertyField(overlayBlending, new GUIContent("Blending")); + EditorGUILayout.PropertyField(overlayMinIntensity, new GUIContent("Min Intensity")); + EditorGUILayout.PropertyField(overlayAnimationSpeed, new GUIContent("Animation Speed")); + EditorGUILayout.PropertyField(overlayVisibility, new GUIContent("Visibility")); + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + + EditorGUILayout.BeginVertical(GUI.skin.box); + DrawSectionField(targetFX, "Target", targetFX.boolValue); + if (targetFX.boolValue) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(targetFXTexture, new GUIContent("Texture", "The texture that contains the shape to be drawn over the highlighted object.")); + EditorGUILayout.PropertyField(targetFXColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(targetFXCenter, new GUIContent("Center", "Optionally assign a transform. Target will follow transform. If the object is skinned, you can also assign a bone to reflect currenct animation position.")); + EditorGUILayout.PropertyField(targetFXRotationSpeed, new GUIContent("Rotation Speed")); + EditorGUILayout.PropertyField(targetFXInitialScale, new GUIContent("Initial Scale")); + EditorGUILayout.PropertyField(targetFXEndScale, new GUIContent("End Scale")); + EditorGUILayout.PropertyField(targetFXScaleToRenderBounds, new GUIContent("Scale To Object Bounds")); + EditorGUILayout.PropertyField(targetFXAlignToGround, new GUIContent("Align To Ground")); + if (targetFXAlignToGround.boolValue) { + CheckDepthTextureSupport("Align To Ground option"); + EditorGUI.indentLevel++; + if (thisEffect.includedObjectsCount > 1 && targetFXCenter.objectReferenceValue == null && effectGroup.intValue != (int)TargetOptions.OnlyThisObject) { + EditorGUILayout.HelpBox("It's recommended to specify in the 'Center' property above, the specific object used to position the target fx image (will be rendered under that object on the ground).", MessageType.Info); + } + EditorGUILayout.PropertyField(targetFXGroundMaxDistance, new GUIContent("Ground Max Distance")); + EditorGUILayout.PropertyField(targetFXGroundLayerMask, new GUIContent("Ground Layer Mask")); + HighlightEffect he = (HighlightEffect)target; + if ((targetFXGroundLayerMask.intValue & (1 << he.gameObject.layer)) != 0) { + EditorGUILayout.HelpBox("Ground Layer Mask should not include this object layer.", MessageType.Warning); + } + EditorGUILayout.PropertyField(targetFXFadePower, new GUIContent("Fade Power")); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(targetFXTransitionDuration, new GUIContent("Transition Duration")); + EditorGUILayout.PropertyField(targetFXStayDuration, new GUIContent("Stay Duration")); + EditorGUILayout.PropertyField(targetFXVisibility, new GUIContent("Visibility")); + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + } + + if (isMeshObject) { + + EditorGUILayout.BeginVertical(GUI.skin.box); + EditorGUILayout.PropertyField(seeThrough); + if (seeThrough.intValue != (int)SeeThroughMode.Never) { + if (isManager && seeThrough.intValue == (int)SeeThroughMode.AlwaysWhenOccluded) { + EditorGUILayout.HelpBox("This option is not valid in Manager.\nTo make an object always visible add a Highlight Effect component to the gameobject and enable this option on the component.", MessageType.Error); + } + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(seeThroughOccluderMask, new GUIContent("Occluder Layer")); + if (seeThroughOccluderMask.intValue > 0) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(seeThroughOccluderMaskAccurate, new GUIContent("Accurate")); + EditorGUILayout.PropertyField(seeThroughOccluderThreshold, new GUIContent("Radius Threshold", "Multiplier to the object bounds. Making the bounds smaller prevents false occlusion tests.")); + EditorGUILayout.PropertyField(seeThroughOccluderCheckInterval, new GUIContent("Check Interval", "Interval in seconds between occlusion tests.")); + EditorGUILayout.PropertyField(seeThroughOccluderCheckIndividualObjects, new GUIContent("Check Individual Objects")); + if (!showCurrentOccluders && Camera.main != null) { + GUI.enabled = Application.isPlaying; + EditorGUILayout.BeginHorizontal(); + GUILayout.Label("", GUILayout.Width(30)); + if (GUILayout.Button(" Show Current Occluders (only during Play Mode) ")) { + showCurrentOccluders = true; + } + GUILayout.FlexibleSpace(); + EditorGUILayout.EndHorizontal(); + GUI.enabled = true; + } + if (showCurrentOccluders) { + HighlightEffect h = (HighlightEffect)target; + List occluders = h.GetOccluders(Camera.main); + int count = occluders != null ? occluders.Count : 0; + if (count == 0) { + EditorGUILayout.LabelField("No occluders found (using main camera)"); + } else { + EditorGUILayout.LabelField("Occluders found (using main camera):"); + for (int k = 0; k < count; k++) { + if (occluders[k] == null) continue; + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(occluders[k].name); + if (GUILayout.Button("Select")) { + Selection.activeGameObject = occluders[k].gameObject; + GUIUtility.ExitGUI(); + } + EditorGUILayout.EndHorizontal(); + } + } + } + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(seeThroughDepthOffset, new GUIContent("Depth Offset" + ((seeThroughDepthOffset.floatValue > 0) ? " •" : ""))); + EditorGUILayout.PropertyField(seeThroughMaxDepth, new GUIContent("Max Depth" + ((seeThroughMaxDepth.floatValue > 0) ? " •" : ""))); + if (seeThroughDepthOffset.floatValue > 0 || seeThroughMaxDepth.floatValue > 0) { + CheckDepthTextureSupport("See-Through Depth Options"); + } + EditorGUILayout.PropertyField(seeThroughIntensity, new GUIContent("Intensity")); + EditorGUILayout.PropertyField(seeThroughTintColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(seeThroughTintAlpha, new GUIContent("Color Blend")); + EditorGUILayout.PropertyField(seeThroughNoise, new GUIContent("Noise")); + EditorGUILayout.PropertyField(seeThroughTexture, new GUIContent("Texture")); + if (seeThroughTexture.objectReferenceValue != null) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(seeThroughTextureUVSpace, new GUIContent("UV Space")); + EditorGUILayout.PropertyField(seeThroughTextureScale, new GUIContent("Texture Scale")); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(seeThroughBorder, new GUIContent("Border When Hidden" + ((seeThroughBorder.floatValue > 0) ? " •" : ""))); + if (seeThroughBorder.floatValue > 0) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(seeThroughBorderWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(seeThroughBorderColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(seeThroughBorderOnly, new GUIContent("Border Only")); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(seeThroughOrdered, new GUIContent("Ordered")); + + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + } + + EditorGUILayout.BeginVertical(GUI.skin.box); + DrawSectionField(hitFxInitialIntensity, "Hit FX", hitFxInitialIntensity.floatValue > 0); + if (hitFxInitialIntensity.floatValue > 0) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(hitFxMode, new GUIContent("Mode")); + EditorGUILayout.PropertyField(hitFxFadeOutDuration, new GUIContent("Fade Out Duration")); + EditorGUILayout.PropertyField(hitFxColor, new GUIContent("Color")); + if ((HitFxMode)hitFxMode.intValue == HitFxMode.LocalHit) { + EditorGUILayout.PropertyField(hitFxRadius, new GUIContent("Radius")); + } + EditorGUI.indentLevel--; + } + + if (!Application.isPlaying) { + EditorGUILayout.HelpBox("Enter Play Mode to test this feature. In your code, call effect.HitFX() method to execute this hit effect.", MessageType.Info); + } else { + EditorGUI.indentLevel++; + if (GUILayout.Button("Execute Hit")) { + thisEffect.HitFX(); + } + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + + if (serializedObject.ApplyModifiedProperties() || profileChanged || Event.current.commandName == "UndoRedoPerformed") { + if (thisEffect.profile != null) { + if (profileChanged) { + thisEffect.profile.Load(thisEffect); + profileChanged = false; + enableProfileApply = false; + } else { + enableProfileApply = true; + } + } + + foreach (HighlightEffect effect in targets) { + effect.Refresh(); + } + } + } + + void DrawSectionField(SerializedProperty property, string label, bool active) { + EditorGUILayout.PropertyField(property, new GUIContent(active ? label + " •" : label)); + } + + void CheckVRSupport(int qualityLevel) { + if (qualityLevel == (int)QualityLevel.Highest && PlayerSettings.virtualRealitySupported) { + if (PlayerSettings.stereoRenderingPath != StereoRenderingPath.MultiPass) { + EditorGUILayout.HelpBox("Highest Quality only supports VR Multi-Pass as CommandBuffers do not support this VR mode yet. Either switch to 'High Quality' or change VR Stereo mode to Multi-Pass.", MessageType.Error); + } + } + } + + void CheckDepthTextureSupport(string feature) { + if (pipe == null) return; + if (!pipe.supportsCameraDepthTexture && !thisEffect.spriteMode) { + EditorGUILayout.HelpBox(feature + " requires Depth Texture support and currently it's not enabled in the Rendering Pipeline asset.", MessageType.Error); + if (pipe != null && GUILayout.Button("Go to Universal Rendering Pipeline Asset")) { + Selection.activeObject = pipe; + } + EditorGUILayout.Separator(); + } + } + + static readonly int[] qualityValues = { 0, 3, 1, 2 }; + static readonly GUIContent[] qualityTexts = { new GUIContent("Fastest"), new GUIContent("Medium"), new GUIContent("High"), new GUIContent("Highest") }; + + public static void QualityPropertyField(SerializedProperty prop) { + prop.intValue = EditorGUILayout.IntPopup(new GUIContent("Quality", "Default and High use a mesh displacement technique. Highest quality can provide best look and also performance depending on the complexity of mesh."), prop.intValue, qualityTexts, qualityValues); + } + + bool IsDefaultEffectUsedByManager() { + MonoBehaviour[] components = thisEffect.GetComponents(); + if (components != null) { + for (int k = 0; k < components.Length; k++) { + if (components[k] == null || !components[k].enabled) + continue; + string name = components[k].GetType().Name; + if ("HighlightManager".Equals(name)) return true; + } + } + return false; + } + + #region Profile handling + + void CreateProfile() { + + HighlightProfile newProfile = CreateInstance(); + newProfile.Save(thisEffect); + + AssetDatabase.CreateAsset(newProfile, "Assets/Highlight Plus Profile.asset"); + AssetDatabase.SaveAssets(); + + EditorUtility.FocusProjectWindow(); + Selection.activeObject = newProfile; + + thisEffect.profile = newProfile; + } + + + #endregion + +#pragma warning restore 0618 + + } + +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Editor/HighlightEffectEditor.cs.meta b/Assets/Plugins/HighlightPlus/Editor/HighlightEffectEditor.cs.meta new file mode 100644 index 0000000..4c1a7dc --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Editor/HighlightEffectEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: be287539f47634552a716f0705710448 +timeCreated: 1542886545 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Editor/HighlightManagerEditor.cs b/Assets/Plugins/HighlightPlus/Editor/HighlightManagerEditor.cs new file mode 100644 index 0000000..1ac0b24 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Editor/HighlightManagerEditor.cs @@ -0,0 +1,71 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace HighlightPlus { + [CustomEditor(typeof(HighlightManager))] + public class HighlightManagerEditor : Editor { + + SerializedProperty highlightOnHover, layerMask, raycastCamera, raycastSource, minDistance, maxDistance, respectUI; + SerializedProperty selectOnClick, selectedProfile, selectedAndHighlightedProfile, singleSelection, toggleOnClick, keepSelection; + + void OnEnable() { + highlightOnHover = serializedObject.FindProperty("highlightOnHover"); + layerMask = serializedObject.FindProperty("layerMask"); + raycastCamera = serializedObject.FindProperty("raycastCamera"); + raycastSource = serializedObject.FindProperty("raycastSource"); + minDistance = serializedObject.FindProperty("minDistance"); + maxDistance = serializedObject.FindProperty("maxDistance"); + respectUI = serializedObject.FindProperty("respectUI"); + selectOnClick = serializedObject.FindProperty("selectOnClick"); + selectedProfile = serializedObject.FindProperty("selectedProfile"); + selectedAndHighlightedProfile = serializedObject.FindProperty("selectedAndHighlightedProfile"); + singleSelection = serializedObject.FindProperty("singleSelection"); + toggleOnClick = serializedObject.FindProperty("toggle"); + keepSelection = serializedObject.FindProperty("keepSelection"); + } + + public override void OnInspectorGUI() { + EditorGUILayout.Separator(); + EditorGUILayout.HelpBox("Only objects with a collider can be highlighted automatically.", MessageType.Info); + + serializedObject.Update(); + + EditorGUILayout.PropertyField(layerMask); + EditorGUILayout.PropertyField(raycastCamera); + EditorGUILayout.PropertyField(raycastSource); + EditorGUILayout.PropertyField(minDistance); + EditorGUILayout.PropertyField(maxDistance); + EditorGUILayout.PropertyField(respectUI); + EditorGUILayout.PropertyField(highlightOnHover); + EditorGUILayout.PropertyField(selectOnClick); + if (selectOnClick.boolValue) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(selectedProfile); + EditorGUILayout.PropertyField(selectedAndHighlightedProfile); + EditorGUILayout.PropertyField(singleSelection); + EditorGUILayout.PropertyField(toggleOnClick); + EditorGUILayout.PropertyField(keepSelection); + EditorGUI.indentLevel--; + } + + serializedObject.ApplyModifiedProperties(); + } + + + [MenuItem("GameObject/Effects/Highlight Plus/Create Highlight Manager", false, 10)] + static void CreateManager (MenuCommand menuCommand) { + HighlightManager manager = FindObjectOfType (); + if (manager == null) { + GameObject managerGO = new GameObject ("HighlightPlusManager"); + manager = managerGO.AddComponent (); + // Register root object for undo. + Undo.RegisterCreatedObjectUndo (manager, "Create Highlight Plus Manager"); + } + Selection.activeObject = manager; + } + + } + +} diff --git a/Assets/Plugins/HighlightPlus/Editor/HighlightManagerEditor.cs.meta b/Assets/Plugins/HighlightPlus/Editor/HighlightManagerEditor.cs.meta new file mode 100644 index 0000000..7edb76b --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Editor/HighlightManagerEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ace58d1d278d649c98e5a2b5a066b3cd +timeCreated: 1548711355 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Editor/HighlightProfileEditor.cs b/Assets/Plugins/HighlightPlus/Editor/HighlightProfileEditor.cs new file mode 100644 index 0000000..7781b87 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Editor/HighlightProfileEditor.cs @@ -0,0 +1,370 @@ +using UnityEditor; +using UnityEngine; + +namespace HighlightPlus { + + [CustomEditor(typeof(HighlightProfile))] + [CanEditMultipleObjects] + public class HighlightProfileEditor : Editor { + + SerializedProperty effectGroup, effectGroupLayer, effectNameFilter, combineMeshes, alphaCutOff, cullBackFaces; + SerializedProperty overlay, overlayMode, overlayColor, overlayAnimationSpeed, overlayMinIntensity, overlayTexture, overlayTextureScale, overlayTextureUVSpace, overlayBlending, overlayVisibility; + SerializedProperty fadeInDuration, fadeOutDuration, constantWidth, normalsOption; + SerializedProperty outline, outlineColor, outlineColorStyle, outlineGradient, outlineGradientInLocalSpace, outlineWidth, outlineBlurPasses, outlineQuality, outlineEdgeMode, outlineEdgeThreshold, outlineDownsampling, outlineVisibility, outlineIndependent, outlineContourStyle; + SerializedProperty glow, glowWidth, glowQuality, glowBlurMethod, glowDownsampling, glowHQColor, glowDithering, glowMagicNumber1, glowMagicNumber2, glowAnimationSpeed; + SerializedProperty glowBlendPasses, glowVisibility, glowBlendMode, glowPasses, glowIgnoreMask; + SerializedProperty innerGlow, innerGlowWidth, innerGlowColor, innerGlowBlendMode, innerGlowVisibility; + SerializedProperty targetFX, targetFXTexture, targetFXColor, targetFXRotationSpeed, targetFXInitialScale, targetFXEndScale, targetFXScaleToRenderBounds; + SerializedProperty targetFXAlignToGround, targetFXFadePower, targetFXGroundMaxDistance, targetFXGroundLayerMask, targetFXTransitionDuration, targetFXStayDuration, targetFXVisibility; + SerializedProperty seeThrough, seeThroughOccluderMask, seeThroughOccluderMaskAccurate, seeThroughOccluderThreshold, seeThroughOccluderCheckInterval, seeThroughOccluderCheckIndividualObjects, seeThroughDepthOffset, seeThroughMaxDepth; + SerializedProperty seeThroughIntensity, seeThroughTintAlpha, seeThroughTintColor, seeThroughNoise, seeThroughBorder, seeThroughBorderWidth, seeThroughBorderColor, seeThroughOrdered, seeThroughBorderOnly, seeThroughTexture, seeThroughTextureUVSpace, seeThroughTextureScale; + SerializedProperty hitFxInitialIntensity, hitFxMode, hitFxFadeOutDuration, hitFxColor, hitFxRadius; + SerializedProperty cameraDistanceFade, cameraDistanceFadeNear, cameraDistanceFadeFar; + + void OnEnable() { + effectGroup = serializedObject.FindProperty("effectGroup"); + effectGroupLayer = serializedObject.FindProperty("effectGroupLayer"); + effectNameFilter = serializedObject.FindProperty("effectNameFilter"); + combineMeshes = serializedObject.FindProperty("combineMeshes"); + alphaCutOff = serializedObject.FindProperty("alphaCutOff"); + cullBackFaces = serializedObject.FindProperty("cullBackFaces"); + normalsOption = serializedObject.FindProperty("normalsOption"); + fadeInDuration = serializedObject.FindProperty("fadeInDuration"); + fadeOutDuration = serializedObject.FindProperty("fadeOutDuration"); + constantWidth = serializedObject.FindProperty("constantWidth"); + overlay = serializedObject.FindProperty("overlay"); + overlayMode = serializedObject.FindProperty("overlayMode"); + overlayColor = serializedObject.FindProperty("overlayColor"); + overlayAnimationSpeed = serializedObject.FindProperty("overlayAnimationSpeed"); + overlayMinIntensity = serializedObject.FindProperty("overlayMinIntensity"); + overlayBlending = serializedObject.FindProperty("overlayBlending"); + overlayVisibility = serializedObject.FindProperty("overlayVisibility"); + overlayTexture = serializedObject.FindProperty("overlayTexture"); + overlayTextureUVSpace = serializedObject.FindProperty("overlayTextureUVSpace"); + overlayTextureScale = serializedObject.FindProperty("overlayTextureScale"); + outline = serializedObject.FindProperty("outline"); + outlineColor = serializedObject.FindProperty("outlineColor"); + outlineColorStyle = serializedObject.FindProperty("outlineColorStyle"); + outlineGradient = serializedObject.FindProperty("outlineGradient"); + outlineGradientInLocalSpace = serializedObject.FindProperty("outlineGradientInLocalSpace"); + outlineWidth = serializedObject.FindProperty("outlineWidth"); + outlineBlurPasses = serializedObject.FindProperty("outlineBlurPasses"); + outlineQuality = serializedObject.FindProperty("outlineQuality"); + outlineEdgeMode = serializedObject.FindProperty("outlineEdgeMode"); + outlineEdgeThreshold = serializedObject.FindProperty("outlineEdgeThreshold"); + outlineDownsampling = serializedObject.FindProperty("outlineDownsampling"); + outlineVisibility = serializedObject.FindProperty("outlineVisibility"); + outlineIndependent = serializedObject.FindProperty("outlineIndependent"); + outlineContourStyle = serializedObject.FindProperty("outlineContourStyle"); + glow = serializedObject.FindProperty("glow"); + glowWidth = serializedObject.FindProperty("glowWidth"); + glowQuality = serializedObject.FindProperty("glowQuality"); + glowBlurMethod = serializedObject.FindProperty("glowBlurMethod"); + glowDownsampling = serializedObject.FindProperty("glowDownsampling"); + glowHQColor = serializedObject.FindProperty("glowHQColor"); + glowAnimationSpeed = serializedObject.FindProperty("glowAnimationSpeed"); + glowDithering = serializedObject.FindProperty("glowDithering"); + glowMagicNumber1 = serializedObject.FindProperty("glowMagicNumber1"); + glowMagicNumber2 = serializedObject.FindProperty("glowMagicNumber2"); + glowAnimationSpeed = serializedObject.FindProperty("glowAnimationSpeed"); + glowBlendPasses = serializedObject.FindProperty("glowBlendPasses"); + glowVisibility = serializedObject.FindProperty("glowVisibility"); + glowBlendMode = serializedObject.FindProperty("glowBlendMode"); + glowPasses = serializedObject.FindProperty("glowPasses"); + glowIgnoreMask = serializedObject.FindProperty("glowIgnoreMask"); + innerGlow = serializedObject.FindProperty("innerGlow"); + innerGlowColor = serializedObject.FindProperty("innerGlowColor"); + innerGlowWidth = serializedObject.FindProperty("innerGlowWidth"); + innerGlowBlendMode = serializedObject.FindProperty("innerGlowBlendMode"); + innerGlowVisibility = serializedObject.FindProperty("innerGlowVisibility"); + targetFX = serializedObject.FindProperty("targetFX"); + targetFXTexture = serializedObject.FindProperty("targetFXTexture"); + targetFXRotationSpeed = serializedObject.FindProperty("targetFXRotationSpeed"); + targetFXInitialScale = serializedObject.FindProperty("targetFXInitialScale"); + targetFXEndScale = serializedObject.FindProperty("targetFXEndScale"); + targetFXScaleToRenderBounds = serializedObject.FindProperty("targetFXScaleToRenderBounds"); + targetFXAlignToGround = serializedObject.FindProperty("targetFXAlignToGround"); + targetFXGroundMaxDistance = serializedObject.FindProperty("targetFXGroundMaxDistance"); + targetFXGroundLayerMask = serializedObject.FindProperty("targetFXGroundLayerMask"); + targetFXFadePower = serializedObject.FindProperty("targetFXFadePower"); + targetFXColor = serializedObject.FindProperty("targetFXColor"); + targetFXTransitionDuration = serializedObject.FindProperty("targetFXTransitionDuration"); + targetFXStayDuration = serializedObject.FindProperty("targetFXStayDuration"); + targetFXVisibility = serializedObject.FindProperty("targetFXVisibility"); + seeThrough = serializedObject.FindProperty("seeThrough"); + seeThroughOccluderMask = serializedObject.FindProperty("seeThroughOccluderMask"); + seeThroughOccluderMaskAccurate = serializedObject.FindProperty("seeThroughOccluderMaskAccurate"); + seeThroughOccluderThreshold = serializedObject.FindProperty("seeThroughOccluderThreshold"); + seeThroughOccluderCheckInterval = serializedObject.FindProperty("seeThroughOccluderCheckInterval"); + seeThroughOccluderCheckIndividualObjects = serializedObject.FindProperty("seeThroughOccluderCheckIndividualObjects"); + seeThroughDepthOffset = serializedObject.FindProperty("seeThroughDepthOffset"); + seeThroughMaxDepth = serializedObject.FindProperty("seeThroughMaxDepth"); + seeThroughIntensity = serializedObject.FindProperty("seeThroughIntensity"); + seeThroughTintAlpha = serializedObject.FindProperty("seeThroughTintAlpha"); + seeThroughTintColor = serializedObject.FindProperty("seeThroughTintColor"); + seeThroughNoise = serializedObject.FindProperty("seeThroughNoise"); + seeThroughBorder = serializedObject.FindProperty("seeThroughBorder"); + seeThroughBorderWidth = serializedObject.FindProperty("seeThroughBorderWidth"); + seeThroughBorderColor = serializedObject.FindProperty("seeThroughBorderColor"); + seeThroughBorderOnly = serializedObject.FindProperty("seeThroughBorderOnly"); + seeThroughOrdered = serializedObject.FindProperty("seeThroughOrdered"); + seeThroughTexture = serializedObject.FindProperty("seeThroughTexture"); + seeThroughTextureScale = serializedObject.FindProperty("seeThroughTextureScale"); + seeThroughTextureUVSpace = serializedObject.FindProperty("seeThroughTextureUVSpace"); + hitFxInitialIntensity = serializedObject.FindProperty("hitFxInitialIntensity"); + hitFxMode = serializedObject.FindProperty("hitFxMode"); + hitFxFadeOutDuration = serializedObject.FindProperty("hitFxFadeOutDuration"); + hitFxColor = serializedObject.FindProperty("hitFxColor"); + hitFxRadius = serializedObject.FindProperty("hitFxRadius"); + cameraDistanceFade = serializedObject.FindProperty("cameraDistanceFade"); + cameraDistanceFadeNear = serializedObject.FindProperty("cameraDistanceFadeNear"); + cameraDistanceFadeFar = serializedObject.FindProperty("cameraDistanceFadeFar"); + } + + public override void OnInspectorGUI() { + + serializedObject.Update(); + + EditorGUILayout.Separator(); + EditorGUILayout.LabelField("Highlight Options", EditorStyles.boldLabel); + EditorGUILayout.PropertyField(effectGroup, new GUIContent("Include")); + if (effectGroup.intValue == (int)TargetOptions.LayerInScene || effectGroup.intValue == (int)TargetOptions.LayerInChildren) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(effectGroupLayer, new GUIContent("Layer")); + EditorGUI.indentLevel--; + } + if (effectGroup.intValue != (int)TargetOptions.OnlyThisObject && effectGroup.intValue != (int)TargetOptions.Scripting) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(effectNameFilter, new GUIContent("Object Name Filter")); + EditorGUILayout.PropertyField(combineMeshes); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(alphaCutOff); + EditorGUILayout.PropertyField(cullBackFaces); + EditorGUILayout.PropertyField(normalsOption); + EditorGUILayout.PropertyField(fadeInDuration); + EditorGUILayout.PropertyField(fadeOutDuration); + EditorGUILayout.PropertyField(cameraDistanceFade); + if (cameraDistanceFade.boolValue) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(cameraDistanceFadeNear, new GUIContent("Near Distance")); + EditorGUILayout.PropertyField(cameraDistanceFadeFar, new GUIContent("Far Distance")); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(constantWidth); + EditorGUILayout.PropertyField(outlineIndependent, new GUIContent("Independent", "Do not combine outline with other highlighted objects.")); + + EditorGUILayout.Separator(); + EditorGUILayout.LabelField("Effects", EditorStyles.boldLabel); + + EditorGUILayout.BeginVertical(GUI.skin.box); + DrawSectionField(outline, "Outline", outline.floatValue > 0); + if (outline.floatValue > 0) { + EditorGUI.indentLevel++; + HighlightEffectEditor.QualityPropertyField(outlineQuality); + if (outlineQuality.intValue == (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(outlineEdgeMode, new GUIContent("Edges")); + if (outlineEdgeMode.intValue == (int)OutlineEdgeMode.Any) { + EditorGUILayout.PropertyField(outlineEdgeThreshold, new GUIContent("Edge Detection Threshold")); + } + EditorGUILayout.PropertyField(outlineContourStyle, new GUIContent("Contour Style")); + EditorGUILayout.PropertyField(outlineWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(outlineColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(outlineBlurPasses, new GUIContent("Blur Passes")); + } else { + EditorGUILayout.PropertyField(outlineWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(outlineColorStyle, new GUIContent("Color Style")); + switch ((ColorStyle)outlineColorStyle.intValue) { + case ColorStyle.SingleColor: + EditorGUILayout.PropertyField(outlineColor, new GUIContent("Color")); + break; + case ColorStyle.Gradient: + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(outlineGradient, new GUIContent("Gradient")); + EditorGUILayout.PropertyField(outlineGradientInLocalSpace, new GUIContent("In Local Space")); + EditorGUI.indentLevel--; + break; + } + } + if (outlineQuality.intValue == (int)QualityLevel.Highest && outlineEdgeMode.intValue != (int)OutlineEdgeMode.Any) { + EditorGUILayout.PropertyField(outlineDownsampling, new GUIContent("Downsampling")); + } + if (outlineQuality.intValue == (int)QualityLevel.Highest && glowQuality.intValue == (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility")); + } else { + EditorGUILayout.PropertyField(outlineVisibility, new GUIContent("Visibility")); + } + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + + EditorGUILayout.BeginVertical(GUI.skin.box); + DrawSectionField(glow, "Outer Glow", glow.floatValue > 0); + if (glow.floatValue > 0) { + EditorGUI.indentLevel++; + HighlightEffectEditor.QualityPropertyField(glowQuality); + if (glowQuality.intValue == (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(outlineContourStyle, new GUIContent("Contour Style")); + EditorGUILayout.PropertyField(glowWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(glowHQColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(glowBlurMethod, new GUIContent("Blur Method", "Gaussian: better quality. Kawase: faster.")); + EditorGUILayout.PropertyField(glowDownsampling, new GUIContent("Downsampling")); + } else { + EditorGUILayout.PropertyField(glowWidth, new GUIContent("Width")); + } + EditorGUILayout.PropertyField(glowAnimationSpeed, new GUIContent("Animation Speed")); + EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility")); + EditorGUILayout.PropertyField(glowBlendMode, new GUIContent("Blend Mode")); + if (glowQuality.intValue != (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(glowDithering, new GUIContent("Dithering")); + if (glowDithering.boolValue) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(glowMagicNumber1, new GUIContent("Magic Number 1")); + EditorGUILayout.PropertyField(glowMagicNumber2, new GUIContent("Magic Number 2")); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(glowBlendPasses, new GUIContent("Blend Passes")); + EditorGUILayout.PropertyField(glowPasses, true); + EditorGUILayout.PropertyField(glowIgnoreMask, new GUIContent("Ignore Mask")); + } + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + + EditorGUILayout.BeginVertical(GUI.skin.box); + DrawSectionField(innerGlow, "Inner Glow", innerGlow.floatValue > 0); + if (innerGlow.floatValue > 0) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(innerGlowColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(innerGlowWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(innerGlowBlendMode, new GUIContent("Blend Mode")); + EditorGUILayout.PropertyField(innerGlowVisibility, new GUIContent("Visibility")); + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + + EditorGUILayout.BeginVertical(GUI.skin.box); + DrawSectionField(overlay, "Overlay", overlay.floatValue > 0); + if (overlay.floatValue > 0) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(overlayMode, new GUIContent("Mode")); + EditorGUILayout.PropertyField(overlayColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(overlayTexture, new GUIContent("Texture")); + if (overlayTexture.objectReferenceValue != null) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(overlayTextureUVSpace, new GUIContent("UV Space")); + EditorGUILayout.PropertyField(overlayTextureScale, new GUIContent("Texture Scale")); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(overlayBlending, new GUIContent("Blending")); + EditorGUILayout.PropertyField(overlayMinIntensity, new GUIContent("Min Intensity")); + EditorGUILayout.PropertyField(overlayAnimationSpeed, new GUIContent("Animation Speed")); + EditorGUILayout.PropertyField(overlayVisibility, new GUIContent("Visibility")); + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + + EditorGUILayout.BeginVertical(GUI.skin.box); + DrawSectionField(targetFX, "Target", targetFX.boolValue); + if (targetFX.boolValue) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(targetFXTexture, new GUIContent("Texture")); + EditorGUILayout.PropertyField(targetFXColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(targetFXRotationSpeed, new GUIContent("Rotation Speed")); + EditorGUILayout.PropertyField(targetFXInitialScale, new GUIContent("Initial Scale")); + EditorGUILayout.PropertyField(targetFXEndScale, new GUIContent("End Scale")); + EditorGUILayout.PropertyField(targetFXScaleToRenderBounds, new GUIContent("Scale To Object Bounds")); + EditorGUILayout.PropertyField(targetFXAlignToGround, new GUIContent("Align To Ground")); + if (targetFXAlignToGround.boolValue) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(targetFXGroundMaxDistance, new GUIContent("Ground Max Distance")); + EditorGUILayout.PropertyField(targetFXGroundLayerMask, new GUIContent("Ground Layer Mask")); + EditorGUILayout.PropertyField(targetFXFadePower, new GUIContent("Fade Power")); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(targetFXTransitionDuration, new GUIContent("Transition Duration")); + EditorGUILayout.PropertyField(targetFXStayDuration, new GUIContent("Stay Duration")); + EditorGUILayout.PropertyField(targetFXVisibility, new GUIContent("Visibility")); + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + + EditorGUILayout.BeginVertical(GUI.skin.box); + EditorGUILayout.PropertyField(seeThrough); + if (seeThrough.intValue != (int)SeeThroughMode.Never) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(seeThroughOccluderMask, new GUIContent("Occluder Layer")); + if (seeThroughOccluderMask.intValue > 0) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(seeThroughOccluderMaskAccurate, new GUIContent("Accurate")); + EditorGUILayout.PropertyField(seeThroughOccluderThreshold, new GUIContent("Radius Threshold", "Multiplier to the object bounds. Making the bounds smaller prevents false occlusion tests.")); + EditorGUILayout.PropertyField(seeThroughOccluderCheckInterval, new GUIContent("Check Interval", "Interval in seconds between occlusion tests.")); + EditorGUILayout.PropertyField(seeThroughOccluderCheckIndividualObjects, new GUIContent("Check Individual Objects", "Interval in seconds between occlusion tests.")); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(seeThroughDepthOffset, new GUIContent("Depth Offset" + ((seeThroughDepthOffset.floatValue > 0) ? " •" : ""))); + EditorGUILayout.PropertyField(seeThroughMaxDepth, new GUIContent("Max Depth" + ((seeThroughMaxDepth.floatValue > 0) ? " •" : ""))); + EditorGUILayout.PropertyField(seeThroughIntensity, new GUIContent("Intensity")); + EditorGUILayout.PropertyField(seeThroughTintColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(seeThroughTintAlpha, new GUIContent("Color Blend")); + EditorGUILayout.PropertyField(seeThroughNoise, new GUIContent("Noise")); + EditorGUILayout.PropertyField(seeThroughTexture, new GUIContent("Texture")); + if (seeThroughTexture.objectReferenceValue != null) { + EditorGUILayout.PropertyField(seeThroughTextureUVSpace, new GUIContent("UV Space")); + EditorGUILayout.PropertyField(seeThroughTextureScale, new GUIContent("Texture Scale")); + } + EditorGUILayout.PropertyField(seeThroughBorder, new GUIContent("Border When Hidden")); + if (seeThroughBorder.floatValue > 0) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(seeThroughBorderWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(seeThroughBorderColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(seeThroughBorderOnly, new GUIContent("Border Only")); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(seeThroughOrdered, new GUIContent("Ordered")); + + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + + EditorGUILayout.BeginVertical(GUI.skin.box); + DrawSectionField(hitFxInitialIntensity, "Hit FX", hitFxInitialIntensity.floatValue > 0); + if (hitFxInitialIntensity.floatValue > 0) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(hitFxInitialIntensity, new GUIContent("Initial Intensity")); + EditorGUILayout.PropertyField(hitFxMode, new GUIContent("Mode")); + EditorGUILayout.PropertyField(hitFxFadeOutDuration, new GUIContent("Fade Out Duration")); + EditorGUILayout.PropertyField(hitFxColor, new GUIContent("Color")); + if ((HitFxMode)hitFxMode.intValue == HitFxMode.LocalHit) { + EditorGUILayout.PropertyField(hitFxRadius, new GUIContent("Radius")); + } + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + + if (serializedObject.ApplyModifiedProperties() || (Event.current.type == EventType.ValidateCommand && + Event.current.commandName == "UndoRedoPerformed")) { + + // Triggers profile reload on all Highlight Effect scripts + HighlightEffect[] effects = FindObjectsOfType(); + for (int t = 0; t < targets.Length; t++) { + HighlightProfile profile = (HighlightProfile)targets[t]; + for (int k = 0; k < effects.Length; k++) { + if (effects[k] != null && effects[k].profile == profile && effects[k].profileSync) { + profile.Load(effects[k]); + effects[k].Refresh(); + } + } + } + EditorUtility.SetDirty(target); + } + + } + + void DrawSectionField(SerializedProperty property, string label, bool active) { + EditorGUILayout.PropertyField(property, new GUIContent(active ? label + " •" : label)); + } + + } + +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Editor/HighlightProfileEditor.cs.meta b/Assets/Plugins/HighlightPlus/Editor/HighlightProfileEditor.cs.meta new file mode 100644 index 0000000..dfa2e44 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Editor/HighlightProfileEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b3b0e551d6f4f4f3987e8e5be2e89285 +timeCreated: 1542886545 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs b/Assets/Plugins/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs new file mode 100644 index 0000000..02d90a4 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs @@ -0,0 +1,33 @@ +using UnityEditor; +using UnityEngine; + +namespace HighlightPlus { + + [CustomEditor(typeof(HighlightSeeThroughOccluder))] + public class HighlightSeeThroughOccluderEditor : Editor { + + SerializedProperty mode, detectionMethod; + + void OnEnable() { + mode = serializedObject.FindProperty("mode"); + detectionMethod = serializedObject.FindProperty("detectionMethod"); + } + + public override void OnInspectorGUI() { + + serializedObject.Update(); + + EditorGUILayout.PropertyField(mode); + if (mode.intValue == (int)OccluderMode.BlocksSeeThrough) { + EditorGUILayout.HelpBox("This object will occlude any see-through effect.", MessageType.Info); + EditorGUILayout.PropertyField(detectionMethod); + } else { + EditorGUILayout.HelpBox("This object will trigger see-through effect. Use only on objects that do not write to depth buffer normally, like sprites or transparent objects.", MessageType.Info); + } + + serializedObject.ApplyModifiedProperties(); + + } + } + +} diff --git a/Assets/Plugins/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs.meta b/Assets/Plugins/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs.meta new file mode 100644 index 0000000..0edc1b0 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 11e725ecbe4d74569b232e1a0d57efba +timeCreated: 1548711355 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Editor/HighlightTriggerEditor.cs b/Assets/Plugins/HighlightPlus/Editor/HighlightTriggerEditor.cs new file mode 100644 index 0000000..158dc34 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Editor/HighlightTriggerEditor.cs @@ -0,0 +1,105 @@ +using UnityEditor; +using UnityEngine; + +namespace HighlightPlus { + [CustomEditor(typeof(HighlightTrigger))] + public class HighlightTriggerEditor : Editor { + + SerializedProperty highlightOnHover, triggerMode, raycastCamera, raycastSource, raycastLayerMask; + SerializedProperty minDistance, maxDistance, respectUI, volumeLayerMask; + SerializedProperty selectOnClick, selectedProfile, selectedAndHighlightedProfile, singleSelection, toggleOnClick, keepSelection; + HighlightTrigger trigger; + + void OnEnable() { + highlightOnHover = serializedObject.FindProperty("highlightOnHover"); + triggerMode = serializedObject.FindProperty("triggerMode"); + raycastCamera = serializedObject.FindProperty("raycastCamera"); + raycastSource = serializedObject.FindProperty("raycastSource"); + raycastLayerMask = serializedObject.FindProperty("raycastLayerMask"); + minDistance = serializedObject.FindProperty("minDistance"); + maxDistance = serializedObject.FindProperty("maxDistance"); + respectUI = serializedObject.FindProperty("respectUI"); + volumeLayerMask = serializedObject.FindProperty("volumeLayerMask"); + selectOnClick = serializedObject.FindProperty("selectOnClick"); + selectedProfile = serializedObject.FindProperty("selectedProfile"); + selectedAndHighlightedProfile = serializedObject.FindProperty("selectedAndHighlightedProfile"); + singleSelection = serializedObject.FindProperty("singleSelection"); + toggleOnClick = serializedObject.FindProperty("toggle"); + keepSelection = serializedObject.FindProperty("keepSelection"); + trigger = (HighlightTrigger)target; + trigger.Init(); + } + + public override void OnInspectorGUI() { + + serializedObject.Update (); + + if (trigger.triggerMode == TriggerMode.RaycastOnThisObjectAndChildren) { + if (!trigger.hasColliders && !trigger.hasColliders2D) { + EditorGUILayout.HelpBox ("No collider found on this object or any of its children. Add colliders to allow automatic highlighting.", MessageType.Warning); + } + } else { +#if ENABLE_INPUT_SYSTEM + if (trigger.triggerMode == TriggerMode.ColliderEventsOnlyOnThisObject) { + EditorGUILayout.HelpBox("This trigger mode is not compatible with the new input system.", MessageType.Error); + } +#endif + if (trigger.GetComponent() == null && trigger.GetComponent() == null) { + EditorGUILayout.HelpBox ("No collider found on this object. Add a collider to allow automatic highlighting.", MessageType.Error); + } + } + + EditorGUILayout.PropertyField(triggerMode); + switch (trigger.triggerMode) { + case TriggerMode.RaycastOnThisObjectAndChildren: + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(raycastCamera); + EditorGUILayout.PropertyField(raycastSource); + EditorGUILayout.PropertyField(raycastLayerMask); + EditorGUILayout.PropertyField(minDistance); + EditorGUILayout.PropertyField(maxDistance); + EditorGUI.indentLevel--; + break; + case TriggerMode.Volume: + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(volumeLayerMask); + EditorGUI.indentLevel--; + break; + } + + if (trigger.triggerMode != TriggerMode.Volume) { + EditorGUILayout.PropertyField(respectUI); + } + EditorGUILayout.PropertyField(highlightOnHover); + EditorGUILayout.PropertyField(selectOnClick); + if (selectOnClick.boolValue) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(selectedProfile); + EditorGUILayout.PropertyField(selectedAndHighlightedProfile); + EditorGUILayout.PropertyField(singleSelection); + EditorGUILayout.PropertyField(toggleOnClick); + if (trigger.triggerMode == TriggerMode.RaycastOnThisObjectAndChildren) { + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(keepSelection); + if (EditorGUI.EndChangeCheck()) { + // Update all triggers + HighlightTrigger[] triggers = FindObjectsOfType(); + foreach(HighlightTrigger t in triggers) { + if (t.keepSelection != keepSelection.boolValue) { + t.keepSelection = keepSelection.boolValue; + EditorUtility.SetDirty(t); + } + } + } + } + EditorGUI.indentLevel--; + } + + if (serializedObject.ApplyModifiedProperties()) { + trigger.Init(); + } + } + + } + +} diff --git a/Assets/Plugins/HighlightPlus/Editor/HighlightTriggerEditor.cs.meta b/Assets/Plugins/HighlightPlus/Editor/HighlightTriggerEditor.cs.meta new file mode 100644 index 0000000..fa1a714 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Editor/HighlightTriggerEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: eaf7f56fbcfa343efb5081d4309cb76b +timeCreated: 1548711355 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Editor/TransparentWithDepth.cs b/Assets/Plugins/HighlightPlus/Editor/TransparentWithDepth.cs new file mode 100644 index 0000000..49a566a --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Editor/TransparentWithDepth.cs @@ -0,0 +1,92 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEditor; + +namespace HighlightPlus { + + public class TransparentWithDepth { + + static Material bmDepthOnly; + + + [MenuItem ("GameObject/Effects/Highlight Plus/Add Depth To Transparent Object", false, 100)] + static void AddDepthOption () { + Renderer renderer = GetRenderer (); + if (renderer == null) + return; + + if (!EditorUtility.DisplayDialog ("Add Depth To Transparent Object", "This option will force the transparent object to write to the depth buffer by adding a new special material to the renderer (existing materials are preserved) so it can occlude and allow See-Through effect.\nOnly use on transparent objects.\n\nProceed?", "Yes", "No")) { + return; + } + + Material[] materials = renderer.sharedMaterials; + for (int k = 0; k < materials.Length; k++) { + if (materials [k] == bmDepthOnly) { + EditorUtility.DisplayDialog ("Depth Support", "Already set! Nothing to do.", "Ok"); + return; + } + } + if (materials == null) { + renderer.sharedMaterial = bmDepthOnly; + } else { + List newMaterials = new List (materials); + newMaterials.Insert (0, bmDepthOnly); + renderer.sharedMaterials = newMaterials.ToArray (); + } + } + + [MenuItem ("GameObject/Effects/Highlight Plus/Remove Depth Compatibility", false, 101)] + static void RemoveDepthOption () { + + Renderer renderer = GetRenderer (); + if (renderer == null) + return; + + Material[] materials = renderer.sharedMaterials; + for (int k = 0; k < materials.Length; k++) { + if (materials [k] == bmDepthOnly) { + List newMaterials = new List (renderer.sharedMaterials); + newMaterials.RemoveAt (k); + renderer.sharedMaterials = newMaterials.ToArray (); + return; + } + } + + for (int k = 0; k < materials.Length; k++) { + if (materials [k] == bmDepthOnly) { + EditorUtility.DisplayDialog ("Depth Support", "This object was not previously modified! Nothing to do.", "Ok"); + return; + } + } + + } + + + static Renderer GetRenderer () { + + if (Selection.activeGameObject == null) { + EditorUtility.DisplayDialog ("Depth Support", "This option can only be used on GameObjects.", "Ok"); + return null; + } + Renderer renderer = Selection.activeGameObject.GetComponent (); + if (renderer == null) { + EditorUtility.DisplayDialog ("Depth Support", "This option can only be used on GameObjects with a Renderer component attached.", "Ok"); + return null; + } + + if (bmDepthOnly == null) { + bmDepthOnly = Resources.Load ("HighlightPlus/HighlightPlusDepthWrite"); + if (bmDepthOnly == null) { + EditorUtility.DisplayDialog ("Depth Support", "HighlightPlusDepthWrite material not found!", "Ok"); + return null; + } + } + + return renderer; + } + + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Editor/TransparentWithDepth.cs.meta b/Assets/Plugins/HighlightPlus/Editor/TransparentWithDepth.cs.meta new file mode 100644 index 0000000..7221edb --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Editor/TransparentWithDepth.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: be6e3be6d17ed49a3bd16d816815d6fd +timeCreated: 1515683694 +licenseType: Store +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Pipelines.meta b/Assets/Plugins/HighlightPlus/Pipelines.meta new file mode 100644 index 0000000..3a431a2 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Pipelines.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3302310c4cbf644e2b5dc5c588f0213f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Pipelines/URP.meta b/Assets/Plugins/HighlightPlus/Pipelines/URP.meta new file mode 100644 index 0000000..94662b2 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Pipelines/URP.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6ec7787befe3645f7a6f10c3762dc3df +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Pipelines/URP/HighlightPlusForwardRenderer.asset b/Assets/Plugins/HighlightPlus/Pipelines/URP/HighlightPlusForwardRenderer.asset new file mode 100644 index 0000000..51ccfc1 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Pipelines/URP/HighlightPlusForwardRenderer.asset @@ -0,0 +1,73 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-7137549924450841197 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 473a86c9e274347dfbdde619584cebe9, type: 3} + m_Name: NewHighlightPlusRenderPassFeature + m_EditorClassIdentifier: + m_Active: 1 + renderPassEvent: 500 + clearStencil: 0 + previewInEditMode: 1 + showInPreviewCamera: 1 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} + m_Name: HighlightPlusForwardRenderer + m_EditorClassIdentifier: + debugShaders: + debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3} + m_RendererFeatures: + - {fileID: -7137549924450841197} + m_RendererFeatureMap: + m_UseNativeRenderPass: 0 + postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} + xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} + shaders: + blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} + copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} + screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd, type: 3} + samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} + stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} + fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} + materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} + coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} + coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, type: 3} + cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, type: 3} + objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, type: 3} + m_AssetVersion: 2 + m_OpaqueLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_TransparentLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_DefaultStencilState: + overrideStencilState: 0 + stencilReference: 0 + stencilCompareFunction: 8 + passOperation: 0 + failOperation: 0 + zFailOperation: 0 + m_ShadowTransparentReceive: 1 + m_RenderingMode: 0 + m_DepthPrimingMode: 0 + m_CopyDepthMode: 0 + m_AccurateGbufferNormals: 0 + m_ClusteredRendering: 0 + m_TileSize: 32 + m_IntermediateTextureMode: 1 diff --git a/Assets/Plugins/HighlightPlus/Pipelines/URP/HighlightPlusForwardRenderer.asset.meta b/Assets/Plugins/HighlightPlus/Pipelines/URP/HighlightPlusForwardRenderer.asset.meta new file mode 100644 index 0000000..69856d5 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Pipelines/URP/HighlightPlusForwardRenderer.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 47db18f3169384f6b87445e6447e189e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Pipelines/URP/HighlightPlusRenderPassFeature.cs b/Assets/Plugins/HighlightPlus/Pipelines/URP/HighlightPlusRenderPassFeature.cs new file mode 100644 index 0000000..1caf7d3 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Pipelines/URP/HighlightPlusRenderPassFeature.cs @@ -0,0 +1,208 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +namespace HighlightPlus { + + public class HighlightPlusRenderPassFeature : ScriptableRendererFeature { + class HighlightPass : ScriptableRenderPass { + + // far objects render first + class DistanceComparer : IComparer { + + public Vector3 camPos; + + public int Compare(HighlightEffect e1, HighlightEffect e2) { + Vector3 e1Pos = e1.transform.position; + float dx1 = e1Pos.x - camPos.x; + float dy1 = e1Pos.y - camPos.y; + float dz1 = e1Pos.z - camPos.z; + float distE1 = dx1 * dx1 + dy1 * dy1 + dz1 * dz1 + e1.sortingOffset; + Vector3 e2Pos = e2.transform.position; + float dx2 = e2Pos.x - camPos.x; + float dy2 = e2Pos.y - camPos.y; + float dz2 = e2Pos.z - camPos.z; + float distE2 = dx2 * dx2 + dy2 * dy2 + dz2 * dz2 + e2.sortingOffset; + if (distE1 > distE2) return -1; + if (distE1 < distE2) return 1; + return 0; + } + } + + public bool usesCameraOverlay; + + ScriptableRenderer renderer; + RenderTextureDescriptor cameraTextureDescriptor; + DistanceComparer effectDistanceComparer; + bool clearStencil; + FullScreenBlitMethod fullScreenBlitMethod = FullScreenBlit; + int frameCount; + + public void Setup(HighlightPlusRenderPassFeature passFeature, ScriptableRenderer renderer) { + this.renderPassEvent = passFeature.renderPassEvent; + this.clearStencil = passFeature.clearStencil; + this.renderer = renderer; + if (effectDistanceComparer == null) { + effectDistanceComparer = new DistanceComparer(); + } + HighlightEffect.isVREnabled = UnityEngine.XR.XRSettings.enabled && Application.isPlaying; + } + + public override void Configure(CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor) { + this.cameraTextureDescriptor = cameraTextureDescriptor; +#if UNITY_2021_2_OR_NEWER + ConfigureInput(ScriptableRenderPassInput.Depth); +#endif + } + + public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) { + int count = HighlightEffect.effects.Count; + if (count == 0) return; + + Camera cam = renderingData.cameraData.camera; + int camLayer = 1 << cam.gameObject.layer; + CameraType camType = cam.cameraType; + +#if UNITY_2022_1_OR_NEWER + RTHandle cameraColorTarget = renderer.cameraColorTargetHandle; + RTHandle cameraDepthTarget = renderer.cameraDepthTargetHandle; +#else + RenderTargetIdentifier cameraColorTarget = renderer.cameraColorTarget; + RenderTargetIdentifier cameraDepthTarget = renderer.cameraDepthTarget; +#endif +#if !UNITY_2021_2_OR_NEWER + // In Unity 2021.2, when MSAA > 1, cameraDepthTarget is no longer cameraColorTarget + if (!usesCameraOverlay && (cameraTextureDescriptor.msaaSamples > 1 || cam.cameraType == CameraType.SceneView)) { + cameraDepthTarget = cameraColorTarget; + } +#endif + + if (!HighlightEffect.customSorting && ((frameCount++) % 10 == 0 || !Application.isPlaying)) { + effectDistanceComparer.camPos = cam.transform.position; + HighlightEffect.effects.Sort(effectDistanceComparer); + } + + bool clearStencil = this.clearStencil; + + for (int k = 0; k < count; k++) { + HighlightEffect effect = HighlightEffect.effects[k]; + + if (!(effect.ignoreObjectVisibility || effect.isVisible)) continue; + + if (!effect.isActiveAndEnabled) continue; + + if (camType == CameraType.Reflection && !effect.reflectionProbes) continue; + + if ((effect.camerasLayerMask & camLayer) == 0) continue; + + CommandBuffer cb = effect.GetCommandBuffer(cam, cameraColorTarget, cameraDepthTarget, fullScreenBlitMethod, clearStencil); + if (cb != null) { + context.ExecuteCommandBuffer(cb); + clearStencil = false; + } + + } + } + + static Mesh _fullScreenMesh; + static Mesh fullscreenMesh { + get { + if (_fullScreenMesh != null) { + return _fullScreenMesh; + } + float num = 1f; + float num2 = 0f; + Mesh val = new Mesh(); + _fullScreenMesh = val; + _fullScreenMesh.SetVertices(new List { + new Vector3 (-1f, -1f, 0f), + new Vector3 (-1f, 1f, 0f), + new Vector3 (1f, -1f, 0f), + new Vector3 (1f, 1f, 0f) + }); + _fullScreenMesh.SetUVs(0, new List { + new Vector2 (0f, num2), + new Vector2 (0f, num), + new Vector2 (1f, num2), + new Vector2 (1f, num) + }); + _fullScreenMesh.SetIndices(new int[6] { 0, 1, 2, 2, 1, 3 }, (MeshTopology)0, 0, false); + _fullScreenMesh.UploadMeshData(true); + return _fullScreenMesh; + } + } + + static Matrix4x4 matrix4x4Identity = Matrix4x4.identity; + static void FullScreenBlit(CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier destination, Material material, int passIndex) { + destination = new RenderTargetIdentifier(destination, 0, CubemapFace.Unknown, -1); + cmd.SetRenderTarget(destination); + cmd.SetGlobalTexture(ShaderParams.MainTex, source); + cmd.SetGlobalFloat(ShaderParams.AspectRatio, HighlightEffect.isVREnabled ? 0.5f : 1); + cmd.DrawMesh(fullscreenMesh, matrix4x4Identity, material, 0, passIndex); + } + + public override void FrameCleanup(CommandBuffer cmd) { + } + } + + HighlightPass renderPass; + public RenderPassEvent renderPassEvent = RenderPassEvent.AfterRenderingTransparents; + [Tooltip("Clears stencil buffer before rendering highlight effects. This option can solve compatibility issues with shaders that also use stencil buffers.")] + public bool clearStencil; + + /// + /// Makes the effects visible in Edit mode. + /// + [Tooltip("If enabled, effects will be visible also in Edit mode (when not in Play mode).")] + public bool previewInEditMode = true; + + /// + /// Makes the effects visible in Edit mode. + /// + [Tooltip("If enabled, effects will be visible also in Preview camera (preview camera shown when a camera is selected in Editor).")] + public bool showInPreviewCamera = true; + + + public static bool installed; + public static bool showingInEditMode; + + const string PREVIEW_CAMERA_NAME = "Preview Camera"; + + void OnDisable() { + installed = false; + } + + public override void Create() { + renderPass = new HighlightPass(); + } + + // This method is called when setting up the renderer once per-camera. + public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData) { + + showingInEditMode = previewInEditMode; + Camera cam = renderingData.cameraData.camera; + +#if UNITY_EDITOR + if (!previewInEditMode && !Application.isPlaying) { + return; + } + if (cam.cameraType == CameraType.Preview) { + return; + } + if (!showInPreviewCamera && PREVIEW_CAMERA_NAME.Equals(cam.name)) { + return; + } +#endif + +#if UNITY_2019_4_OR_NEWER + if (renderingData.cameraData.renderType == CameraRenderType.Base) { + renderPass.usesCameraOverlay = cam.GetUniversalAdditionalCameraData().cameraStack.Count > 0; + } +#endif + renderPass.Setup(this, renderer); + renderer.EnqueuePass(renderPass); + installed = true; + } + } +} diff --git a/Assets/Plugins/HighlightPlus/Pipelines/URP/HighlightPlusRenderPassFeature.cs.meta b/Assets/Plugins/HighlightPlus/Pipelines/URP/HighlightPlusRenderPassFeature.cs.meta new file mode 100644 index 0000000..3af9ec8 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Pipelines/URP/HighlightPlusRenderPassFeature.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 473a86c9e274347dfbdde619584cebe9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Pipelines/URP/UniversalRenderPipelineAsset.asset b/Assets/Plugins/HighlightPlus/Pipelines/URP/UniversalRenderPipelineAsset.asset new file mode 100644 index 0000000..f64cdb9 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Pipelines/URP/UniversalRenderPipelineAsset.asset @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} + m_Name: UniversalRenderPipelineAsset + m_EditorClassIdentifier: + k_AssetVersion: 9 + k_AssetPreviousVersion: 9 + m_RendererType: 1 + m_RendererData: {fileID: 0} + m_RendererDataList: + - {fileID: 11400000, guid: 47db18f3169384f6b87445e6447e189e, type: 2} + m_DefaultRendererIndex: 0 + m_RequireDepthTexture: 1 + m_RequireOpaqueTexture: 0 + m_OpaqueDownsampling: 1 + m_SupportsTerrainHoles: 1 + m_StoreActionsOptimization: 0 + m_SupportsHDR: 1 + m_MSAA: 2 + m_RenderScale: 1 + m_UpscalingFilter: 0 + m_FsrOverrideSharpness: 0 + m_FsrSharpness: 0.92 + m_MainLightRenderingMode: 1 + m_MainLightShadowsSupported: 1 + m_MainLightShadowmapResolution: 2048 + m_AdditionalLightsRenderingMode: 1 + m_AdditionalLightsPerObjectLimit: 4 + m_AdditionalLightShadowsSupported: 0 + m_AdditionalLightsShadowmapResolution: 512 + m_AdditionalLightsShadowResolutionTierLow: 128 + m_AdditionalLightsShadowResolutionTierMedium: 256 + m_AdditionalLightsShadowResolutionTierHigh: 512 + m_ReflectionProbeBlending: 0 + m_ReflectionProbeBoxProjection: 0 + m_ShadowDistance: 50 + m_ShadowCascadeCount: 1 + m_Cascade2Split: 0.25 + m_Cascade3Split: {x: 0.1, y: 0.3} + m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} + m_CascadeBorder: 0.1 + m_ShadowDepthBias: 1 + m_ShadowNormalBias: 1 + m_AnyShadowsSupported: 1 + m_SoftShadowsSupported: 1 + m_ConservativeEnclosingSphere: 0 + m_NumIterationsEnclosingSphere: 64 + m_AdditionalLightsCookieResolution: 2048 + m_AdditionalLightsCookieFormat: 3 + m_UseSRPBatcher: 1 + m_SupportsDynamicBatching: 0 + m_MixedLightingSupported: 1 + m_SupportsLightLayers: 0 + m_DebugLevel: 0 + m_UseAdaptivePerformance: 1 + m_ColorGradingMode: 0 + m_ColorGradingLutSize: 32 + m_UseFastSRGBLinearConversion: 0 + m_ShadowType: 1 + m_LocalShadowsSupported: 0 + m_LocalShadowsAtlasResolution: 256 + m_MaxPixelLights: 0 + m_ShadowAtlasResolution: 256 + m_ShaderVariantLogLevel: 0 + m_VolumeFrameworkUpdateMode: 0 + m_ShadowCascades: 0 diff --git a/Assets/Plugins/HighlightPlus/Pipelines/URP/UniversalRenderPipelineAsset.asset.meta b/Assets/Plugins/HighlightPlus/Pipelines/URP/UniversalRenderPipelineAsset.asset.meta new file mode 100644 index 0000000..a3eec97 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Pipelines/URP/UniversalRenderPipelineAsset.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7cb1de89cd1dc44c5be43a3f6664fb90 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/README.txt b/Assets/Plugins/HighlightPlus/README.txt new file mode 100644 index 0000000..39956e9 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/README.txt @@ -0,0 +1,382 @@ +************************************** +* HIGHLIGHT PLUS * +* Created by Ramiro Oliva (Kronnect) * +* README FILE * +************************************** + + +Notice about Universal Rendering Pipeline +----------------------------------------- +This package is designed for URP. +It requires Unity 2019.3 and URP 7.1.6 or later +To install the plugin correctly: + +1) Make sure you have Universal Rendering Pipeline asset installed (from Package Manager). +2) Go to Project Settings / Graphics. +3) Double click the Universal Rendering Pipeline asset. +4) Double click the Forward Renderer asset. +5) Click "+" to add the Highlight Plus Renderer Feature to the list of the Forward Renderer Features. + +Note: URP assets can be assigned to Settings / Graphics and also Settings / Quality. Check both sections! + +You can also find a HighlightPlusForwardRenderer asset in the Highlight Plus / Pipelines / URP folder. +Make sure the Highlight Plus Scriptable Renderer Feature is listed in the Renderer Features of the Forward Renderer in the pipeline asset. + +Video instructions: https://youtu.be/EgyBs8v9aRI + + +Quick help: how to use this asset? +---------------------------------- + +1) Highlighting specific objects: add HighlightEffect.cs script to any GameObject. Customize the appearance options. + In the Highlight Effect inspector, you can specify which objects, in addition to this one, are also affected by the effect: + a) Only this object + b) This object and its children + c) All objects from the root to the children + d) All objects belonging to a layer + +2) Control highlight effect when mouse is over: + Add HighlightTrigger.cs script to the GameObject. It will activate highlight on the gameobject when mouse pass over it. + +3) Highlighting any object in the scene: + Select top menu GameObject -> Effects -> Highlight Plus -> Create Manager. + Customize appearance and behaviour of Highlight Manager. Those settings are default settings for all objects. If you want different settings for certain objects just add another HighlightEffect script to each different object. The manager will use those settings. + +4) Make transparent shaders compatible with See-Through effect: + If you want the See-Through effect be seen through other transparent objects, they need to be modified so they write to depth buffer (by default transparent objects do not write to z-buffer). + To do so, select top menu GameObject -> Effects -> Highlight Plus -> Add Depth To Transparent Object. + +5) Static batching: + Objects marked as "static" need a MeshCollider in order to be highlighted. This is because Unity combines the meshes of static objects so it's not possible to highlight individual objects if their meshes are combined. + To allow highlighting static objects make sure they have a MeshCollider attached (the MeshCollider can be disabled). + + + + +Help & Support Forum +-------------------- + +Check the Documentation folder for detailed instructions: + +Have any question or issue? +* Support-Web: https://kronnect.com/support +* Support-Discord: https://discord.gg/EH2GMaM +* Email: contact@kronnect.com +* Twitter: @Kronnect + +If you like Highlight Plus, please rate it on the Asset Store. It encourages us to keep improving it! Thanks! + + + + +Future updates +-------------- + +All our assets follow an incremental development process by which a few beta releases are published on our support forum (kronnect.com). +We encourage you to signup and engage our forum. The forum is the primary support and feature discussions medium. + +Of course, all updates of Highlight Plus will be eventually available on the Asset Store. + + + +More Cool Assets! +----------------- +Check out our other assets here: +https://assetstore.unity.com/publishers/15018 + + + +Version history +--------------- + +Current version +- Added "Show In Preview Camera" option to Highlight Plus render feature +- Preview in Editor option has moved to the Highlight Plus render feature +- Outline improvements in highest quality mode +- Added Glow Blur Method option: Gaussian (higher quality, default) or Kawase (faster) +- Option to optimize skinned mesh data when using outline/outer glow with mesh-based rendering. Reduces draw calls significantly. + +Version 10.2.2 +- [Fix] Occluder system now ignores particle renderers +- [Fix] Fixed rendering sorting issue when several highlighted objects share same position + +Version 10.2 +- Added "Contour Style" option: 1) around visible parts, or 2) around object shape + +Version 10.1 +- Two outline edge modes are now available when Outline Quality is set to High, allowing to render interior edges +- Added "Inner Glow Blend Mode" option + +Version 10.0 +- Added support for sprites. Compatible effects: outline, glow, overlay, target and hit fx. +- Added "Overlay Visibility" option +- Fixes + +Version 9.6 +- Added new "UV Space" options to Overlay effect (now: triplanar, object space or screen space) +- Added mask texture and "UV Space" options to See-Through effect +- Camera Distance Fade now also affects the see-through effect + +Version 9.5 +- Outline: added Color Style property and new Gradient option +- Internal buffer for highest quality outline/glow format changed to R8 format to reduce memory and improve performance on mobile +- API: Refresh(discardCachedMeshes): added discardCachedMeshes optional parameter to force refresh of cached meshes (useful for combined meshes that have changed) + +Version 9.4 +- Highlight See Through Occluder: added mode for triggering the see-through offect on sprites and transparent objects +- Performance optimizations when using a high number of Highlight Effect components in the scene +- [Fix] Fixed shader compatibility issue on PS4 + +Version 9.3 +- Overlay: added "Mode" option (only when highlighted or always) +- Nested highlight effects are now included unless the 'Ignore' option is selected +- Cached meshes are now reconstructed when calling the Refresh() method + +Version 9.2 +- Improved shared mesh cache handling +- Improved see-through camera-layer based detection + +Version 9.1.2 +- [Fix] Fixed outline/glow distortion due to floating point math issues at distant positions from origin +- [Fix] Fixed VR issue in Unity 2022.1 with Single Pass Instanced + +Version 9.1.1 +- [Fix] Fixed potential issue with Unity 2021.2 related to depthCameraAttachment handling + +Version 9.1 +- Added support for Unity 2022 +- Added Layer Mask option to Highlight Trigger +- Added "Keep Selection" option in Highlight Manager and Highlight Trigger +- [Fix] Fixed a potential issue that could exceed the maximum 64k vertices when combining meshes + +Version 9.0 +- Added "Camera Distance Fade" option +- Improved see-through accurate method which now takes into account multi-part meshes from compound parents +- [Fix] Fixed glow/outline aspect ratio in Single Pass Instanced VR mode + +Version 8.5 +- Improved outline effect when combining "Independent" option with many elements in "Children" selection +- Improved see-through border only effect + +Version 8.4.1 +- [Fix] Fixed unnecessary memory allocation in the render feature + +Version 8.4 +- Added "Border Only" option to See-Through effect +- Adding a Highlight Effect component to a parent no longer deactivates highlighted children + +Version 8.3 +- Upgraded to Unity 2020.3.16 as minimum + +Version 8.2 +- Added "Ignore Mask" option to glow. Can be used to render the glow effect alone +- [Fix] Fixed issue with new input system and highlight manager/trigger if no Event System is present in the scene +- [Fix] Fixed glow passes UI overlap in Unity 2021.3.3 due to reorderable array bug + +Version 8.1 +- Selection state is now visible in inspector (used only by trigger and manager components) +- [Fix] Fixed outer glow not showing in higher quality with visibility set to normal and orthographic camera +- [Fix] Fixed mobile input using the new input system +- [Fix] Fixed outline settings mismatch when using a combination of Highlight Trigger and Manager + +Version 8.0 +- Added SelectObject / ToggleObject / UnselectObject methods to Highlight Manager +- Added ability to apply custom sorting to effects (check documentation: Custom sorting section) +- Independent option is now moved to Highlight Options section and affects both outline and glow +- Added "Clear Stencil" option to Highlight Plus Render Feature (useful to solve compatibility with other assets that use stencil buffers) + +Version 7.9.2 +- [Fix] Fixed an issue in Unity 2021.2 when using MSAA and High Quality outline/glow + +Version 7.9.1 +- Default values for all effects are now 0 (disabled) except outline so desired effects must be enabled. This option allows you to ensure no extra/undesired effects are activated by mistake +- Redesigned Highlight Plus Profile editor interface +- Removed dependency of HighlightManager + +Version 7.8 +- Added outer glow blend mode option +- API: added OnObjectHighlightStart/End events to HighlightTrigger (check documentation for differences with similar events on Highlight Effect main script) +- [Fix] API: Fixed specific issues with SetTarget method when used on shader graph based materials that don't use standard texture names + +Version 7.7.2 +- [Fix] Fixed fade in/out issue when disabling/enabling objects + +Version 7.7 +- Added support for the new Input System +- [Fix] Fixes to the align to ground option of target fx effect + +Version 7.6.2 +- [Fix] VR: fixed target effect "Align to Ground" issue with Single Pass Instanced + +Version 7.6.1 +- [Fix] Fixed overlay animation speed issue + +Version 7.6 +- Added "Target FX Align to Ground" option +- Added isSeeThroughOccluded(camera). Is true when any see-through occluder using raycast mode is blocking the see-through effect +- All shader keywords are now of local type reducing global keyword usage +- Fixes and improvements to see-through when combined with outline/outer glow + +Version 7.5.2 +- [Fix] See-through is now visible when using glow/outline/inner glow with Always Visible option + +Version 7.5.1 +- [Fix] Fixed regression bug with Outline in High Quality mode + +Version 7.5 +- Added new HitFX style: "Local Hit" +- Added new demo scene showcasing the HitFx variations +- Added "Overlay Texture" option +- Added "Min Distance" option to Highlight Manager and Highlight Trigger +- Added support for "Domain Reload" disabled option +- API: added OnObjectHighlightStart, OnObjectHighlightEnd events to HighlightManager +- [Fix] Fixed inner glow and overlay issue when MaterialPropertyBlock is used on the character material + +Version 7.1 +- Added "Respect UI" to Highlight Manager and Trigger which blocks interaction if pointer is over an UI element + +Version 7.0.2 +- Memory optimizations + +Version 7.0 +- Added support for Single Pass Instanced +- Internal improvements and fixes + +Version 6.9 +- Added "Ordered" option to see-through +- Removed "Non Overlap" option from see-through as now it pervents overdraw by default + +Version 6.8 +- Improvements to see-through rendering order +- [Fix] Fixed properties not being reflected in scene immediately when invoking Undo + +Version 6.7 +- Added "SeeThrough Max Depth" option. Limits the visibility of the see-through effect to certain distance from the occluders +- Added "SeeThrough Check Individual Objects" option. If enabled, occlusion test is performed for each individual child of the object, instead of using combined bounds + +Version 6.6 +- Added "SeeThrough Depth Offset" option. This option allows you to control the minimum distance from the occluder to the object before showing the see-through effect +- Added "SeeThrough Non Overlap" option. Enable it only if the see-through effect produces flickering due to overlapping geometry in the hidden object +- [Fix] Fixed properties not being reflected in scene immediately when invoking Undo + +Version 6.5.2 +- Added inspector tooltips and improved documentation + +Version 6.5.1 +- Calling ProfileLoad() method will now assign that profile to the highlight effect component in addition to loading its values +- Prevents _Time overflow which can cause glitching on some Android devices + +Version 6.5 +- Name filter now is ignored when effect group is set to Only This Object +- New shader "HighlightPlus/Geometry/UIMask" to cancel highlight effects when rendering through a UI Canvas (see documentation) + +Version 6.4 +- Added "Cameras Layer Mask" to specify which cameras can render the effects +- Hit FX color in Highlight Profile now exposes HDR color options + +Version 6.3.1 +- Added "Single Selection" option to Highlight Manager/Trigger +- Added "Toggle" option to Highlight Manager/Trigger +- Selection is cleared now when clicking anywhere in the scene (requires Highlight Manager) +- API: added SetGlowColor +- Improved Highlight Manager inspector + +Version 6.2 +- Added TargetFX Scale To Object Bounds (defaults to false) +- Added support for HDR color to Hit FX color field +- Option to list occluders in the inspector when See Through Occluder Mask "Accurate" option is enabled + +Version 6.1 +- Added more accurate occluder layer system ("Accurate" option) +- Added default hit fx settings to inspector & profile +- Added hit fx modes (overlay or inner glow) + +Version 6.0 +- Added Selection feature +- Inspector: sections can be now collapsed to reduce screen space +- API: added OnObjectSelected / OnObjectUnSelected events + +Version 5.5 4/Apr/2021 +- [Fix] Fixed glow overlay when MSAA is disabled on Windows + +Version 5.4 5/Feb/2021 +- Added Visibility option to targete effect +- Stencil mask is no longer computed when only overlay or inner glow is used improving performance + +Version 5.3.4 22/01/2021 +- Optimizations to material setters +- [Fix] Fixed outline color issue with quality level set to medium + +Version 5.3.3 +- Effects now reflect object transform changes when combines meshes option is enabled + +Version 5.3 +- Added "Combine Meshes" option to profile +- Optimizations and fixes + +Version 5.2 +- Added "Object Name Filter" option to profile + +Version 5.1 +- Added "Border When Hidden" effect (outline when see-through triggers) + +Version 5.0.1 +- Added support for Unity 2020.2 beta + +Version 5.0 +- API: added "TargetFX" method to programmatically start the target effect +- Added support for double-sided shader effects + +Version 4.9 +- Added "Medium" quality level + +Version 4.8.2 +- [Fix] Fixed issue with outline set to fastest and glow using highest in latest URP version + +Version 4.8.1 +- [Fix] Fixed issue with outline/glow when overlay cameras are present on the stack + +Version 4.8 +- Added "Outer Glow Blend Passes" option +- [Fix] Fixed outline & glow issue with alpha cutout when using non-highest quality mode + +Version 4.7 +- Added "Normals Option" with Smooth, Preserve and Reorient variants to improve results +- Target effect now only renders once per gameobject if a specific target transform is specified +- API: added OnTargetAnimates. Allows you to override center, rotation and scale of target effect on a per-frame basis. + +Version 4.6 +- Added "SubMesh Mask" which allows to exclude certain submeshes +- [Fix] Fixed shader compilation issue with Single Pass Instanced mode enabled + +Version 4.4 +- Exposed "Smooth Normals" option in inspector. + +Version 4.3.2 +- Added HitFX effect +- Improvements to SeeThrough Occluder when Detection Mode is set to RayCast + +Version 4.3.1 +- [Fix] Fixed issue with Highlight Effect Occluder script + +Version 4.3 +- Added GPU instancing support for outline / outer glow effects + +Version 4.2.2 +- [Fix] Fixed effect being rendered when object is outside of frustum camera + +Version 4.2.1 +- Profile: added "Constant Width" property +- Enabled HDR color picker to Color properties +- [Fix] Fixed missing outline with flat surfaces like quads under certain angles + +Version 4.2 +- Glow/Outline downsampling option added to profiles +- [Fix] Removed VR API usage console warning + +Version 4.1 +- Added Outline Independent option +- [Fix] Fixed error when highlight script is added to an empty gameobject + +Version 4.0 +- Support for URP Scriptable Rendering Feature diff --git a/Assets/Plugins/HighlightPlus/README.txt.meta b/Assets/Plugins/HighlightPlus/README.txt.meta new file mode 100644 index 0000000..a386b10 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/README.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 53265a9967ed548efaf71f5807638781 +timeCreated: 1542901568 +licenseType: Store +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime.meta b/Assets/Plugins/HighlightPlus/Runtime.meta new file mode 100644 index 0000000..c95baa0 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a233cc5176ac642f89469b5d4c676c89 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources.meta new file mode 100644 index 0000000..7a6440c --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3a476022645d74299b862c36d0daa1df +folderAsset: yes +timeCreated: 1542876301 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus.meta new file mode 100644 index 0000000..85f2d99 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6bd97436761b94109a0785ed6823647c +folderAsset: yes +timeCreated: 1542893576 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/CustomVertexTransform.cginc b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/CustomVertexTransform.cginc new file mode 100644 index 0000000..60241d2 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/CustomVertexTransform.cginc @@ -0,0 +1,10 @@ +#ifndef CUSTOM_VERTEX_TRANSFORM_INCLUDED +#define CUSTOM_VERTEX_TRANSFORM_INCLUDED + +float4 ComputeVertexPosition(float4 vertex) { + // Add here any custom vertex transform + float4 pos = UnityObjectToClipPos(vertex); + return pos; +} + +#endif diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/CustomVertexTransform.cginc.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/CustomVertexTransform.cginc.meta new file mode 100644 index 0000000..00350b8 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/CustomVertexTransform.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 26b31a85c4f4c4b11850968651dddfeb +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightAddDepth.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightAddDepth.shader new file mode 100644 index 0000000..835a34c --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightAddDepth.shader @@ -0,0 +1,49 @@ +Shader "HighlightPlus/Geometry/JustDepth" +{ + Properties + { + } + SubShader + { + Tags { "RenderType"="Opaque" } + ColorMask 0 + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + UNITY_VERTEX_OUTPUT_STEREO + }; + + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = ComputeVertexPosition(v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return 0; + } + ENDCG + } + } +} diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightAddDepth.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightAddDepth.shader.meta new file mode 100644 index 0000000..1857474 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightAddDepth.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 058a572e30b2d446bade2dda32bcef0f +timeCreated: 1515682635 +licenseType: Store +ShaderImporter: + externalObjects: {} + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurGlow.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurGlow.shader new file mode 100644 index 0000000..e7627cb --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurGlow.shader @@ -0,0 +1,183 @@ +Shader "HighlightPlus/Geometry/BlurGlow" { +Properties { + _Color ("Color", Color) = (1,1,0) // not used; dummy property to avoid inspector warning "material has no _Color property" + _BlurScale("Blur Scale", Float) = 2.0 + _Speed("Speed", Float) = 1 +} + SubShader + { + ZTest Always + ZWrite Off + Cull Off + CGINCLUDE + + #include "UnityCG.cginc" + + UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex); + float4 _MainTex_TexelSize; + float4 _MainTex_ST; + float _BlurScale, _Speed; + float _AspectRatio; + float _ResampleScale; + + struct appdata { + float4 vertex : POSITION; + float2 texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2fCross { + float4 pos : SV_POSITION; + float2 uv: TEXCOORD0; + float2 uv1: TEXCOORD1; + float2 uv2: TEXCOORD2; + float2 uv3: TEXCOORD3; + float2 uv4: TEXCOORD4; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + v2fCross vertCross(appdata v) { + v2fCross o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.pos = v.vertex; + o.pos.y *= _ProjectionParams.x; + + o.uv = v.texcoord; + float3 offsets = _MainTex_TexelSize.xyx * float3(1, _AspectRatio, -1); + + o.uv1 = v.texcoord - offsets.xy; + o.uv2 = v.texcoord - offsets.zy; + o.uv3 = v.texcoord + offsets.zy; + o.uv4 = v.texcoord + offsets.xy; + return o; + } + + v2fCross vertCrossKawase(appdata v) { + v2fCross o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.pos = v.vertex; + o.pos.y *= _ProjectionParams.x; + + o.uv = v.texcoord + _MainTex_TexelSize.xy * 0.5; + float animatedWidth = _BlurScale * _ResampleScale * (0.75 + 0.25 * sin(_Time.w * _Speed)); + float3 offsets = _MainTex_TexelSize.xyx * float3(1, _AspectRatio, -1) * animatedWidth; + + o.uv1 = v.texcoord - offsets.xy; + o.uv2 = v.texcoord - offsets.zy; + o.uv3 = v.texcoord + offsets.zy; + o.uv4 = v.texcoord + offsets.xy; + return o; + } + + + v2fCross vertBlurH(appdata v) { + v2fCross o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.pos = v.vertex; + o.pos.y *= _ProjectionParams.x; + + float animatedWidth = _BlurScale * (1.0 + 0.25 * sin(_Time.w * _Speed)); + o.uv = v.texcoord; + float2 inc = float2(_MainTex_TexelSize.x * 1.3846153846 * animatedWidth, 0); + o.uv1 = v.texcoord - inc; + o.uv2 = v.texcoord + inc; + float2 inc2 = float2(_MainTex_TexelSize.x * 3.2307692308 * animatedWidth, 0); + o.uv3 = v.texcoord - inc2; + o.uv4 = v.texcoord + inc2; + return o; + } + + v2fCross vertBlurV(appdata v) { + v2fCross o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.pos = v.vertex; + o.pos.y *= _ProjectionParams.x; + + float animatedWidth = _AspectRatio * _BlurScale * (1.0 + 0.25 * sin(_Time.w * _Speed)); + o.uv = v.texcoord; + float2 inc = float2(0, _MainTex_TexelSize.y * 1.3846153846 * animatedWidth); + o.uv1 = v.texcoord - inc; + o.uv2 = v.texcoord + inc; + float2 inc2 = float2(0, _MainTex_TexelSize.y * 3.2307692308 * animatedWidth); + o.uv3 = v.texcoord - inc2; + o.uv4 = v.texcoord + inc2; + return o; + } + + float4 fragBlur (v2fCross i): SV_Target { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + float4 pixel = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv) * 0.2270270270 + + (UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv1) + UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv2)) * 0.3162162162 + + (UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv3) + UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv4)) * 0.0702702703; + return pixel; + } + + float4 fragResample(v2fCross i) : SV_Target { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + float4 c1 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv1); + float4 c2 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv2); + float4 c3 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv3); + float4 c4 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv4); + return (c1+c2+c3+c4) * 0.25; + } + + + ENDCG + + Pass { + Name "Gaussian Blur Horizontal" + CGPROGRAM + #pragma vertex vertBlurH + #pragma fragment fragBlur + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + Pass { + Name "Gaussian Blur Vertical" + CGPROGRAM + #pragma vertex vertBlurV + #pragma fragment fragBlur + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + Pass { + Name "Copy Resample" + CGPROGRAM + #pragma vertex vertCross + #pragma fragment fragResample + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + Pass { + Name "Fast Blur" + CGPROGRAM + #pragma vertex vertCrossKawase + #pragma fragment fragResample + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurGlow.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurGlow.shader.meta new file mode 100644 index 0000000..32335c2 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurGlow.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 84c84ee93ec484bdda371ffbdebfcc7c +timeCreated: 1556874239 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurOutline.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurOutline.shader new file mode 100644 index 0000000..3bb8c4e --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurOutline.shader @@ -0,0 +1,169 @@ +Shader "HighlightPlus/Geometry/BlurOutline" { +Properties { + _Color ("Color", Color) = (1,1,0) // not used; dummy property to avoid inspector warning "material has no _Color property" + _BlurScale("Blur Scale", Float) = 2.0 + _BlurScaleFirstHoriz("Blur Scale First Horiz", Float) = 4 +} + SubShader + { + ZTest Always + ZWrite Off + Cull Off + CGINCLUDE + + #include "UnityCG.cginc" + + UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex); + float4 _MainTex_TexelSize; + float4 _MainTex_ST; + float _BlurScale; + float _BlurScaleFirstHoriz; + float _AspectRatio; + + struct appdata { + float4 vertex : POSITION; + float2 texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2fCross { + float4 pos : SV_POSITION; + float2 uv: TEXCOORD0; + float2 uv1: TEXCOORD1; + float2 uv2: TEXCOORD2; + float2 uv3: TEXCOORD3; + float2 uv4: TEXCOORD4; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + v2fCross vertCross(appdata v) { + v2fCross o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.pos = v.vertex; + o.pos.y *= _ProjectionParams.x; + + o.uv = v.texcoord; + float3 offsets = _MainTex_TexelSize.xyx * float3(1, _AspectRatio, -1); + o.uv1 = v.texcoord - offsets.xy; + o.uv2 = v.texcoord - offsets.zy; + o.uv3 = v.texcoord + offsets.zy; + o.uv4 = v.texcoord + offsets.xy; + return o; + } + + + v2fCross vertBlur(appdata v, float multiplier) { + v2fCross o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.pos = v.vertex; + o.pos.y *= _ProjectionParams.x; + o.uv = v.texcoord; + + float2 inc = float2(_MainTex_TexelSize.x * 1.3846153846 * multiplier, 0); + o.uv1 = v.texcoord - inc; + o.uv2 = v.texcoord + inc; + float2 inc2 = float2(_MainTex_TexelSize.x * 3.2307692308 * multiplier, 0); + o.uv3 = v.texcoord - inc2; + o.uv4 = v.texcoord + inc2; + return o; + } + + v2fCross vertBlurH(appdata v) { + return vertBlur(v, _BlurScale / _AspectRatio); + } + + v2fCross vertBlurH2(appdata v) { + return vertBlur(v, _BlurScaleFirstHoriz / _AspectRatio); + } + + + v2fCross vertBlurV(appdata v) { + v2fCross o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.pos = v.vertex; + o.pos.y *= _ProjectionParams.x; + + o.uv = v.texcoord; + float2 inc = float2(0, _MainTex_TexelSize.y * 1.3846153846 * _BlurScale); + o.uv1 = v.texcoord - inc; + o.uv2 = v.texcoord + inc; + float2 inc2 = float2(0, _MainTex_TexelSize.y * 3.2307692308 * _BlurScale); + o.uv3 = v.texcoord - inc2; + o.uv4 = v.texcoord + inc2; + return o; + } + + float4 fragBlur (v2fCross i): SV_Target { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + float4 pixel = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv) * 0.2270270270 + + (UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv1) + UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv2)) * 0.3162162162 + + (UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv3) + UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv4)) * 0.0702702703; + return pixel; + } + + float4 fragResample(v2fCross i) : SV_Target { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + float4 c1 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv1); + float4 c2 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv2); + float4 c3 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv3); + float4 c4 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv4); + return (c1+c2+c3+c4) * 0.25; + } + + + ENDCG + + Pass { + Name "Blur Horizontal" + CGPROGRAM + #pragma vertex vertBlurH + #pragma fragment fragBlur + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + Pass { + Name "Blur Vertical" + CGPROGRAM + #pragma vertex vertBlurV + #pragma fragment fragBlur + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + Pass { + Name "Resample" + CGPROGRAM + #pragma vertex vertCross + #pragma fragment fragResample + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + Pass { + Name "Blur Horizontalx2" + CGPROGRAM + #pragma vertex vertBlurH2 + #pragma fragment fragBlur + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurOutline.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurOutline.shader.meta new file mode 100644 index 0000000..31a942b --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurOutline.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 74f3491dcf1224f0c91238381c035439 +timeCreated: 1556874239 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightClearStencil.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightClearStencil.shader new file mode 100644 index 0000000..b8c0c99 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightClearStencil.shader @@ -0,0 +1,95 @@ +Shader "HighlightPlus/ClearStencil" +{ + Properties + { + } + SubShader + { + Stencil { + Ref 2 + Comp Always + Pass zero + } + ZTest Always + ZWrite Off + Cull Off + ColorMask 0 + + Pass // clear stencil full screen + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + UNITY_VERTEX_OUTPUT_STEREO + }; + + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = float4(v.vertex.xy, 0, 0.5); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return 0; + } + ENDCG + } + + Pass // clear stencil object-space + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + UNITY_VERTEX_OUTPUT_STEREO + }; + + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = ComputeVertexPosition(v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return 0; + } + ENDCG + } + } +} diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightClearStencil.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightClearStencil.shader.meta new file mode 100644 index 0000000..3915251 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightClearStencil.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 844773224daae4c31a9160897f833c5b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeGlow.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeGlow.shader new file mode 100644 index 0000000..eee2a2f --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeGlow.shader @@ -0,0 +1,151 @@ +Shader "HighlightPlus/Geometry/ComposeGlow" { +Properties { + _MainTex ("Texture", Any) = "black" {} + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + [HideInInspector] _Cull ("Cull Mode", Int) = 2 + [HideInInspector] _ZTest ("ZTest Mode", Int) = 0 + [HideInInspector] _Flip("Flip", Vector) = (0, 1, 0) + [HideInInspector] _BlendSrc("Blend Src", Int) = 1 + [HideInInspector] _BlendDst("Blend Dst", Int) = 1 + _Debug("Debug Color", Color) = (0,0,0,0) + [HideInInspector] _GlowStencilComp ("Stencil Comp", Int) = 6 +} + SubShader + { + Tags { "Queue"="Transparent+102" "RenderType"="Transparent" "DisableBatching" = "True" } + Blend [_BlendSrc] [_BlendDst] + + // Compose effect on camera target + Pass + { + ZWrite Off + ZTest Always // [_ZTest] + Cull Off //[_Cull] + Stencil { + Ref 2 + Comp [_GlowStencilComp] + Pass keep + ReadMask 2 + WriteMask 2 + } + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + UNITY_DECLARE_SCREENSPACE_TEXTURE(_HPComposeGlowFinal); + fixed4 _Color; + float3 _Flip; + fixed4 _Debug; + + struct appdata + { + float4 vertex : POSITION; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos: SV_POSITION; + float4 scrPos: TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = UnityObjectToClipPos(v.vertex); + o.scrPos = ComputeScreenPos(o.pos); + o.scrPos.y = o.scrPos.w * _Flip.x + o.scrPos.y * _Flip.y; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + fixed4 glow = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_HPComposeGlowFinal, i.scrPos.xy/i.scrPos.w); + fixed4 color = _Color; + color *= glow.r; + color += _Debug; + color.a = saturate(color.a); + return color; + } + ENDCG + } + + // Compose effect on camera target (full-screen blit) + Pass + { + ZWrite Off + ZTest Always //[_ZTest] + Cull Off //[_Cull] + + Stencil { + Ref 2 + Comp NotEqual + Pass keep + ReadMask 2 + WriteMask 2 + } + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex); + float4 _MainTex_ST; + fixed4 _Color; + float3 _Flip; + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos: SV_POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + v2f vert(appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = UnityStereoScreenSpaceUVAdjust(v.uv, _MainTex_ST); + o.uv.y = _Flip.x + o.uv.y * _Flip.y; + return o; + } + + fixed4 frag(v2f i) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + fixed4 glow = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); + fixed4 color = _Color; + color *= glow.r; + color.a = saturate(color.a); + return color; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeGlow.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeGlow.shader.meta new file mode 100644 index 0000000..186a4c9 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeGlow.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 975a91ee935da4d9c8a3e807fecd8047 +timeCreated: 1544699251 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeOutline.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeOutline.shader new file mode 100644 index 0000000..aef9333 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeOutline.shader @@ -0,0 +1,162 @@ +Shader "HighlightPlus/Geometry/ComposeOutline" { +Properties { + _MainTex ("Texture", Any) = "black" {} + _Color("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _Cull("Cull Mode", Int) = 2 + _ZTest("ZTest Mode", Int) = 0 + _Flip("Flip", Vector) = (0, 1, 0) + _Debug("Debug Color", Color) = (0,0,0,0) + _OutlineStencilComp("Stencil Comp", Int) = 6 +} +SubShader + { + Tags { "Queue" = "Transparent+120" "RenderType" = "Transparent" "DisableBatching" = "True" } + Blend SrcAlpha OneMinusSrcAlpha + + // Compose effect on camera target (optimal quad blit) + Pass + { + ZWrite Off + ZTest Always // [_ZTest] + Cull Off // [_Cull] + Stencil { + Ref 2 + Comp [_OutlineStencilComp] + Pass keep + ReadMask 2 + WriteMask 2 + } + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALL_EDGES + + #include "UnityCG.cginc" + + UNITY_DECLARE_SCREENSPACE_TEXTURE(_HPComposeOutlineFinal); + + fixed4 _Color; + float3 _Flip; + fixed4 _Debug; + #if HP_ALL_EDGES + #define OUTLINE_SOURCE outline.g + #else + #define OUTLINE_SOURCE outline.r + #endif + + struct appdata + { + float4 vertex : POSITION; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos: SV_POSITION; + float4 scrPos: TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = UnityObjectToClipPos(v.vertex); + o.scrPos = ComputeScreenPos(o.pos); + o.scrPos.y = o.scrPos.w * _Flip.x + o.scrPos.y * _Flip.y; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + fixed4 outline = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_HPComposeOutlineFinal, i.scrPos.xy/i.scrPos.w); + fixed4 color = _Color; + color.a *= OUTLINE_SOURCE; + color += _Debug; + color.a = saturate(color.a); + return color; + } + ENDCG + } + + // Compose effect on camera target (full-screen blit) + Pass + { + ZWrite Off + ZTest Always //[_ZTest] + Cull Off // [_Cull] + Stencil { + Ref 2 + Comp [_OutlineStencilComp] + Pass keep + ReadMask 2 + WriteMask 2 + } + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALL_EDGES + + #include "UnityCG.cginc" + + UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex); + float4 _MainTex_ST; + fixed4 _Color; + float3 _Flip; + #if HP_ALL_EDGES + #define OUTLINE_SOURCE outline.g + #else + #define OUTLINE_SOURCE outline.r + #endif + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos: SV_POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + v2f vert(appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = UnityStereoScreenSpaceUVAdjust(v.uv, _MainTex_ST); + o.uv.y = _Flip.x + o.uv.y * _Flip.y; + return o; + } + + fixed4 frag(v2f i) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + fixed4 outline = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); + fixed4 color = _Color; + color.a *= OUTLINE_SOURCE; + color = saturate(color); + return color; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeOutline.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeOutline.shader.meta new file mode 100644 index 0000000..ced1aa1 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeOutline.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0a6de74b6cfa9440182f8f56e4a0e4f1 +timeCreated: 1544699251 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.mat b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.mat new file mode 100644 index 0000000..8d5f4ce --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.mat @@ -0,0 +1,95 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: HighlightGlow + m_Shader: {fileID: 4800000, guid: 049d9e75e07674a78a703cf1203c07dd, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 1 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _ConstantWidth: 1 + - _Cull: 2 + - _Cutoff: 0.5 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _GlowZTest: 4 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _Glow: {r: 1, g: 0.025, b: 0.75, a: 0.5} + - _Glow2: {r: 0.01, g: 1, b: 0.5, a: 0} + - _GlowColor: {r: 1, g: 1, b: 1, a: 1} + - _GlowDirection: {r: 1, g: 1, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} +--- !u!114 &8957597210722627563 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1 diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.mat.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.mat.meta new file mode 100644 index 0000000..43f7b20 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 41672e7b4c6544aedbffb9e271c7ef7c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.shader new file mode 100644 index 0000000..99bc4c4 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.shader @@ -0,0 +1,119 @@ +Shader "HighlightPlus/Geometry/Glow" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _Glow2 ("Glow2", Vector) = (0.01, 1, 0.5, 0) + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _Cull ("Cull Mode", Int) = 2 + _ConstantWidth ("Constant Width", Float) = 1 + _GlowZTest ("ZTest", Int) = 4 + _GlowStencilOp ("Stencil Operation", Int) = 0 + _CutOff("CutOff", Float ) = 0.5 + _GlowStencilComp ("Stencil Comp", Int) = 6 +} + SubShader + { + Tags { "Queue"="Transparent+102" "RenderType"="Transparent" "DisableBatching"="True" } + + // Glow passes + Pass + { + Stencil { + Ref 2 + Comp [_GlowStencilComp] + Pass [_GlowStencilOp] + ReadMask 2 + WriteMask 2 + } + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + Cull [_Cull] + ZTest [_GlowZTest] + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma multi_compile_local _ HP_ALPHACLIP + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + fixed4 color : COLOR; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + //float4 _Glow; // x = intensity, y = width, z = magic number 1, w = magic number 2 + float3 _Glow2; // x = outline width, y = glow speed, z = dither on/off + float _ConstantWidth; + fixed _CutOff; + sampler2D _MainTex; + float4 _MainTex_ST; + float4 _MainTex_TexelSize; + + UNITY_INSTANCING_BUFFER_START(Props) + UNITY_DEFINE_INSTANCED_PROP(float4, _GlowColor) + UNITY_DEFINE_INSTANCED_PROP(float4, _Glow) + UNITY_DEFINE_INSTANCED_PROP(float4, _GlowDirection) + UNITY_INSTANCING_BUFFER_END(Props) + + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + float4 pos = ComputeVertexPosition(v.vertex); + float3 norm = mul ((float3x3)UNITY_MATRIX_IT_MV, v.normal); + float2 offset = any(norm.xy)!=0 ? TransformViewToProjection(normalize(norm.xy)) : 0.0.xx; + float2 glowDirection = UNITY_ACCESS_INSTANCED_PROP(Props, _GlowDirection); + #if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED) || defined(SINGLE_PASS_STEREO) + glowDirection.x *= 2.0; + #endif + offset += glowDirection; + float z = lerp(UNITY_Z_0_FAR_FROM_CLIPSPACE(pos.z), 2.0, UNITY_MATRIX_P[3][3]); + z = _ConstantWidth * (z - 2.0) + 2.0; + float outlineWidth = _Glow2.x; + float4 glow = UNITY_ACCESS_INSTANCED_PROP(Props, _Glow); + float animatedWidth = glow.y * (1.0 + 0.25 * sin(_Time.w * _Glow2.y)); + offset *= z * (outlineWidth + animatedWidth); + pos.xy += offset; + o.pos = pos; + o.color = UNITY_ACCESS_INSTANCED_PROP(Props, _GlowColor); + o.color.a = glow.x; + o.uv = TRANSFORM_TEX (v.uv, _MainTex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + #if HP_ALPHACLIP + fixed4 col = tex2D(_MainTex, i.uv); + clip(col.a - _CutOff); + #endif + + fixed4 color = i.color; + float4 glow = UNITY_ACCESS_INSTANCED_PROP(Props, _Glow); + float2 screenPos = floor( i.pos.xy * glow.z ) * glow.w; + color.a *= saturate(_Glow2.z + frac(screenPos.x + screenPos.y)); + return color; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.shader.meta new file mode 100644 index 0000000..ceb3a99 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 049d9e75e07674a78a703cf1203c07dd +timeCreated: 1544699250 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightInnerGlow.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightInnerGlow.shader new file mode 100644 index 0000000..51d4c9e --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightInnerGlow.shader @@ -0,0 +1,92 @@ +Shader "HighlightPlus/Geometry/InnerGlow" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _InnerGlowColor ("Inner Glow Color", Color) = (1,1,1,1) + _InnerGlowWidth ("Width", Float) = 1.0 + _CutOff("CutOff", Float ) = 0.5 + _Cull ("Cull Mode", Int) = 2 + _InnerGlowZTest ("ZTest", Int) = 4 + _InnerGlowBlendMode("Blend Mode", Int) = 1 +} + SubShader + { + Tags { "Queue"="Transparent+122" "RenderType"="Transparent" } + + // Inner Glow + Pass + { + Stencil { + Ref 4 + ReadMask 4 + Comp NotEqual + Pass keep + } + Blend SrcAlpha [_InnerGlowBlendMode] + ZWrite Off + Offset -1, -1 + ZTest [_InnerGlowZTest] + Cull [_Cull] + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALPHACLIP + + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + float3 normal : NORMAL; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float3 wpos : TEXCOORD1; + float3 normal : NORMAL; + UNITY_VERTEX_OUTPUT_STEREO + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + fixed _CutOff; + fixed4 _InnerGlowColor; + fixed _InnerGlowWidth; + + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = ComputeVertexPosition(v.vertex); + o.wpos = mul(unity_ObjectToWorld, v.vertex).xyz; + o.normal = UnityObjectToWorldNormal(v.normal); + o.uv = TRANSFORM_TEX (v.uv, _MainTex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + #if HP_ALPHACLIP + fixed4 color = tex2D(_MainTex, i.uv); + clip(color.a - _CutOff); + #endif + + float3 viewDir = normalize(i.wpos - _WorldSpaceCameraPos.xyz); + fixed dx = saturate(_InnerGlowWidth - abs(dot(viewDir, normalize(i.normal)))) / _InnerGlowWidth; + fixed4 col = _InnerGlowColor * dx; + return col; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightInnerGlow.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightInnerGlow.shader.meta new file mode 100644 index 0000000..d52a3f3 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightInnerGlow.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e5a069457bd344391acd5af227c0ce11 +timeCreated: 1544699250 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightMask.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightMask.shader new file mode 100644 index 0000000..18510e2 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightMask.shader @@ -0,0 +1,114 @@ +Shader "HighlightPlus/Geometry/Mask" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _CutOff("CutOff", Float ) = 0.5 + _Cull ("Cull Mode", Int) = 2 + _ZTest("ZTest", Int) = 4 +} + SubShader + { + Tags { "Queue"="Transparent+100" "RenderType"="Transparent" "DisableBatching"="True" } + CGINCLUDE + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + sampler2D _MainTex; + float4 _MainTex_ST; + float4 _MainTex_TexelSize; + fixed _CutOff; + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos: SV_POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_OUTPUT_STEREO + }; + + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = ComputeVertexPosition(v.vertex); + o.uv = TRANSFORM_TEX (v.uv, _MainTex); + + #if UNITY_REVERSED_Z + o.pos.z += 0.0001; + #else + o.pos.z -= 0.0001; + #endif + + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + #if HP_ALPHACLIP + fixed4 col = tex2D(_MainTex, i.uv); + clip(col.a - _CutOff); + #endif + return 0; + } + + ENDCG + + + // Create mask + Pass + { + Name "Mask" + Stencil { + Ref 2 + Comp always + Pass replace + WriteMask 2 + ReadMask 2 + } + ColorMask 0 + ZWrite Off + Cull [_Cull] // default Cull Back improves glow in high quality) + ZTest [_ZTest] + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALPHACLIP + ENDCG + } + + + // Create mask for see-through (the only difference is the ZTest) + Pass + { + Name "See-through Mask" + Stencil { + Ref 2 + Comp always + Pass replace + WriteMask 2 + ReadMask 2 + } + ColorMask 0 + ZWrite Off + Cull [_Cull] // default Cull Back improves glow in high quality) + ZTest LEqual + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALPHACLIP + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightMask.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightMask.shader.meta new file mode 100644 index 0000000..54d5508 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightMask.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e694fa934b6db4a00b8d4b9887115332 +timeCreated: 1544699251 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOccluder.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOccluder.shader new file mode 100644 index 0000000..6afbd18 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOccluder.shader @@ -0,0 +1,59 @@ +Shader "HighlightPlus/Geometry/SeeThroughOccluder" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" +} + SubShader + { + Tags { "Queue"="Transparent+100" "RenderType"="Transparent" } + + // Create mask + Pass + { + Stencil { + Ref 3 + WriteMask 3 + Comp always + Pass replace + } + ColorMask 0 + ZWrite Off + Offset -1, -1 + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + UNITY_VERTEX_OUTPUT_STEREO + }; + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = UnityObjectToClipPos(v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return 0; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOccluder.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOccluder.shader.meta new file mode 100644 index 0000000..b5eca91 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOccluder.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 229baf997355a43cda580dd4cf86b71e +timeCreated: 1544699251 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.mat b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.mat new file mode 100644 index 0000000..5e37508 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.mat @@ -0,0 +1,102 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-6555637095062934885 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: HighlightOutline + m_Shader: {fileID: 4800000, guid: cbbf740e9c8644e8492d08b1a3fd0203, type: 3} + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 1 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 1e193a79841ea4b4b8dddf797b7fba7d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineGradientTex: + m_Texture: {fileID: 2800000, guid: 1e193a79841ea4b4b8dddf797b7fba7d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _ConstantWidth: 0.28 + - _Cull: 2.17 + - _CutOff: -0.32 + - _Cutoff: 0.5 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _OutlineWidth: 0.01 + - _OutlineZTest: 3.44 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} + - _OutlineDirection: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.mat.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.mat.meta new file mode 100644 index 0000000..2b0dc0b --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 580895c3d590f4760ba7d0ee2a5dc624 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.shader new file mode 100644 index 0000000..91a3e95 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.shader @@ -0,0 +1,180 @@ +Shader "HighlightPlus/Geometry/Outline" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _OutlineWidth ("Outline Offset", Float) = 0.01 + _OutlineGradientTex("Outline Gradient Tex", 2D) = "white" {} + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _Cull ("Cull Mode", Int) = 2 + _ConstantWidth ("Constant Width", Float) = 1 + _OutlineZTest("ZTest", Int) = 4 + _CutOff("CutOff", Float ) = 0.5 +} + SubShader + { + Tags { "Queue"="Transparent+120" "RenderType"="Transparent" "DisableBatching"="True" } + + Pass + { + Name "Outline" + Stencil { + Ref 2 + Comp NotEqual + Pass replace + ReadMask 2 + WriteMask 2 + } + + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + Cull [_Cull] + ZTest [_OutlineZTest] + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma multi_compile_local _ HP_ALPHACLIP + #pragma multi_compile_local _ HP_OUTLINE_GRADIENT_WS HP_OUTLINE_GRADIENT_LS + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + fixed yt : TEXCOORD1; + UNITY_VERTEX_OUTPUT_STEREO + }; + + fixed4 _OutlineColor; + sampler2D _OutlineGradientTex; + + float _OutlineWidth; + float _ConstantWidth; + fixed _CutOff; + sampler2D _MainTex; + float4 _MainTex_ST; + float4 _MainTex_TexelSize; + + fixed2 _OutlineVertexData; + + UNITY_INSTANCING_BUFFER_START(Props) + UNITY_DEFINE_INSTANCED_PROP(float4, _OutlineDirection) + UNITY_INSTANCING_BUFFER_END(Props) + + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #if HP_OUTLINE_GRADIENT_WS + float posy = mul(unity_ObjectToWorld, v.vertex).y; + o.yt = saturate( (posy - _OutlineVertexData.x) / _OutlineVertexData.y); + #else + o.yt = saturate( (v.vertex.y - _OutlineVertexData.x) / _OutlineVertexData.y); + #endif + o.pos = ComputeVertexPosition(v.vertex); + float3 norm = mul ((float3x3)UNITY_MATRIX_IT_MV, v.normal); + float2 offset = any(norm.xy)!=0 ? TransformViewToProjection(normalize(norm.xy)) : 0.0.xx; + float z = lerp(UNITY_Z_0_FAR_FROM_CLIPSPACE(o.pos.z), 2.0, UNITY_MATRIX_P[3][3]); + z = _ConstantWidth * (z - 2.0) + 2.0; + float4 outlineDirection = UNITY_ACCESS_INSTANCED_PROP(Props, _OutlineDirection); + #if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED) || defined(SINGLE_PASS_STEREO) + outlineDirection.x *= 2.0; + #endif + o.pos.xy += offset * z * _OutlineWidth + outlineDirection.xy * z; + o.uv = TRANSFORM_TEX (v.uv, _MainTex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + #if HP_ALPHACLIP + fixed4 col = tex2D(_MainTex, i.uv); + clip(col.a - _CutOff); + #endif + #if HP_OUTLINE_GRADIENT_WS || HP_OUTLINE_GRADIENT_LS + half4 color = tex2D(_OutlineGradientTex, float2(i.yt, 0)); + color.a *= _OutlineColor.a; + #else + half4 color = _OutlineColor; + #endif + return color; + } + ENDCG + } + + Pass + { + Name "Outline Clear Stencil" + Stencil { + Ref 2 + Comp Always + Pass zero + } + + ColorMask 0 + ZWrite Off + Cull [_Cull] + ZTest [_OutlineZTest] + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + UNITY_VERTEX_OUTPUT_STEREO + }; + + fixed4 _OutlineColor; + float _OutlineWidth; + float2 _OutlineDirection; + float _ConstantWidth; + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = ComputeVertexPosition(v.vertex); + float3 norm = mul ((float3x3)UNITY_MATRIX_IT_MV, v.normal); + float2 offset = any(norm.xy)!=0 ? TransformViewToProjection(normalize(norm.xy)) : 0.0.xx; + float z = lerp(UNITY_Z_0_FAR_FROM_CLIPSPACE(o.pos.z), 2.0, UNITY_MATRIX_P[3][3]); + z = _ConstantWidth * (z - 2.0) + 2.0; + o.pos.xy += offset * z * _OutlineWidth + _OutlineDirection * z; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return 0; + } + ENDCG + } + + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.shader.meta new file mode 100644 index 0000000..14bfdeb --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cbbf740e9c8644e8492d08b1a3fd0203 +timeCreated: 1544699250 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOverlay.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOverlay.shader new file mode 100644 index 0000000..bf43138 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOverlay.shader @@ -0,0 +1,139 @@ +Shader "HighlightPlus/Geometry/Overlay" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _OverlayColor ("Overlay Color", Color) = (1,1,1,1) + _OverlayBackColor ("Overlay Back Color", Color) = (1,1,1,1) + _OverlayData("Overlay Data", Vector) = (1,0.5,1,1) + _OverlayHitPosData("Overlay Hit Pos Data", Vector) = (0,0,0,0) + _OverlayTexture("Overlay Texture", 2D) = "white" {} + _CutOff("CutOff", Float ) = 0.5 + _Cull ("Cull Mode", Int) = 2 + _OverlayZTest("ZTest", Int) = 4 +} + SubShader + { + Tags { "Queue"="Transparent+121" "RenderType"="Transparent" "DisableBatching"="True" } + + // Overlay + Pass + { + Stencil { + Ref 4 + ReadMask 4 + Comp NotEqual + Pass keep + } + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + Cull [_Cull] + Offset -1, -1 // avoid issues on Quest 2 standalone when using with other render features (ie. Liquid Volume Pro 2 irregular topology) + ZTest [_OverlayZTest] + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALPHACLIP + #pragma multi_compile_local _ HP_TEXTURE_TRIPLANAR HP_TEXTURE_SCREENSPACE HP_TEXTURE_OBJECTSPACE + + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + float3 norm : NORMAL; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float3 wpos : TEXCOORD1; + #if HP_TEXTURE_TRIPLANAR + float3 wnorm : TEXCOORD2; + #endif + #if HP_TEXTURE_SCREENSPACE + float4 scrPos : TEXCOORD3; + #endif + UNITY_VERTEX_OUTPUT_STEREO + }; + + fixed4 _OverlayColor; + sampler2D _MainTex; + float4 _MainTex_ST; + fixed4 _OverlayBackColor; + fixed4 _OverlayData; // x = speed, y = MinIntensity, z = blend, w = texture scale + float4 _OverlayHitPosData; + float _OverlayHitStartTime; + fixed _CutOff; + sampler2D _OverlayTexture; + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = ComputeVertexPosition(v.vertex); + #if HP_TEXTURE_SCREENSPACE + o.scrPos = ComputeScreenPos(o.pos); + o.scrPos.x *= _ScreenParams.x / _ScreenParams.y; + #endif + o.wpos = mul(unity_ObjectToWorld, v.vertex).xyz; + #if HP_TEXTURE_TRIPLANAR + o.wnorm = UnityObjectToWorldNormal(v.norm); + #endif + o.uv = TRANSFORM_TEX (v.uv, _MainTex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + fixed4 color = tex2D(_MainTex, i.uv); + #if HP_ALPHACLIP + clip(color.a - _CutOff); + #endif + float time = _Time.y % 1000; + fixed t = _OverlayData.y + (1.0 - _OverlayData.y) * 2.0 * abs(0.5 - frac(time * _OverlayData.x)); + fixed4 col = lerp(_OverlayColor, color * _OverlayBackColor * _OverlayColor, _OverlayData.z); + col.a *= t; + + if (_OverlayHitPosData.w>0) { + float elapsed = _Time.y - _OverlayHitStartTime; + float hitDist = distance(i.wpos, _OverlayHitPosData.xyz); + float atten = saturate( min(elapsed, _OverlayHitPosData.w) / hitDist ); + col.a *= atten; + } + + #if HP_TEXTURE_TRIPLANAR + half3 triblend = saturate(pow(i.wnorm, 4)); + triblend /= max(dot(triblend, half3(1,1,1)), 0.0001); + + // triplanar uvs + float3 tpos = i.wpos * _OverlayData.w; + float2 uvX = tpos.zy; + float2 uvY = tpos.xz; + float2 uvZ = tpos.xy; + + // albedo textures + fixed4 colX = tex2D(_OverlayTexture, uvX); + fixed4 colY = tex2D(_OverlayTexture, uvY); + fixed4 colZ = tex2D(_OverlayTexture, uvZ); + fixed4 tex = colX * triblend.x + colY * triblend.y + colZ * triblend.z; + col *= tex; + #elif HP_TEXTURE_SCREENSPACE + col *= tex2D(_OverlayTexture, (i.scrPos.xy / i.scrPos.w) * _OverlayData.w); + #elif HP_TEXTURE_OBJECTSPACE + col *= tex2D(_OverlayTexture, i.uv * _OverlayData.w); + #endif + + return col; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOverlay.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOverlay.shader.meta new file mode 100644 index 0000000..80f1636 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOverlay.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d17a98d19ada34bb7b4f86130e590159 +timeCreated: 1544699250 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightPlusDepthWrite.mat b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightPlusDepthWrite.mat new file mode 100644 index 0000000..a13e488 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightPlusDepthWrite.mat @@ -0,0 +1,76 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: HighlightPlusDepthWrite + m_Shader: {fileID: 4800000, guid: 058a572e30b2d446bade2dda32bcef0f, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightPlusDepthWrite.mat.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightPlusDepthWrite.mat.meta new file mode 100644 index 0000000..7ce4eb2 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightPlusDepthWrite.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 825cb444e111842cf97788cbb7583edd +timeCreated: 1546857910 +licenseType: Store +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThrough.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThrough.shader new file mode 100644 index 0000000..4486fa8 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThrough.shader @@ -0,0 +1,168 @@ +Shader "HighlightPlus/Geometry/SeeThrough" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _SeeThrough ("See Through", Range(0,1)) = 0.8 + _SeeThroughTintColor ("See Through Tint Color", Color) = (1,0,0,0.8) + _SeeThroughNoise("Noise", Float) = 1 + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _CutOff("CutOff", Float ) = 0.5 + _SeeThroughStencilRef ("Stencil Ref", Int) = 2 + _SeeThroughStencilComp ("Stencil Comp", Int) = 5 + _SeeThroughStencilPassOp ("Stencil Pass Operation", Int) = 0 + _SeeThroughDepthOffset ("Depth Offset", Float) = 0 + _SeeThroughMaxDepth("Max Depth", Float) = 0 + _SeeThroughTexture("Mask Texture", 2D) = "white" {} + _SeeThroughTextureScale("Mask Texture Scale", Float) = 1.0 +} + SubShader + { + Tags { "Queue"="Transparent+201" "RenderType"="Transparent" "DisableBatching"="True" } + + // See through effect + Pass + { + Name "See-through" + Stencil { + ReadMask 3 + WriteMask 3 + Ref [_SeeThroughStencilRef] + Comp [_SeeThroughStencilComp] + Pass [_SeeThroughStencilPassOp] + Fail [_SeeThroughStencilPassOp] + } + ZTest Greater + ZWrite Off + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALPHACLIP + #pragma multi_compile_local _ HP_DEPTH_OFFSET + #pragma multi_compile_local _ HP_SEETHROUGH_ONLY_BORDER + #pragma multi_compile_local _ HP_TEXTURE_TRIPLANAR HP_TEXTURE_SCREENSPACE HP_TEXTURE_OBJECTSPACE + + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + float3 norm : NORMAL; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos: SV_POSITION; + float2 uv : TEXCOORD0; + #if HP_DEPTH_OFFSET || HP_TEXTURE_SCREENSPACE + float4 scrPos : TEXCOORD1; + #endif + #if HP_DEPTH_OFFSET + float depth : TEXCOORD2; + #endif + float3 wpos : TEXCOORD3; + #if HP_TEXTURE_TRIPLANAR + float3 wnorm : TEXCOORD4; + #endif + UNITY_VERTEX_OUTPUT_STEREO + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + fixed _SeeThrough; + fixed4 _SeeThroughTintColor; + fixed _CutOff; + fixed _SeeThroughNoise; + float _SeeThroughDepthOffset; + float _SeeThroughMaxDepth; + fixed _HP_Fade; + sampler2D _SeeThroughTexture; + fixed _SeeThroughTextureScale; + UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = ComputeVertexPosition(v.vertex); + #if HP_DEPTH_OFFSET || HP_TEXTURE_SCREENSPACE + o.scrPos = ComputeScreenPos(o.pos); + #endif + #if HP_DEPTH_OFFSET + COMPUTE_EYEDEPTH(o.depth); + #endif + o.wpos = mul(unity_ObjectToWorld, v.vertex).xyz; + #if HP_TEXTURE_TRIPLANAR + o.wnorm = UnityObjectToWorldNormal(v.norm); + #endif + o.uv = TRANSFORM_TEX(v.uv, _MainTex); + return o; + } + + float GetEyeDepth(float rawDepth) { + float persp = LinearEyeDepth(rawDepth); + float ortho = (_ProjectionParams.z-_ProjectionParams.y)*(1-rawDepth)+_ProjectionParams.y; + return lerp(persp,ortho,unity_OrthoParams.w); + } + + fixed4 frag (v2f i) : SV_Target + { + #if HP_SEETHROUGH_ONLY_BORDER + return 0; + #else + + #if HP_DEPTH_OFFSET + float sceneZ = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.scrPos.xy / i.scrPos.w); + float sceneDepth = GetEyeDepth(sceneZ); + if (i.depth - sceneDepth - _SeeThroughDepthOffset < 0 || i.depth - sceneDepth > _SeeThroughMaxDepth) discard; + #endif + fixed4 col = tex2D(_MainTex, i.uv); + #if HP_ALPHACLIP + clip(col.a - _CutOff); + #endif + col.rgb = lerp(col.rgb, _SeeThroughTintColor.rgb, _SeeThroughTintColor.a); + float scry = i.pos.y; + float time = _Time.w % 1.0; + col.rgb += _SeeThroughNoise *(frac( scry * time ) * 0.1); + col.a = _SeeThrough; + col.a = lerp(col.a, col.a * ( (scry % 2) - 1.0 ), _SeeThroughNoise); + col.a *= _HP_Fade; + + #if HP_TEXTURE_TRIPLANAR + half3 triblend = saturate(pow(i.wnorm, 4)); + triblend /= max(dot(triblend, half3(1,1,1)), 0.0001); + + // triplanar uvs + float3 tpos = i.wpos * _SeeThroughTextureScale; + float2 uvX = tpos.zy; + float2 uvY = tpos.xz; + float2 uvZ = tpos.xy; + + // albedo textures + fixed4 colX = tex2D(_SeeThroughTexture, uvX); + fixed4 colY = tex2D(_SeeThroughTexture, uvY); + fixed4 colZ = tex2D(_SeeThroughTexture, uvZ); + fixed4 tex = colX * triblend.x + colY * triblend.y + colZ * triblend.z; + col *= tex; + #elif HP_TEXTURE_SCREENSPACE + float2 uv = (i.scrPos.xy / i.scrPos.w); + uv.x *= _ScreenParams.x / _ScreenParams.y; + col *= tex2D(_SeeThroughTexture, uv * _SeeThroughTextureScale); + #elif HP_TEXTURE_OBJECTSPACE + col *= tex2D(_SeeThroughTexture, i.uv * _SeeThroughTextureScale); + #endif + + return col; + + #endif // HP_ONLY_BORDER + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThrough.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThrough.shader.meta new file mode 100644 index 0000000..8312b80 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThrough.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 47198bbf0b2a44882aceef6af17a467d +timeCreated: 1544699250 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughBorder.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughBorder.shader new file mode 100644 index 0000000..70eccb0 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughBorder.shader @@ -0,0 +1,122 @@ +Shader "HighlightPlus/Geometry/SeeThroughBorder" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _SeeThroughBorderColor ("Outline Color", Color) = (0,0,0,1) + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _CutOff("CutOff", Float ) = 0.5 + _SeeThroughBorderWidth ("Outline Offset", Float) = 0.01 + _SeeThroughBorderConstantWidth ("Constant Width", Float) = 1 + _SeeThroughStencilRef ("Stencil Ref", Int) = 2 + _SeeThroughStencilComp ("Stencil Comp", Int) = 5 + _SeeThroughDepthOffset ("Depth Offset", Float) = 0 + _SeeThroughMaxDepth("Max Depth", Float) = 0 + _SeeThroughStencilPassOp ("Stencil Pass Operation", Int) = 0 +} + SubShader + { + Tags { "Queue"="Transparent+201" "RenderType"="Transparent" "DisableBatching"="True" } + + // See through effect + Pass + { + Name "See-through border" + Stencil { + ReadMask 3 + WriteMask 3 + Ref [_SeeThroughStencilRef] + Comp [_SeeThroughStencilComp] + Pass [_SeeThroughStencilPassOp] + Fail [_SeeThroughStencilPassOp] + } + ZTest Greater + ZWrite Off + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALPHACLIP + #pragma multi_compile_local _ HP_DEPTH_OFFSET + + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + float3 normal : NORMAL; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos: SV_POSITION; + float2 uv : TEXCOORD0; + #if HP_DEPTH_OFFSET + float4 scrPos : TEXCOORD1; + float depth : TEXCOORD2; + #endif + UNITY_VERTEX_OUTPUT_STEREO + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + fixed4 _SeeThroughBorderColor; + fixed _CutOff; + float _SeeThroughDepthOffset; + float _SeeThroughMaxDepth; + float _SeeThroughBorderWidth; + float _SeeThroughBorderConstantWidth; + fixed _HP_Fade; + + UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = ComputeVertexPosition(v.vertex); + #if HP_DEPTH_OFFSET + o.scrPos = ComputeScreenPos(o.pos); + COMPUTE_EYEDEPTH(o.depth); + #endif + + float3 norm = mul ((float3x3)UNITY_MATRIX_IT_MV, v.normal); + float2 offset = any(norm.xy)!=0 ? TransformViewToProjection(normalize(norm.xy)) : 0.0.xx; + float z = lerp(UNITY_Z_0_FAR_FROM_CLIPSPACE(o.pos.z), 2.0, UNITY_MATRIX_P[3][3]); + z = _SeeThroughBorderConstantWidth * (z - 2.0) + 2.0; + o.pos.xy += offset * z * _SeeThroughBorderWidth; + + o.uv = TRANSFORM_TEX(v.uv, _MainTex); + return o; + } + + float GetEyeDepth(float rawDepth) { + float persp = LinearEyeDepth(rawDepth); + float ortho = (_ProjectionParams.z-_ProjectionParams.y)*(1-rawDepth)+_ProjectionParams.y; + return lerp(persp,ortho,unity_OrthoParams.w); + } + + fixed4 frag (v2f i) : SV_Target + { + #if HP_DEPTH_OFFSET + float sceneZ = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.scrPos.xy / i.scrPos.w); + float sceneDepth = GetEyeDepth(sceneZ); + if (i.depth - sceneDepth - _SeeThroughDepthOffset < 0 || i.depth - sceneDepth > _SeeThroughMaxDepth) discard; + #endif + #if HP_ALPHACLIP + fixed4 col = tex2D(_MainTex, i.uv); + clip(col.a - _CutOff); + #endif + fixed4 res = _SeeThroughBorderColor; + res.a *= _HP_Fade; + return res; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughBorder.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughBorder.shader.meta new file mode 100644 index 0000000..202bec6 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughBorder.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fe0a98aa774224cf1bc4a800a586a33a +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughMask.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughMask.shader new file mode 100644 index 0000000..a9c2483 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughMask.shader @@ -0,0 +1,62 @@ +Shader "HighlightPlus/Geometry/SeeThroughMask" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" +} + SubShader + { + Tags { "Queue"="Transparent+201" "RenderType"="Transparent" "DisableBatching"="True" } + + // See through effect + Pass + { + Name "See-through mask" + Stencil { + WriteMask 3 + Ref 1 + Comp always + Pass replace + } + + ZTest Always + ZWrite Off + ColorMask 0 + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos: SV_POSITION; + UNITY_VERTEX_OUTPUT_STEREO + }; + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = ComputeVertexPosition(v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return 0; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughMask.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughMask.shader.meta new file mode 100644 index 0000000..da76823 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughMask.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 457d76fdfc7c4472faeb0297c0edab29 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSolidColor.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSolidColor.shader new file mode 100644 index 0000000..cb4fdab --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSolidColor.shader @@ -0,0 +1,138 @@ +Shader "HighlightPlus/Geometry/SolidColor" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _CutOff("CutOff", Float ) = 0.5 + _Cull ("Cull Mode", Int) = 2 + _ZTest("ZTest", Int) = 4 + _EdgeThreshold("Edge Threshold", Float) = 0.995 +} + SubShader + { + Tags { "Queue"="Transparent+100" "RenderType"="Transparent" "DisableBatching" = "True" } + + // Compose effect on camera target + Pass + { + ZWrite Off + Cull [_Cull] + ZTest Always + Stencil { + Ref 2 + Comp NotEqual + Pass replace + } + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALPHACLIP + #pragma multi_compile_local _ HP_DEPTHCLIP HP_DEPTHCLIP_INV + #pragma multi_compile_local _ HP_ALL_EDGES + + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + sampler2D _MainTex; + #if HP_DEPTHCLIP || HP_DEPTHCLIP_INV || HP_ALL_EDGES + UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); + float4 _CameraDepthTexture_TexelSize;; + float _EdgeThreshold; + #endif + + float4 _MainTex_ST; + fixed _CutOff; + fixed4 _Color; + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float4 scrPos : TEXCOORD1; + #if HP_DEPTHCLIP || HP_DEPTHCLIP_INV + float depth : TEXCOORD2; + #endif + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = ComputeVertexPosition(v.vertex); + o.uv = TRANSFORM_TEX (v.uv, _MainTex); + o.scrPos = ComputeScreenPos(o.pos); + #if HP_DEPTHCLIP || HP_DEPTHCLIP_INV + COMPUTE_EYEDEPTH(o.depth); + #endif + return o; + } + +#if HP_ALL_EDGES + float3 GetNormal(float depth, float depth1, float depth2, float2 offset1, float2 offset2) { + float3 p1 = float3(offset1, depth1 - depth); + float3 p2 = float3(offset2, depth2 - depth); + float3 normal = cross(p1, p2); + return normalize(normal); + } + + fixed ComputeDepthOutline(float2 uv) { + float3 uvInc = float3(_CameraDepthTexture_TexelSize.x, _CameraDepthTexture_TexelSize.y, 0); + float depthS = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv - uvInc.zy)); + float depthW = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv - uvInc.xz)); + float depthE = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv + uvInc.xz)); + float depthN = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv + uvInc.zy)); + float depth = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv)); + float3 normalNW = GetNormal(depth, depthN, depthW, uvInc.zy, float2(-uvInc.x, 0)); + float3 normalSE = GetNormal(depth, depthS, depthE, float2(0, -uvInc.y), uvInc.xz); + float dnorm = dot(normalNW, normalSE); + fixed outline = (fixed)(dnorm < _EdgeThreshold); + return outline; + } +#endif + + fixed4 frag (v2f i) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + + #if HP_ALPHACLIP + fixed4 col = tex2D(_MainTex, i.uv); + clip(col.a - _CutOff); + #endif + float2 uv = UnityStereoTransformScreenSpaceTex(i.scrPos.xy / i.scrPos.w); + #if HP_DEPTHCLIP || HP_DEPTHCLIP_INV + float depthRaw = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv); + float depthPersp = LinearEyeDepth(depthRaw); + #if defined(UNITY_REVERSED_Z) + depthRaw = 1.0 - depthRaw; + #endif + float depthOrtho = lerp(_ProjectionParams.y, _ProjectionParams.z, depthRaw); + float vz = unity_OrthoParams.w ? depthOrtho : depthPersp; + #if HP_DEPTHCLIP_INV + clip( i.depth * 0.999 - vz); + #else + clip( vz - i.depth * 0.999); + #endif + #endif + #if HP_ALL_EDGES + return fixed4(1.0, ComputeDepthOutline(uv), 1.0, 1.0); + #else + return fixed4(1.0, 1.0, 1.0, 1.0); + #endif + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSolidColor.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSolidColor.shader.meta new file mode 100644 index 0000000..37f54c5 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSolidColor.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 77643996218224478a471439e0ea5fb4 +timeCreated: 1544699251 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightTarget.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightTarget.shader new file mode 100644 index 0000000..e4aed23 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightTarget.shader @@ -0,0 +1,168 @@ +Shader "HighlightPlus/Geometry/Target" { +Properties { + _MainTex ("Texture", 2D) = "white" {} + _Color ("Color", Color) = (1,1,1,1) + _ZTest ("ZTest", Int) = 0 + } + + SubShader + { + Tags { "RenderType" = "Transparent" "Queue" = "Transparent-1" "DisableBatching" = "True" } + + // Target FX decal + Pass + { + Stencil { + Ref 2 + Comp NotEqual + ReadMask 2 + } + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + ZTest [_ZTest] + Cull Off + + HLSLPROGRAM + + #pragma vertex vert + #pragma fragment frag + + #pragma target 3.0 + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareDepthTexture.hlsl" + + struct appdata + { + float3 positionOS : POSITION; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 positionCS : SV_POSITION; + float4 screenPos : TEXCOORD0; + float4 rayVS : TEXCOORD1; + float3 camPosVS : TEXCOORD2; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + sampler2D _MainTex; + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + half4 _Color; + float4 _TargetFXRenderData; + CBUFFER_END + + #define GROUND_NORMAL _TargetFXRenderData.xyz + #define FADE_POWER _TargetFXRenderData.w + + + v2f vert(appdata input) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + VertexPositionInputs vertexPositionInput = GetVertexPositionInputs(input.positionOS); + o.positionCS = vertexPositionInput.positionCS; + o.screenPos = ComputeScreenPos(o.positionCS); + + float3 viewRay = vertexPositionInput.positionVS; + o.rayVS.w = viewRay.z; + float4x4 viewToObject = mul(UNITY_MATRIX_I_M, UNITY_MATRIX_I_V); + o.rayVS.xyz = mul((float3x3)viewToObject, -viewRay); + o.camPosVS = mul(viewToObject, float4(0,0,0,1)).xyz; + return o; + } + + half4 frag(v2f i) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + + float depth = SampleSceneDepth(i.screenPos.xy / i.screenPos.w); + float3 decalPos; + if(unity_OrthoParams.w) { + #if defined(UNITY_REVERSED_Z) + depth = 1.0 - depth; + #endif + float sceneDepthVS = lerp(_ProjectionParams.y, _ProjectionParams.z, depth); + float2 rayVSEnd = float2(unity_OrthoParams.xy * (i.screenPos.xy - 0.5) * 2.0); + float4 posVS = float4(rayVSEnd, -sceneDepthVS, 1); + float3 wpos = mul(UNITY_MATRIX_I_V, posVS).xyz; + decalPos = mul(GetWorldToObjectMatrix(), float4(wpos, 1)).xyz; + } else { + float depthEye = LinearEyeDepth(depth, _ZBufferParams); + decalPos = i.camPosVS + (i.rayVS.xyz / i.rayVS.w) * depthEye; + } + clip(0.5 - abs(decalPos)); + + // check normal + float3 normal = normalize(cross(ddx(decalPos), -ddy(decalPos))); + float slope = dot(normal, GROUND_NORMAL); + clip(slope - 0.01); + + float2 uv = decalPos.xz + 0.5; + half4 col = tex2D(_MainTex, uv); + col *= _Color; + + // atten with elevation + col.a /= 1.0 + pow(1.0 + max(0, decalPos.y - 0.1), FADE_POWER); + + return col; + } + ENDHLSL + } + + Pass + { + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + ZTest [_ZTest] + Cull Off + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_OUTPUT_STEREO + }; + + sampler2D _MainTex; + fixed4 _Color; + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.uv; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return tex2D(_MainTex, i.uv) * _Color; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightTarget.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightTarget.shader.meta new file mode 100644 index 0000000..d768e87 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightTarget.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 54328cae8f89d442da972097ce4f23d9 +timeCreated: 1544699250 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.mat b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.mat new file mode 100644 index 0000000..e9c33e3 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.mat @@ -0,0 +1,96 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-2752029129534311206 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: HighlightUIMask + m_Shader: {fileID: 4800000, guid: 3e461a1484e2948598abca48b53d8b58, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _ColorMask: 15 + - _Cull: 2 + - _CutOff: 0.5 + - _Cutoff: 0.5 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + - _Surface: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.mat.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.mat.meta new file mode 100644 index 0000000..e4c879a --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 779128a8e84b44d4db81443c424af511 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.shader b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.shader new file mode 100644 index 0000000..108714d --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.shader @@ -0,0 +1,77 @@ +Shader "HighlightPlus/UI/Mask" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _CutOff("CutOff", Float ) = 0.5 + _StencilComp("Stencil Comparison", Float) = 8 + _Stencil("Stencil ID", Float) = 0 + _StencilOp("Stencil Operation", Float) = 0 + _StencilWriteMask("Stencil Write Mask", Float) = 255 + _StencilReadMask("Stencil Read Mask", Float) = 255 + _ColorMask("Color Mask", Float) = 15 +} + SubShader + { + Tags { "Queue"="Transparent" "RenderType"="Transparent" "IgnoreProjector" = "True" } + + // Create mask + Pass + { + Stencil { + Ref 6 + Comp always + Pass replace + ReadMask 6 + WriteMask 6 + } + ColorMask 0 + ZWrite Off + Cull Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + sampler2D _MainTex; + float4 _MainTex_ST; + float4 _MainTex_TexelSize; + fixed _CutOff; + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos: SV_POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_OUTPUT_STEREO + }; + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = ComputeVertexPosition(v.vertex); + o.uv = TRANSFORM_TEX (v.uv, _MainTex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + fixed4 col = tex2D(_MainTex, i.uv); + clip(col.a - _CutOff); + return 0; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.shader.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.shader.meta new file mode 100644 index 0000000..693ec2b --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3e461a1484e2948598abca48b53d8b58 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/target.png b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/target.png new file mode 100644 index 0000000..f9fadf8 Binary files /dev/null and b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/target.png differ diff --git a/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/target.png.meta b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/target.png.meta new file mode 100644 index 0000000..77c6102 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/target.png.meta @@ -0,0 +1,100 @@ +fileFormatVersion: 2 +guid: 1de3c566a6c8c405b9f6f453137273ec +timeCreated: 1555360741 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: WebGL + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts.meta b/Assets/Plugins/HighlightPlus/Runtime/Scripts.meta new file mode 100644 index 0000000..1682aa4 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 89ce39cd6bb34454bbaf48f1d111f236 +folderAsset: yes +timeCreated: 1542876305 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffect.cs b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffect.cs new file mode 100644 index 0000000..686fb30 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffect.cs @@ -0,0 +1,2892 @@ +/// +/// Highlight Plus - (c) Kronnect Technologies SL +/// + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; + +namespace HighlightPlus { + + public delegate bool OnObjectHighlightEvent(GameObject obj); + public delegate bool OnRendererHighlightEvent(Renderer renderer); + + /// + /// Triggers when target effect animation occurs + /// + /// A value from 0 to 1 that represent the animation time from start to end, based on target duration and start time + public delegate void OnTargetAnimatesEvent(ref Vector3 center, ref Quaternion rotation, ref Vector3 scale, float t); + public delegate void FullScreenBlitMethod(CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier destination, Material material, int passIndex); + + public enum NormalsOption { + Smooth = 0, + PreserveOriginal = 1, + Reorient = 2 + } + + public enum SeeThroughMode { + WhenHighlighted = 0, + AlwaysWhenOccluded = 1, + Never = 2 + } + + public enum OverlayMode { + WhenHighlighted = 0, + Always = 10 + } + + public enum TextureUVSpace { + Triplanar = 0, + ObjectSpace = 1, + ScreenSpace = 2 + } + + public enum QualityLevel { + Fastest = 0, + High = 1, + Highest = 2, + Medium = 3 + } + + public enum TargetOptions { + Children, + OnlyThisObject, + RootToChildren, + LayerInScene, + LayerInChildren, + Scripting + } + + public enum Visibility { + Normal, + AlwaysOnTop, + OnlyWhenOccluded + } + + public enum ColorStyle { + SingleColor, + Gradient + } + + public enum OutlineEdgeMode { + Exterior, + Any + } + + public enum ContourStyle { + AroundVisibleParts, + AroundObjectShape + } + + public enum GlowBlendMode { + Additive, + AlphaBlending + } + + public enum InnerGlowBlendMode { + Additive, + AlphaBlending + } + + public enum BlurMethod { + Gaussian, + Kawase + } + + public static class QualityLevelExtensions { + public static bool UsesMultipleOffsets(this QualityLevel qualityLevel) { + return qualityLevel == QualityLevel.Medium || qualityLevel == QualityLevel.High; + } + } + + [Serializable] + public struct GlowPassData { + public float offset; + public float alpha; + public Color color; + } + + [ExecuteInEditMode] + [HelpURL("https://kronnect.com/guides/highlight-plus-introduction/")] + public partial class HighlightEffect : MonoBehaviour { + + /// + /// Gets or sets the current profile. To load a profile and apply its settings at runtime, please use ProfileLoad() method. + /// + [Tooltip("The current profile (optional). A profile let you store Highlight Plus settings and apply those settings easily to many objects. You can also load a profile and apply its settings at runtime, using the ProfileLoad() method of the Highlight Effect component.")] + public HighlightProfile profile; + + /// + /// Sets if changes to the original profile should propagate to this effect. + /// + [Tooltip("If enabled, settings from the profile will be applied to this component automatically when game starts or when any profile setting is updated.")] + public bool profileSync; + + /// + /// Which cameras can render the effects + /// + [Tooltip("Which cameras can render the effect.")] + public LayerMask camerasLayerMask = -1; + + /// + /// Specifies which objects are affected by this effect. + /// + [Tooltip("Different options to specify which objects are affected by this Highlight Effect component.")] + public TargetOptions effectGroup = TargetOptions.Children; + + /// + /// The layer that contains the affected objects by this effect when effectGroup is set to LayerMask. + /// + [Tooltip("The layer that contains the affected objects by this effect when effectGroup is set to LayerMask.")] + public LayerMask effectGroupLayer = -1; + + /// + /// Optional object name filter + /// + [Tooltip("Only include objects whose names contains this text.")] + public string effectNameFilter; + + /// + /// Combine objects into a single mesh + /// + [Tooltip("Combine meshes of all objects in this group affected by Highlight Effect reducing draw calls.")] + public bool combineMeshes; + + /// + /// The alpha threshold for transparent cutout objects. Pixels with alpha below this value will be discarded. + /// + [Tooltip("The alpha threshold for transparent cutout objects. Pixels with alpha below this value will be discarded.")] + [Range(0, 1)] + public float alphaCutOff; + + /// + /// If back facing triangles are ignored. Backfaces triangles are not visible but you may set this property to false to force highlight effects to act on those triangles as well. + /// + [Tooltip("If back facing triangles are ignored.Backfaces triangles are not visible but you may set this property to false to force highlight effects to act on those triangles as well.")] + public bool cullBackFaces = true; + + /// + /// Show highlight effects even if the object is currently not visible. This option is useful if the affected objects are rendered using GPU instancing tools which render directly to the GPU without creating real game object geometry in CPU. + /// + [Tooltip("Show highlight effects even if the object is not visible. If this object or its children use GPU Instancing tools, the MeshRenderer can be disabled although the object is visible. In this case, this option is useful to enable highlighting.")] + public bool ignoreObjectVisibility; + + /// + /// Enable to support reflection probes + /// + [Tooltip("Support reflection probes. Enable only if you want the effects to be visible in reflections.")] + public bool reflectionProbes; + + /// + /// Enable to support reflection probes + /// + [Tooltip("Enables GPU instancing. Reduces draw calls in outline and outer glow effects on platforms that support GPU instancing. Should be enabled by default.")] + public bool GPUInstancing = true; + + /// + /// Enable to support reflection probes + /// + [Tooltip("Bakes skinned mesh to leverage GPU instancing when using outline/outer glow with mesh-based rendering. Reduces draw calls significantly on skinned meshes.")] + public bool optimizeSkinnedMesh = true; + + /// + /// Enabled depth buffer flip in HQ + /// + [Tooltip("Enables depth buffer clipping. Only applies to outline or outer glow in High Quality mode.")] + public bool depthClip; + + [Tooltip("Fades out effects based on distance to camera")] + public bool cameraDistanceFade; + + [Tooltip("The closest distance particles can get to the camera before they fade from the camera’s view.")] + public float cameraDistanceFadeNear; + + [Tooltip("The farthest distance particles can get away from the camera before they fade from the camera’s view.")] + public float cameraDistanceFadeFar = 1000; + + [Tooltip("Normals handling option:\nPreserve original: use original mesh normals.\nSmooth: average normals to produce a smoother outline/glow mesh based effect.\nReorient: recomputes normals based on vertex direction to centroid.")] + public NormalsOption normalsOption; + + /// + /// Ignores highlight effects on this object. + /// + [Tooltip("Ignore highlighting on this object.")] + public bool ignore; + + [SerializeField] + bool _highlighted; + + public bool highlighted { get { return _highlighted; } set { SetHighlighted(value); } } + + public float fadeInDuration; + public float fadeOutDuration; + + public bool flipY; + + [Tooltip("Keeps the outline/glow size unaffected by object distance.")] + public bool constantWidth = true; + + [Tooltip("Mask to include or exclude certain submeshes. By default, all submeshes are included.")] + public int subMeshMask = -1; + + [Range(0, 1)] + [Tooltip("Intensity of the overlay effect. A value of 0 disables the overlay completely.")] + public float overlay; + public OverlayMode overlayMode = OverlayMode.WhenHighlighted; + [ColorUsage(true, true)] public Color overlayColor = Color.yellow; + public float overlayAnimationSpeed = 1f; + [Range(0, 1)] + public float overlayMinIntensity = 0.5f; + [Range(0, 1)] + [Tooltip("Controls the blending or mix of the overlay color with the natural colors of the object.")] + public float overlayBlending = 1.0f; + [Tooltip("Optional overlay texture.")] + public Texture2D overlayTexture; + public TextureUVSpace overlayTextureUVSpace; + public float overlayTextureScale = 1f; + public Visibility overlayVisibility = Visibility.Normal; + + [Range(0, 1)] + [Tooltip("Intensity of the outline. A value of 0 disables the outline completely.")] + public float outline = 1f; + [ColorUsage(true, true)] public Color outlineColor = Color.black; + public ColorStyle outlineColorStyle = ColorStyle.SingleColor; + [GradientUsage(hdr: true, ColorSpace.Linear)] public Gradient outlineGradient; + public bool outlineGradientInLocalSpace; + public float outlineWidth = 0.45f; + [Range(1, 3)] + public int outlineBlurPasses = 2; + public QualityLevel outlineQuality = QualityLevel.Medium; + public OutlineEdgeMode outlineEdgeMode = OutlineEdgeMode.Exterior; + public float outlineEdgeThreshold = 0.995f; + [Range(1, 8)] + [Tooltip("Reduces the quality of the outline but improves performance a bit.")] + public int outlineDownsampling = 1; + public Visibility outlineVisibility = Visibility.Normal; + public GlowBlendMode glowBlendMode = GlowBlendMode.Additive; + public bool outlineBlitDebug; + [Tooltip("If enabled, this object won't combine the outline with other objects.")] + public bool outlineIndependent; + public ContourStyle outlineContourStyle = ContourStyle.AroundVisibleParts; + + [Range(0, 5)] + [Tooltip("The intensity of the outer glow effect. A value of 0 disables the glow completely.")] + public float glow; + public float glowWidth = 0.4f; + public QualityLevel glowQuality = QualityLevel.Medium; + public BlurMethod glowBlurMethod = BlurMethod.Gaussian; + [Range(1, 8)] + [Tooltip("Reduces the quality of the glow but improves performance a bit.")] + public int glowDownsampling = 2; + [ColorUsage(true, true)] public Color glowHQColor = new Color(0.64f, 1f, 0f, 1f); + [Tooltip("When enabled, outer glow renders with dithering. When disabled, glow appears as a solid color.")] + public bool glowDithering = true; + [Tooltip("Seed for the dithering effect")] + public float glowMagicNumber1 = 0.75f; + [Tooltip("Another seed for the dithering effect that combines with first seed to create different patterns")] + public float glowMagicNumber2 = 0.5f; + public float glowAnimationSpeed = 1f; + public Visibility glowVisibility = Visibility.Normal; + public bool glowBlitDebug; + [Tooltip("Blends glow passes one after another. If this option is disabled, glow passes won't overlap (in this case, make sure the glow pass 1 has a smaller offset than pass 2, etc.)")] + public bool glowBlendPasses = true; +#if UNITY_2020_2_OR_NEWER + [NonReorderable] +#endif + public GlowPassData[] glowPasses; + [Tooltip("If enabled, glow effect will not use a stencil mask. This can be used to render the glow effect alone.")] + public bool glowIgnoreMask; + + [Range(0, 5f)] + [Tooltip("The intensity of the inner glow effect. A value of 0 disables the glow completely.")] + public float innerGlow; + [Range(0, 2)] + public float innerGlowWidth = 1f; + [ColorUsage(true, true)] public Color innerGlowColor = Color.white; + public InnerGlowBlendMode innerGlowBlendMode = InnerGlowBlendMode.Additive; + public Visibility innerGlowVisibility = Visibility.Normal; + + [Tooltip("Enables the targetFX effect. This effect draws an animated sprite over the object.")] + public bool targetFX; + public Texture2D targetFXTexture; + [ColorUsage(true, true)] public Color targetFXColor = Color.white; + public Transform targetFXCenter; + public float targetFXRotationSpeed = 50f; + public float targetFXInitialScale = 4f; + public float targetFXEndScale = 1.5f; + [Tooltip("Makes target scale relative to object renderer bounds")] + public bool targetFXScaleToRenderBounds = true; + [Tooltip("Places target FX sprite at the bottom of the highlighted object.")] + public bool targetFXAlignToGround; + [Tooltip("Fade out effect with altitude")] + public float targetFXFadePower = 32; + public float targetFXGroundMaxDistance = 10f; + public LayerMask targetFXGroundLayerMask = -1; + public float targetFXTransitionDuration = 0.5f; + [Tooltip("The duration of the effect. A value of 0 will keep the target sprite on screen while object is highlighted.")] + public float targetFXStayDuration = 1.5f; + public Visibility targetFXVisibility = Visibility.AlwaysOnTop; + + public event OnObjectHighlightEvent OnObjectHighlightStart; + public event OnObjectHighlightEvent OnObjectHighlightEnd; + public event OnRendererHighlightEvent OnRendererHighlightStart; + public event OnTargetAnimatesEvent OnTargetAnimates; + + [Tooltip("See-through mode for this Highlight Effect component.")] + public SeeThroughMode seeThrough = SeeThroughMode.Never; + [Tooltip("This mask setting let you specify which objects will be considered as occluders and cause the see-through effect for this Highlight Effect component. For example, you assign your walls to a different layer and specify that layer here, so only walls and not other objects, like ground or ceiling, will trigger the see-through effect.")] + public LayerMask seeThroughOccluderMask = -1; + [Tooltip("A multiplier for the occluder volume size which can be used to reduce the actual size of occluders when Highlight Effect checks if they're occluding this object.")] + [Range(0.01f, 0.6f)] public float seeThroughOccluderThreshold = 0.3f; + [Tooltip("Uses stencil buffers to ensure pixel-accurate occlusion test. If this option is disabled, only physics raycasting is used to test for occlusion.")] + public bool seeThroughOccluderMaskAccurate; + [Tooltip("The interval of time between occlusion tests.")] + public float seeThroughOccluderCheckInterval = 1f; + [Tooltip("If enabled, occlusion test is performed for each children element. If disabled, the bounds of all children is combined and a single occlusion test is performed for the combined bounds.")] + public bool seeThroughOccluderCheckIndividualObjects; + [Tooltip("Shows the see-through effect only if the occluder if at this 'offset' distance from the object.")] + public float seeThroughDepthOffset; + [Tooltip("Hides the see-through effect if the occluder is further than this distance from the object (0 = infinite)")] + public float seeThroughMaxDepth; + [Range(0, 5f)] public float seeThroughIntensity = 0.8f; + [Range(0, 1)] public float seeThroughTintAlpha = 0.5f; + [ColorUsage(true, true)] public Color seeThroughTintColor = Color.red; + [Range(0, 1)] public float seeThroughNoise = 1f; + [Range(0, 1)] public float seeThroughBorder; + public Color seeThroughBorderColor = Color.black; + [Tooltip("Only display the border instead of the full see-through effect.")] + public bool seeThroughBorderOnly; + public float seeThroughBorderWidth = 0.45f; + [Tooltip("This option clears the stencil buffer after rendering the see-through effect which results in correct rendering order and supports other stencil-based effects that render afterwards.")] + public bool seeThroughOrdered; + [Tooltip("Optional see-through mask effect texture.")] + public Texture2D seeThroughTexture; + public TextureUVSpace seeThroughTextureUVSpace; + public float seeThroughTextureScale = 1f; + + struct ModelMaterials { + public bool render; // if this object can render this frame + public Transform transform; + public bool renderWasVisibleDuringSetup; + public Mesh mesh, originalMesh, bakedSkinnedMesh; + public Renderer renderer; + public bool isSkinnedMesh; + public Material[] fxMatMask, fxMatOutline, fxMatGlow, fxMatSolidColor, fxMatSeeThroughInner, fxMatSeeThroughBorder, fxMatOverlay, fxMatInnerGlow; + public NormalsOption normalsOption; + public Matrix4x4 renderingMatrix; + + public bool isCombined; + public bool preserveOriginalMesh { get { return !isCombined && normalsOption == NormalsOption.PreserveOriginal; } } + + public void Init() { + render = false; + transform = null; + mesh = originalMesh = null; + if (bakedSkinnedMesh != null) DestroyImmediate(bakedSkinnedMesh); + renderer = null; + isSkinnedMesh = false; + normalsOption = NormalsOption.Smooth; + isCombined = false; + } + } + + enum FadingState { + FadingOut = -1, + NoFading = 0, + FadingIn = 1 + } + + [SerializeField, HideInInspector] + ModelMaterials[] rms; + [SerializeField, HideInInspector] + int rmsCount; + + /// + /// Number of objects affected by this highlight effect script + /// + public int includedObjectsCount => rmsCount; + +#if UNITY_EDITOR + /// + /// True if there's some static children + /// + [NonSerialized] + public bool staticChildren; +#endif + + /// + /// Returns true if the renderer for this gameobject is visible by any camera + /// + [NonSerialized] + public bool isVisible; + + [NonSerialized] + public Transform target; + + /// + /// Time in which the highlight started + /// + [NonSerialized] + public float highlightStartTime; + + /// + /// Time in which the target fx started + /// + [NonSerialized] + public float targetFxStartTime; + + /// + /// True if this object is selected (if selectOnClick is used) + /// + [NonSerialized] + public bool isSelected; + + /// + /// If a sprite is used with this script, spriteMode = true. Certain mesh-only options will be disabled. + /// + [NonSerialized] + public bool spriteMode; + + [NonSerialized] + public HighlightProfile previousSettings; + + public void RestorePreviousHighlightEffectSettings() { + previousSettings.Load(this); + } + + const float TAU = 0.70711f; + + // Reference materials. These are instanced per object (rms). + static Material fxMatMask, fxMatSolidColor, fxMatSeeThrough, fxMatSeeThroughBorder, fxMatOverlay, fxMatClearStencil; + static Material fxMatSeeThroughMask; + + // Per-object materials + Material fxMatGlowTemplate, fxMatInnerGlow, fxMatOutlineTemplate, fxMatTarget; + Material fxMatComposeGlow, fxMatComposeOutline, fxMatBlurGlow, fxMatBlurOutline; + + static Vector4[] offsets; + + float fadeStartTime; + FadingState fading = FadingState.NoFading; + CommandBuffer cbHighlight; + bool cbHighlightEmpty; + int[] mipGlowBuffers, mipOutlineBuffers; + static Mesh quadMesh, cubeMesh; + int sourceRT; + Matrix4x4 quadGlowMatrix, quadOutlineMatrix; + Vector4[] corners; + RenderTextureDescriptor sourceDesc; + Color debugColor, blackColor; + Visibility lastOutlineVisibility; + bool requireUpdateMaterial; + + [NonSerialized] + public static List effects = new List(); + + public static bool customSorting; + [NonSerialized] + public float sortingOffset; // used to avoid two objects with same distance to camera during sorting + + bool useSmoothGlow, useSmoothOutline, useSmoothBlend; + bool useGPUInstancing; + bool usesReversedZBuffer; + + class PerCameraOcclusionData { + public float checkLastTime = -10000; + public int occlusionRenderFrame; + public bool lastOcclusionTestResult; + public readonly List cachedOccluders = new List(); + } + readonly Dictionary perCameraOcclusionData = new Dictionary(); + MaterialPropertyBlock glowPropertyBlock, outlinePropertyBlock; + static readonly List matDataDirection = new List(); + static readonly List matDataGlow = new List(); + static readonly List matDataColor = new List(); + static Matrix4x4[] matrices; + + int outlineOffsetsMin, outlineOffsetsMax; + int glowOffsetsMin, glowOffsetsMax; + static CombineInstance[] combineInstances; + bool maskRequired; + FullScreenBlitMethod FullScreenBlit; + + Texture2D outlineGradientTex; + Color[] outlineGradientColors; + + public static bool isVREnabled; + + bool shouldBakeSkinnedMesh; + + void OnEnable() { + lastOutlineVisibility = outlineVisibility; + debugColor = new Color(1f, 0f, 0f, 0.5f); + blackColor = new Color(0, 0, 0, 0); + if (offsets == null || offsets.Length != 8) { + offsets = new Vector4[] { + new Vector4(0,1), + new Vector4(1,0), + new Vector4(0,-1), + new Vector4(-1,0), + new Vector4 (-TAU, TAU), + new Vector4 (TAU, TAU), + new Vector4 (TAU, -TAU), + new Vector4 (-TAU, -TAU) + }; + } + if (corners == null || corners.Length != 8) { + corners = new Vector4[8]; + } + InitCommandBuffer(); + if (quadMesh == null) { + BuildQuad(); + } + if (cubeMesh == null) { + BuildCube(); + } + if (target == null) { + target = transform; + } + if (profileSync && profile != null) { + profile.Load(this); + } + if (glowPasses == null || glowPasses.Length == 0) { + glowPasses = new GlowPassData[4]; + glowPasses[0] = new GlowPassData() { offset = 4, alpha = 0.1f, color = new Color(0.64f, 1f, 0f, 1f) }; + glowPasses[1] = new GlowPassData() { offset = 3, alpha = 0.2f, color = new Color(0.64f, 1f, 0f, 1f) }; + glowPasses[2] = new GlowPassData() { offset = 2, alpha = 0.3f, color = new Color(0.64f, 1f, 0f, 1f) }; + glowPasses[3] = new GlowPassData() { offset = 1, alpha = 0.4f, color = new Color(0.64f, 1f, 0f, 1f) }; + } + sourceRT = Shader.PropertyToID("_HPSourceRT"); + useGPUInstancing = GPUInstancing && SystemInfo.supportsInstancing; + usesReversedZBuffer = SystemInfo.usesReversedZBuffer; + + if (useGPUInstancing) { + if (glowPropertyBlock == null) { + glowPropertyBlock = new MaterialPropertyBlock(); + } + if (outlinePropertyBlock == null) { + outlinePropertyBlock = new MaterialPropertyBlock(); + } + } + + CheckGeometrySupportDependencies(); + UpdateVisibilityState(); + + if (!effects.Contains(this)) { + effects.Add(this); + } + } + + private void Start() { + SetupMaterial(); + } + + + public void OnDidApplyAnimationProperties() { // support for animating property based fields + UpdateMaterialProperties(); + } + + void OnDisable() { + UpdateMaterialProperties(); + if (effects != null) { + int k = effects.IndexOf(this); + if (k >= 0) { + effects.RemoveAt(k); + } + } + } + + + void DestroyMaterial(Material mat) { + if (mat != null) DestroyImmediate(mat); + } + + void DestroyMaterialArray(Material[] mm) { + if (mm == null) return; + for (int k = 0; k < mm.Length; k++) { + DestroyMaterial(mm[k]); + } + } + + void OnDestroy() { + if (rms != null) { + for (int k = 0; k < rms.Length; k++) { + DestroyMaterialArray(rms[k].fxMatMask); + DestroyMaterialArray(rms[k].fxMatOutline); + DestroyMaterialArray(rms[k].fxMatGlow); + DestroyMaterialArray(rms[k].fxMatSolidColor); + DestroyMaterialArray(rms[k].fxMatSeeThroughInner); + DestroyMaterialArray(rms[k].fxMatSeeThroughBorder); + DestroyMaterialArray(rms[k].fxMatOverlay); + DestroyMaterialArray(rms[k].fxMatInnerGlow); + } + } + + DestroyMaterial(fxMatGlowTemplate); + DestroyMaterial(fxMatInnerGlow); + DestroyMaterial(fxMatOutlineTemplate); + DestroyMaterial(fxMatTarget); + DestroyMaterial(fxMatComposeGlow); + DestroyMaterial(fxMatComposeOutline); + DestroyMaterial(fxMatBlurGlow); + DestroyMaterial(fxMatBlurOutline); + + if (combinedMeshes.ContainsKey(combinedMeshesHashId)) { + combinedMeshes.Remove(combinedMeshesHashId); + } + + foreach (Mesh instancedMesh in instancedMeshes) { + if (instancedMesh == null) continue; + int usageCount; + if (sharedMeshUsage.TryGetValue(instancedMesh, out usageCount)) { + if (usageCount <= 1) { + sharedMeshUsage.Remove(instancedMesh); + DestroyImmediate(instancedMesh); + } else { + sharedMeshUsage[instancedMesh] = usageCount - 1; + } + } + } + } + + void Reset() { + SetupMaterial(); + } + + + private void OnBecameVisible() { + isVisible = true; + } + + private void OnBecameInvisible() { + if (rms == null || rms.Length != 1 || rms[0].transform != transform) { + // if effect group doesn't include exactly one object and this object is this same gameobject + // ignore this optimization + isVisible = true; + } else { + isVisible = false; + } + } + + /// + /// Loads a profile into this effect + /// + public void ProfileLoad(HighlightProfile profile) { + if (profile != null) { + this.profile = profile; + profile.Load(this); + } + } + + /// + /// Reloads currently assigned profile + /// + public void ProfileReload() { + if (profile != null) { + profile.Load(this); + } + } + + + /// + /// Save current settings into given profile + /// + public void ProfileSaveChanges(HighlightProfile profile) { + if (profile != null) { + profile.Save(this); + } + } + + /// + /// Save current settings into current profile + /// + public void ProfileSaveChanges() { + if (profile != null) { + profile.Save(this); + } + } + + + public void Refresh(bool discardCachedMeshes = false) { + if (discardCachedMeshes) { + RefreshCachedMeshes(); + } + if (enabled) { + SetupMaterial(); + } + } + + RenderTargetIdentifier colorAttachmentBuffer, depthAttachmentBuffer; + + public CommandBuffer GetCommandBuffer(Camera cam, RenderTargetIdentifier colorAttachmentBuffer, RenderTargetIdentifier depthAttachmentBuffer, FullScreenBlitMethod fullScreenBlit, bool clearStencil) { + this.colorAttachmentBuffer = colorAttachmentBuffer; + this.depthAttachmentBuffer = depthAttachmentBuffer; + this.FullScreenBlit = fullScreenBlit; + BuildCommandBuffer(cam, clearStencil); + return cbHighlightEmpty ? null : cbHighlight; + } + + void BuildCommandBuffer(Camera cam, bool clearStencil) { + + if (colorAttachmentBuffer == 0) { + colorAttachmentBuffer = BuiltinRenderTextureType.CameraTarget; + } + if (depthAttachmentBuffer == 0) { + depthAttachmentBuffer = BuiltinRenderTextureType.CameraTarget; + } + + InitCommandBuffer(); + + if (requireUpdateMaterial) { + requireUpdateMaterial = false; + UpdateMaterialProperties(); + } + + bool independentFullScreenNotExecuted = true; + if (clearStencil) { + ConfigureOutput(); + cbHighlight.DrawMesh(quadMesh, Matrix4x4.identity, fxMatClearStencil, 0, 0); + independentFullScreenNotExecuted = false; + } + + bool seeThroughReal = seeThroughIntensity > 0 && (seeThrough == SeeThroughMode.AlwaysWhenOccluded || (seeThrough == SeeThroughMode.WhenHighlighted && _highlighted)); + if (seeThroughReal) { + ConfigureOutput(); + seeThroughReal = RenderSeeThroughOccluders(cbHighlight, cam); + if (seeThroughReal && seeThroughOccluderMask != -1) { + if (seeThroughOccluderMaskAccurate) { + CheckOcclusionAccurate(cbHighlight, cam); + } else { + seeThroughReal = CheckOcclusion(cam); + } + } + } + + bool showOverlay = hitActive || overlayMode == OverlayMode.Always; + if (!_highlighted && !seeThroughReal && !showOverlay) { + return; + } + + ConfigureOutput(); + + if (rms == null) { + SetupMaterial(); + if (rms == null) return; + } + + // Check camera culling mask + int cullingMask = cam.cullingMask; + + // Ensure renderers are valid and visible (in case LODgroup has changed active renderer) + if (!ignoreObjectVisibility) { + for (int k = 0; k < rmsCount; k++) { + if (rms[k].renderer != null && rms[k].renderer.isVisible != rms[k].renderWasVisibleDuringSetup) { + SetupMaterial(); + break; + } + } + } + + // Apply effect + float glowReal = _highlighted ? this.glow : 0; + if (fxMatMask == null) + return; + + // Check smooth blend ztesting capability + Visibility smoothGlowVisibility = glowVisibility; + Visibility smoothOutlineVisibility = outlineVisibility; + + // First create masks + float aspect = cam.aspect; + bool somePartVisible = false; + + for (int k = 0; k < rmsCount; k++) { + rms[k].render = false; + + Transform t = rms[k].transform; + if (t == null) + continue; + + if (rms[k].isSkinnedMesh && shouldBakeSkinnedMesh) { + SkinnedMeshRenderer smr = (SkinnedMeshRenderer)rms[k].renderer; + if (rms[k].bakedSkinnedMesh == null) { + rms[k].bakedSkinnedMesh = new Mesh(); + } + smr.BakeMesh(rms[k].bakedSkinnedMesh, true); + rms[k].mesh = rms[k].bakedSkinnedMesh; + rms[k].normalsOption = NormalsOption.Smooth; + } + + Mesh mesh = rms[k].mesh; + if (mesh == null) + continue; + + if (!ignoreObjectVisibility) { + int layer = t.gameObject.layer; + if (((1 << layer) & cullingMask) == 0) + continue; + if (!rms[k].renderer.isVisible) + continue; + } + + rms[k].render = true; + somePartVisible = true; + + if (rms[k].isCombined) { + rms[k].renderingMatrix = t.localToWorldMatrix; + } + + if (outlineIndependent) { + if (useSmoothBlend) { + if (independentFullScreenNotExecuted) { + independentFullScreenNotExecuted = false; + cbHighlight.DrawMesh(quadMesh, Matrix4x4.identity, fxMatClearStencil, 0, 0); + } + } else if (outline > 0 || glow > 0) { + float width = outlineWidth; + if (glow > 0) { + width = Mathf.Max(width, glowWidth); + } + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + if (outlineQuality.UsesMultipleOffsets()) { + for (int o = outlineOffsetsMin; o <= outlineOffsetsMax; o++) { + Vector4 direction = offsets[o] * (width / 100f); + direction.y *= aspect; + cbHighlight.SetGlobalVector(ShaderParams.OutlineDirection, direction); + if (rms[k].isCombined) { + cbHighlight.DrawMesh(rms[k].mesh, rms[k].renderingMatrix, rms[k].fxMatOutline[l], l, 1); + } else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatOutline[l], l, 1); + } + } + } else { + cbHighlight.SetGlobalVector(ShaderParams.OutlineDirection, Vector4.zero); + if (rms[k].isCombined) { + cbHighlight.DrawMesh(rms[k].mesh, rms[k].renderingMatrix, rms[k].fxMatOutline[l], l, 1); + } else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatOutline[l], l, 1); + } + } + } + } + } + + } + + bool renderMaskOnTop = _highlighted && ((outline > 0 && smoothOutlineVisibility != Visibility.Normal) || (glow > 0 && smoothGlowVisibility != Visibility.Normal) || (innerGlow > 0 && innerGlowVisibility != Visibility.Normal)); + renderMaskOnTop = renderMaskOnTop | (useSmoothBlend && outlineContourStyle == ContourStyle.AroundObjectShape); + if (maskRequired) { + for (int k = 0; k < rmsCount; k++) { + if (rms[k].render) { + RenderMask(k, rms[k].mesh, renderMaskOnTop); + } + } + } + + // Compute tweening + float fadeGroup = 1f; + float fade = 1f; + if (fading != FadingState.NoFading) { + if (fading == FadingState.FadingIn) { + if (fadeInDuration > 0) { + fadeGroup = (Time.time - fadeStartTime) / fadeInDuration; + if (fadeGroup > 1f) { + fadeGroup = 1f; + fading = FadingState.NoFading; + } + } + } else if (fadeOutDuration > 0) { + fadeGroup = 1f - (Time.time - fadeStartTime) / fadeOutDuration; + if (fadeGroup < 0f) { + fadeGroup = 0f; + fading = FadingState.NoFading; + _highlighted = false; + if (OnObjectHighlightEnd != null) { + OnObjectHighlightEnd(gameObject); + } + SendMessage("HighlightEnd", null, SendMessageOptions.DontRequireReceiver); + } + } + } + + if (glowQuality == QualityLevel.High) { + glowReal *= 0.25f; + } else if (glowQuality == QualityLevel.Medium) { + glowReal *= 0.5f; + } + + bool targetEffectRendered = false; + bool usesSeeThroughBorder = (seeThroughBorder * seeThroughBorderWidth) > 0; + + // Add mesh effects + for (int k = 0; k < rmsCount; k++) { + if (!rms[k].render) + continue; + Mesh mesh = rms[k].mesh; + + fade = fadeGroup; + // Distance fade + if (cameraDistanceFade) { + fade *= ComputeCameraDistanceFade(rms[k].transform.position, cam.transform); + cbHighlight.SetGlobalFloat(ShaderParams.FadeFactor, fade); + } else { + cbHighlight.SetGlobalFloat(ShaderParams.FadeFactor, 1f); + } + + + if (_highlighted || showOverlay) { + // Hit FX + Color overlayColor = this.overlayColor; + float overlayMinIntensity = this.overlayMinIntensity; + float overlayBlending = this.overlayBlending; + + Color innerGlowColorA = this.innerGlowColor; + float innerGlow = this.innerGlow; + + if (hitActive) { + overlayColor.a = _highlighted ? overlay : 0; + innerGlowColorA.a = _highlighted ? innerGlow : 0; + float t = hitFadeOutDuration > 0 ? (Time.time - hitStartTime) / hitFadeOutDuration : 1f; + if (t >= 1f) { + hitActive = false; + } else { + if (hitFxMode == HitFxMode.InnerGlow) { + bool lerpToCurrentInnerGlow = _highlighted && innerGlow > 0; + innerGlowColorA = lerpToCurrentInnerGlow ? Color.Lerp(hitColor, innerGlowColor, t) : hitColor; + innerGlowColorA.a = lerpToCurrentInnerGlow ? Mathf.Lerp(1f - t, innerGlow, t) : 1f - t; + innerGlowColorA.a *= hitInitialIntensity; + } else { + bool lerpToCurrentOverlay = _highlighted && overlay > 0; + overlayColor = lerpToCurrentOverlay ? Color.Lerp(hitColor, overlayColor, t) : hitColor; + overlayColor.a = lerpToCurrentOverlay ? Mathf.Lerp(1f - t, overlay, t) : 1f - t; + overlayColor.a *= hitInitialIntensity; + overlayMinIntensity = 1f; + overlayBlending = 0; + } + } + } else { + overlayColor.a = overlay * fade; + innerGlowColorA.a = innerGlow * fade; + } + + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + + // Overlay + if (overlayColor.a > 0) { + Material fxMat = rms[k].fxMatOverlay[l]; + fxMat.SetColor(ShaderParams.OverlayColor, overlayColor); + fxMat.SetVector(ShaderParams.OverlayData, new Vector4(overlayAnimationSpeed, overlayMinIntensity, overlayBlending, overlayTextureScale)); + if (hitActive && hitFxMode == HitFxMode.LocalHit) { + fxMat.SetVector(ShaderParams.OverlayHitPosData, new Vector4(hitPosition.x, hitPosition.y, hitPosition.z, hitRadius)); + fxMat.SetFloat(ShaderParams.OverlayHitStartTime, hitStartTime); + } else { + fxMat.SetVector(ShaderParams.OverlayHitPosData, Vector4.zero); + } + if (rms[k].isCombined) { + cbHighlight.DrawMesh(rms[k].mesh, rms[k].renderingMatrix, rms[k].fxMatOverlay[l], l); + } else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatOverlay[l], l); + } + } + + + // Inner Glow + if (innerGlowColorA.a > 0) { + rms[k].fxMatInnerGlow[l].SetColor(ShaderParams.InnerGlowColor, innerGlowColorA); + if (rms[k].isCombined) { + cbHighlight.DrawMesh(rms[k].mesh, rms[k].renderingMatrix, rms[k].fxMatInnerGlow[l], l); + } else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatInnerGlow[l], l); + } + } + } + } + + if (!_highlighted) + continue; + + bool allowGPUInstancing = useGPUInstancing && !rms[k].isSkinnedMesh; + + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + + // Glow + if (glow > 0 && glowQuality != QualityLevel.Highest) { + matDataGlow.Clear(); + matDataColor.Clear(); + matDataDirection.Clear(); + for (int glowPass = 0; glowPass < glowPasses.Length; glowPass++) { + if (glowQuality.UsesMultipleOffsets()) { + for (int o = glowOffsetsMin; o <= glowOffsetsMax; o++) { + Vector4 direction = offsets[o]; + direction.y *= aspect; + Color dataColor = glowPasses[glowPass].color; + Vector4 dataGlow = new Vector4(fade * glowReal * glowPasses[glowPass].alpha, glowPasses[glowPass].offset * glowWidth / 100f, glowMagicNumber1, glowMagicNumber2); + if (allowGPUInstancing) { + matDataDirection.Add(direction); + matDataGlow.Add(dataGlow); + matDataColor.Add(new Vector4(dataColor.r, dataColor.g, dataColor.b, dataColor.a)); + } else { + cbHighlight.SetGlobalVector(ShaderParams.GlowDirection, direction); + cbHighlight.SetGlobalColor(ShaderParams.GlowColor, dataColor); + cbHighlight.SetGlobalVector(ShaderParams.Glow, dataGlow); + if (rms[k].isCombined) { + cbHighlight.DrawMesh(rms[k].mesh, rms[k].renderingMatrix, rms[k].fxMatGlow[l], l); + } else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatGlow[l], l); + } + } + } + } else { + Vector4 dataGlow = new Vector4(fade * glowReal * glowPasses[glowPass].alpha, glowPasses[glowPass].offset * glowWidth / 100f, glowMagicNumber1, glowMagicNumber2); + Color dataColor = glowPasses[glowPass].color; + if (allowGPUInstancing) { + matDataDirection.Add(Vector4.zero); + matDataGlow.Add(dataGlow); + matDataColor.Add(new Vector4(dataColor.r, dataColor.g, dataColor.b, dataColor.a)); + } else { + int matIndex = glowPass * 8; + cbHighlight.SetGlobalColor(ShaderParams.GlowColor, dataColor); + cbHighlight.SetGlobalVector(ShaderParams.Glow, dataGlow); + cbHighlight.SetGlobalVector(ShaderParams.GlowDirection, Vector4.zero); + if (rms[k].isCombined) { + cbHighlight.DrawMesh(rms[k].mesh, rms[k].renderingMatrix, rms[k].fxMatGlow[l], l); + } else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatGlow[l], l); + } + } + } + } + if (allowGPUInstancing) { + int instanceCount = matDataDirection.Count; + if (instanceCount > 0) { + glowPropertyBlock.Clear(); + glowPropertyBlock.SetVectorArray(ShaderParams.GlowDirection, matDataDirection); + glowPropertyBlock.SetVectorArray(ShaderParams.GlowColor, matDataColor); + glowPropertyBlock.SetVectorArray(ShaderParams.Glow, matDataGlow); + if (matrices == null || matrices.Length < instanceCount) { + matrices = new Matrix4x4[instanceCount]; + } + if (rms[k].isCombined) { + for (int m = 0; m < instanceCount; m++) { + matrices[m] = rms[k].renderingMatrix; + } + } else { + Matrix4x4 objectToWorld = rms[k].transform.localToWorldMatrix; + for (int m = 0; m < instanceCount; m++) { + matrices[m] = objectToWorld; + } + } + cbHighlight.DrawMeshInstanced(mesh, l, rms[k].fxMatGlow[l], 0, matrices, instanceCount, glowPropertyBlock); + } + } + } + + // Outline + if (outline > 0 && outlineQuality != QualityLevel.Highest) { + Color outlineColor = this.outlineColor; + if (outlineColorStyle == ColorStyle.Gradient) { + outlineColor.a *= outline * fade; + Bounds bounds = outlineGradientInLocalSpace ? mesh.bounds : rms[k].renderer.bounds; + cbHighlight.SetGlobalVector(ShaderParams.OutlineVertexData, new Vector4(bounds.min.y, bounds.size.y + 0.0001f, 0, 0)); + } else { + outlineColor.a = outline * fade; + cbHighlight.SetGlobalVector(ShaderParams.OutlineVertexData, new Vector4(-1e6f, 1f, 0, 0)); + } + cbHighlight.SetGlobalColor(ShaderParams.OutlineColor, outlineColor); + if (outlineQuality.UsesMultipleOffsets()) { + matDataDirection.Clear(); + for (int o = outlineOffsetsMin; o <= outlineOffsetsMax; o++) { + Vector4 direction = offsets[o] * (outlineWidth / 100f); + direction.y *= aspect; + if (allowGPUInstancing) { + matDataDirection.Add(direction); + } else { + cbHighlight.SetGlobalVector(ShaderParams.OutlineDirection, direction); + if (rms[k].isCombined) { + cbHighlight.DrawMesh(rms[k].mesh, rms[k].renderingMatrix, rms[k].fxMatOutline[l], l, 0); + } else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatOutline[l], l, 0); + } + } + } + if (allowGPUInstancing) { + int instanceCount = matDataDirection.Count; + if (instanceCount > 0) { + outlinePropertyBlock.Clear(); + outlinePropertyBlock.SetVectorArray(ShaderParams.OutlineDirection, matDataDirection); + if (matrices == null || matrices.Length < instanceCount) { + matrices = new Matrix4x4[instanceCount]; + } + if (rms[k].isCombined) { + for (int m = 0; m < instanceCount; m++) { + matrices[m] = rms[k].renderingMatrix; + } + } else { + Matrix4x4 objectToWorld = rms[k].transform.localToWorldMatrix; + for (int m = 0; m < instanceCount; m++) { + matrices[m] = objectToWorld; + } + } + cbHighlight.DrawMeshInstanced(mesh, l, rms[k].fxMatOutline[l], 0, matrices, instanceCount, outlinePropertyBlock); + } + } + } else { + cbHighlight.SetGlobalColor(ShaderParams.OutlineColor, outlineColor); + cbHighlight.SetGlobalVector(ShaderParams.OutlineDirection, Vector4.zero); + if (rms[k].isSkinnedMesh) { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatOutline[l], l, 0); + } else { + // keep this because normals may be reoriented / smoothed + cbHighlight.DrawMesh(mesh, rms[k].transform.localToWorldMatrix, rms[k].fxMatOutline[l], l, 0); + } + } + } + + } + + // Target + if (targetFX) { + float fadeOut = 1f; + if (targetFXStayDuration > 0 && Application.isPlaying) { + fadeOut = (Time.time - targetFxStartTime); + if (fadeOut >= targetFXStayDuration) { + fadeOut -= targetFXStayDuration; + fadeOut = 1f - fadeOut; + } + if (fadeOut > 1f) { + fadeOut = 1f; + } + } + bool usesTarget = targetFXCenter != null; + if (fadeOut > 0 && !(targetEffectRendered && usesTarget)) { + targetEffectRendered = true; + float scaleT = 1f; + float time; + float normalizedTime = 0; + if (Application.isPlaying) { + normalizedTime = (Time.time - targetFxStartTime) / targetFXTransitionDuration; + if (normalizedTime > 1f) { + normalizedTime = 1f; + } + scaleT = Mathf.Sin(normalizedTime * Mathf.PI * 0.5f); + time = Time.time; + } else { + time = (float)DateTime.Now.Subtract(DateTime.Today).TotalSeconds; + } + Bounds bounds = rms[k].renderer.bounds; + if (!targetFXScaleToRenderBounds) { + bounds.size = Vector3.one; + } + Vector3 scale = bounds.size; + float minSize = scale.x; + if (scale.y < minSize) { + minSize = scale.y; + } + if (scale.z < minSize) { + minSize = scale.z; + } + scale.x = scale.y = scale.z = minSize; + scale = Vector3.Lerp(scale * targetFXInitialScale, scale * targetFXEndScale, scaleT); + Vector3 center = usesTarget ? targetFXCenter.transform.position : bounds.center; + Quaternion rotation; + if (targetFXAlignToGround) { + rotation = Quaternion.Euler(90, 0, 0); + center.y += 0.5f; // a bit of offset in case it's in contact with ground + if (Physics.Raycast(center, Vector3.down, out RaycastHit groundHitInfo, targetFXGroundMaxDistance, targetFXGroundLayerMask)) { + center = groundHitInfo.point; + center.y += 0.01f; + Vector4 renderData = groundHitInfo.normal; + renderData.w = targetFXFadePower; + fxMatTarget.SetVector(ShaderParams.TargetFXRenderData, renderData); + rotation = Quaternion.Euler(0, time * targetFXRotationSpeed, 0); + if (OnTargetAnimates != null) { + OnTargetAnimates(ref center, ref rotation, ref scale, normalizedTime); + } + Matrix4x4 m = Matrix4x4.TRS(center, rotation, scale); + Color color = targetFXColor; + color.a *= fade * fadeOut; + fxMatTarget.color = color; + cbHighlight.DrawMesh(cubeMesh, m, fxMatTarget, 0, 0); + } + } else { + rotation = Quaternion.LookRotation(cam.transform.position - rms[k].transform.position); + Quaternion animationRot = Quaternion.Euler(0, 0, time * targetFXRotationSpeed); + rotation *= animationRot; + if (OnTargetAnimates != null) { + OnTargetAnimates(ref center, ref rotation, ref scale, normalizedTime); + } + Matrix4x4 m = Matrix4x4.TRS(center, rotation, scale); + Color color = targetFXColor; + color.a *= fade * fadeOut; + fxMatTarget.color = color; + cbHighlight.DrawMesh(quadMesh, m, fxMatTarget, 0, 1); + } + } + } + } + + if (useSmoothBlend && _highlighted && somePartVisible) { + + int smoothRTWidth = 0; + int smoothRTHeight = 0; + Bounds smoothBounds = new Bounds(); + + // Prepare smooth outer glow / outline target + smoothRTWidth = cam.pixelWidth; + smoothRTHeight = cam.pixelHeight; + if (smoothRTHeight <= 0) { + smoothRTHeight = 1; + } + if (UnityEngine.XR.XRSettings.enabled && Application.isPlaying) { + sourceDesc = UnityEngine.XR.XRSettings.eyeTextureDesc; + } else { + sourceDesc = new RenderTextureDescriptor(smoothRTWidth, smoothRTHeight); // Application.isMobilePlatform ? RenderTextureFormat.Default : RenderTextureFormat.DefaultHDR); + sourceDesc.volumeDepth = 1; + } + sourceDesc.colorFormat = useSmoothOutline && outlineEdgeMode == OutlineEdgeMode.Any ? RenderTextureFormat.ARGB32 : RenderTextureFormat.R8; + sourceDesc.msaaSamples = 1; + sourceDesc.useMipMap = false; + sourceDesc.depthBufferBits = 0; + + cbHighlight.GetTemporaryRT(sourceRT, sourceDesc, FilterMode.Bilinear); + RenderTargetIdentifier sourceTarget = new RenderTargetIdentifier(sourceRT, 0, CubemapFace.Unknown, -1); + cbHighlight.SetRenderTarget(sourceTarget); + cbHighlight.ClearRenderTarget(false, true, new Color(0, 0, 0, 0)); + + for (int k = 0; k < rmsCount; k++) { + if (!rms[k].render) + continue; + if (k == 0) { + smoothBounds = rms[k].renderer.bounds; + } else { + smoothBounds.Encapsulate(rms[k].renderer.bounds); + } + Mesh mesh = rms[k].mesh; + + // Render object body for glow/outline highest quality + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + if (l < rms[k].fxMatSolidColor.Length) { + if (rms[k].isCombined) { + cbHighlight.DrawMesh(rms[k].mesh, rms[k].renderingMatrix, rms[k].fxMatSolidColor[l], l); + } else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatSolidColor[l], l); + } + } + } + } + + if (ComputeSmoothQuadMatrix(cam, smoothBounds)) { + // Smooth Glow + if (useSmoothGlow) { + float intensity = glow * fade; + fxMatComposeGlow.color = new Color(glowHQColor.r * intensity, glowHQColor.g * intensity, glowHQColor.b * intensity, glowHQColor.a * intensity); + SmoothGlow(smoothRTWidth / glowDownsampling, smoothRTHeight / glowDownsampling); + } + + // Smooth Outline + if (useSmoothOutline) { + float intensity = outline * fade; + fxMatComposeOutline.color = new Color(outlineColor.r, outlineColor.g, outlineColor.b, outlineColor.a * intensity * 10f); + SmoothOutline(smoothRTWidth / outlineDownsampling, smoothRTHeight / outlineDownsampling); + } + + // Bit result + ComposeSmoothBlend(smoothGlowVisibility, smoothOutlineVisibility); + } + } + + // See-Through + if (seeThroughReal) { + if (renderMaskOnTop) { + for (int k = 0; k < rmsCount; k++) { + if (!rms[k].render) + continue; + Mesh mesh = rms[k].mesh; + RenderSeeThroughClearStencil(k, mesh); + } + for (int k = 0; k < rmsCount; k++) { + if (!rms[k].render) + continue; + Mesh mesh = rms[k].mesh; + RenderSeeThroughMask(k, mesh); + } + } + for (int k = 0; k < rmsCount; k++) { + if (!rms[k].render) + continue; + Mesh mesh = rms[k].mesh; + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + if (l < rms[k].fxMatSeeThroughInner.Length && rms[k].fxMatSeeThroughInner[l] != null) { + if (rms[k].isCombined) { + cbHighlight.DrawMesh(mesh, rms[k].renderingMatrix, rms[k].fxMatSeeThroughInner[l], l); + } else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatSeeThroughInner[l], l); + } + } + if (usesSeeThroughBorder) { + if (rms[k].isCombined) { + cbHighlight.DrawMesh(mesh, rms[k].renderingMatrix, rms[k].fxMatSeeThroughBorder[l], l); + } else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatSeeThroughBorder[l], l); + } + } + } + } + + if (seeThroughOrdered) { // Ordered for see-through + for (int k = 0; k < rmsCount; k++) { + if (!rms[k].render) + continue; + Mesh mesh = rms[k].mesh; + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + if (rms[k].isCombined) { + cbHighlight.DrawMesh(mesh, rms[k].renderingMatrix, fxMatClearStencil, l, 1); + } else { + cbHighlight.DrawRenderer(rms[k].renderer, fxMatClearStencil, l, 1); + } + } + } + } + } + + + } + + void RenderMask(int k, Mesh mesh, bool renderMaskOnTop) { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + if (renderMaskOnTop) { + rms[k].fxMatMask[l].SetInt(ShaderParams.ZTest, (int)CompareFunction.Always); + } else { + rms[k].fxMatMask[l].SetInt(ShaderParams.ZTest, (int)CompareFunction.LessEqual); + } + if (rms[k].isCombined) { + cbHighlight.DrawMesh(rms[k].mesh, rms[k].renderingMatrix, rms[k].fxMatMask[l], l, 0); + } else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatMask[l], l, 0); + } + } + } + + void RenderSeeThroughClearStencil(int k, Mesh mesh) { + if (rms[k].isCombined) { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + cbHighlight.DrawMesh(mesh, rms[k].renderingMatrix, fxMatClearStencil, l, 1); + } + } else { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + cbHighlight.DrawRenderer(rms[k].renderer, fxMatClearStencil, l, 1); + } + } + } + + void RenderSeeThroughMask(int k, Mesh mesh) { + if (rms[k].isCombined) { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + cbHighlight.DrawMesh(mesh, rms[k].renderingMatrix, rms[k].fxMatMask[l], l, 1); + } + } else { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatMask[l], l, 1); + } + } + } + + + void WorldToViewportPoint(ref Matrix4x4 m, ref Vector4 p, bool perspectiveProjection, float zBufferParamsZ, float zBufferParamsW) { + p = m * p; + p.x = (p.x / p.w + 1f) * 0.5f; + p.y = (p.y / p.w + 1f) * 0.5f; + + if (perspectiveProjection) { + p.z /= p.w; + p.z = 1.0f / (zBufferParamsZ * p.z + zBufferParamsW); + } else { + if (usesReversedZBuffer) { + p.z = 1f - p.z; + } + p.z = (zBufferParamsW - zBufferParamsZ) * p.z + zBufferParamsZ; + } + } + + + bool ComputeSmoothQuadMatrix(Camera cam, Bounds bounds) { + // Compute bounds in screen space and enlarge for glow space + + Vector3 shift = cam.transform.position; + cam.transform.position = Vector3.zero; + bounds.center -= shift; + bool res = ComputeSmoothQuadMatrixOriginShifted(cam, ref bounds, ref shift); + cam.transform.position = shift; + return res; + } + + bool ComputeSmoothQuadMatrixOriginShifted(Camera cam, ref Bounds bounds, ref Vector3 shift) { + // Compute bounds in screen space and enlarge for glow space + + Matrix4x4 mat = GL.GetGPUProjectionMatrix(cam.projectionMatrix, false) * cam.worldToCameraMatrix; + Vector3 min = bounds.min; + Vector3 max = bounds.max; + corners[0] = new Vector4(min.x, min.y, min.z, 1f); + corners[1] = new Vector4(min.x, min.y, max.z, 1f); + corners[2] = new Vector4(max.x, min.y, min.z, 1f); + corners[3] = new Vector4(max.x, min.y, max.z, 1f); + corners[4] = new Vector4(min.x, max.y, min.z, 1f); + corners[5] = new Vector4(min.x, max.y, max.z, 1f); + corners[6] = new Vector4(max.x, max.y, min.z, 1f); + corners[7] = new Vector4(max.x, max.y, max.z, 1f); + Vector3 scrMin = new Vector3(float.MaxValue, float.MaxValue, 0); + Vector3 scrMax = new Vector3(float.MinValue, float.MinValue, 0); + float distanceMin = float.MaxValue; + float distanceMax = float.MinValue; + float nearClipPlane = cam.nearClipPlane; + float farClipPlane = cam.farClipPlane; + + float x, y, z, w; + bool isPerspectiveCamera = !cam.orthographic; + if (isPerspectiveCamera) { + if (usesReversedZBuffer) { + x = -1f + farClipPlane / nearClipPlane; + y = 1f; + z = x / farClipPlane; + w = 1f / farClipPlane; + } else { + x = 1f - farClipPlane / nearClipPlane; + y = farClipPlane / nearClipPlane; + z = x / farClipPlane; + w = y / farClipPlane; + } + } else { + z = nearClipPlane; + w = farClipPlane; + } + + for (int k = 0; k < 8; k++) { + WorldToViewportPoint(ref mat, ref corners[k], isPerspectiveCamera, z, w); + if (corners[k].x < scrMin.x) { + scrMin.x = corners[k].x; + } + if (corners[k].y < scrMin.y) { + scrMin.y = corners[k].y; + } + if (corners[k].x > scrMax.x) { + scrMax.x = corners[k].x; + } + if (corners[k].y > scrMax.y) { + scrMax.y = corners[k].y; + } + if (corners[k].z < distanceMin) { + distanceMin = corners[k].z; + if (distanceMin < nearClipPlane) { + distanceMin = distanceMax = 0.01f; + scrMin.x = scrMin.y = 0; + scrMax.x = 1f; + scrMax.y = 1f; + break; + } + } + if (corners[k].z > distanceMax) { + distanceMax = corners[k].z; + } + } + if (scrMax.y == scrMin.y) + return false; + + int pixelWidth = cam.pixelWidth; + int pixelHeight = cam.pixelHeight; + scrMin.x *= pixelWidth; + scrMax.x *= pixelWidth; + scrMin.y *= pixelHeight; + scrMax.y *= pixelHeight; + + if (spriteMode) { + scrMin.z = scrMax.z = (distanceMin + distanceMax) * 0.5f + nearClipPlane; + } else { + scrMin.z = scrMax.z = isVREnabled ? distanceMin : 0.05f + nearClipPlane; // small shift to avoid origin far issues + } + + if (outline > 0) { + BuildMatrix(cam, scrMin, scrMax, (int)(10 + 20 * outlineWidth + 5 * outlineDownsampling), ref quadOutlineMatrix, ref shift); + } + if (glow > 0) { + BuildMatrix(cam, scrMin, scrMax, (int)(20 + 30 * glowWidth + 10 * glowDownsampling), ref quadGlowMatrix, ref shift); + } + return true; + } + + void BuildMatrix(Camera cam, Vector3 scrMin, Vector3 scrMax, int border, ref Matrix4x4 quadMatrix, ref Vector3 shift) { + + // Insert padding to make room for effects + scrMin.x -= border; + scrMin.y -= border; + scrMax.x += border; + scrMax.y += border; + + // Back to world space + Vector3 third = new Vector3(scrMax.x, scrMin.y, scrMin.z); + scrMin = cam.ScreenToWorldPoint(scrMin); + scrMax = cam.ScreenToWorldPoint(scrMax); + third = cam.ScreenToWorldPoint(third); + + float width = Vector3.Distance(scrMin, third); + float height = Vector3.Distance(scrMax, third); + + quadMatrix = Matrix4x4.TRS((scrMin + scrMax) * 0.5f + shift, cam.transform.rotation, new Vector3(width, height, 1f)); + } + + void SmoothGlow(int rtWidth, int rtHeight) { + + Material matBlur = fxMatBlurGlow; + RenderTextureDescriptor glowDesc = sourceDesc; + glowDesc.depthBufferBits = 0; + + if (glowBlurMethod == BlurMethod.Gaussian) { + + const int blurPasses = 4; + + // Blur buffers + int bufferCount = blurPasses * 2; + if (mipGlowBuffers == null || mipGlowBuffers.Length != bufferCount) { + mipGlowBuffers = new int[bufferCount]; + for (int k = 0; k < bufferCount; k++) { + mipGlowBuffers[k] = Shader.PropertyToID("_HPSmoothGlowTemp" + k); + } + mipGlowBuffers[bufferCount - 2] = ShaderParams.GlowRT; + } + + for (int k = 0; k < bufferCount; k++) { + float reduction = k / 2 + 2; + int reducedWidth = (int)(rtWidth / reduction); + int reducedHeight = (int)(rtHeight / reduction); + if (reducedWidth <= 0) { + reducedWidth = 1; + } + if (reducedHeight <= 0) { + reducedHeight = 1; + } + glowDesc.width = reducedWidth; + glowDesc.height = reducedHeight; + cbHighlight.GetTemporaryRT(mipGlowBuffers[k], glowDesc, FilterMode.Bilinear); + } + + for (int k = 0; k < bufferCount - 1; k += 2) { + if (k == 0) { + FullScreenBlit(cbHighlight, sourceRT, mipGlowBuffers[k + 1], fxMatBlurGlow, 0); + } else { + FullScreenBlit(cbHighlight, mipGlowBuffers[k], mipGlowBuffers[k + 1], fxMatBlurGlow, 0); + } + FullScreenBlit(cbHighlight, mipGlowBuffers[k + 1], mipGlowBuffers[k], fxMatBlurGlow, 1); + + if (k < bufferCount - 2) { + FullScreenBlit(cbHighlight, mipGlowBuffers[k], mipGlowBuffers[k + 2], fxMatBlurGlow, 2); + } + } + } else { + const int blurPasses = 5; + + int bufferCount = blurPasses; + if (mipGlowBuffers == null || mipGlowBuffers.Length != bufferCount) { + mipGlowBuffers = new int[bufferCount]; + for (int k = 0; k < bufferCount; k++) { + mipGlowBuffers[k] = Shader.PropertyToID("_HPSmoothGlowTemp" + k); + } + mipGlowBuffers[bufferCount - 2] = ShaderParams.GlowRT; + } + + for (int k = 0; k < bufferCount; k++) { + float reduction = k + 2; + int reducedWidth = (int)(rtWidth / reduction); + int reducedHeight = (int)(rtHeight / reduction); + if (reducedWidth <= 0) { + reducedWidth = 1; + } + if (reducedHeight <= 0) { + reducedHeight = 1; + } + glowDesc.width = reducedWidth; + glowDesc.height = reducedHeight; + cbHighlight.GetTemporaryRT(mipGlowBuffers[k], glowDesc, FilterMode.Bilinear); + } + FullScreenBlit(cbHighlight, sourceRT, mipGlowBuffers[0], matBlur, 3); + for (int k = 0; k < bufferCount - 2; k++) { + cbHighlight.SetGlobalFloat(ShaderParams.ResampleScale, k + 0.5f); + FullScreenBlit(cbHighlight, mipGlowBuffers[k], mipGlowBuffers[k + 1], matBlur, 3); + } + } + } + + void SmoothOutline(int rtWidth, int rtHeight) { + + // Blur buffers + int bufferCount = outlineBlurPasses * 2; + if (mipOutlineBuffers == null || mipOutlineBuffers.Length != bufferCount) { + mipOutlineBuffers = new int[bufferCount]; + for (int k = 0; k < bufferCount; k++) { + mipOutlineBuffers[k] = Shader.PropertyToID("_HPSmoothOutlineTemp" + k); + } + mipOutlineBuffers[bufferCount - 2] = ShaderParams.OutlineRT; + } + RenderTextureDescriptor outlineDesc = sourceDesc; + outlineDesc.depthBufferBits = 0; + + for (int k = 0; k < bufferCount; k++) { + float reduction = k / 2 + 2; + int reducedWidth = (int)(rtWidth / reduction); + int reducedHeight = (int)(rtHeight / reduction); + if (reducedWidth <= 0) { + reducedWidth = 1; + } + if (reducedHeight <= 0) { + reducedHeight = 1; + } + outlineDesc.width = reducedWidth; + outlineDesc.height = reducedHeight; + cbHighlight.GetTemporaryRT(mipOutlineBuffers[k], outlineDesc, FilterMode.Bilinear); + } + + for (int k = 0; k < bufferCount - 1; k += 2) { + if (k == 0) { + FullScreenBlit(cbHighlight, sourceRT, mipOutlineBuffers[k + 1], fxMatBlurOutline, 3); + } else { + FullScreenBlit(cbHighlight, mipOutlineBuffers[k], mipOutlineBuffers[k + 1], fxMatBlurOutline, 0); + } + FullScreenBlit(cbHighlight, mipOutlineBuffers[k + 1], mipOutlineBuffers[k], fxMatBlurOutline, 1); + + if (k < bufferCount - 2) { + FullScreenBlit(cbHighlight, mipOutlineBuffers[k], mipOutlineBuffers[k + 2], fxMatBlurOutline, 2); + } + } + } + + + void ComposeSmoothBlend(Visibility smoothGlowVisibility, Visibility smoothOutlineVisibility) { + + // Render mask on target surface + //if (Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.OSXPlayer || Application.platform == RuntimePlatform.IPhonePlayer) { // TODO: RML + cbHighlight.SetRenderTarget(colorAttachmentBuffer, depthAttachmentBuffer); + //} else { + // cbHighlight.SetRenderTarget(colorAttachmentBuffer); + //} + + bool renderSmoothGlow = glow > 0 && glowWidth > 0 && glowQuality == QualityLevel.Highest; + if (renderSmoothGlow) { + fxMatComposeGlow.SetVector(ShaderParams.Flip, (UnityEngine.XR.XRSettings.enabled && flipY) ? new Vector4(1, -1) : new Vector4(0, 1)); + fxMatComposeGlow.SetInt(ShaderParams.ZTest, GetZTestValue(smoothGlowVisibility)); + fxMatComposeGlow.SetColor(ShaderParams.Debug, glowBlitDebug ? debugColor : blackColor); + fxMatComposeGlow.SetInt(ShaderParams.GlowStencilComp, glowIgnoreMask ? (int)CompareFunction.Always : (int)CompareFunction.NotEqual); + cbHighlight.DrawMesh(quadMesh, quadGlowMatrix, fxMatComposeGlow, 0, 0); + } + bool renderSmoothOutline = outline > 0 && outlineWidth > 0 && outlineQuality == QualityLevel.Highest; + if (renderSmoothOutline) { + fxMatComposeOutline.SetVector(ShaderParams.Flip, (UnityEngine.XR.XRSettings.enabled && flipY) ? new Vector4(1, -1) : new Vector4(0, 1)); + fxMatComposeOutline.SetInt(ShaderParams.ZTest, GetZTestValue(smoothOutlineVisibility)); + cbHighlight.DrawMesh(quadMesh, quadOutlineMatrix, fxMatComposeOutline, 0, 0); + } + // Release render textures + if (renderSmoothGlow) { + for (int k = 0; k < mipGlowBuffers.Length; k++) { + cbHighlight.ReleaseTemporaryRT(mipGlowBuffers[k]); + } + } + if (renderSmoothOutline) { + for (int k = 0; k < mipOutlineBuffers.Length; k++) { + cbHighlight.ReleaseTemporaryRT(mipOutlineBuffers[k]); + } + } + + cbHighlight.ReleaseTemporaryRT(sourceRT); + } + + void InitMaterial(ref Material material, string shaderName) { + if (material != null) return; + Shader shaderFX = Shader.Find(shaderName); + if (shaderFX == null) { + Debug.LogError("Shader " + shaderName + " not found."); + return; + } + material = new Material(shaderFX); + } + + void Fork(Material mat, ref Material[] mats, Mesh mesh) { + if (mesh == null) + return; + int count = mesh.subMeshCount; + Fork(mat, ref mats, count); + } + + void Fork(Material material, ref Material[] array, int count) { + if (array == null || array.Length < count) { + DestroyMaterialArray(array); + array = new Material[count]; + } + for (int k = 0; k < count; k++) { + if (array[k] == null) { + array[k] = Instantiate(material); + } + } + } + + /// + /// Sets target for highlight effects + /// + public void SetTarget(Transform transform) { + if (transform == null) return; + if (transform != target) { + if (_highlighted) { + ImmediateFadeOut(); + } + target = transform; + SetupMaterial(); + } else { + UpdateVisibilityState(); + } + } + + + + /// + /// Sets target for highlight effects and also specify a list of renderers to be included as well + /// + public void SetTargets(Transform transform, Renderer[] renderers) { + if (transform == null) + return; + + if (_highlighted) { + ImmediateFadeOut(); + } + + effectGroup = TargetOptions.Scripting; + target = transform; + SetupMaterial(renderers); + } + + + /// + /// Start or finish highlight on the object + /// + public void SetHighlighted(bool state) { + + if (!Application.isPlaying) { + _highlighted = state; + return; + } + + float now = Time.time; + + if (fading == FadingState.NoFading) { + fadeStartTime = now; + } + + if (state && !ignore) { + if (_highlighted && fading == FadingState.NoFading) { + return; + } + if (OnObjectHighlightStart != null) { + if (!OnObjectHighlightStart(gameObject)) { + return; + } + } + SendMessage("HighlightStart", null, SendMessageOptions.DontRequireReceiver); + highlightStartTime = targetFxStartTime = now; + if (fadeInDuration > 0) { + if (fading == FadingState.FadingOut) { + float remaining = fadeOutDuration - (now - fadeStartTime); + fadeStartTime = now - remaining; + fadeStartTime = Mathf.Min(fadeStartTime, now); + } + fading = FadingState.FadingIn; + } else { + fading = FadingState.NoFading; + } + _highlighted = true; + requireUpdateMaterial = true; + } else if (_highlighted) { + if (fadeOutDuration > 0) { + if (fading == FadingState.FadingIn) { + float elapsed = now - fadeStartTime; + fadeStartTime = now + elapsed - fadeInDuration; + fadeStartTime = Mathf.Min(fadeStartTime, now); + } + fading = FadingState.FadingOut; // when fade out ends, highlighted will be set to false in OnRenderObject + } else { + fading = FadingState.NoFading; + ImmediateFadeOut(); + requireUpdateMaterial = true; + } + } + } + + void ImmediateFadeOut() { + fading = FadingState.NoFading; + _highlighted = false; + if (OnObjectHighlightEnd != null) { + OnObjectHighlightEnd(gameObject); + } + SendMessage("HighlightEnd", null, SendMessageOptions.DontRequireReceiver); + } + + void SetupMaterial() { + +#if UNITY_EDITOR + staticChildren = false; +#endif + + if (target == null || fxMatMask == null) + return; + + Renderer[] rr = null; + switch (effectGroup) { + case TargetOptions.OnlyThisObject: + Renderer renderer = target.GetComponent(); + if (renderer != null && ValidRenderer(renderer)) { + rr = new Renderer[1]; + rr[0] = renderer; + } + break; + case TargetOptions.RootToChildren: + Transform root = target; + while (root.parent != null) { + root = root.parent; + } + rr = FindRenderersInChildren(root); + break; + case TargetOptions.LayerInScene: { + HighlightEffect eg = this; + if (target != transform) { + HighlightEffect targetEffect = target.GetComponent(); + if (targetEffect != null) { + eg = targetEffect; + } + } + rr = FindRenderersWithLayerInScene(eg.effectGroupLayer); + } + break; + case TargetOptions.LayerInChildren: { + HighlightEffect eg = this; + if (target != transform) { + HighlightEffect targetEffect = target.GetComponent(); + if (targetEffect != null) { + eg = targetEffect; + } + } + rr = FindRenderersWithLayerInChildren(eg.effectGroupLayer); + } + break; + case TargetOptions.Children: + rr = FindRenderersInChildren(target); + break; + case TargetOptions.Scripting: + if (rmsCount > 0) return; + return; + } + + SetupMaterial(rr); + } + + void SetupMaterial(Renderer[] rr) { + + if (rr == null) { + rr = new Renderer[0]; + } + if (rms == null || rms.Length < rr.Length) { + rms = new ModelMaterials[rr.Length]; + } + InitCommandBuffer(); + + spriteMode = false; + rmsCount = 0; + for (int k = 0; k < rr.Length; k++) { + rms[rmsCount].Init(); + Renderer renderer = rr[k]; + if (renderer == null) continue; + if (effectGroup != TargetOptions.OnlyThisObject && !string.IsNullOrEmpty(effectNameFilter)) { + if (!renderer.name.Contains(effectNameFilter)) continue; + } + rms[rmsCount].renderer = renderer; + rms[rmsCount].renderWasVisibleDuringSetup = renderer.isVisible; + sortingOffset = (renderer.bounds.size.x + renderer.bounds.size.y + renderer.bounds.size.z) % 0.0001f; + + if (renderer.transform != target) { + HighlightEffect otherEffect = renderer.GetComponent(); + if (otherEffect != null && otherEffect.enabled && otherEffect.ignore) { + continue; // ignore this object + } + } + + if (OnRendererHighlightStart != null) { + if (!OnRendererHighlightStart(renderer)) { + rmsCount++; + continue; + } + } + + rms[rmsCount].isCombined = false; + bool isSkinnedMesh = renderer is SkinnedMeshRenderer; + rms[rmsCount].isSkinnedMesh = isSkinnedMesh; + bool isSpriteRenderer = renderer is SpriteRenderer; + rms[rmsCount].normalsOption = isSkinnedMesh ? NormalsOption.PreserveOriginal : normalsOption; + if (isSpriteRenderer) { + rms[rmsCount].mesh = quadMesh; + spriteMode = true; + } else if (isSkinnedMesh) { + // ignore cloth skinned renderers + rms[rmsCount].mesh = ((SkinnedMeshRenderer)renderer).sharedMesh; + } else if (Application.isPlaying && renderer.isPartOfStaticBatch) { + // static batched objects need to have a mesh collider in order to use its original mesh + MeshCollider mc = renderer.GetComponent(); + if (mc != null) { + rms[rmsCount].mesh = mc.sharedMesh; + } + } else { + MeshFilter mf = renderer.GetComponent(); + if (mf != null) { + rms[rmsCount].mesh = mf.sharedMesh; + +#if UNITY_EDITOR + if (renderer.gameObject.isStatic && renderer.GetComponent() == null) { + staticChildren = true; + } +#endif + + } + } + + if (rms[rmsCount].mesh == null) { + continue; + } + + rms[rmsCount].transform = renderer.transform; + Fork(fxMatMask, ref rms[rmsCount].fxMatMask, rms[rmsCount].mesh); + Fork(fxMatOutlineTemplate, ref rms[rmsCount].fxMatOutline, rms[rmsCount].mesh); + Fork(fxMatGlowTemplate, ref rms[rmsCount].fxMatGlow, rms[rmsCount].mesh); + Fork(fxMatSeeThrough, ref rms[rmsCount].fxMatSeeThroughInner, rms[rmsCount].mesh); + Fork(fxMatSeeThroughBorder, ref rms[rmsCount].fxMatSeeThroughBorder, rms[rmsCount].mesh); + Fork(fxMatOverlay, ref rms[rmsCount].fxMatOverlay, rms[rmsCount].mesh); + Fork(fxMatInnerGlow, ref rms[rmsCount].fxMatInnerGlow, rms[rmsCount].mesh); + Fork(fxMatSolidColor, ref rms[rmsCount].fxMatSolidColor, rms[rmsCount].mesh); + rms[rmsCount].originalMesh = rms[rmsCount].mesh; + if (!rms[rmsCount].preserveOriginalMesh) { + if (innerGlow > 0 || (glow > 0 && glowQuality != QualityLevel.Highest) || (outline > 0 && outlineQuality != QualityLevel.Highest)) { + if (normalsOption == NormalsOption.Reorient) { + ReorientNormals(rmsCount); + } else { + AverageNormals(rmsCount); + } + } + } + rmsCount++; + } + +#if UNITY_EDITOR + // Avoids command buffer issue when refreshing asset inside the Editor + if (!Application.isPlaying) { + mipGlowBuffers = null; + mipOutlineBuffers = null; + } +#endif + + if (spriteMode) { + outlineIndependent = false; + outlineQuality = QualityLevel.Highest; + glowQuality = QualityLevel.Highest; + innerGlow = 0; + cullBackFaces = false; + seeThrough = SeeThroughMode.Never; + if (alphaCutOff <= 0) { + alphaCutOff = 0.5f; + } + } else { + if (combineMeshes) { + CombineMeshes(); + } + } + + UpdateMaterialProperties(); + } + + readonly List tempRR = new List(); + + bool ValidRenderer(Renderer r) { + return r is MeshRenderer || r is SpriteRenderer || r is SkinnedMeshRenderer; + } + + Renderer[] FindRenderersWithLayerInScene(LayerMask layer) { + Renderer[] rr = FindObjectsOfType(); + tempRR.Clear(); + for (var i = 0; i < rr.Length; i++) { + Renderer r = rr[i]; + if (((1 << r.gameObject.layer) & layer) != 0) { + if (ValidRenderer(r)) { + tempRR.Add(r); + } + } + } + return tempRR.ToArray(); + } + + Renderer[] FindRenderersWithLayerInChildren(LayerMask layer) { + Renderer[] rr = target.GetComponentsInChildren(); + tempRR.Clear(); + for (var i = 0; i < rr.Length; i++) { + Renderer r = rr[i]; + if (((1 << r.gameObject.layer) & layer) != 0) { + if (ValidRenderer(r)) { + tempRR.Add(r); + } + } + } + return tempRR.ToArray(); + } + + Renderer[] FindRenderersInChildren(Transform parent) { + tempRR.Clear(); + parent.GetComponentsInChildren(tempRR); + for (var i = 0; i < tempRR.Count; i++) { + Renderer r = tempRR[i]; + if (!ValidRenderer(r)) { + tempRR.RemoveAt(i); + i--; + } + } + return tempRR.ToArray(); + } + + void CheckGeometrySupportDependencies() { + InitMaterial(ref fxMatMask, "HighlightPlus/Geometry/Mask"); + InitMaterial(ref fxMatGlowTemplate, "HighlightPlus/Geometry/Glow"); + if (fxMatGlowTemplate != null && useGPUInstancing) fxMatGlowTemplate.enableInstancing = true; + InitMaterial(ref fxMatInnerGlow, "HighlightPlus/Geometry/InnerGlow"); + InitMaterial(ref fxMatOutlineTemplate, "HighlightPlus/Geometry/Outline"); + if (fxMatOutlineTemplate != null && useGPUInstancing) fxMatOutlineTemplate.enableInstancing = true; + InitMaterial(ref fxMatOverlay, "HighlightPlus/Geometry/Overlay"); + InitMaterial(ref fxMatSeeThrough, "HighlightPlus/Geometry/SeeThrough"); + InitMaterial(ref fxMatSeeThroughBorder, "HighlightPlus/Geometry/SeeThroughBorder"); + InitMaterial(ref fxMatSeeThroughMask, "HighlightPlus/Geometry/SeeThroughMask"); + InitMaterial(ref fxMatTarget, "HighlightPlus/Geometry/Target"); + InitMaterial(ref fxMatComposeGlow, "HighlightPlus/Geometry/ComposeGlow"); + InitMaterial(ref fxMatComposeOutline, "HighlightPlus/Geometry/ComposeOutline"); + InitMaterial(ref fxMatSolidColor, "HighlightPlus/Geometry/SolidColor"); + InitMaterial(ref fxMatBlurGlow, "HighlightPlus/Geometry/BlurGlow"); + InitMaterial(ref fxMatBlurOutline, "HighlightPlus/Geometry/BlurOutline"); + InitMaterial(ref fxMatClearStencil, "HighlightPlus/ClearStencil"); + } + + void InitCommandBuffer() { + if (cbHighlight == null) { + cbHighlight = new CommandBuffer(); + cbHighlight.name = "Highlight Plus for " + name; + } + cbHighlightEmpty = true; + } + + + void ConfigureOutput() { + if (!cbHighlightEmpty) return; + cbHighlightEmpty = false; + + cbHighlight.Clear(); +#if UNITY_2022_1_OR_NEWER + // depth priming might have changed depth render target so we ensure it's set to normal + colorAttachmentBuffer = new RenderTargetIdentifier(colorAttachmentBuffer, 0, CubemapFace.Unknown, -1); + depthAttachmentBuffer = new RenderTargetIdentifier(depthAttachmentBuffer, 0, CubemapFace.Unknown, -1); + cbHighlight.SetRenderTarget(colorAttachmentBuffer, depthAttachmentBuffer); +#elif UNITY_2021_2_OR_NEWER + var useDepthRenderBuffer = colorAttachmentBuffer != BuiltinRenderTextureType.CameraTarget && depthAttachmentBuffer == BuiltinRenderTextureType.CameraTarget; + cbHighlight.SetRenderTarget(colorAttachmentBuffer, useDepthRenderBuffer ? colorAttachmentBuffer : depthAttachmentBuffer); +#endif + } + + public void UpdateVisibilityState() { + // isVisible only accounts for cases where there's a single object managed by the highlight effect + // and that object can receive OnBecameVisible/OnBecameInvisible. Otherwise we can't use this optimization + if (rms == null || rms.Length != 1 || rms[0].transform != transform || rms[0].renderer == null) { + isVisible = true; + } else if (rms[0].renderer != null) { + isVisible = rms[0].renderer.isVisible; + } + } + + public void UpdateMaterialProperties() { + + if (rms == null) + return; + + if (ignore) { + _highlighted = false; + } + + UpdateVisibilityState(); + + maskRequired = (_highlighted && (outline > 0 || (glow > 0 && !glowIgnoreMask))) || seeThrough != SeeThroughMode.Never || (targetFX && targetFXAlignToGround); + + Color seeThroughTintColor = this.seeThroughTintColor; + seeThroughTintColor.a = this.seeThroughTintAlpha; + + if (lastOutlineVisibility != outlineVisibility) { + // change by scripting? + if (glowQuality == QualityLevel.Highest && outlineQuality == QualityLevel.Highest) { + glowVisibility = outlineVisibility; + } + lastOutlineVisibility = outlineVisibility; + } + if (outlineWidth < 0) { + outlineWidth = 0; + } + if (outlineQuality == QualityLevel.Medium) { + outlineOffsetsMin = 4; outlineOffsetsMax = 7; + } else if (outlineQuality == QualityLevel.High) { + outlineOffsetsMin = 0; outlineOffsetsMax = 7; + } else { + outlineOffsetsMin = outlineOffsetsMax = 0; + } + if (glowWidth < 0) { + glowWidth = 0; + } + if (glowQuality == QualityLevel.Medium) { + glowOffsetsMin = 4; glowOffsetsMax = 7; + } else if (glowQuality == QualityLevel.High) { + glowOffsetsMin = 0; glowOffsetsMax = 7; + } else { + glowOffsetsMin = glowOffsetsMax = 0; + } + if (targetFXTransitionDuration <= 0) { + targetFXTransitionDuration = 0.0001f; + } + if (targetFXStayDuration <= 0) { + targetFXStayDuration = 0; + } + if (targetFXFadePower <= 0) { + targetFXFadePower = 0; + } + if (seeThroughDepthOffset < 0) { + seeThroughDepthOffset = 0; + } + if (seeThroughMaxDepth < 0) { + seeThroughMaxDepth = 0; + } + if (seeThroughBorderWidth < 0) { + seeThroughBorderWidth = 0; + } + + + shouldBakeSkinnedMesh = optimizeSkinnedMesh && ((outline > 0 && outlineQuality != QualityLevel.Highest) || (glow > 0 && glowQuality != QualityLevel.Highest)); + + useSmoothGlow = glow > 0 && glowWidth > 0 && glowQuality == QualityLevel.Highest; + useSmoothOutline = outline > 0 && outlineWidth > 0 && outlineQuality == QualityLevel.Highest; + useSmoothBlend = useSmoothGlow || useSmoothOutline; + if (useSmoothBlend) { + if (useSmoothGlow && useSmoothOutline) { + outlineVisibility = glowVisibility; + } + outlineEdgeThreshold = Mathf.Clamp01(outlineEdgeThreshold); + } + if (useSmoothGlow) { + fxMatComposeGlow.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + if (glowBlendMode == GlowBlendMode.Additive) { + fxMatComposeGlow.SetInt(ShaderParams.BlendSrc, (int)BlendMode.One); + fxMatComposeGlow.SetInt(ShaderParams.BlendDst, (int)BlendMode.One); + } else { + fxMatComposeGlow.SetInt(ShaderParams.BlendSrc, (int)BlendMode.SrcAlpha); + fxMatComposeGlow.SetInt(ShaderParams.BlendDst, (int)BlendMode.OneMinusSrcAlpha); + } + fxMatBlurGlow.SetFloat(ShaderParams.BlurScale, glowWidth / glowDownsampling); + fxMatBlurGlow.SetFloat(ShaderParams.Speed, glowAnimationSpeed); + } + + if (useSmoothOutline) { + fxMatComposeOutline.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMatComposeOutline.SetColor(ShaderParams.Debug, outlineBlitDebug ? debugColor : blackColor); + if (outlineEdgeMode == OutlineEdgeMode.Exterior) { + fxMatComposeOutline.SetInt(ShaderParams.OutlineStencilCompareFunction, (int)CompareFunction.NotEqual); + fxMatComposeOutline.DisableKeyword(ShaderParams.SKW_ALL_EDGES); + } else { + fxMatComposeOutline.SetInt(ShaderParams.OutlineStencilCompareFunction, (int)CompareFunction.Always); + fxMatComposeOutline.EnableKeyword(ShaderParams.SKW_ALL_EDGES); + outlineDownsampling = 1; + } + float edgeWidth = outlineWidth; + if (outlineEdgeMode == OutlineEdgeMode.Any) edgeWidth = Mathf.Clamp(edgeWidth, outlineBlurPasses / 5f, outlineBlurPasses); + fxMatBlurOutline.SetFloat(ShaderParams.BlurScale, edgeWidth / outlineDownsampling); + fxMatBlurOutline.SetFloat(ShaderParams.BlurScaleFirstHoriz, edgeWidth * 2f); + } + if (outlineColorStyle == ColorStyle.Gradient) { + const int OUTLINE_GRADIENT_TEX_SIZE = 32; + bool requiresUpdate = false; + if (outlineGradientTex == null) { + outlineGradientTex = new Texture2D(OUTLINE_GRADIENT_TEX_SIZE, 1, TextureFormat.RGBA32, mipChain: false, linear: true); + outlineGradientTex.wrapMode = TextureWrapMode.Clamp; + requiresUpdate = true; + } + if (outlineGradientColors == null || outlineGradientColors.Length != OUTLINE_GRADIENT_TEX_SIZE) { + outlineGradientColors = new Color[OUTLINE_GRADIENT_TEX_SIZE]; + requiresUpdate = true; + } + for (int k = 0; k < OUTLINE_GRADIENT_TEX_SIZE; k++) { + float t = (float)k / OUTLINE_GRADIENT_TEX_SIZE; + Color color = outlineGradient.Evaluate(t); + if (color != outlineGradientColors[k]) { + outlineGradientColors[k] = color; + requiresUpdate = true; + } + } + if (requiresUpdate) { + outlineGradientTex.SetPixels(outlineGradientColors); + outlineGradientTex.Apply(); + } + } + + // Setup materials + + // Target + if (targetFX) { + if (targetFXTexture == null) { + targetFXTexture = Resources.Load("HighlightPlus/target"); + } + fxMatTarget.mainTexture = targetFXTexture; + fxMatTarget.SetInt(ShaderParams.ZTest, GetZTestValue(targetFXVisibility)); + } + + // Per object + float scaledOutlineWidth = outlineQuality.UsesMultipleOffsets() ? 0f : outlineWidth / 100f; + + for (int k = 0; k < rmsCount; k++) { + if (rms[k].mesh != null) { + + Renderer renderer = rms[k].renderer; + if (renderer == null) + continue; + + renderer.GetSharedMaterials(rendererSharedMaterials); + + // Per submesh + for (int l = 0; l < rms[k].mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + + Material mat = null; + if (l < rendererSharedMaterials.Count) { + mat = rendererSharedMaterials[l]; + } + if (mat == null) + continue; + + bool hasTexture = false; + Texture matTexture = null; + Vector2 matTextureOffset = Vector2.zero; + Vector2 matTextureScale = Vector2.one; + if (mat.HasProperty(ShaderParams.MainTex)) { + matTexture = mat.GetTexture(ShaderParams.MainTex); + matTextureOffset = mat.mainTextureOffset; + matTextureScale = mat.mainTextureScale; + hasTexture = true; + } else if (mat.HasProperty(ShaderParams.BaseMap)) { + matTexture = mat.GetTexture(ShaderParams.BaseMap); // we don't use mainTexture because ShaderGraph doesn't inform that generic property correctly + hasTexture = true; + if (mat.HasProperty(ShaderParams.BaseMapST)) { + // mat.mainTextureOffset will raise an error in builds - we need to manually get the scale/offset from the material by its property name + Vector4 baseMapST = mat.GetVector(ShaderParams.BaseMapST); + matTextureScale.x = baseMapST.x; + matTextureScale.y = baseMapST.y; + matTextureOffset.x = baseMapST.z; + matTextureOffset.y = baseMapST.w; + } + } + bool useAlphaTest = alphaCutOff > 0 && hasTexture; + + // Mask + if (rms[k].fxMatMask != null && rms[k].fxMatMask.Length > l) { + Material fxMat = rms[k].fxMatMask[l]; + if (fxMat != null) { + //if (hasTexture) { + fxMat.mainTexture = matTexture; + fxMat.mainTextureOffset = matTextureOffset; + fxMat.mainTextureScale = matTextureScale; + //} + if (useAlphaTest) { + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + } + } + + // Outline + if (rms[k].fxMatOutline != null && rms[k].fxMatOutline.Length > l) { + Material fxMat = rms[k].fxMatOutline[l]; + if (fxMat != null) { + fxMat.SetFloat(ShaderParams.OutlineWidth, scaledOutlineWidth); + fxMat.SetInt(ShaderParams.OutlineZTest, GetZTestValue(outlineVisibility)); + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMat.SetFloat(ShaderParams.ConstantWidth, constantWidth ? 1.0f : 0); + if (useAlphaTest) { + fxMat.mainTexture = matTexture; + fxMat.mainTextureOffset = matTextureOffset; + fxMat.mainTextureScale = matTextureScale; + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + fxMat.DisableKeyword(ShaderParams.SKW_OUTLINE_GRADIENT_LS); + fxMat.DisableKeyword(ShaderParams.SKW_OUTLINE_GRADIENT_WS); + if (outlineColorStyle == ColorStyle.Gradient) { + fxMat.SetTexture(ShaderParams.OutlineGradientTex, outlineGradientTex); + fxMat.EnableKeyword(outlineGradientInLocalSpace ? ShaderParams.SKW_OUTLINE_GRADIENT_LS : ShaderParams.SKW_OUTLINE_GRADIENT_WS); + } + } + } + + // Glow + if (rms[k].fxMatGlow != null && rms[k].fxMatGlow.Length > l) { + Material fxMat = rms[k].fxMatGlow[l]; + if (fxMat != null) { + fxMat.SetVector(ShaderParams.Glow2, new Vector4(outline > 0 ? outlineWidth / 100f : 0, glowAnimationSpeed, glowDithering ? 0 : 1)); + fxMat.SetInt(ShaderParams.GlowZTest, GetZTestValue(glowVisibility)); + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMat.SetFloat(ShaderParams.ConstantWidth, constantWidth ? 1.0f : 0); + fxMat.SetInt(ShaderParams.GlowStencilOp, glowBlendPasses ? (int)StencilOp.Keep : (int)StencilOp.Replace); + fxMat.SetInt(ShaderParams.GlowStencilComp, glowIgnoreMask ? (int)CompareFunction.Always : (int)CompareFunction.NotEqual); + + if (useAlphaTest) { + fxMat.mainTexture = matTexture; + fxMat.mainTextureOffset = matTextureOffset; + fxMat.mainTextureScale = matTextureScale; + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + } + } + + // See-through + bool usesSeeThroughBorder = rms[k].fxMatSeeThroughBorder != null && rms[k].fxMatSeeThroughBorder.Length > l && (seeThroughBorder * seeThroughBorderWidth > 0); + if (rms[k].fxMatSeeThroughInner != null && rms[k].fxMatSeeThroughInner.Length > l) { + Material fxMat = rms[k].fxMatSeeThroughInner[l]; + if (fxMat != null) { + fxMat.SetFloat(ShaderParams.SeeThrough, seeThroughIntensity); + fxMat.SetFloat(ShaderParams.SeeThroughNoise, seeThroughNoise); + fxMat.SetColor(ShaderParams.SeeThroughTintColor, seeThroughTintColor); + if (seeThroughOccluderMaskAccurate && seeThroughOccluderMask != -1) { + fxMat.SetInt(ShaderParams.SeeThroughStencilRef, 1); + fxMat.SetInt(ShaderParams.SeeThroughStencilComp, (int)CompareFunction.Equal); + fxMat.SetInt(ShaderParams.SeeThroughStencilPassOp, (int)StencilOp.Zero); + } else { + fxMat.SetInt(ShaderParams.SeeThroughStencilRef, 2); + fxMat.SetInt(ShaderParams.SeeThroughStencilComp, (int)CompareFunction.Greater); + fxMat.SetInt(ShaderParams.SeeThroughStencilPassOp, (int)StencilOp.Replace); + } + //if (hasTexture) { + fxMat.mainTexture = matTexture; + fxMat.mainTextureOffset = matTextureOffset; + fxMat.mainTextureScale = matTextureScale; + //} + if (useAlphaTest) { + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + if (seeThroughDepthOffset > 0 || seeThroughMaxDepth > 0) { + fxMat.SetFloat(ShaderParams.SeeThroughDepthOffset, seeThroughDepthOffset > 0 ? seeThroughDepthOffset : -1); + fxMat.SetFloat(ShaderParams.SeeThroughMaxDepth, seeThroughMaxDepth > 0 ? seeThroughMaxDepth : 999999); + fxMat.EnableKeyword(ShaderParams.SKW_DEPTH_OFFSET); + } else { + fxMat.DisableKeyword(ShaderParams.SKW_DEPTH_OFFSET); + } + if (seeThroughBorderOnly) { + fxMat.EnableKeyword(ShaderParams.SKW_SEETHROUGH_ONLY_BORDER); + } else { + fxMat.DisableKeyword(ShaderParams.SKW_SEETHROUGH_ONLY_BORDER); + } + + fxMat.DisableKeyword(ShaderParams.SKW_TEXTURE_TRIPLANAR); + fxMat.DisableKeyword(ShaderParams.SKW_TEXTURE_OBJECTSPACE); + fxMat.DisableKeyword(ShaderParams.SKW_TEXTURE_SCREENSPACE); + if (seeThroughTexture != null) { + fxMat.SetTexture(ShaderParams.SeeThroughTexture, seeThroughTexture); + fxMat.SetFloat(ShaderParams.SeeThroughTextureScale, seeThroughTextureScale); + switch (seeThroughTextureUVSpace) { + case TextureUVSpace.ScreenSpace: + fxMat.EnableKeyword(ShaderParams.SKW_TEXTURE_SCREENSPACE); + break; + case TextureUVSpace.ObjectSpace: + fxMat.EnableKeyword(ShaderParams.SKW_TEXTURE_OBJECTSPACE); + break; + default: + fxMat.EnableKeyword(ShaderParams.SKW_TEXTURE_TRIPLANAR); + break; + } + } + + } + } + + // See-through border + if (usesSeeThroughBorder) { + Material fxMat = rms[k].fxMatSeeThroughBorder[l]; + if (fxMat != null) { + fxMat.SetColor(ShaderParams.SeeThroughBorderColor, new Color(seeThroughBorderColor.r, seeThroughBorderColor.g, seeThroughBorderColor.b, seeThroughBorder)); + fxMat.SetFloat(ShaderParams.SeeThroughBorderWidth, (seeThroughBorder * seeThroughBorderWidth) > 0 ? seeThroughBorderWidth / 100f : 0); + fxMat.SetFloat(ShaderParams.SeeThroughBorderConstantWidth, constantWidth ? 1.0f : 0); + if (seeThroughOccluderMaskAccurate && seeThroughOccluderMask != -1) { + fxMat.SetInt(ShaderParams.SeeThroughStencilRef, 1); + fxMat.SetInt(ShaderParams.SeeThroughStencilComp, (int)CompareFunction.Equal); + fxMat.SetInt(ShaderParams.SeeThroughStencilPassOp, (int)StencilOp.Zero); + } else { + fxMat.SetInt(ShaderParams.SeeThroughStencilRef, 2); + fxMat.SetInt(ShaderParams.SeeThroughStencilComp, (int)CompareFunction.Greater); + fxMat.SetInt(ShaderParams.SeeThroughStencilPassOp, (int)StencilOp.Keep); + } + //if (hasTexture) { + fxMat.mainTexture = matTexture; + fxMat.mainTextureOffset = matTextureOffset; + fxMat.mainTextureScale = matTextureScale; + //} + if (useAlphaTest) { + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + if (seeThroughDepthOffset > 0 || seeThroughMaxDepth > 0) { + fxMat.SetFloat(ShaderParams.SeeThroughDepthOffset, seeThroughDepthOffset > 0 ? seeThroughDepthOffset : -1); + fxMat.SetFloat(ShaderParams.SeeThroughMaxDepth, seeThroughMaxDepth > 0 ? seeThroughMaxDepth : 999999); + fxMat.EnableKeyword(ShaderParams.SKW_DEPTH_OFFSET); + } else { + fxMat.DisableKeyword(ShaderParams.SKW_DEPTH_OFFSET); + } + } + } + + // Overlay + if (rms[k].fxMatOverlay != null && rms[k].fxMatOverlay.Length > l) { + Material fxMat = rms[k].fxMatOverlay[l]; + if (fxMat != null) { + //if (hasTexture) { + fxMat.mainTexture = matTexture; + fxMat.mainTextureOffset = matTextureOffset; + fxMat.mainTextureScale = matTextureScale; + //} + if (mat.HasProperty(ShaderParams.Color)) { + fxMat.SetColor(ShaderParams.OverlayBackColor, mat.GetColor(ShaderParams.Color)); + } + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMat.SetInt(ShaderParams.OverlayZTest, GetZTestValue(overlayVisibility)); + fxMat.DisableKeyword(ShaderParams.SKW_TEXTURE_TRIPLANAR); + fxMat.DisableKeyword(ShaderParams.SKW_TEXTURE_OBJECTSPACE); + fxMat.DisableKeyword(ShaderParams.SKW_TEXTURE_SCREENSPACE); + if (overlayTexture != null) { + fxMat.SetTexture(ShaderParams.OverlayTexture, overlayTexture); + switch (overlayTextureUVSpace) { + case TextureUVSpace.ScreenSpace: + fxMat.EnableKeyword(ShaderParams.SKW_TEXTURE_SCREENSPACE); + break; + case TextureUVSpace.ObjectSpace: + fxMat.EnableKeyword(ShaderParams.SKW_TEXTURE_OBJECTSPACE); + break; + default: + fxMat.EnableKeyword(ShaderParams.SKW_TEXTURE_TRIPLANAR); + break; + } + } + + if (useAlphaTest) { + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + } + } + + // Inner Glow + if (rms[k].fxMatInnerGlow != null && rms[k].fxMatInnerGlow.Length > l) { + Material fxMat = rms[k].fxMatInnerGlow[l]; + if (fxMat != null) { + //if (hasTexture) { + fxMat.mainTexture = matTexture; + fxMat.mainTextureOffset = matTextureOffset; + fxMat.mainTextureScale = matTextureScale; + //} + fxMat.SetFloat(ShaderParams.InnerGlowWidth, innerGlowWidth); + fxMat.SetInt(ShaderParams.InnerGlowZTest, GetZTestValue(innerGlowVisibility)); + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMat.SetInt(ShaderParams.InnerGlowBlendMode, innerGlowBlendMode == InnerGlowBlendMode.Additive ? 1 : 10); + if (useAlphaTest) { + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + } + } + + // Solid Color for smooth glow + if (rms[k].fxMatSolidColor != null && rms[k].fxMatSolidColor.Length > l) { + Material fxMat = rms[k].fxMatSolidColor[l]; + if (fxMat != null) { + fxMat.color = glowHQColor; + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMat.SetFloat(ShaderParams.OutlineEdgeThreshold, outlineEdgeThreshold); + //if (hasTexture) { + fxMat.mainTexture = matTexture; + fxMat.mainTextureOffset = matTextureOffset; + fxMat.mainTextureScale = matTextureScale; + //} + // if (!Application.isMobilePlatform) { // TODO: currently this does not work with URP on Android + + if ((glow > 0 && glowQuality == QualityLevel.Highest && glowVisibility == Visibility.Normal) || (outline > 0 && outlineQuality == QualityLevel.Highest && outlineVisibility == Visibility.Normal)) { + fxMat.DisableKeyword(ShaderParams.SKW_DEPTHCLIP_INV); + fxMat.EnableKeyword(ShaderParams.SKW_DEPTHCLIP); + } else if ((glow > 0 && glowQuality == QualityLevel.Highest && glowVisibility == Visibility.OnlyWhenOccluded) || (outline > 0 && outlineQuality == QualityLevel.Highest && outlineVisibility == Visibility.OnlyWhenOccluded)) { + fxMat.DisableKeyword(ShaderParams.SKW_DEPTHCLIP); + fxMat.EnableKeyword(ShaderParams.SKW_DEPTHCLIP_INV); + } else { + fxMat.DisableKeyword(ShaderParams.SKW_DEPTHCLIP); + fxMat.DisableKeyword(ShaderParams.SKW_DEPTHCLIP_INV); + } + //} + if (useAlphaTest) { + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + if (outlineEdgeMode == OutlineEdgeMode.Any) { + fxMat.EnableKeyword(ShaderParams.SKW_ALL_EDGES); + } else { + fxMat.DisableKeyword(ShaderParams.SKW_ALL_EDGES); + } + } + } + } + } + } + } + + float ComputeCameraDistanceFade(Vector3 position, Transform cameraTransform) { + Vector3 heading = position - cameraTransform.position; + float distance = Vector3.Dot(heading, cameraTransform.forward); + if (distance < cameraDistanceFadeNear) { + return 1f - Mathf.Min(1f, cameraDistanceFadeNear - distance); + } + if (distance > cameraDistanceFadeFar) { + return 1f - Mathf.Min(1f, distance - cameraDistanceFadeFar); + } + return 1f; + } + + int GetZTestValue(Visibility param) { + switch (param) { + case Visibility.AlwaysOnTop: + return (int)CompareFunction.Always; + case Visibility.OnlyWhenOccluded: + return (int)CompareFunction.Greater; + default: + return (int)CompareFunction.LessEqual; + } + } + + void BuildQuad() { + quadMesh = new Mesh(); + + // Setup vertices + Vector3[] newVertices = new Vector3[4]; + float halfHeight = 0.5f; + float halfWidth = 0.5f; + newVertices[0] = new Vector3(-halfWidth, -halfHeight, 0); + newVertices[1] = new Vector3(-halfWidth, halfHeight, 0); + newVertices[2] = new Vector3(halfWidth, -halfHeight, 0); + newVertices[3] = new Vector3(halfWidth, halfHeight, 0); + + // Setup UVs + Vector2[] newUVs = new Vector2[newVertices.Length]; + newUVs[0] = new Vector2(0, 0); + newUVs[1] = new Vector2(0, 1); + newUVs[2] = new Vector2(1, 0); + newUVs[3] = new Vector2(1, 1); + + // Setup triangles + int[] newTriangles = { 0, 1, 2, 3, 2, 1 }; + + // Setup normals + Vector3[] newNormals = new Vector3[newVertices.Length]; + for (int i = 0; i < newNormals.Length; i++) { + newNormals[i] = Vector3.forward; + } + + // Create quad + quadMesh.vertices = newVertices; + quadMesh.uv = newUVs; + quadMesh.triangles = newTriangles; + quadMesh.normals = newNormals; + + quadMesh.RecalculateBounds(); + } + + void BuildCube() { + cubeMesh = Resources.GetBuiltinResource("Cube.fbx"); + } + + + /// + /// Returns true if a given transform is included in this effect + /// + public bool Includes(Transform transform) { + for (int k = 0; k < rmsCount; k++) { + if (rms[k].transform == transform) return true; + } + return false; + } + + /// + /// Updates profile glow color + /// + public void SetGlowColor(Color color) { + if (glowPasses != null) { + for (int k = 0; k < glowPasses.Length; k++) { + glowPasses[k].color = color; + } + } + glowHQColor = color; + UpdateMaterialProperties(); + } + + + #region Normals handling + + static List vertices; + static List normals; + static Vector3[] newNormals; + static int[] matches; + static readonly Dictionary vv = new Dictionary(); + static readonly List rendererSharedMaterials = new List(); + + // cached meshes + static readonly Dictionary smoothMeshes = new Dictionary(); + static readonly Dictionary reorientedMeshes = new Dictionary(); + static readonly Dictionary combinedMeshes = new Dictionary(); + int combinedMeshesHashId; + + // annotate usage count of the instanced meshes due to normals or combine mesh option + // when highlighte effect is destroyed and the usage count is zero, we destroy the cached mesh + static readonly Dictionary sharedMeshUsage = new Dictionary(); + readonly List instancedMeshes = new List(); + + void AverageNormals(int objIndex) { + if (rms == null || objIndex >= rms.Length) return; + Mesh mesh = rms[objIndex].mesh; + + Mesh newMesh; + int hashCode = mesh.GetHashCode(); + if (!smoothMeshes.TryGetValue(hashCode, out newMesh) || newMesh == null) { + if (!mesh.isReadable) return; + if (normals == null) { + normals = new List(); + } else { + normals.Clear(); + } + mesh.GetNormals(normals); + int normalsCount = normals.Count; + if (normalsCount == 0) + return; + if (vertices == null) { + vertices = new List(); + } else { + vertices.Clear(); + } + mesh.GetVertices(vertices); + int vertexCount = vertices.Count; + if (normalsCount < vertexCount) { + vertexCount = normalsCount; + } + if (newNormals == null || newNormals.Length < vertexCount) { + newNormals = new Vector3[vertexCount]; + } else { + Vector3 zero = Vector3.zero; + for (int k = 0; k < vertexCount; k++) { + newNormals[k] = zero; + } + } + if (matches == null || matches.Length < vertexCount) { + matches = new int[vertexCount]; + } + // Locate overlapping vertices + vv.Clear(); + for (int k = 0; k < vertexCount; k++) { + int i; + Vector3 v = vertices[k]; + if (!vv.TryGetValue(v, out i)) { + vv[v] = i = k; + } + matches[k] = i; + } + // Average normals + for (int k = 0; k < vertexCount; k++) { + int match = matches[k]; + newNormals[match] += normals[k]; + } + for (int k = 0; k < vertexCount; k++) { + int match = matches[k]; + normals[k] = newNormals[match].normalized; + } + // Reassign normals + newMesh = Instantiate(mesh); + newMesh.SetNormals(normals); + smoothMeshes[hashCode] = newMesh; + IncrementeMeshUsage(newMesh); + } + rms[objIndex].mesh = newMesh; + } + + + void ReorientNormals(int objIndex) { + if (rms == null || objIndex >= rms.Length) return; + Mesh mesh = rms[objIndex].mesh; + + Mesh newMesh; + int hashCode = mesh.GetHashCode(); + if (!reorientedMeshes.TryGetValue(hashCode, out newMesh) || newMesh == null) { + if (!mesh.isReadable) return; + if (normals == null) { + normals = new List(); + } else { + normals.Clear(); + } + if (vertices == null) { + vertices = new List(); + } else { + vertices.Clear(); + } + mesh.GetVertices(vertices); + int vertexCount = vertices.Count; + if (vertexCount == 0) return; + + Vector3 mid = Vector3.zero; + for (int k = 0; k < vertexCount; k++) { + mid += vertices[k]; + } + mid /= vertexCount; + // Average normals + for (int k = 0; k < vertexCount; k++) { + normals.Add((vertices[k] - mid).normalized); + } + // Reassign normals + newMesh = Instantiate(mesh); + newMesh.SetNormals(normals); + reorientedMeshes[hashCode] = newMesh; + IncrementeMeshUsage(newMesh); + } + rms[objIndex].mesh = newMesh; + } + + const int MAX_VERTEX_COUNT = 65535; + void CombineMeshes() { + + if (rmsCount <= 1) return; + + // Combine meshes of group into the first mesh in rms + if (combineInstances == null || combineInstances.Length != rmsCount) { + combineInstances = new CombineInstance[rmsCount]; + } + int first = -1; + int count = 0; + combinedMeshesHashId = 0; + int vertexCount = 0; + Matrix4x4 im = Matrix4x4.identity; + for (int k = 0; k < rmsCount; k++) { + combineInstances[k].mesh = null; + if (!rms[k].isSkinnedMesh) { + Mesh mesh = rms[k].mesh; + if (mesh != null && mesh.isReadable) { + if (vertexCount + mesh.vertexCount > MAX_VERTEX_COUNT) continue; + vertexCount += mesh.vertexCount; + combineInstances[k].mesh = mesh; + int instanceId = rms[k].renderer.gameObject.GetInstanceID(); + if (first < 0) { + first = k; + combinedMeshesHashId = instanceId; + im = rms[k].transform.worldToLocalMatrix; + } else { + combinedMeshesHashId ^= instanceId; + rms[k].mesh = null; + } + combineInstances[k].transform = im * rms[k].transform.localToWorldMatrix; + count++; + } + } + } + if (count < 2) return; + + Mesh combinedMesh; + if (!combinedMeshes.TryGetValue(combinedMeshesHashId, out combinedMesh) || combinedMesh == null) { + combinedMesh = new Mesh(); + combinedMesh.CombineMeshes(combineInstances, true, true); + combinedMeshes[combinedMeshesHashId] = combinedMesh; + IncrementeMeshUsage(combinedMesh); + } + rms[first].mesh = combinedMesh; + rms[first].isCombined = true; + } + + + void IncrementeMeshUsage(Mesh mesh) { + int usageCount; + sharedMeshUsage.TryGetValue(mesh, out usageCount); + usageCount++; + sharedMeshUsage[mesh] = usageCount; + instancedMeshes.Add(mesh); + } + + /// + /// Destroys any cached mesh + /// + public static void ClearMeshCache() { + foreach (Mesh mesh in combinedMeshes.Values) { + if (mesh != null) DestroyImmediate(mesh); + } + foreach (Mesh mesh in smoothMeshes.Values) { + if (mesh != null) DestroyImmediate(mesh); + } + foreach (Mesh mesh in reorientedMeshes.Values) { + if (mesh != null) DestroyImmediate(mesh); + } + } + + /// + /// Clears cached mesh only for the highlighted object + /// + void RefreshCachedMeshes() { + if (combinedMeshes.TryGetValue(combinedMeshesHashId, out Mesh combinedMesh)) { + DestroyImmediate(combinedMesh); + combinedMeshes.Remove(combinedMeshesHashId); + } + if (rms == null) return; + for (int k = 0; k < rms.Length; k++) { + Mesh mesh = rms[k].mesh; + if (mesh != null) { + if (smoothMeshes.ContainsValue(mesh) || reorientedMeshes.ContainsValue(mesh)) { + DestroyImmediate(mesh); + } + } + + } + } + #endregion + + } +} + diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffect.cs.meta b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffect.cs.meta new file mode 100644 index 0000000..5bc1ff6 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffect.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 888380afc233049ce9e618f9f36c8ba8 +timeCreated: 1545593776 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 900 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectActions.cs b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectActions.cs new file mode 100644 index 0000000..a49d877 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectActions.cs @@ -0,0 +1,84 @@ +using UnityEngine; + +namespace HighlightPlus { + + public enum HitFxMode { + Overlay = 0, + InnerGlow = 1, + LocalHit = 2 + } + + public partial class HighlightEffect : MonoBehaviour { + + [Range(0,1)] public float hitFxInitialIntensity; + public HitFxMode hitFxMode = HitFxMode.Overlay; + public float hitFxFadeOutDuration = 0.25f; + [ColorUsage(true, true)] public Color hitFxColor = Color.white; + public float hitFxRadius = 0.5f; + + float hitInitialIntensity; + float hitStartTime; + float hitFadeOutDuration; + Color hitColor; + bool hitActive; + Vector3 hitPosition; + float hitRadius; + + /// + /// Performs a hit effect using default values + /// + public void HitFX() { + HitFX(hitFxColor, hitFxFadeOutDuration, hitFxInitialIntensity); + } + + /// + /// Performs a hit effect localized at hit position and radius with default values + /// + public void HitFX(Vector3 position) { + HitFX(hitFxColor, hitFxFadeOutDuration, hitFxInitialIntensity, position, hitFxRadius); + + } + + /// + /// Performs a hit effect using desired color, fade out duration and optionally initial intensity (0-1) + /// + public void HitFX(Color color, float fadeOutDuration, float initialIntensity = 1f) { + hitInitialIntensity = initialIntensity; + hitFadeOutDuration = fadeOutDuration; + hitColor = color; + hitStartTime = Time.time; + hitActive = true; + if (overlay == 0) { + UpdateMaterialProperties(); + } + } + + + /// + /// Performs a hit effect using desired color, fade out duration, initial intensity (0-1), hit position and radius of effect + /// + public void HitFX(Color color, float fadeOutDuration, float initialIntensity, Vector3 position, float radius) { + hitInitialIntensity = initialIntensity; + hitFadeOutDuration = fadeOutDuration; + hitColor = color; + hitStartTime = Time.time; + hitActive = true; + hitPosition = position; + hitRadius = radius; + if (overlay == 0) { + UpdateMaterialProperties(); + } + } + + /// + /// Initiates the target FX on demand using predefined configuration (see targetFX... properties) + /// + public void TargetFX() { + targetFxStartTime = Time.time; + if (!targetFX) { + targetFX = true; + UpdateMaterialProperties(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectActions.cs.meta b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectActions.cs.meta new file mode 100644 index 0000000..12aa7a7 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectActions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e749f80d0d29a49d49d6e0f4752065cd +timeCreated: 1542876337 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectOccluderManager.cs b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectOccluderManager.cs new file mode 100644 index 0000000..8d957d8 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectOccluderManager.cs @@ -0,0 +1,274 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; + +namespace HighlightPlus { + + + public partial class HighlightEffect : MonoBehaviour { + + static readonly List occluders = new List(); + static readonly Dictionary occludersFrameCount = new Dictionary(); + static Material fxMatSeeThroughOccluder, fxMatDepthWrite; + static RaycastHit[] hits; + static Collider[] colliders; + + /// + /// True if the see-through is cancelled by an occluder using raycast method + /// + public bool IsSeeThroughOccluded(Camera cam) { + // Compute bounds + Bounds bounds = new Bounds(); + for (int r = 0; r < rms.Length; r++) { + if (rms[r].renderer != null) { + if (bounds.size.x == 0) { + bounds = rms[r].renderer.bounds; + } else { + bounds.Encapsulate(rms[r].renderer.bounds); + } + } + } + Vector3 pos = bounds.center; + Vector3 camPos = cam.transform.position; + Vector3 offset = pos - camPos; + float maxDistance = Vector3.Distance(pos, camPos); + if (hits == null || hits.Length == 0) { + hits = new RaycastHit[64]; + } + int occludersCount = occluders.Count; + int hitCount = Physics.BoxCastNonAlloc(pos - offset, bounds.extents * 0.9f, offset.normalized, hits, Quaternion.identity, maxDistance); + for (int k = 0; k < hitCount; k++) { + for (int j = 0; j < occludersCount; j++) { + if (hits[k].collider.transform == occluders[j].transform) { + return true; + } + } + } + return false; + } + + public static void RegisterOccluder(HighlightSeeThroughOccluder occluder) { + if (!occluders.Contains(occluder)) { + occluders.Add(occluder); + } + } + + public static void UnregisterOccluder(HighlightSeeThroughOccluder occluder) { + if (occluders.Contains(occluder)) { + occluders.Remove(occluder); + } + } + + /// + /// Test see-through occluders. + /// + /// The camera to be tested + /// Returns true if there's no raycast-based occluder cancelling the see-through effect + public bool RenderSeeThroughOccluders(CommandBuffer cb, Camera cam) { + + int occludersCount = occluders.Count; + if (occludersCount == 0 || rmsCount == 0) return true; + + bool useRayCastCheck = false; + // Check if raycast method is needed + for (int k = 0; k < occludersCount; k++) { + HighlightSeeThroughOccluder occluder = occluders[k]; + if (occluder == null || !occluder.isActiveAndEnabled) continue; + if (occluder.detectionMethod == DetectionMethod.RayCast) { + useRayCastCheck = true; + break; + } + } + if (useRayCastCheck) { + if (IsSeeThroughOccluded(cam)) return false; + } + + // do not render see-through occluders more than once this frame per camera (there can be many highlight effect scripts in the scene, we only need writing to stencil once) + int lastFrameCount; + occludersFrameCount.TryGetValue(cam, out lastFrameCount); + int currentFrameCount = Time.frameCount; + if (currentFrameCount == lastFrameCount) return true; + occludersFrameCount[cam] = currentFrameCount; + + if (fxMatSeeThroughOccluder == null) { + InitMaterial(ref fxMatSeeThroughOccluder, "HighlightPlus/Geometry/SeeThroughOccluder"); + if (fxMatSeeThroughOccluder == null) return true; + } + if (fxMatDepthWrite == null) { + InitMaterial(ref fxMatDepthWrite, "HighlightPlus/Geometry/JustDepth"); + if (fxMatDepthWrite == null) return true; + } + + for (int k = 0; k < occludersCount; k++) { + HighlightSeeThroughOccluder occluder = occluders[k]; + if (occluder == null || !occluder.isActiveAndEnabled) continue; + if (occluder.detectionMethod == DetectionMethod.Stencil) { + if (occluder.meshData == null) continue; + int meshDataLength = occluder.meshData.Length; + // Per renderer + for (int m = 0; m < meshDataLength; m++) { + // Per submesh + Renderer renderer = occluder.meshData[m].renderer; + if (renderer.isVisible) { + for (int s = 0; s < occluder.meshData[m].subMeshCount; s++) { + cb.DrawRenderer(renderer, occluder.mode == OccluderMode.BlocksSeeThrough ? fxMatSeeThroughOccluder : fxMatDepthWrite, s); + } + } + } + } + } + return true; + } + + bool CheckOcclusion(Camera cam) { + + if (!perCameraOcclusionData.TryGetValue(cam, out PerCameraOcclusionData occlusionData)) { + occlusionData = new PerCameraOcclusionData(); + perCameraOcclusionData[cam] = occlusionData; + } + + float now = Time.time; + int frameCount = Time.frameCount; // ensure all cameras are checked this frame + + if (now - occlusionData.checkLastTime < seeThroughOccluderCheckInterval && Application.isPlaying && occlusionData.occlusionRenderFrame != frameCount) return occlusionData.lastOcclusionTestResult; + occlusionData.checkLastTime = now; + occlusionData.occlusionRenderFrame = frameCount; + + if (rms == null || rms.Length == 0 || rms[0].renderer == null) return false; + + Vector3 camPos = cam.transform.position; + Quaternion quaternionIdentity = Quaternion.identity; + if (colliders == null || colliders.Length == 0) { + colliders = new Collider[1]; + } + + if (seeThroughOccluderCheckIndividualObjects) { + for (int r = 0; r < rms.Length; r++) { + if (rms[r].renderer != null) { + Bounds bounds = rms[r].renderer.bounds; + Vector3 pos = bounds.center; + float maxDistance = Vector3.Distance(pos, camPos); + Vector3 extents = bounds.extents * seeThroughOccluderThreshold; + if (Physics.OverlapBoxNonAlloc(pos, extents, colliders, quaternionIdentity, seeThroughOccluderMask) > 0) { + occlusionData.lastOcclusionTestResult = true; + return true; + } + if (Physics.BoxCast(pos, extents, (camPos - pos).normalized, quaternionIdentity, maxDistance, seeThroughOccluderMask)) { + occlusionData.lastOcclusionTestResult = true; + return true; + } + } + } + occlusionData.lastOcclusionTestResult = false; + return false; + } else { + // Compute combined bounds + Bounds bounds = rms[0].renderer.bounds; + for (int r = 1; r < rms.Length; r++) { + if (rms[r].renderer != null) { + bounds.Encapsulate(rms[r].renderer.bounds); + } + } + Vector3 pos = bounds.center; + Vector3 extents = bounds.extents * seeThroughOccluderThreshold; + if (Physics.OverlapBoxNonAlloc(pos, extents, colliders, quaternionIdentity, seeThroughOccluderMask) > 0) { + occlusionData.lastOcclusionTestResult = true; + return true; + } + float maxDistance = Vector3.Distance(pos, camPos); + occlusionData.lastOcclusionTestResult = Physics.BoxCast(pos, extents, (camPos - pos).normalized, quaternionIdentity, maxDistance, seeThroughOccluderMask); + return occlusionData.lastOcclusionTestResult; + } + } + + + const int MAX_OCCLUDER_HITS = 50; + static RaycastHit[] occluderHits; + + void AddWithoutRepetition(List target, List source) { + int sourceCount = source.Count; + for (int k = 0; k < sourceCount; k++) { + Renderer entry = source[k]; + if (entry != null && !target.Contains(entry) && ValidRenderer(entry)) { + target.Add(entry); + } + } + } + + void CheckOcclusionAccurate(CommandBuffer cbuf, Camera cam) { + + if (!perCameraOcclusionData.TryGetValue(cam, out PerCameraOcclusionData occlusionData)) { + occlusionData = new PerCameraOcclusionData(); + perCameraOcclusionData[cam] = occlusionData; + } + + float now = Time.time; + int frameCount = Time.frameCount; // ensure all cameras are checked this frame + bool reuse = now - occlusionData.checkLastTime < seeThroughOccluderCheckInterval && Application.isPlaying && occlusionData.occlusionRenderFrame != frameCount; + + if (!reuse) { + if (rms == null || rms.Length == 0 || rms[0].renderer == null) return; + + occlusionData.checkLastTime = now; + occlusionData.occlusionRenderFrame = frameCount; + Quaternion quaternionIdentity = Quaternion.identity; + Vector3 camPos = cam.transform.position; + + occlusionData.cachedOccluders.Clear(); + + if (occluderHits == null || occluderHits.Length < MAX_OCCLUDER_HITS) { + occluderHits = new RaycastHit[MAX_OCCLUDER_HITS]; + } + + if (seeThroughOccluderCheckIndividualObjects) { + for (int r = 0; r < rms.Length; r++) { + if (rms[r].renderer != null) { + Bounds bounds = rms[r].renderer.bounds; + Vector3 pos = bounds.center; + float maxDistance = Vector3.Distance(pos, camPos); + int numOccluderHits = Physics.BoxCastNonAlloc(pos, bounds.extents * seeThroughOccluderThreshold, (camPos - pos).normalized, occluderHits, quaternionIdentity, maxDistance, seeThroughOccluderMask); + for (int k = 0; k < numOccluderHits; k++) { + occluderHits[k].collider.transform.root.GetComponentsInChildren(tempRR); + AddWithoutRepetition(occlusionData.cachedOccluders, tempRR); + } + } + } + } else { + // Compute combined bounds + Bounds bounds = rms[0].renderer.bounds; + for (int r = 1; r < rms.Length; r++) { + if (rms[r].renderer != null) { + bounds.Encapsulate(rms[r].renderer.bounds); + } + } + Vector3 pos = bounds.center; + float maxDistance = Vector3.Distance(pos, camPos); + int numOccluderHits = Physics.BoxCastNonAlloc(pos, bounds.extents * seeThroughOccluderThreshold, (camPos - pos).normalized, occluderHits, quaternionIdentity, maxDistance, seeThroughOccluderMask); + for (int k = 0; k < numOccluderHits; k++) { + occluderHits[k].collider.transform.root.GetComponentsInChildren(tempRR); + AddWithoutRepetition(occlusionData.cachedOccluders, tempRR); + } + } + } + + // render occluders + int occluderRenderersCount = occlusionData.cachedOccluders.Count; + if (occluderRenderersCount > 0) { + for (int k = 0; k < occluderRenderersCount; k++) { + Renderer r = occlusionData.cachedOccluders[k]; + if (r != null) { + cbuf.DrawRenderer(r, fxMatSeeThroughMask); + } + } + } + } + + public List GetOccluders(Camera camera) { + if (perCameraOcclusionData.TryGetValue(camera, out PerCameraOcclusionData occlusionData)) { + return occlusionData.cachedOccluders; + } + return null; + } + } +} diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectOccluderManager.cs.meta b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectOccluderManager.cs.meta new file mode 100644 index 0000000..bd8680d --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectOccluderManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d0bc1f04199a64e66ae9630062b3a6ad +timeCreated: 1542876337 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightManager.cs b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightManager.cs new file mode 100644 index 0000000..c81d32e --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightManager.cs @@ -0,0 +1,440 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; + +namespace HighlightPlus { + + public delegate bool OnObjectSelectionEvent(GameObject obj); + + [RequireComponent(typeof(HighlightEffect))] + [DefaultExecutionOrder(100)] + [HelpURL("https://kronnect.com/guides/highlight-plus-introduction/")] + public class HighlightManager : MonoBehaviour { + + [Tooltip("Enables highlight when pointer is over this object.")] + public bool highlightOnHover = true; + + public LayerMask layerMask = -1; + public Camera raycastCamera; + public RayCastSource raycastSource = RayCastSource.MousePosition; + [Tooltip("Minimum distance for target.")] + public float minDistance; + [Tooltip("Maximum distance for target. 0 = infinity")] + public float maxDistance; + [Tooltip("Blocks interaction if pointer is over an UI element")] + public bool respectUI = true; + + [Tooltip("If the object will be selected by clicking with mouse or tapping on it.")] + public bool selectOnClick; + [Tooltip("Optional profile for objects selected by clicking on them")] + public HighlightProfile selectedProfile; + [Tooltip("Profile to use whtn object is selected and highlighted.")] + public HighlightProfile selectedAndHighlightedProfile; + [Tooltip("Automatically deselects other previously selected objects")] + public bool singleSelection; + [Tooltip("Toggles selection on/off when clicking object")] + public bool toggle; + [Tooltip("Keeps current selection when clicking outside of any selectable object")] + public bool keepSelection = true; + + HighlightEffect baseEffect, currentEffect; + Transform currentObject; + RaycastHit2D[] hitInfo2D; + + public readonly static List selectedObjects = new List(); + public event OnObjectSelectionEvent OnObjectSelected; + public event OnObjectSelectionEvent OnObjectUnSelected; + public event OnObjectHighlightEvent OnObjectHighlightStart; + public event OnObjectHighlightEvent OnObjectHighlightEnd; + public static int lastTriggerFrame; + + static HighlightManager _instance; + public static HighlightManager instance { + get { + if (_instance == null) { + _instance = FindObjectOfType(); + } + return _instance; + } + } + + [RuntimeInitializeOnLoadMethod] + static void DomainReloadDisabledSupport() { + selectedObjects.Clear(); + lastTriggerFrame = 0; + _instance = null; + } + + void OnEnable() { + currentObject = null; + currentEffect = null; + if (baseEffect == null) { + baseEffect = GetComponent (); + if (baseEffect == null) { + baseEffect = gameObject.AddComponent (); + } + } + raycastCamera = GetComponent (); + if (raycastCamera == null) { + raycastCamera = GetCamera (); + if (raycastCamera == null) { + Debug.LogError ("Highlight Manager: no camera found!"); + } + } + hitInfo2D = new RaycastHit2D[1]; + InputProxy.Init(); + } + + + void OnDisable () { + SwitchesCollider (null); + internal_DeselectAll(); + } + + void Update () { + if (raycastCamera == null) + return; + +#if ENABLE_INPUT_SYSTEM + if (respectUI) { + EventSystem es = EventSystem.current; + if (es == null) { + es = CreateEventSystem(); + } + List raycastResults = new List(); + PointerEventData eventData = new PointerEventData(es); + Vector3 cameraPos = raycastCamera.transform.position; + if (raycastSource == RayCastSource.MousePosition) { + eventData.position = InputProxy.mousePosition; + } else { + eventData.position = new Vector2(raycastCamera.pixelWidth * 0.5f, raycastCamera.pixelHeight * 0.5f); + } + es.RaycastAll(eventData, raycastResults); + int hitCount = raycastResults.Count; + // check UI blocker + bool blocked = false; + for (int k = 0; k < hitCount; k++) { + RaycastResult rr = raycastResults[k]; + if (rr.module is UnityEngine.UI.GraphicRaycaster) { + blocked = true; + break; + } + } + if (blocked) return; + + // look for our gameobject + for (int k = 0; k < hitCount; k++) { + RaycastResult rr = raycastResults[k]; + float distance = Vector3.Distance(rr.worldPosition, cameraPos); + if (distance < minDistance || (maxDistance > 0 && distance > maxDistance)) continue; + + GameObject theGameObject = rr.gameObject; + if ((layerMask & (1 << rr.gameObject.layer)) == 0) continue; + + // is this object state controller by Highlight Trigger? + HighlightTrigger trigger = theGameObject.GetComponent(); + if (trigger != null) return; + + // Toggles selection + Transform t = theGameObject.transform; + if (InputProxy.GetMouseButtonDown(0)) { + if (selectOnClick) { + ToggleSelection(t, !toggle); + } + } else { + // Check if the object has a Highlight Effect + if (t != currentObject) { + SwitchesCollider(t); + } + } + return; + } + } + // if not blocked by UI and no hit found, fallback to raycast (required if no PhysicsRaycaster is present on the camera) +#endif + + Ray ray; + if (raycastSource == RayCastSource.MousePosition) { +#if !ENABLE_INPUT_SYSTEM + if (!CanInteract()) { + return; + } +#endif + ray = raycastCamera.ScreenPointToRay(InputProxy.mousePosition); + } else { + ray = new Ray(raycastCamera.transform.position, raycastCamera.transform.forward); + } + RaycastHit hitInfo; + if (Physics.Raycast(ray, out hitInfo, maxDistance > 0 ? maxDistance : raycastCamera.farClipPlane, layerMask) && Vector3.Distance(hitInfo.point, ray.origin) >= minDistance) { + Transform t = hitInfo.collider.transform; + // is this object state controller by Highlight Trigger? + HighlightTrigger trigger = t.GetComponent(); + if (trigger != null) return; + + // Toggles selection + if (InputProxy.GetMouseButtonDown(0)) { + if (selectOnClick) { + ToggleSelection(t, !toggle); + } + } else { + // Check if the object has a Highlight Effect + if (t != currentObject) { + SwitchesCollider(t); + } + } + return; + } else // check sprites + if (Physics2D.GetRayIntersectionNonAlloc(ray, hitInfo2D, maxDistance > 0 ? maxDistance : raycastCamera.farClipPlane, layerMask) > 0 && Vector3.Distance(hitInfo2D[0].point, ray.origin) >= minDistance) { + Transform t = hitInfo2D[0].collider.transform; + // is this object state controller by Highlight Trigger? + HighlightTrigger trigger = t.GetComponent(); + if (trigger != null) return; + + // Toggles selection + if (InputProxy.GetMouseButtonDown(0)) { + if (selectOnClick) { + ToggleSelection(t, !toggle); + } + } else { + // Check if the object has a Highlight Effect + if (t != currentObject) { + SwitchesCollider(t); + } + } + return; + } + + // no hit + if (selectOnClick && !keepSelection && InputProxy.GetMouseButtonDown(0) && lastTriggerFrame < Time.frameCount) { + internal_DeselectAll(); + } + SwitchesCollider (null); + } + + +#if ENABLE_INPUT_SYSTEM + EventSystem CreateEventSystem() { + GameObject eo = new GameObject("Event System created by Highlight Plus", typeof(EventSystem), typeof(UnityEngine.InputSystem.UI.InputSystemUIInputModule)); + return eo.GetComponent(); + } +#endif + + + void SwitchesCollider (Transform newObject) { + if (currentEffect != null) { + if (highlightOnHover) { + Highlight(false); + } + currentEffect = null; + } + currentObject = newObject; + if (newObject == null) return; + HighlightTrigger ht = newObject.GetComponent(); + if (ht != null && ht.enabled) + return; + + HighlightEffect otherEffect = newObject.GetComponent (); + if (otherEffect == null) { + // Check if there's a parent highlight effect that includes this object + HighlightEffect parentEffect = newObject.GetComponentInParent(); + if (parentEffect != null && parentEffect.Includes(newObject)) { + currentEffect = parentEffect; + if (highlightOnHover) { + Highlight(true); + } + return; + } + } + currentEffect = otherEffect != null ? otherEffect : baseEffect; + baseEffect.enabled = currentEffect == baseEffect; + currentEffect.SetTarget(currentObject); + + if (highlightOnHover) { + Highlight(true); + } + } + + + bool CanInteract() { + if (!respectUI) return true; + EventSystem es = EventSystem.current; + if (es == null) return true; + if (Application.isMobilePlatform && InputProxy.touchCount > 0 && es.IsPointerOverGameObject(InputProxy.GetFingerIdFromTouch(0))) { + return false; + } else if (es.IsPointerOverGameObject(-1)) + return false; + return true; + } + + + void ToggleSelection(Transform t, bool forceSelection) { + + // We need a highlight effect on each selected object + HighlightEffect hb = t.GetComponent(); + if (hb == null) { + HighlightEffect parentEffect = t.GetComponentInParent(); + if (parentEffect != null && parentEffect.Includes(t)) { + hb = parentEffect; + if (hb.previousSettings == null) { + hb.previousSettings = ScriptableObject.CreateInstance(); + } + hb.previousSettings.Save(hb); + } else { + hb = t.gameObject.AddComponent(); + hb.previousSettings = ScriptableObject.CreateInstance(); + // copy default highlight effect settings from this manager into this highlight plus component + hb.previousSettings.Save(baseEffect); + hb.previousSettings.Load(hb); + } + } + + bool currentState = hb.isSelected; + bool newState = forceSelection ? true : !currentState; + if (newState == currentState) return; + + if (newState) { + if (OnObjectSelected != null && !OnObjectSelected(t.gameObject)) return; + } else { + if (OnObjectUnSelected != null && !OnObjectUnSelected(t.gameObject)) return; + } + + if (singleSelection) { + internal_DeselectAll(); + } + + currentEffect = hb; + currentEffect.isSelected = newState; + baseEffect.enabled = false; + + if (currentEffect.isSelected) { + if (currentEffect.previousSettings == null) { + currentEffect.previousSettings = ScriptableObject.CreateInstance(); + } + hb.previousSettings.Save(hb); + + if (!selectedObjects.Contains(currentEffect)) { + selectedObjects.Add(currentEffect); + } + } else { + if (currentEffect.previousSettings != null) { + currentEffect.previousSettings.Load(hb); + } + if (selectedObjects.Contains(currentEffect)) { + selectedObjects.Remove(currentEffect); + } + } + + Highlight(true); + } + + void Highlight(bool state) { + if (state) { + if (!currentEffect.highlighted) { + if (OnObjectHighlightStart != null && currentEffect.target != null) { + if (!OnObjectHighlightStart(currentEffect.target.gameObject)) return; + } + } + } else { + if (currentEffect.highlighted) { + if (OnObjectHighlightEnd != null && currentEffect.target != null) { + OnObjectHighlightEnd(currentEffect.target.gameObject); + } + } + } + if (selectOnClick || currentEffect.isSelected) { + if (currentEffect.isSelected) { + if (state && selectedAndHighlightedProfile != null) { + selectedAndHighlightedProfile.Load(currentEffect); + } else if (selectedProfile != null) { + selectedProfile.Load(currentEffect); + } else { + currentEffect.previousSettings.Load(currentEffect); + } + if (currentEffect.highlighted) { + currentEffect.UpdateMaterialProperties(); + } else { + currentEffect.SetHighlighted(true); + } + return; + } else if (!highlightOnHover) { + currentEffect.SetHighlighted(false); + return; + } + } + currentEffect.SetHighlighted(state); + } + + public static Camera GetCamera() { + Camera raycastCamera = Camera.main; + if (raycastCamera == null) { + raycastCamera = FindObjectOfType(); + } + return raycastCamera; + } + + void internal_DeselectAll() { + foreach (HighlightEffect hb in selectedObjects) { + if (hb != null && hb.gameObject != null) { + if (OnObjectUnSelected != null) { + if (!OnObjectUnSelected(hb.gameObject)) continue; + } + hb.RestorePreviousHighlightEffectSettings(); + hb.isSelected = false; + hb.SetHighlighted(false); + } + } + selectedObjects.Clear(); + } + + + public static void DeselectAll() { + foreach (HighlightEffect hb in selectedObjects) { + if (hb != null && hb.gameObject != null) { + hb.isSelected = false; + if (hb.highlighted && _instance != null) { + _instance.Highlight(false); + } else { + hb.SetHighlighted(false); + } + } + } + selectedObjects.Clear(); + } + + /// + /// Manually causes highlight manager to select an object + /// + public void SelectObject(Transform t) { + ToggleSelection(t, true); + } + + /// + /// Manually causes highlight manager to toggle selection on an object + /// + public void ToggleObject(Transform t) { + ToggleSelection(t, false); + } + + /// + /// Manually causes highlight manager to unselect an object + /// + public void UnselectObject(Transform t) { + if (t == null) return; + HighlightEffect hb = t.GetComponent(); + if (hb == null) return; + + if (selectedObjects.Contains(hb)) { + if (OnObjectUnSelected != null) { + if (!OnObjectUnSelected(hb.gameObject)) return; + } + hb.isSelected = false; + hb.SetHighlighted(false); + selectedObjects.Remove(hb); + } + } + + + } + +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightManager.cs.meta b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightManager.cs.meta new file mode 100644 index 0000000..02ba108 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: af4d46fd89b9543e5be2358ac0c9ced0 +timeCreated: 1542876337 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightProfile.cs b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightProfile.cs new file mode 100644 index 0000000..64245a8 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightProfile.cs @@ -0,0 +1,407 @@ +using UnityEngine; + +namespace HighlightPlus { + + [CreateAssetMenu(menuName = "Highlight Plus Profile", fileName = "Highlight Plus Profile", order = 100)] + [HelpURL("https://www.dropbox.com/s/1p9h8xys68lm4a3/Documentation.pdf?dl=0")] + public class HighlightProfile : ScriptableObject { + + [Tooltip("Different options to specify which objects are affected by this Highlight Effect component.")] + public TargetOptions effectGroup = TargetOptions.Children; + + [Tooltip("The layer that contains the affected objects by this effect when effectGroup is set to LayerMask.")] + public LayerMask effectGroupLayer = -1; + + [Tooltip("Only include objects whose names contains this text.")] + public string effectNameFilter; + + [Tooltip("Combine meshes of all objects in this group affected by Highlight Effect reducing draw calls.")] + public bool combineMeshes; + + [Tooltip("The alpha threshold for transparent cutout objects. Pixels with alpha below this value will be discarded.")] + [Range(0, 1)] + public float alphaCutOff; + + [Tooltip("If back facing triangles are ignored.Backfaces triangles are not visible but you may set this property to false to force highlight effects to act on those triangles as well.")] + public bool cullBackFaces = true; + + [Tooltip("Normals handling option:\nPreserve original: use original mesh normals.\nSmooth: average normals to produce a smoother outline/glow mesh based effect.\nReorient: recomputes normals based on vertex direction to centroid.")] + public NormalsOption normalsOption; + + public float fadeInDuration; + public float fadeOutDuration; + + [Tooltip("Fades out effects based on distance to camera")] + public bool cameraDistanceFade; + + [Tooltip("The closest distance particles can get to the camera before they fade from the camera’s view.")] + public float cameraDistanceFadeNear; + + [Tooltip("The farthest distance particles can get away from the camera before they fade from the camera’s view.")] + public float cameraDistanceFadeFar = 1000; + + [Tooltip("Keeps the outline/glow size unaffected by object distance.")] + public bool constantWidth = true; + + [Range(0, 1)] + [Tooltip("Intensity of the overlay effect. A value of 0 disables the overlay completely.")] + public float overlay; + public OverlayMode overlayMode = OverlayMode.WhenHighlighted; + [ColorUsage(true, true)] public Color overlayColor = Color.yellow; + public float overlayAnimationSpeed = 1f; + [Range(0, 1)] + public float overlayMinIntensity = 0.5f; + [Range(0, 1)] + [Tooltip("Controls the blending or mix of the overlay color with the natural colors of the object.")] + public float overlayBlending = 1.0f; + [Tooltip("Optional overlay texture.")] + public Texture2D overlayTexture; + public TextureUVSpace overlayTextureUVSpace; + public float overlayTextureScale = 1f; + public Visibility overlayVisibility = Visibility.Normal; + + [Range(0, 1)] + [Tooltip("Intensity of the outline. A value of 0 disables the outline completely.")] + public float outline = 1f; + [ColorUsage(true, true)] public Color outlineColor = Color.black; + public ColorStyle outlineColorStyle = ColorStyle.SingleColor; + [GradientUsage(hdr: true, ColorSpace.Linear)] public Gradient outlineGradient; + public bool outlineGradientInLocalSpace; + [Range(1, 3)] + public int outlineBlurPasses = 2; + public float outlineWidth = 0.45f; + public QualityLevel outlineQuality = QualityLevel.High; + public OutlineEdgeMode outlineEdgeMode = OutlineEdgeMode.Exterior; + public float outlineEdgeThreshold = 0.995f; + [Range(1, 8)] + [Tooltip("Reduces the quality of the outline but improves performance a bit.")] + public int outlineDownsampling = 1; + public ContourStyle outlineContourStyle = ContourStyle.AroundVisibleParts; + + public Visibility outlineVisibility = Visibility.Normal; + [Tooltip("If enabled, this object won't combine the outline with other objects.")] + public bool outlineIndependent; + + [Range(0, 5)] + [Tooltip("The intensity of the outer glow effect. A value of 0 disables the glow completely.")] + public float glow; + public float glowWidth = 0.4f; + public QualityLevel glowQuality = QualityLevel.High; + public BlurMethod glowBlurMethod = BlurMethod.Gaussian; + [Range(1, 8)] + [Tooltip("Reduces the quality of the glow but improves performance a bit.")] + public int glowDownsampling = 2; + [ColorUsage(true, true)] public Color glowHQColor = new Color(0.64f, 1f, 0f, 1f); + [Tooltip("When enabled, outer glow renders with dithering. When disabled, glow appears as a solid color.")] + public bool glowDithering = true; + [Tooltip("Seed for the dithering effect")] + public float glowMagicNumber1 = 0.75f; + [Tooltip("Another seed for the dithering effect that combines with first seed to create different patterns")] + public float glowMagicNumber2 = 0.5f; + public float glowAnimationSpeed = 1f; + public Visibility glowVisibility = Visibility.Normal; + public GlowBlendMode glowBlendMode = GlowBlendMode.Additive; + [Tooltip("Blends glow passes one after another. If this option is disabled, glow passes won't overlap (in this case, make sure the glow pass 1 has a smaller offset than pass 2, etc.)")] + public bool glowBlendPasses = true; + public GlowPassData[] glowPasses; + [Tooltip("If enabled, glow effect will not use a stencil mask. This can be used to render the glow effect alone.")] + public bool glowIgnoreMask; + + [Range(0, 5f)] + [Tooltip("The intensity of the inner glow effect. A value of 0 disables the glow completely.")] + public float innerGlow; + [Range(0, 2)] + public float innerGlowWidth = 1f; + public InnerGlowBlendMode innerGlowBlendMode = InnerGlowBlendMode.Additive; + [ColorUsage(true, true)] public Color innerGlowColor = Color.white; + public Visibility innerGlowVisibility = Visibility.Normal; + + [Tooltip("Enables the targetFX effect. This effect draws an animated sprite over the object.")] + public bool targetFX; + public Texture2D targetFXTexture; + [ColorUsage(true, true)] public Color targetFXColor = Color.white; + public float targetFXRotationSpeed = 50f; + public float targetFXInitialScale = 4f; + public float targetFXEndScale = 1.5f; + [Tooltip("Makes target scale relative to object renderer bounds.")] + public bool targetFXScaleToRenderBounds; + [Tooltip("Places target FX sprite at the bottom of the highlighted object.")] + public bool targetFXAlignToGround; + [Tooltip("Max distance from the center of the highlighted object to the ground.")] + public float targetFXGroundMaxDistance = 15f; + public LayerMask targetFXGroundLayerMask = -1; + [Tooltip("Fade out effect with altitude")] + public float targetFXFadePower = 32; + public float targetFXTransitionDuration = 0.5f; + public float targetFXStayDuration = 1.5f; + public Visibility targetFXVisibility = Visibility.AlwaysOnTop; + + [Tooltip("See-through mode for this Highlight Effect component.")] + public SeeThroughMode seeThrough = SeeThroughMode.Never; + [Tooltip("This mask setting let you specify which objects will be considered as occluders and cause the see-through effect for this Highlight Effect component. For example, you assign your walls to a different layer and specify that layer here, so only walls and not other objects, like ground or ceiling, will trigger the see-through effect.")] + public LayerMask seeThroughOccluderMask = -1; + [Tooltip("Uses stencil buffers to ensure pixel-accurate occlusion test. If this option is disabled, only physics raycasting is used to test for occlusion.")] + public bool seeThroughOccluderMaskAccurate; + [Tooltip("A multiplier for the occluder volume size which can be used to reduce the actual size of occluders when Highlight Effect checks if they're occluding this object.")] + [Range(0.01f, 0.9f)] public float seeThroughOccluderThreshold = 0.4f; + [Tooltip("The interval of time between occlusion tests.")] + public float seeThroughOccluderCheckInterval = 1f; + [Tooltip("If enabled, occlusion test is performed for each children element. If disabled, the bounds of all children is combined and a single occlusion test is performed for the combined bounds.")] + public bool seeThroughOccluderCheckIndividualObjects; + [Tooltip("Shows the see-through effect only if the occluder if at this 'offset' distance from the object.")] + public float seeThroughDepthOffset; + [Tooltip("Hides the see-through effect if the occluder is further than this distance from the object (0 = infinite)")] + public float seeThroughMaxDepth; + [Range(0, 5f)] public float seeThroughIntensity = 0.8f; + [Range(0, 1)] public float seeThroughTintAlpha = 0.5f; + public Color seeThroughTintColor = Color.red; + [Range(0, 1)] public float seeThroughNoise = 1f; + [Range(0, 1)] public float seeThroughBorder; + public Color seeThroughBorderColor = Color.black; + public float seeThroughBorderWidth = 0.45f; + [Tooltip("Only display the border instead of the full see-through effect.")] + public bool seeThroughBorderOnly; + [Tooltip("This option clears the stencil buffer after rendering the see-through effect which results in correct rendering order and supports other stencil-based effects that render afterwards.")] + public bool seeThroughOrdered; + [Tooltip("Optional see-through mask effect texture.")] + public Texture2D seeThroughTexture; + public TextureUVSpace seeThroughTextureUVSpace; + public float seeThroughTextureScale = 1f; + + [Range(0, 1)] public float hitFxInitialIntensity; + public HitFxMode hitFxMode = HitFxMode.Overlay; + public float hitFxFadeOutDuration = 0.25f; + [ColorUsage(true, true)] public Color hitFxColor = Color.white; + public float hitFxRadius = 0.5f; + + public void Load(HighlightEffect effect) { + effect.effectGroup = effectGroup; + effect.effectGroupLayer = effectGroupLayer; + effect.effectNameFilter = effectNameFilter; + effect.combineMeshes = combineMeshes; + effect.alphaCutOff = alphaCutOff; + effect.cullBackFaces = cullBackFaces; + effect.normalsOption = normalsOption; + effect.fadeInDuration = fadeInDuration; + effect.fadeOutDuration = fadeOutDuration; + effect.cameraDistanceFade = cameraDistanceFade; + effect.cameraDistanceFadeFar = cameraDistanceFadeFar; + effect.cameraDistanceFadeNear = cameraDistanceFadeNear; + effect.constantWidth = constantWidth; + effect.overlay = overlay; + effect.overlayMode = overlayMode; + effect.overlayColor = overlayColor; + effect.overlayAnimationSpeed = overlayAnimationSpeed; + effect.overlayMinIntensity = overlayMinIntensity; + effect.overlayBlending = overlayBlending; + effect.overlayTexture = overlayTexture; + effect.overlayTextureUVSpace = overlayTextureUVSpace; + effect.overlayTextureScale = overlayTextureScale; + effect.overlayVisibility = overlayVisibility; + effect.outline = outline; + effect.outlineColor = outlineColor; + effect.outlineColorStyle = outlineColorStyle; + effect.outlineGradient = outlineGradient; + effect.outlineGradientInLocalSpace = outlineGradientInLocalSpace; + effect.outlineWidth = outlineWidth; + effect.outlineBlurPasses = outlineBlurPasses; + effect.outlineQuality = outlineQuality; + effect.outlineEdgeMode = outlineEdgeMode; + effect.outlineEdgeThreshold = outlineEdgeThreshold; + effect.outlineDownsampling = outlineDownsampling; + effect.outlineVisibility = outlineVisibility; + effect.outlineIndependent = outlineIndependent; + effect.outlineContourStyle = outlineContourStyle; + effect.glow = glow; + effect.glowWidth = glowWidth; + effect.glowQuality = glowQuality; + effect.glowBlurMethod = glowBlurMethod; + effect.glowDownsampling = glowDownsampling; + effect.glowHQColor = glowHQColor; + effect.glowDithering = glowDithering; + effect.glowMagicNumber1 = glowMagicNumber1; + effect.glowMagicNumber2 = glowMagicNumber2; + effect.glowAnimationSpeed = glowAnimationSpeed; + effect.glowVisibility = glowVisibility; + effect.glowBlendMode = glowBlendMode; + effect.glowBlendPasses = glowBlendPasses; + effect.glowPasses = GetGlowPassesCopy(glowPasses); + effect.glowIgnoreMask = glowIgnoreMask; + effect.innerGlow = innerGlow; + effect.innerGlowWidth = innerGlowWidth; + effect.innerGlowColor = innerGlowColor; + effect.innerGlowBlendMode = innerGlowBlendMode; + effect.innerGlowVisibility = innerGlowVisibility; + effect.targetFX = targetFX; + effect.targetFXColor = targetFXColor; + effect.targetFXInitialScale = targetFXInitialScale; + effect.targetFXEndScale = targetFXEndScale; + effect.targetFXScaleToRenderBounds = targetFXScaleToRenderBounds; + effect.targetFXAlignToGround = targetFXAlignToGround; + effect.targetFXGroundMaxDistance = targetFXGroundMaxDistance; + effect.targetFXGroundLayerMask = targetFXGroundLayerMask; + effect.targetFXFadePower = targetFXFadePower; + effect.targetFXRotationSpeed = targetFXRotationSpeed; + effect.targetFXStayDuration = targetFXStayDuration; + effect.targetFXTexture = targetFXTexture; + effect.targetFXTransitionDuration = targetFXTransitionDuration; + effect.targetFXVisibility = targetFXVisibility; + effect.seeThrough = seeThrough; + effect.seeThroughOccluderMask = seeThroughOccluderMask; + effect.seeThroughOccluderMaskAccurate = seeThroughOccluderMaskAccurate; + effect.seeThroughOccluderThreshold = seeThroughOccluderThreshold; + effect.seeThroughOccluderCheckInterval = seeThroughOccluderCheckInterval; + effect.seeThroughOccluderCheckIndividualObjects = seeThroughOccluderCheckIndividualObjects; + effect.seeThroughIntensity = seeThroughIntensity; + effect.seeThroughTintAlpha = seeThroughTintAlpha; + effect.seeThroughTintColor = seeThroughTintColor; + effect.seeThroughNoise = seeThroughNoise; + effect.seeThroughBorder = seeThroughBorder; + effect.seeThroughBorderColor = seeThroughBorderColor; + effect.seeThroughBorderWidth = seeThroughBorderWidth; + effect.seeThroughBorderOnly = seeThroughBorderOnly; + effect.seeThroughDepthOffset = seeThroughDepthOffset; + effect.seeThroughMaxDepth = seeThroughMaxDepth; + effect.seeThroughOrdered = seeThroughOrdered; + effect.seeThroughTexture = seeThroughTexture; + effect.seeThroughTextureScale = seeThroughTextureScale; + effect.seeThroughTextureUVSpace = seeThroughTextureUVSpace; + effect.hitFxInitialIntensity = hitFxInitialIntensity; + effect.hitFxMode = hitFxMode; + effect.hitFxFadeOutDuration = hitFxFadeOutDuration; + effect.hitFxColor = hitFxColor; + effect.hitFxRadius = hitFxRadius; + effect.UpdateMaterialProperties(); + } + + public void Save(HighlightEffect effect) { + effectGroup = effect.effectGroup; + effectGroupLayer = effect.effectGroupLayer; + effectNameFilter = effect.effectNameFilter; + combineMeshes = effect.combineMeshes; + alphaCutOff = effect.alphaCutOff; + cullBackFaces = effect.cullBackFaces; + normalsOption = effect.normalsOption; + fadeInDuration = effect.fadeInDuration; + fadeOutDuration = effect.fadeOutDuration; + cameraDistanceFade = effect.cameraDistanceFade; + cameraDistanceFadeFar = effect.cameraDistanceFadeFar; + cameraDistanceFadeNear = effect.cameraDistanceFadeNear; + constantWidth = effect.constantWidth; + overlay = effect.overlay; + overlayMode = effect.overlayMode; + overlayColor = effect.overlayColor; + overlayAnimationSpeed = effect.overlayAnimationSpeed; + overlayMinIntensity = effect.overlayMinIntensity; + overlayBlending = effect.overlayBlending; + overlayTexture = effect.overlayTexture; + overlayTextureUVSpace = effect.overlayTextureUVSpace; + overlayTextureScale = effect.overlayTextureScale; + overlayVisibility = effect.overlayVisibility; + outline = effect.outline; + outlineColor = effect.outlineColor; + outlineColorStyle = effect.outlineColorStyle; + outlineGradient = effect.outlineGradient; + outlineGradientInLocalSpace = effect.outlineGradientInLocalSpace; + outlineWidth = effect.outlineWidth; + outlineBlurPasses = effect.outlineBlurPasses; + outlineQuality = effect.outlineQuality; + outlineEdgeMode = effect.outlineEdgeMode; + outlineEdgeThreshold = effect.outlineEdgeThreshold; + outlineDownsampling = effect.outlineDownsampling; + outlineVisibility = effect.outlineVisibility; + outlineIndependent = effect.outlineIndependent; + outlineContourStyle = effect.outlineContourStyle; + glow = effect.glow; + glowWidth = effect.glowWidth; + glowQuality = effect.glowQuality; + glowBlurMethod = effect.glowBlurMethod; + glowDownsampling = effect.glowDownsampling; + glowHQColor = effect.glowHQColor; + glowDithering = effect.glowDithering; + glowMagicNumber1 = effect.glowMagicNumber1; + glowMagicNumber2 = effect.glowMagicNumber2; + glowAnimationSpeed = effect.glowAnimationSpeed; + glowVisibility = effect.glowVisibility; + glowBlendMode = effect.glowBlendMode; + glowBlendPasses = effect.glowBlendPasses; + glowPasses = GetGlowPassesCopy(effect.glowPasses); + glowIgnoreMask = effect.glowIgnoreMask; + innerGlow = effect.innerGlow; + innerGlowWidth = effect.innerGlowWidth; + innerGlowColor = effect.innerGlowColor; + innerGlowBlendMode = effect.innerGlowBlendMode; + innerGlowVisibility = effect.innerGlowVisibility; + targetFX = effect.targetFX; + targetFXColor = effect.targetFXColor; + targetFXInitialScale = effect.targetFXInitialScale; + targetFXEndScale = effect.targetFXEndScale; + targetFXScaleToRenderBounds = effect.targetFXScaleToRenderBounds; + targetFXAlignToGround = effect.targetFXAlignToGround; + targetFXGroundMaxDistance = effect.targetFXGroundMaxDistance; + targetFXGroundLayerMask = effect.targetFXGroundLayerMask; + targetFXFadePower = effect.targetFXFadePower; + targetFXRotationSpeed = effect.targetFXRotationSpeed; + targetFXStayDuration = effect.targetFXStayDuration; + targetFXTexture = effect.targetFXTexture; + targetFXTransitionDuration = effect.targetFXTransitionDuration; + targetFXVisibility = effect.targetFXVisibility; + seeThrough = effect.seeThrough; + seeThroughOccluderMask = effect.seeThroughOccluderMask; + seeThroughOccluderMaskAccurate = effect.seeThroughOccluderMaskAccurate; + seeThroughOccluderThreshold = effect.seeThroughOccluderThreshold; + seeThroughOccluderCheckInterval = effect.seeThroughOccluderCheckInterval; + seeThroughOccluderCheckIndividualObjects = effect.seeThroughOccluderCheckIndividualObjects; + seeThroughIntensity = effect.seeThroughIntensity; + seeThroughTintAlpha = effect.seeThroughTintAlpha; + seeThroughTintColor = effect.seeThroughTintColor; + seeThroughNoise = effect.seeThroughNoise; + seeThroughBorder = effect.seeThroughBorder; + seeThroughBorderColor = effect.seeThroughBorderColor; + seeThroughBorderWidth = effect.seeThroughBorderWidth; + seeThroughDepthOffset = effect.seeThroughDepthOffset; + seeThroughBorderOnly = effect.seeThroughBorderOnly; + seeThroughMaxDepth = effect.seeThroughMaxDepth; + seeThroughOrdered = effect.seeThroughOrdered; + seeThroughTexture = effect.seeThroughTexture; + seeThroughTextureScale = effect.seeThroughTextureScale; + seeThroughTextureUVSpace = effect.seeThroughTextureUVSpace; + hitFxInitialIntensity = effect.hitFxInitialIntensity; + hitFxMode = effect.hitFxMode; + hitFxFadeOutDuration = effect.hitFxFadeOutDuration; + hitFxColor = effect.hitFxColor; + hitFxRadius = effect.hitFxRadius; + } + + GlowPassData[] GetGlowPassesCopy(GlowPassData[] glowPasses) { + if (glowPasses == null) { + return new GlowPassData[0]; + } + GlowPassData[] pd = new GlowPassData[glowPasses.Length]; + for (int k = 0; k < glowPasses.Length; k++) { + pd[k].alpha = glowPasses[k].alpha; + pd[k].color = glowPasses[k].color; + pd[k].offset = glowPasses[k].offset; + } + return pd; + } + + private void OnValidate() { + outlineEdgeThreshold = Mathf.Clamp01(outlineEdgeThreshold); + seeThroughDepthOffset = Mathf.Max(0, seeThroughDepthOffset); + seeThroughMaxDepth = Mathf.Max(0, seeThroughMaxDepth); + seeThroughBorderWidth = Mathf.Max(0, seeThroughBorderWidth); + targetFXFadePower = Mathf.Max(0, targetFXFadePower); + cameraDistanceFadeNear = Mathf.Max(0, cameraDistanceFadeNear); + cameraDistanceFadeFar = Mathf.Max(0, cameraDistanceFadeFar); + if (glowPasses == null || glowPasses.Length == 0) { + glowPasses = new GlowPassData[4]; + glowPasses[0] = new GlowPassData() { offset = 4, alpha = 0.1f, color = new Color(0.64f, 1f, 0f, 1f) }; + glowPasses[1] = new GlowPassData() { offset = 3, alpha = 0.2f, color = new Color(0.64f, 1f, 0f, 1f) }; + glowPasses[2] = new GlowPassData() { offset = 2, alpha = 0.3f, color = new Color(0.64f, 1f, 0f, 1f) }; + glowPasses[3] = new GlowPassData() { offset = 1, alpha = 0.4f, color = new Color(0.64f, 1f, 0f, 1f) }; + } + } + } +} + diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightProfile.cs.meta b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightProfile.cs.meta new file mode 100644 index 0000000..f269c7c --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightProfile.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8e9253636bf2648bd813257f451f8486 +timeCreated: 1549831900 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightSeeThroughOccluder.cs b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightSeeThroughOccluder.cs new file mode 100644 index 0000000..50fff0c --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightSeeThroughOccluder.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace HighlightPlus { + + public struct MeshData { + public Renderer renderer; + public int subMeshCount; + } + + public enum OccluderMode { + BlocksSeeThrough, + TriggersSeeThrough + } + + public enum DetectionMethod { + Stencil = 0, + RayCast = 1 + } + [ExecuteInEditMode] + public class HighlightSeeThroughOccluder : MonoBehaviour { + + public OccluderMode mode = OccluderMode.BlocksSeeThrough; + + public DetectionMethod detectionMethod = DetectionMethod.Stencil; + + [NonSerialized] + public MeshData[] meshData; + + List rr; + + void OnEnable () { + if (gameObject.activeInHierarchy) { + Init(); + } + } + + void Init() { + + if (detectionMethod == DetectionMethod.RayCast) { + HighlightEffect.RegisterOccluder(this); + return; + } + + if (rr == null) { + rr = new List(); + } else { + rr.Clear(); + } + GetComponentsInChildren(rr); + int rrCount = rr.Count; + meshData = new MeshData[rrCount]; + for (int k = 0; k < rrCount; k++) { + meshData[k].renderer = rr[k]; + meshData[k].subMeshCount = 1; + if (rr[k] is MeshRenderer) { + MeshFilter mf = rr[k].GetComponent(); + if (mf != null && mf.sharedMesh != null) { + meshData[k].subMeshCount = mf.sharedMesh.subMeshCount; + } + } else if (rr[k] is SkinnedMeshRenderer) { + SkinnedMeshRenderer smr = (SkinnedMeshRenderer)rr[k]; + meshData[k].subMeshCount = smr.sharedMesh.subMeshCount; + } + } + if (rrCount > 0) { + HighlightEffect.RegisterOccluder(this); + } + } + + void OnDisable () { + HighlightEffect.UnregisterOccluder(this); + } + } + +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightSeeThroughOccluder.cs.meta b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightSeeThroughOccluder.cs.meta new file mode 100644 index 0000000..6d02b16 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightSeeThroughOccluder.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8dd965ceab19c4729a9dabd8aeb2972a +timeCreated: 1542876337 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightTrigger.cs b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightTrigger.cs new file mode 100644 index 0000000..164fd1b --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightTrigger.cs @@ -0,0 +1,441 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; + +namespace HighlightPlus { + + public enum TriggerMode { + ColliderEventsOnlyOnThisObject = 0, + RaycastOnThisObjectAndChildren = 1, + Volume = 2 + } + + public enum RayCastSource { + MousePosition = 0, + CameraDirection = 1 + } + + + [RequireComponent(typeof(HighlightEffect))] + [ExecuteInEditMode] + [HelpURL("https://kronnect.com/guides/highlight-plus-introduction/")] + public class HighlightTrigger : MonoBehaviour { + + [Tooltip("Enables highlight when pointer is over this object.")] + public bool highlightOnHover = true; + [Tooltip("Used to trigger automatic highlighting including children objects.")] +#if ENABLE_INPUT_SYSTEM + public TriggerMode triggerMode = TriggerMode.RaycastOnThisObjectAndChildren; +#else + public TriggerMode triggerMode = TriggerMode.ColliderEventsOnlyOnThisObject; +#endif + public Camera raycastCamera; + public RayCastSource raycastSource = RayCastSource.MousePosition; + public LayerMask raycastLayerMask = -1; + [Tooltip("Minimum distance for target.")] + public float minDistance; + [Tooltip("Maximum distance for target. 0 = infinity")] + public float maxDistance; + [Tooltip("Blocks interaction if pointer is over an UI element")] + public bool respectUI = true; + public LayerMask volumeLayerMask; + + const int MAX_RAYCAST_HITS = 100; + + + [Tooltip("If the object will be selected by clicking with mouse or tapping on it.")] + public bool selectOnClick; + [Tooltip("Profile to use when object is selected by clicking on it.")] + public HighlightProfile selectedProfile; + [Tooltip("Profile to use whtn object is selected and highlighted.")] + public HighlightProfile selectedAndHighlightedProfile; + [Tooltip("Automatically deselects any other selected object prior selecting this one")] + public bool singleSelection; + [Tooltip("Toggles selection on/off when clicking object")] + public bool toggle; + [Tooltip("Keeps current selection when clicking outside of any selectable object")] + public bool keepSelection = true; + + [NonSerialized] public Collider[] colliders; + [NonSerialized] public Collider2D[] colliders2D; + + public bool hasColliders => (colliders != null && colliders.Length > 0); + public bool hasColliders2D => (colliders2D != null && colliders2D.Length > 0); + + UnityEngine.Object currentCollider; + static RaycastHit[] hits; + static RaycastHit2D[] hits2D; + HighlightEffect hb; + + public HighlightEffect highlightEffect { get { return hb; } } + + public event OnObjectSelectionEvent OnObjectSelected; + public event OnObjectSelectionEvent OnObjectUnSelected; + public event OnObjectHighlightEvent OnObjectHighlightStart; + public event OnObjectHighlightEvent OnObjectHighlightEnd; + + TriggerMode currentTriggerMode; + + + [RuntimeInitializeOnLoadMethod] + static void DomainReloadDisabledSupport() { + HighlightManager.selectedObjects.Clear(); + } + + void OnEnable() { + Init(); + } + + private void OnValidate() { + if (currentTriggerMode != triggerMode) { + UpdateTriggers(); + } + } + + void UpdateTriggers() { + currentTriggerMode = triggerMode; + if (currentTriggerMode == TriggerMode.RaycastOnThisObjectAndChildren) { + colliders = GetComponentsInChildren(); + colliders2D = GetComponentsInChildren(); + if (hits == null || hits.Length != MAX_RAYCAST_HITS) { + hits = new RaycastHit[MAX_RAYCAST_HITS]; + } + if (hits2D == null || hits2D.Length != MAX_RAYCAST_HITS) { + hits2D = new RaycastHit2D[MAX_RAYCAST_HITS]; + } + if (Application.isPlaying) { + StopAllCoroutines(); + if (gameObject.activeInHierarchy) { + StartCoroutine(DoRayCast()); + } + } + } + } + + + public void Init() { + if (raycastCamera == null) { + raycastCamera = HighlightManager.GetCamera(); + } + UpdateTriggers(); + if (hb == null) { + hb = GetComponent(); + } + InputProxy.Init(); + } + + void Start() { + UpdateTriggers(); + if (triggerMode == TriggerMode.RaycastOnThisObjectAndChildren) { + if (raycastCamera == null) { + raycastCamera = HighlightManager.GetCamera(); + if (raycastCamera == null) { + Debug.LogError("Highlight Trigger on " + gameObject.name + ": no camera found!"); + } + } + } else { + Collider collider = GetComponent(); + if (collider == null) { + if (GetComponent() != null) { + gameObject.AddComponent(); + } + } + } + } + + + IEnumerator DoRayCast() { + yield return null; + WaitForEndOfFrame w = new WaitForEndOfFrame(); + while (triggerMode == TriggerMode.RaycastOnThisObjectAndChildren) { + if (raycastCamera == null) { + yield return null; + continue; + } + + int hitCount; + bool hit = false; + +#if ENABLE_INPUT_SYSTEM + + if (respectUI) { + EventSystem es = EventSystem.current; + if (es == null) { + es = CreateEventSystem(); + } + List raycastResults = new List(); + PointerEventData eventData = new PointerEventData(es); + Vector3 cameraPos = raycastCamera.transform.position; + if (raycastSource == RayCastSource.MousePosition) { + eventData.position = InputProxy.mousePosition; + } else { + eventData.position = new Vector2(raycastCamera.pixelWidth * 0.5f, raycastCamera.pixelHeight * 0.5f); + } + es.RaycastAll(eventData, raycastResults); + hitCount = raycastResults.Count; + // check UI blocker + bool blocked = false; + for (int k = 0; k < hitCount; k++) { + RaycastResult rr = raycastResults[k]; + if (rr.module is UnityEngine.UI.GraphicRaycaster) { + blocked = true; + break; + } + } + if (blocked) { + yield return null; + continue; + } + // look for our gameobject + for (int k = 0; k < hitCount; k++) { + RaycastResult rr = raycastResults[k]; + float distance = Vector3.Distance(rr.worldPosition, cameraPos); + if (distance < minDistance || (maxDistance > 0 && distance > maxDistance)) continue; + + GameObject theGameObject = rr.gameObject; + for (int c = 0; c < colliders.Length; c++) { + if (colliders[c].gameObject == theGameObject) { + Collider theCollider = colliders[c]; + hit = true; + if (selectOnClick && InputProxy.GetMouseButtonDown(0)) { + ToggleSelection(); + break; + } else if (theCollider != currentCollider) { + SwitchCollider(theCollider); + k = hitCount; + break; + } + } + } + } + } + // if not blocked by UI and no hit found, fallback to raycast (required if no PhysicsRaycaster is present on the camera) + +#endif + Ray ray; + if (raycastSource == RayCastSource.MousePosition) { +#if !ENABLE_INPUT_SYSTEM + + if (!CanInteract()) { + yield return null; + continue; + } +#endif + ray = raycastCamera.ScreenPointToRay(InputProxy.mousePosition); + } else { + ray = new Ray(raycastCamera.transform.position, raycastCamera.transform.forward); + } + bool isMouseButonDown = InputProxy.GetMouseButtonDown(0); + if (hasColliders2D) { + if (maxDistance > 0) { + hitCount = Physics2D.GetRayIntersectionNonAlloc(ray, hits2D, maxDistance, raycastLayerMask); + } else { + hitCount = Physics2D.GetRayIntersectionNonAlloc(ray, hits2D, float.MaxValue, raycastLayerMask); + } + for (int k = 0; k < hitCount; k++) { + if (Vector3.Distance(hits2D[k].point, ray.origin) < minDistance) continue; + Collider2D theCollider = hits2D[k].collider; + int colliders2DCount = colliders2D.Length; + for (int c = 0; c < colliders2DCount; c++) { + if (colliders2D[c] == theCollider) { + hit = true; + if (selectOnClick && isMouseButonDown) { + ToggleSelection(); + break; + } else if (theCollider != currentCollider) { + SwitchCollider(theCollider); + k = hitCount; + break; + } + } + } + } + } + if (hasColliders) { + if (maxDistance > 0) { + hitCount = Physics.RaycastNonAlloc(ray, hits, maxDistance, raycastLayerMask); + } else { + hitCount = Physics.RaycastNonAlloc(ray, hits, float.MaxValue, raycastLayerMask); + } + for (int k = 0; k < hitCount; k++) { + if (Vector3.Distance(hits[k].point, ray.origin) < minDistance) continue; + Collider theCollider = hits[k].collider; + int collidersCount = colliders.Length; + for (int c = 0; c < collidersCount; c++) { + if (colliders[c] == theCollider) { + hit = true; + if (selectOnClick && isMouseButonDown) { + ToggleSelection(); + break; + } else if (theCollider != currentCollider) { + SwitchCollider(theCollider); + k = hitCount; + break; + } + } + } + } + } + + + if (!hit && currentCollider != null) { + SwitchCollider(null); + } + + if (selectOnClick && isMouseButonDown && !keepSelection && !hit) { + yield return w; // wait for other potential triggers to act + if (HighlightManager.lastTriggerFrame < Time.frameCount) { + HighlightManager.DeselectAll(); + } + } + + yield return null; + } + } + +#if ENABLE_INPUT_SYSTEM + EventSystem CreateEventSystem() { + GameObject eo = new GameObject("Event System created by Highlight Plus", typeof(EventSystem), typeof(UnityEngine.InputSystem.UI.InputSystemUIInputModule)); + return eo.GetComponent(); + } +#endif + + void SwitchCollider(UnityEngine.Object newCollider) { + if (!highlightOnHover && !hb.isSelected) return; + + currentCollider = newCollider; + if (currentCollider != null) { + Highlight(true); + } else { + Highlight(false); + } + } + + bool CanInteract() { + if (!respectUI) return true; + EventSystem es = EventSystem.current; + if (es == null) return true; + if (Application.isMobilePlatform && InputProxy.touchCount > 0 && es.IsPointerOverGameObject(InputProxy.GetFingerIdFromTouch(0))) { + return false; + } else if (es.IsPointerOverGameObject(-1)) + return false; + return true; + } + + + void OnMouseDown() { + if (isActiveAndEnabled && triggerMode == TriggerMode.ColliderEventsOnlyOnThisObject) { + if (!CanInteract()) return; + if (selectOnClick && InputProxy.GetMouseButtonDown(0)) { + ToggleSelection(); + return; + } + Highlight(true); + } + } + + void OnMouseEnter() { + if (isActiveAndEnabled && triggerMode == TriggerMode.ColliderEventsOnlyOnThisObject) { + if (!CanInteract()) return; + Highlight(true); + } + } + + void OnMouseExit() { + if (isActiveAndEnabled && triggerMode == TriggerMode.ColliderEventsOnlyOnThisObject) { + if (!CanInteract()) return; + Highlight(false); + } + } + + void Highlight(bool state) { + if (state) { + if (!hb.highlighted) { + if (OnObjectHighlightStart != null && hb.target != null) { + if (!OnObjectHighlightStart(hb.target.gameObject)) return; + } + } + } else { + if (hb.highlighted) { + if (OnObjectHighlightEnd != null && hb.target != null) { + OnObjectHighlightEnd(hb.target.gameObject); + } + } + } + if (selectOnClick || hb.isSelected) { + if (hb.isSelected) { + if (state && selectedAndHighlightedProfile != null) { + selectedAndHighlightedProfile.Load(hb); + } else if (selectedProfile != null) { + selectedProfile.Load(hb); + } else { + hb.previousSettings.Load(hb); + } + if (hb.highlighted) { + hb.UpdateMaterialProperties(); + } else { + hb.SetHighlighted(true); + } + return; + } else if (!highlightOnHover) { + hb.SetHighlighted(false); + return; + } + } + hb.SetHighlighted(state); + } + + + void ToggleSelection() { + + HighlightManager.lastTriggerFrame = Time.frameCount; + + bool newState = toggle ? !hb.isSelected : true; + if (newState) { + if (OnObjectSelected != null && !OnObjectSelected(gameObject)) return; + } else { + if (OnObjectUnSelected != null && !OnObjectUnSelected(gameObject)) return; + } + + if (singleSelection && newState) { + HighlightManager.DeselectAll(); + } + hb.isSelected = newState; + if (newState && !HighlightManager.selectedObjects.Contains(hb)) { + HighlightManager.selectedObjects.Add(hb); + } else if (!newState && HighlightManager.selectedObjects.Contains(hb)) { + HighlightManager.selectedObjects.Remove(hb); + } + + if (hb.isSelected) { + if (hb.previousSettings == null) { + hb.previousSettings = ScriptableObject.CreateInstance(); + } + hb.previousSettings.Save(hb); + } else { + hb.RestorePreviousHighlightEffectSettings(); + } + + Highlight(true); + } + + public void OnTriggerEnter(Collider other) { + if (triggerMode == TriggerMode.Volume) { + if ((volumeLayerMask & (1 << other.gameObject.layer)) != 0) { + Highlight(true); + } + } + } + + public void OnTriggerExit(Collider other) { + if (triggerMode == TriggerMode.Volume) { + if ((volumeLayerMask & (1 << other.gameObject.layer)) != 0) { + Highlight(false); + } + } + } + } + +} \ No newline at end of file diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightTrigger.cs.meta b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightTrigger.cs.meta new file mode 100644 index 0000000..630204a --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5009cbb7e54994bb586cde7a70f34e6b +timeCreated: 1542876337 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/InputProxy.cs b/Assets/Plugins/HighlightPlus/Runtime/Scripts/InputProxy.cs new file mode 100644 index 0000000..7f29b23 --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/InputProxy.cs @@ -0,0 +1,90 @@ +using UnityEngine; + +#if ENABLE_INPUT_SYSTEM +using UnityEngine.InputSystem; +using UnityEngine.InputSystem.Controls; +using EnhancedTouch = UnityEngine.InputSystem.EnhancedTouch; +#endif + +namespace HighlightPlus { + + public static class InputProxy { + +#if ENABLE_INPUT_SYSTEM + + static Vector3 lastPointerPosition; + + public static void Init() { + if (!EnhancedTouch.EnhancedTouchSupport.enabled) { + EnhancedTouch.EnhancedTouchSupport.Enable(); + } + } + + public static Vector3 mousePosition { + get { + if (touchCount > 0) { + lastPointerPosition = EnhancedTouch.Touch.activeTouches[0].screenPosition; + } else { + Mouse m = Mouse.current; + if (m != null) { + lastPointerPosition = m.position.ReadValue(); + } + } + return lastPointerPosition; + } + } + + public static bool GetMouseButtonDown(int buttonIndex) { + if (touchCount > 0) { + return EnhancedTouch.Touch.activeTouches[0].phase == UnityEngine.InputSystem.TouchPhase.Began; + } else { + Mouse m = Mouse.current; + if (m == null) return false; + switch (buttonIndex) { + case 1: return m.rightButton.wasPressedThisFrame; + case 2: return m.middleButton.wasPressedThisFrame; + default: return m.leftButton.wasPressedThisFrame; + } + } + } + + public static int touchCount { get { return EnhancedTouch.Touch.activeTouches.Count; } } + + public static int GetFingerIdFromTouch(int touchIndex) { + EnhancedTouch.Touch touch = EnhancedTouch.Touch.activeTouches[touchIndex]; + return touch.finger.index; + } + + public static bool GetKeyDown(string name) { + return ((KeyControl)Keyboard.current[name]).wasPressedThisFrame; + } + +#else + public static void Init() {} + + public static Vector3 mousePosition { + get { + return Input.mousePosition; + } + } + + public static bool GetMouseButtonDown(int buttonIndex) { + return Input.GetMouseButtonDown(buttonIndex); + } + + public static int touchCount { + get { return Input.touchCount; } + } + + public static int GetFingerIdFromTouch(int touchIndex) { + return Input.GetTouch(touchIndex).fingerId; + } + + public static bool GetKeyDown(string name) { + return Input.GetKeyDown(name); + } + +#endif + + } +} diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/InputProxy.cs.meta b/Assets/Plugins/HighlightPlus/Runtime/Scripts/InputProxy.cs.meta new file mode 100644 index 0000000..954705e --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/InputProxy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 22dd181849f53482686b5c26304410c2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/ShaderParams.cs b/Assets/Plugins/HighlightPlus/Runtime/Scripts/ShaderParams.cs new file mode 100644 index 0000000..2b5427d --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/ShaderParams.cs @@ -0,0 +1,96 @@ +using UnityEngine; + +namespace HighlightPlus { + + public static class ShaderParams { + + // general uniforms + public static int Cull = Shader.PropertyToID("_Cull"); + public static int BlurScale = Shader.PropertyToID("_BlurScale"); + public static int BlurScaleFirstHoriz = Shader.PropertyToID("_BlurScaleFirstHoriz"); + public static int Speed = Shader.PropertyToID("_Speed"); + public static int ConstantWidth = Shader.PropertyToID("_ConstantWidth"); + public static int CutOff = Shader.PropertyToID("_CutOff"); + public static int ZTest = Shader.PropertyToID("_ZTest"); + public static int Flip = Shader.PropertyToID("_Flip"); + public static int Debug = Shader.PropertyToID("_Debug"); + public static int Color = Shader.PropertyToID("_Color"); + public static int MainTex = Shader.PropertyToID("_MainTex"); + public static int BaseMap = Shader.PropertyToID("_BaseMap"); + public static int BaseMapST = Shader.PropertyToID("_BaseMap_ST"); + public static int AspectRatio = Shader.PropertyToID("_AspectRatio"); + public static int BlendSrc = Shader.PropertyToID("_BlendSrc"); + public static int BlendDst = Shader.PropertyToID("_BlendDst"); + public static int FadeFactor = Shader.PropertyToID("_HP_Fade"); + public static int ResampleScale = Shader.PropertyToID("_ResampleScale"); + + // outline uniforms + public static int OutlineWidth = Shader.PropertyToID("_OutlineWidth"); + public static int OutlineZTest = Shader.PropertyToID("_OutlineZTest"); + public static int OutlineDirection = Shader.PropertyToID("_OutlineDirection"); + public static int OutlineColor = Shader.PropertyToID("_OutlineColor"); + public static int OutlineVertexWidth = Shader.PropertyToID("_OutlineVertexWidth"); + public static int OutlineGradientTex = Shader.PropertyToID("_OutlineGradientTex"); + public static int OutlineVertexData = Shader.PropertyToID("_OutlineVertexData"); + public static int OutlineStencilCompareFunction = Shader.PropertyToID("_OutlineStencilComp"); + public static int OutlineEdgeThreshold = Shader.PropertyToID("_EdgeThreshold"); + + // glow uniforms + public static int GlowZTest = Shader.PropertyToID("_GlowZTest"); + public static int GlowStencilComp = Shader.PropertyToID("_GlowStencilComp"); + public static int GlowStencilOp = Shader.PropertyToID("_GlowStencilOp"); + public static int GlowDirection = Shader.PropertyToID("_GlowDirection"); + public static int Glow = Shader.PropertyToID("_Glow"); + public static int GlowColor = Shader.PropertyToID("_GlowColor"); + public static int Glow2 = Shader.PropertyToID("_Glow2"); + + // see-through uniforms + public static int SeeThrough = Shader.PropertyToID("_SeeThrough"); + public static int SeeThroughNoise = Shader.PropertyToID("_SeeThroughNoise"); + public static int SeeThroughBorderWidth = Shader.PropertyToID("_SeeThroughBorderWidth"); + public static int SeeThroughBorderConstantWidth = Shader.PropertyToID("_SeeThroughBorderConstantWidth"); + public static int SeeThroughTintColor = Shader.PropertyToID("_SeeThroughTintColor"); + public static int SeeThroughBorderColor = Shader.PropertyToID("_SeeThroughBorderColor"); + public static int SeeThroughStencilRef = Shader.PropertyToID("_SeeThroughStencilRef"); + public static int SeeThroughStencilComp = Shader.PropertyToID("_SeeThroughStencilComp"); + public static int SeeThroughStencilPassOp = Shader.PropertyToID("_SeeThroughStencilPassOp"); + public static int SeeThroughDepthOffset = Shader.PropertyToID("_SeeThroughDepthOffset"); + public static int SeeThroughMaxDepth = Shader.PropertyToID("_SeeThroughMaxDepth"); + public static int SeeThroughTexture = Shader.PropertyToID("_SeeThroughTexture"); + public static int SeeThroughTextureScale = Shader.PropertyToID("_SeeThroughTextureScale"); + + // inner glow uniforms + public static int InnerGlowWidth = Shader.PropertyToID("_InnerGlowWidth"); + public static int InnerGlowZTest = Shader.PropertyToID("_InnerGlowZTest"); + public static int InnerGlowColor = Shader.PropertyToID("_InnerGlowColor"); + public static int InnerGlowBlendMode = Shader.PropertyToID("_InnerGlowBlendMode"); + + // overlay uniforms + public static int OverlayData = Shader.PropertyToID("_OverlayData"); + public static int OverlayBackColor = Shader.PropertyToID("_OverlayBackColor"); + public static int OverlayColor = Shader.PropertyToID("_OverlayColor"); + public static int OverlayHitPosData = Shader.PropertyToID("_OverlayHitPosData"); + public static int OverlayHitStartTime = Shader.PropertyToID("_OverlayHitStartTime"); + public static int OverlayTexture = Shader.PropertyToID("_OverlayTexture"); + public static int OverlayZTest = Shader.PropertyToID("_OverlayZTest"); + + // target uniforms + public static int TargetFXRenderData = Shader.PropertyToID("_TargetFXRenderData"); + public static int GlowRT = Shader.PropertyToID("_HPComposeGlowFinal"); + public static int OutlineRT = Shader.PropertyToID("_HPComposeOutlineFinal"); + + // keywords + public const string SKW_ALPHACLIP = "HP_ALPHACLIP"; + public const string SKW_OUTLINE_GRADIENT_WS = "HP_OUTLINE_GRADIENT_WS"; + public const string SKW_OUTLINE_GRADIENT_LS = "HP_OUTLINE_GRADIENT_LS"; + public const string SKW_ALL_EDGES = "HP_ALL_EDGES"; + public const string SKW_DEPTHCLIP = "HP_DEPTHCLIP"; + public const string SKW_DEPTHCLIP_INV = "HP_DEPTHCLIP_INV"; + public const string SKW_DEPTH_OFFSET = "HP_DEPTH_OFFSET"; + public const string SKW_TEXTURE_TRIPLANAR = "HP_TEXTURE_TRIPLANAR"; + public const string SKW_TEXTURE_SCREENSPACE = "HP_TEXTURE_SCREENSPACE"; + public const string SKW_TEXTURE_OBJECTSPACE = "HP_TEXTURE_OBJECTSPACE"; + public const string SKW_SEETHROUGH_ONLY_BORDER = "HP_SEETHROUGH_ONLY_BORDER"; + } +} + diff --git a/Assets/Plugins/HighlightPlus/Runtime/Scripts/ShaderParams.cs.meta b/Assets/Plugins/HighlightPlus/Runtime/Scripts/ShaderParams.cs.meta new file mode 100644 index 0000000..39d981d --- /dev/null +++ b/Assets/Plugins/HighlightPlus/Runtime/Scripts/ShaderParams.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0c43adc34509547febe8181a2de00da5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/ModularFirstPersonController.meta b/Assets/Plugins/ModularFirstPersonController.meta new file mode 100644 index 0000000..4722cab --- /dev/null +++ b/Assets/Plugins/ModularFirstPersonController.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e243ac0bc4c7f4942af79e14fe9c14f5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/ModularFirstPersonController/FirstPersonController.meta b/Assets/Plugins/ModularFirstPersonController/FirstPersonController.meta new file mode 100644 index 0000000..410b18b --- /dev/null +++ b/Assets/Plugins/ModularFirstPersonController/FirstPersonController.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f37b4faf82d1edb47811f804ec33f9da +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/ModularFirstPersonController/FirstPersonController/CircleReticle.png b/Assets/Plugins/ModularFirstPersonController/FirstPersonController/CircleReticle.png new file mode 100644 index 0000000..bce1203 Binary files /dev/null and b/Assets/Plugins/ModularFirstPersonController/FirstPersonController/CircleReticle.png differ diff --git a/Assets/Plugins/ModularFirstPersonController/FirstPersonController/CircleReticle.png.meta b/Assets/Plugins/ModularFirstPersonController/FirstPersonController/CircleReticle.png.meta new file mode 100644 index 0000000..128c753 --- /dev/null +++ b/Assets/Plugins/ModularFirstPersonController/FirstPersonController/CircleReticle.png.meta @@ -0,0 +1,116 @@ +fileFormatVersion: 2 +guid: be4ce60e2c9768c44b9b10b9c5258045 +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 + 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 + applyGammaDecoding: 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: 0 + - 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: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: diff --git a/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs b/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs new file mode 100644 index 0000000..e998af0 --- /dev/null +++ b/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs @@ -0,0 +1,797 @@ +// CHANGE LOG +// +// CHANGES || version VERSION +// +// "Enable/Disable Headbob, Changed look rotations - should result in reduced camera jitters" || version 1.0.1 + +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using System; + +#if UNITY_EDITOR +using UnityEditor; +using System.Net; +#endif + +public class FirstPersonController : MonoBehaviour +{ + public Rigidbody rb; + + #region Camera Movement Variables + + public Camera playerCamera; + + public float fov = 60f; + public bool invertCamera = false; + public bool cameraCanMove = true; + public float mouseSensitivity = 2f; + public float maxLookAngle = 50f; + + // Crosshair + public bool lockCursor = true; + public bool crosshair = true; + public Sprite crosshairImage; + public Color crosshairColor = Color.white; + + // Internal Variables + public float yaw = 0.0f; + public float pitch = 0.0f; + private Image crosshairObject; + + + #region Camera Zoom Variables + + public bool enableZoom = true; + public bool holdToZoom = false; + public KeyCode zoomKey = KeyCode.Mouse1; + public float zoomFOV = 30f; + public float zoomStepTime = 5f; + public Action zoomAction; + public float zoomScale = 1; + + // Internal Variables + private bool isZoomed = false; + + #endregion + #endregion + + #region Movement Variables + + public bool playerCanMove = true; + public bool stopForce = true; + public float walkSpeed = 5f; + private float defulatWalkSpeed = 5f; + public float maxVelocityChange = 10f; + + // Internal Variables + private bool isWalking = false; + + #region Sprint + + public bool enableSprint = true; + public bool unlimitedSprint = false; + public bool enableSprintZoom = false; + public KeyCode sprintKey = KeyCode.LeftShift; + public float sprintSpeed = 7f; + private float defultSprintSpeed = 7f; + public float sprintDuration = 5f; + public float sprintCooldown = .5f; + public float sprintFOV = 80f; + public float sprintFOVStepTime = 10f; + + // Sprint Bar + public bool useSprintBar = true; + public bool hideBarWhenFull = true; + public Image sprintBarBG; + public Image sprintBar; + public float sprintBarWidthPercent = .3f; + public float sprintBarHeightPercent = .015f; + + // Internal Variables + private CanvasGroup sprintBarCG; + private bool isSprinting = false; + private float sprintRemaining; + private float sprintBarWidth; + private float sprintBarHeight; + private bool isSprintCooldown = false; + private float sprintCooldownReset; + + #endregion + + + #region Jump + + public bool enableJump = true; + public KeyCode jumpKey = KeyCode.Space; + public float jumpPower = 5f; + + // Internal Variables + private bool isGrounded = false; + + #endregion + + #region Crouch + + public bool enableCrouch = true; + public bool holdToCrouch = true; + public KeyCode crouchKey = KeyCode.LeftControl; + private float crouchHeight = .5f; + public float speedReduction = .5f; + + // Internal Variables + public bool isCrouched = false; + private Vector3 originalScale; + + #endregion + #endregion + + #region Head Bob + + public bool enableHeadBob = true; + public Transform joint; + public float bobSpeed = 10f; + public Vector3 bobAmount = new Vector3(.15f, .05f, 0f); + + // Internal Variables + private Vector3 jointOriginalPos; + private float timer = 0; + + #endregion + + + + private void Awake() + { + rb = GetComponent(); + + crosshairObject = GetComponentInChildren(true); + + // Set internal variables + playerCamera.fieldOfView = fov; + originalScale = transform.localScale; + jointOriginalPos = joint.localPosition; + + if (!unlimitedSprint) + { + sprintRemaining = sprintDuration; + sprintCooldownReset = sprintCooldown; + } + } + + void Start() + { + if (lockCursor) + { + Cursor.lockState = CursorLockMode.Locked; + } + + //if (crosshair) + //{ + // crosshairObject.sprite = crosshairImage; + // crosshairObject.color = crosshairColor; + //} + //else + //{ + // crosshairObject.gameObject.SetActive(false); + //} + + #region Sprint Bar + + //sprintBarCG = GetComponentInChildren(); + + //if (useSprintBar) + //{ + // sprintBarBG.gameObject.SetActive(true); + // sprintBar.gameObject.SetActive(true); + + // float screenWidth = Screen.width; + // float screenHeight = Screen.height; + + // sprintBarWidth = screenWidth * sprintBarWidthPercent; + // sprintBarHeight = screenHeight * sprintBarHeightPercent; + + // sprintBarBG.rectTransform.sizeDelta = new Vector3(sprintBarWidth, sprintBarHeight, 0f); + // sprintBar.rectTransform.sizeDelta = new Vector3(sprintBarWidth - 2, sprintBarHeight - 2, 0f); + + // if (hideBarWhenFull) + // { + // sprintBarCG.alpha = 0; + // } + //} + //else + //{ + // sprintBarBG.gameObject.SetActive(false); + // sprintBar.gameObject.SetActive(false); + //} + + #endregion + } + + float camRotation; + + private void Update() + { + if (EventSystem.current.IsPointerOverGameObject()) return; + float scrollValue = Input.GetAxis("Mouse ScrollWheel"); + if (scrollValue != 0) + { + playerCamera.fieldOfView = Mathf.Clamp(playerCamera.fieldOfView - scrollValue * 20, 10, 60); + zoomScale = Mathf.Clamp(zoomScale - scrollValue * 0.3f, 0.1f, 1); + mouseSensitivity = Mathf.Clamp(mouseSensitivity - scrollValue * 0.8f, 0.2f, 2); + walkSpeed = Mathf.Clamp(walkSpeed - scrollValue * 2f, 0.5f, 5); + zoomAction?.Invoke(zoomScale); + } + #region Camera + + // Control camera movement + if (Input.GetMouseButton(1)) + { + if (cameraCanMove) + { + yaw = transform.localEulerAngles.y + Input.GetAxis("Mouse X") * mouseSensitivity; + + if (!invertCamera) + { + pitch -= mouseSensitivity * Input.GetAxis("Mouse Y"); + } + else + { + // Inverted Y + pitch += mouseSensitivity * Input.GetAxis("Mouse Y"); + } + + // Clamp pitch between lookAngle + pitch = Mathf.Clamp(pitch, -maxLookAngle, maxLookAngle); + + transform.localEulerAngles = new Vector3(0, yaw, 0); + playerCamera.transform.localEulerAngles = new Vector3(pitch, 0, 0); + } + } + + #region Camera Zoom + + if (enableZoom) + { + // Changes isZoomed when key is pressed + // Behavior for toogle zoom + if (Input.GetKeyDown(zoomKey) && !holdToZoom && !isSprinting) + { + if (!isZoomed) + { + isZoomed = true; + } + else + { + isZoomed = false; + } + } + + // Changes isZoomed when key is pressed + // Behavior for hold to zoom + if (holdToZoom && !isSprinting) + { + if (Input.GetKeyDown(zoomKey)) + { + isZoomed = true; + } + else if (Input.GetKeyUp(zoomKey)) + { + isZoomed = false; + } + } + + // Lerps camera.fieldOfView to allow for a smooth transistion + if (isZoomed) + { + playerCamera.fieldOfView = Mathf.Lerp(playerCamera.fieldOfView, zoomFOV, zoomStepTime * Time.deltaTime); + } + else if (!isZoomed && !isSprinting) + { + playerCamera.fieldOfView = Mathf.Lerp(playerCamera.fieldOfView, fov, zoomStepTime * Time.deltaTime); + } + } + + #endregion + #endregion + + #region Sprint + + if (enableSprint) + { + if (isSprinting) + { + isZoomed = false; + + if (enableSprintZoom) + playerCamera.fieldOfView = Mathf.Lerp(playerCamera.fieldOfView, sprintFOV, sprintFOVStepTime * Time.deltaTime); + + // Drain sprint remaining while sprinting + if (!unlimitedSprint) + { + sprintRemaining -= 1 * Time.deltaTime; + if (sprintRemaining <= 0) + { + isSprinting = false; + isSprintCooldown = true; + } + } + } + else + { + // Regain sprint while not sprinting + sprintRemaining = Mathf.Clamp(sprintRemaining += 1 * Time.deltaTime, 0, sprintDuration); + } + + // Handles sprint cooldown + // When sprint remaining == 0 stops sprint ability until hitting cooldown + if (isSprintCooldown) + { + sprintCooldown -= 1 * Time.deltaTime; + if (sprintCooldown <= 0) + { + isSprintCooldown = false; + } + } + else + { + sprintCooldown = sprintCooldownReset; + } + + // Handles sprintBar + if (useSprintBar && !unlimitedSprint) + { + float sprintRemainingPercent = sprintRemaining / sprintDuration; + sprintBar.transform.localScale = new Vector3(sprintRemainingPercent, 1f, 1f); + } + } + + #endregion + + #region Jump + + // Gets input and calls jump method + if (enableJump && Input.GetKeyDown(jumpKey) && isGrounded) + { + Jump(); + } + + #endregion + + #region Crouch + + if (enableCrouch) + { + if (Input.GetKeyDown(crouchKey) && !holdToCrouch) + { + Crouch(); + } + + if (Input.GetKeyDown(crouchKey) && holdToCrouch) + { + isCrouched = false; + Crouch(); + } + else if (Input.GetKeyUp(crouchKey) && holdToCrouch) + { + isCrouched = true; + Crouch(); + } + } + + #endregion + + CheckGround(); + + + + + if (enableHeadBob) + { + HeadBob(); + } + } + + void FixedUpdate() + { + #region Movement + + if (playerCanMove) + { + // Calculate how fast we should be moving + if (Input.GetAxis("Horizontal") == 0 && Input.GetAxis("Vertical") == 0) return; + + Vector3 targetVelocity = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical")); + + // Checks if player is walking and isGrounded + // Will allow head bob + if (targetVelocity.x != 0 || targetVelocity.z != 0 && isGrounded) + { + isWalking = true; + } + else + { + isWalking = false; + } + + // All movement calculations shile sprint is active + if (enableSprint && Input.GetKey(sprintKey) && sprintRemaining > 0f && !isSprintCooldown) + { + targetVelocity = transform.TransformDirection(targetVelocity) * sprintSpeed; + + // Apply a force that attempts to reach our target velocity + Vector3 velocity = rb.velocity; + Vector3 velocityChange = (targetVelocity - velocity); + velocityChange.x = Mathf.Clamp(velocityChange.x, -maxVelocityChange, maxVelocityChange); + velocityChange.z = Mathf.Clamp(velocityChange.z, -maxVelocityChange, maxVelocityChange); + velocityChange.y = 0; + + // Player is only moving when valocity change != 0 + // Makes sure fov change only happens during movement + if (velocityChange.x != 0 || velocityChange.z != 0) + { + isSprinting = true; + + if (isCrouched) + { + Crouch(); + } + + if (hideBarWhenFull && !unlimitedSprint) + { + sprintBarCG.alpha += 5 * Time.deltaTime; + } + } + + rb.AddForce(velocityChange, ForceMode.VelocityChange); + } + // All movement calculations while walking + else + { + //isSprinting = false; + + //if (hideBarWhenFull && sprintRemaining == sprintDuration) + //{ + // sprintBarCG.alpha -= 3 * Time.deltaTime; + //} + + targetVelocity = transform.TransformDirection(targetVelocity) * walkSpeed; + + // Apply a force that attempts to reach our target velocity + Vector3 velocity = rb.velocity; + Vector3 velocityChange = (targetVelocity - velocity); + velocityChange.x = Mathf.Clamp(velocityChange.x, -maxVelocityChange, maxVelocityChange); + velocityChange.z = Mathf.Clamp(velocityChange.z, -maxVelocityChange, maxVelocityChange); + velocityChange.y = 0; + + rb.AddForce(velocityChange, ForceMode.VelocityChange); + } + } + + #endregion + } + + // Sets isGrounded based on a raycast sent straigth down from the player object + private void CheckGround() + { + Vector3 origin = new Vector3(transform.position.x, transform.position.y - (transform.localScale.y * .5f), transform.position.z); + Vector3 direction = transform.TransformDirection(Vector3.down); + float distance = .75f; + + if (Physics.Raycast(origin, direction, out RaycastHit hit, distance)) + { + Debug.DrawRay(origin, direction * distance, Color.red); + isGrounded = true; + } + else + { + isGrounded = false; + } + } + + private void Jump() + { + // Adds force to the player rigidbody to jump + if (isGrounded) + { + rb.AddForce(0f, jumpPower, 0f, ForceMode.Impulse); + isGrounded = false; + } + + // When crouched and using toggle system, will uncrouch for a jump + if (isCrouched && !holdToCrouch) + { + Crouch(); + } + } + + public void Crouch() + { + // Stands player up to full height + // Brings walkSpeed back up to original speed + if (isCrouched) + { + transform.localScale = new Vector3(originalScale.x, originalScale.y, originalScale.z); + walkSpeed /= speedReduction; + transform.GetChild(0).localScale = new Vector3(1, 1, 1); + isCrouched = false; + } + // Crouches player down to set height + // Reduces walkSpeed + else + { + transform.localScale = new Vector3(originalScale.x, crouchHeight, originalScale.z); + walkSpeed *= speedReduction; + transform.GetChild(0).localScale = new Vector3(1, 2, 1); + isCrouched = true; + } + } + + private void HeadBob() + { + if (isWalking) + { + // Calculates HeadBob speed during sprint + if (isSprinting) + { + timer += Time.deltaTime * (bobSpeed + sprintSpeed); + } + // Calculates HeadBob speed during crouched movement + else if (isCrouched) + { + timer += Time.deltaTime * (bobSpeed * speedReduction); + } + // Calculates HeadBob speed during walking + else + { + timer += Time.deltaTime * bobSpeed; + } + // Applies HeadBob movement + joint.localPosition = new Vector3(jointOriginalPos.x + Mathf.Sin(timer) * bobAmount.x, jointOriginalPos.y + Mathf.Sin(timer) * bobAmount.y, jointOriginalPos.z + Mathf.Sin(timer) * bobAmount.z); + } + else + { + // Resets when play stops moving + timer = 0; + joint.localPosition = new Vector3(Mathf.Lerp(joint.localPosition.x, jointOriginalPos.x, Time.deltaTime * bobSpeed), Mathf.Lerp(joint.localPosition.y, jointOriginalPos.y, Time.deltaTime * bobSpeed), Mathf.Lerp(joint.localPosition.z, jointOriginalPos.z, Time.deltaTime * bobSpeed)); + } + } + + + private void OnCollisionEnter(Collision collision) + { + stopForce = true; + } + + public void ChangeSpped(float para) + { + walkSpeed = para * defulatWalkSpeed; + sprintSpeed = para * defultSprintSpeed; + } + /// + /// 改变fpc 上下视角范围 + /// + /// + /// + public void ChangeViewLowLimt(bool cancle, float para) + { + walkSpeed = para * defulatWalkSpeed; + sprintSpeed = para * defultSprintSpeed; + } +} + + + +// Custom Editor +#if UNITY_EDITOR +[CustomEditor(typeof(FirstPersonController)), InitializeOnLoadAttribute] +public class FirstPersonControllerEditor : Editor +{ + FirstPersonController fpc; + SerializedObject SerFPC; + + private void OnEnable() + { + fpc = (FirstPersonController)target; + SerFPC = new SerializedObject(fpc); + } + + public override void OnInspectorGUI() + { + SerFPC.Update(); + + EditorGUILayout.Space(); + GUILayout.Label("Modular First Person Controller", new GUIStyle(GUI.skin.label) { alignment = TextAnchor.MiddleCenter, fontStyle = FontStyle.Bold, fontSize = 16 }); + GUILayout.Label("By Jess Case", new GUIStyle(GUI.skin.label) { alignment = TextAnchor.MiddleCenter, fontStyle = FontStyle.Normal, fontSize = 12 }); + GUILayout.Label("version 1.0.1", new GUIStyle(GUI.skin.label) { alignment = TextAnchor.MiddleCenter, fontStyle = FontStyle.Normal, fontSize = 12 }); + EditorGUILayout.Space(); + + #region Camera Setup + + EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); + GUILayout.Label("Camera Setup", new GUIStyle(GUI.skin.label) { alignment = TextAnchor.MiddleCenter, fontStyle = FontStyle.Bold, fontSize = 13 }, GUILayout.ExpandWidth(true)); + EditorGUILayout.Space(); + + fpc.playerCamera = (Camera)EditorGUILayout.ObjectField(new GUIContent("Camera", "Camera attached to the controller."), fpc.playerCamera, typeof(Camera), true); + fpc.fov = EditorGUILayout.Slider(new GUIContent("Field of View", "The camera’s view angle. Changes the player camera directly."), fpc.fov, fpc.zoomFOV, 179f); + fpc.cameraCanMove = EditorGUILayout.ToggleLeft(new GUIContent("Enable Camera Rotation", "Determines if the camera is allowed to move."), fpc.cameraCanMove); + + GUI.enabled = fpc.cameraCanMove; + fpc.invertCamera = EditorGUILayout.ToggleLeft(new GUIContent("Invert Camera Rotation", "Inverts the up and down movement of the camera."), fpc.invertCamera); + fpc.mouseSensitivity = EditorGUILayout.Slider(new GUIContent("Look Sensitivity", "Determines how sensitive the mouse movement is."), fpc.mouseSensitivity, .1f, 10f); + fpc.maxLookAngle = EditorGUILayout.Slider(new GUIContent("Max Look Angle", "Determines the max and min angle the player camera is able to look."), fpc.maxLookAngle, 40, 90); + GUI.enabled = true; + + fpc.lockCursor = EditorGUILayout.ToggleLeft(new GUIContent("Lock and Hide Cursor", "Turns off the cursor visibility and locks it to the middle of the screen."), fpc.lockCursor); + + fpc.crosshair = EditorGUILayout.ToggleLeft(new GUIContent("Auto Crosshair", "Determines if the basic crosshair will be turned on, and sets is to the center of the screen."), fpc.crosshair); + + // Only displays crosshair options if crosshair is enabled + if (fpc.crosshair) + { + EditorGUI.indentLevel++; + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PrefixLabel(new GUIContent("Crosshair Image", "Sprite to use as the crosshair.")); + fpc.crosshairImage = (Sprite)EditorGUILayout.ObjectField(fpc.crosshairImage, typeof(Sprite), false); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + fpc.crosshairColor = EditorGUILayout.ColorField(new GUIContent("Crosshair Color", "Determines the color of the crosshair."), fpc.crosshairColor); + EditorGUILayout.EndHorizontal(); + EditorGUI.indentLevel--; + } + + EditorGUILayout.Space(); + + #region Camera Zoom Setup + + GUILayout.Label("Zoom", new GUIStyle(GUI.skin.label) { alignment = TextAnchor.MiddleLeft, fontStyle = FontStyle.Bold, fontSize = 13 }, GUILayout.ExpandWidth(true)); + + fpc.enableZoom = EditorGUILayout.ToggleLeft(new GUIContent("Enable Zoom", "Determines if the player is able to zoom in while playing."), fpc.enableZoom); + + GUI.enabled = fpc.enableZoom; + fpc.holdToZoom = EditorGUILayout.ToggleLeft(new GUIContent("Hold to Zoom", "Requires the player to hold the zoom key instead if pressing to zoom and unzoom."), fpc.holdToZoom); + fpc.zoomKey = (KeyCode)EditorGUILayout.EnumPopup(new GUIContent("Zoom Key", "Determines what key is used to zoom."), fpc.zoomKey); + fpc.zoomFOV = EditorGUILayout.Slider(new GUIContent("Zoom FOV", "Determines the field of view the camera zooms to."), fpc.zoomFOV, .1f, fpc.fov); + fpc.zoomStepTime = EditorGUILayout.Slider(new GUIContent("Step Time", "Determines how fast the FOV transitions while zooming in."), fpc.zoomStepTime, .1f, 10f); + GUI.enabled = true; + + #endregion + + #endregion + + #region Movement Setup + + EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); + GUILayout.Label("Movement Setup", new GUIStyle(GUI.skin.label) { alignment = TextAnchor.MiddleCenter, fontStyle = FontStyle.Bold, fontSize = 13 }, GUILayout.ExpandWidth(true)); + EditorGUILayout.Space(); + + fpc.playerCanMove = EditorGUILayout.ToggleLeft(new GUIContent("Enable Player Movement", "Determines if the player is allowed to move."), fpc.playerCanMove); + + GUI.enabled = fpc.playerCanMove; + fpc.walkSpeed = EditorGUILayout.Slider(new GUIContent("Walk Speed", "Determines how fast the player will move while walking."), fpc.walkSpeed, .1f, fpc.sprintSpeed); + GUI.enabled = true; + + EditorGUILayout.Space(); + + #region Sprint + + GUILayout.Label("Sprint", new GUIStyle(GUI.skin.label) { alignment = TextAnchor.MiddleLeft, fontStyle = FontStyle.Bold, fontSize = 13 }, GUILayout.ExpandWidth(true)); + + fpc.enableSprint = EditorGUILayout.ToggleLeft(new GUIContent("Enable Sprint", "Determines if the player is allowed to sprint."), fpc.enableSprint); + + GUI.enabled = fpc.enableSprint; + fpc.enableSprintZoom = EditorGUILayout.ToggleLeft(new GUIContent("Enable Sprint Zoom", "Enable zoom while sprinting,\"Enable Zoom\" to resume while zoomed"), fpc.enableSprintZoom); + fpc.unlimitedSprint = EditorGUILayout.ToggleLeft(new GUIContent("Unlimited Sprint", "Determines if 'Sprint Duration' is enabled. Turning this on will allow for unlimited sprint."), fpc.unlimitedSprint); + fpc.sprintKey = (KeyCode)EditorGUILayout.EnumPopup(new GUIContent("Sprint Key", "Determines what key is used to sprint."), fpc.sprintKey); + fpc.sprintSpeed = EditorGUILayout.Slider(new GUIContent("Sprint Speed", "Determines how fast the player will move while sprinting."), fpc.sprintSpeed, fpc.walkSpeed, 20f); + + //GUI.enabled = !fpc.unlimitedSprint; + fpc.sprintDuration = EditorGUILayout.Slider(new GUIContent("Sprint Duration", "Determines how long the player can sprint while unlimited sprint is disabled."), fpc.sprintDuration, 1f, 20f); + fpc.sprintCooldown = EditorGUILayout.Slider(new GUIContent("Sprint Cooldown", "Determines how long the recovery time is when the player runs out of sprint."), fpc.sprintCooldown, .1f, fpc.sprintDuration); + //GUI.enabled = true; + + fpc.sprintFOV = EditorGUILayout.Slider(new GUIContent("Sprint FOV", "Determines the field of view the camera changes to while sprinting."), fpc.sprintFOV, fpc.fov, 179f); + fpc.sprintFOVStepTime = EditorGUILayout.Slider(new GUIContent("Step Time", "Determines how fast the FOV transitions while sprinting."), fpc.sprintFOVStepTime, .1f, 20f); + + fpc.useSprintBar = EditorGUILayout.ToggleLeft(new GUIContent("Use Sprint Bar", "Determines if the default sprint bar will appear on screen."), fpc.useSprintBar); + + // Only displays sprint bar options if sprint bar is enabled + if (fpc.useSprintBar) + { + EditorGUI.indentLevel++; + + EditorGUILayout.BeginHorizontal(); + fpc.hideBarWhenFull = EditorGUILayout.ToggleLeft(new GUIContent("Hide Full Bar", "Hides the sprint bar when sprint duration is full, and fades the bar in when sprinting. Disabling this will leave the bar on screen at all times when the sprint bar is enabled."), fpc.hideBarWhenFull); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PrefixLabel(new GUIContent("Bar BG", "Object to be used as sprint bar background.")); + fpc.sprintBarBG = (Image)EditorGUILayout.ObjectField(fpc.sprintBarBG, typeof(Image), true); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PrefixLabel(new GUIContent("Bar", "Object to be used as sprint bar foreground.")); + fpc.sprintBar = (Image)EditorGUILayout.ObjectField(fpc.sprintBar, typeof(Image), true); + EditorGUILayout.EndHorizontal(); + + + EditorGUILayout.BeginHorizontal(); + fpc.sprintBarWidthPercent = EditorGUILayout.Slider(new GUIContent("Bar Width", "Determines the width of the sprint bar."), fpc.sprintBarWidthPercent, .1f, .5f); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + fpc.sprintBarHeightPercent = EditorGUILayout.Slider(new GUIContent("Bar Height", "Determines the height of the sprint bar."), fpc.sprintBarHeightPercent, .001f, .025f); + EditorGUILayout.EndHorizontal(); + EditorGUI.indentLevel--; + } + GUI.enabled = true; + + EditorGUILayout.Space(); + + #endregion + + #region Jump + + GUILayout.Label("Jump", new GUIStyle(GUI.skin.label) { alignment = TextAnchor.MiddleLeft, fontStyle = FontStyle.Bold, fontSize = 13 }, GUILayout.ExpandWidth(true)); + + fpc.enableJump = EditorGUILayout.ToggleLeft(new GUIContent("Enable Jump", "Determines if the player is allowed to jump."), fpc.enableJump); + + GUI.enabled = fpc.enableJump; + fpc.jumpKey = (KeyCode)EditorGUILayout.EnumPopup(new GUIContent("Jump Key", "Determines what key is used to jump."), fpc.jumpKey); + fpc.jumpPower = EditorGUILayout.Slider(new GUIContent("Jump Power", "Determines how high the player will jump."), fpc.jumpPower, .1f, 20f); + GUI.enabled = true; + + EditorGUILayout.Space(); + + #endregion + + #region Crouch + + GUILayout.Label("Crouch", new GUIStyle(GUI.skin.label) { alignment = TextAnchor.MiddleLeft, fontStyle = FontStyle.Bold, fontSize = 13 }, GUILayout.ExpandWidth(true)); + + fpc.enableCrouch = EditorGUILayout.ToggleLeft(new GUIContent("Enable Crouch", "Determines if the player is allowed to crouch."), fpc.enableCrouch); + + GUI.enabled = fpc.enableCrouch; + fpc.holdToCrouch = EditorGUILayout.ToggleLeft(new GUIContent("Hold To Crouch", "Requires the player to hold the crouch key instead if pressing to crouch and uncrouch."), fpc.holdToCrouch); + fpc.crouchKey = (KeyCode)EditorGUILayout.EnumPopup(new GUIContent("Crouch Key", "Determines what key is used to crouch."), fpc.crouchKey); + //fpc.crouchHeight = EditorGUILayout.Slider(new GUIContent("Crouch Height", "Determines the y scale of the player object when crouched."), fpc.crouchHeight, .1f, 1); + fpc.speedReduction = EditorGUILayout.Slider(new GUIContent("Speed Reduction", "Determines the percent 'Walk Speed' is reduced by. 1 being no reduction, and .5 being half."), fpc.speedReduction, .1f, 1); + GUI.enabled = true; + + #endregion + + #endregion + + #region Head Bob + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); + GUILayout.Label("Head Bob Setup", new GUIStyle(GUI.skin.label) { alignment = TextAnchor.MiddleCenter, fontStyle = FontStyle.Bold, fontSize = 13 }, GUILayout.ExpandWidth(true)); + EditorGUILayout.Space(); + + fpc.enableHeadBob = EditorGUILayout.ToggleLeft(new GUIContent("Enable Head Bob", "Determines if the camera will bob while the player is walking."), fpc.enableHeadBob); + + + GUI.enabled = fpc.enableHeadBob; + fpc.joint = (Transform)EditorGUILayout.ObjectField(new GUIContent("Camera Joint", "Joint object position is moved while head bob is active."), fpc.joint, typeof(Transform), true); + fpc.bobSpeed = EditorGUILayout.Slider(new GUIContent("Speed", "Determines how often a bob rotation is completed."), fpc.bobSpeed, 1, 20); + fpc.bobAmount = EditorGUILayout.Vector3Field(new GUIContent("Bob Amount", "Determines the amount the joint moves in both directions on every axes."), fpc.bobAmount); + GUI.enabled = true; + + #endregion + + //Sets any changes from the prefab + if (GUI.changed) + { + EditorUtility.SetDirty(fpc); + Undo.RecordObject(fpc, "FPC Change"); + SerFPC.ApplyModifiedProperties(); + } + } + +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs.meta b/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs.meta new file mode 100644 index 0000000..7302a56 --- /dev/null +++ b/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d90ba6530d9bfda47abb4610956b2f44 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Newtonsoft.Json.dll b/Assets/Plugins/Newtonsoft.Json.dll new file mode 100644 index 0000000..7a8a6b5 Binary files /dev/null and b/Assets/Plugins/Newtonsoft.Json.dll differ diff --git a/Assets/Plugins/Newtonsoft.Json.dll.meta b/Assets/Plugins/Newtonsoft.Json.dll.meta new file mode 100644 index 0000000..a59e35e --- /dev/null +++ b/Assets/Plugins/Newtonsoft.Json.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: f50789f62adf7ea46adbfd0d8e912f84 +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: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix.meta b/Assets/Plugins/Sirenix.meta new file mode 100644 index 0000000..2b43858 --- /dev/null +++ b/Assets/Plugins/Sirenix.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7db84c72b2408b24da5a225550b562ff +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies.meta b/Assets/Plugins/Sirenix/Assemblies.meta new file mode 100644 index 0000000..fc26420 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 05b1eef81f23d6648992c93437892982 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEditor.meta b/Assets/Plugins/Sirenix/Assemblies/NoEditor.meta new file mode 100644 index 0000000..c5b7db4 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/NoEditor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aa3dc305dd00dad49bbc1ff3996b055d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll new file mode 100644 index 0000000..01aa6c5 Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll.meta b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll.meta new file mode 100644 index 0000000..ffbca5f --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 5651992cdad94894a3af7dc3f1da9170 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : N3DS + second: + enabled: 1 + settings: {} + - first: + : PSM + second: + enabled: 1 + settings: {} + - first: + : PSP2 + second: + enabled: 1 + settings: {} + - first: + : SamsungTV + second: + enabled: 1 + settings: {} + - first: + : Tizen + second: + enabled: 1 + settings: {} + - first: + : WiiU + second: + enabled: 1 + settings: {} + - first: + Any: + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 0 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 0 + Exclude PSM: 0 + Exclude PSP2: 0 + Exclude SamsungTV: 0 + Exclude Tizen: 0 + Exclude WebGL: 0 + Exclude WiiU: 0 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 0 + Exclude XboxOne: 0 + Exclude iOS: 0 + Exclude tvOS: 0 + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + PS4: PS4 + second: + enabled: 1 + settings: {} + - first: + Standalone: Win64 + second: + enabled: 1 + settings: {} + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + XboxOne: XboxOne + second: + enabled: 1 + settings: {} + - first: + iPhone: iOS + second: + enabled: 1 + settings: {} + - first: + tvOS: tvOS + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll new file mode 100644 index 0000000..0eb66aa Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll.meta b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll.meta new file mode 100644 index 0000000..74b217f --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 5978f8f3dd274e848fbb7a123bde1fb9 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : N3DS + second: + enabled: 1 + settings: {} + - first: + : PSM + second: + enabled: 1 + settings: {} + - first: + : PSP2 + second: + enabled: 1 + settings: {} + - first: + : SamsungTV + second: + enabled: 1 + settings: {} + - first: + : Tizen + second: + enabled: 1 + settings: {} + - first: + : WiiU + second: + enabled: 1 + settings: {} + - first: + Any: + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 0 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 0 + Exclude PSM: 0 + Exclude PSP2: 0 + Exclude SamsungTV: 0 + Exclude Tizen: 0 + Exclude WebGL: 0 + Exclude WiiU: 0 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 0 + Exclude XboxOne: 0 + Exclude iOS: 0 + Exclude tvOS: 0 + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + PS4: PS4 + second: + enabled: 1 + settings: {} + - first: + Standalone: Win64 + second: + enabled: 1 + settings: {} + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + XboxOne: XboxOne + second: + enabled: 1 + settings: {} + - first: + iPhone: iOS + second: + enabled: 1 + settings: {} + - first: + tvOS: tvOS + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor.meta b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor.meta new file mode 100644 index 0000000..cefd7a7 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a73a691127ad93941b89586292291dab +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll new file mode 100644 index 0000000..eb381c8 Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll.meta b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll.meta new file mode 100644 index 0000000..7aeda01 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll.meta @@ -0,0 +1,109 @@ +fileFormatVersion: 2 +guid: d2a8f0021d6b47c5923d8972dfb81ef1 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Linux + second: + enabled: 1 + settings: {} + - first: + : LinuxUniversal + second: + enabled: 1 + settings: {} + - first: + : OSXIntel + second: + enabled: 1 + settings: {} + - first: + : OSXIntel64 + second: + enabled: 1 + settings: {} + - first: + : PSM + second: + enabled: 0 + settings: {} + - first: + Android: Android + second: + enabled: 1 + settings: {} + - first: + Any: + second: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 1 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude N3DS: 1 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 0 + Exclude Win64: 0 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: + - first: + Standalone: Win + second: + enabled: 1 + settings: + CPU: + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll new file mode 100644 index 0000000..1a75d1d Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll.meta b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll.meta new file mode 100644 index 0000000..e259a23 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll.meta @@ -0,0 +1,109 @@ +fileFormatVersion: 2 +guid: 1e0a9643dc0d4b46bf2321f72c4e503e +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Linux + second: + enabled: 1 + settings: {} + - first: + : LinuxUniversal + second: + enabled: 1 + settings: {} + - first: + : OSXIntel + second: + enabled: 1 + settings: {} + - first: + : OSXIntel64 + second: + enabled: 1 + settings: {} + - first: + : PSM + second: + enabled: 0 + settings: {} + - first: + Android: Android + second: + enabled: 1 + settings: {} + - first: + Any: + second: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 1 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude N3DS: 1 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 0 + Exclude Win64: 0 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: + - first: + Standalone: Win + second: + enabled: 1 + settings: + CPU: + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll new file mode 100644 index 0000000..6a353f0 Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll.meta new file mode 100644 index 0000000..77ae929 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 47a84ebde4ec47fabb620b30cc7a3e5c +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 1 + settings: + Exclude Android: 0 + Exclude Editor: 0 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude N3DS: 0 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude PS4: 0 + Exclude PSM: 0 + Exclude PSP2: 0 + Exclude SamsungTV: 0 + Exclude Tizen: 0 + Exclude WebGL: 0 + Exclude WiiU: 0 + Exclude Win: 0 + Exclude Win64: 0 + Exclude WindowsStoreApps: 0 + Exclude XboxOne: 0 + Exclude iOS: 0 + Exclude tvOS: 0 + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml new file mode 100644 index 0000000..0649312 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml @@ -0,0 +1,6441 @@ + + + + Sirenix.OdinInspector.Attributes + + + + + AssetLists is used on lists and arrays and single elements of unity types, and replaces the default list drawer with a list of all possible assets with the specified filter. + Use this to both filter and include or exclude assets from a list or an array, without navigating the project window. + + + Asset lists works on all asset types such as materials, scriptable objects, prefabs, custom components, audio, textures etc, and does also show inherited types. + + + The following example will display an asset list of all prefabs located in the project window. + + public class AssetListExamples : MonoBehaviour + { + [InfoBox("The AssetList attribute work on both lists of UnityEngine.Object types and UnityEngine.Object types, but have different behaviour.")] + [AssetList] + [InlineEditor(InlineEditorModes.LargePreview)] + public GameObject Prefab; + + [AssetList] + public List<PlaceableObject> PlaceableObjects; + + [AssetList(Path = "Plugins/Sirenix/")] + [InlineEditor(InlineEditorModes.LargePreview)] + public UnityEngine.Object Object; + + [AssetList(AutoPopulate = true)] + public List<PlaceableObject> PlaceableObjectsAutoPopulated; + + [AssetList(LayerNames = "MyLayerName")] + public GameObject[] AllPrefabsWithLayerName; + + [AssetList(AssetNamePrefix = "Rock")] + public List<GameObject> PrefabsStartingWithRock; + + [AssetList(Path = "/Plugins/Sirenix/")] + public List<GameObject> AllPrefabsLocatedInFolder; + + [AssetList(Tags = "MyTagA, MyTabB", Path = "/Plugins/Sirenix/")] + public List<GameObject> GameObjectsWithTag; + + [AssetList(Path = "/Plugins/Sirenix/")] + public List<Material> AllMaterialsInSirenix; + + [AssetList(Path = "/Plugins/Sirenix/")] + public List<ScriptableObject> AllScriptableObjects; + + [InfoBox("Use a method as a custom filter for the asset list.")] + [AssetList(CustomFilterMethod = "HasRigidbodyComponent")] + public List<GameObject> MyRigidbodyPrefabs; + + private bool HasRigidbodyComponent(GameObject obj) + { + return obj.GetComponent<Rigidbody>() != null; + } + } + + + + + + If true, all assets found and displayed by the asset list, will automatically be added to the list when inspected. + + + + + Comma separated list of tags to filter the asset list. + + + + + Filter the asset list to only include assets with a specified layer. + + + + + Filter the asset list to only include assets which name begins with. + + + + + Filter the asset list to only include assets which is located at the specified path. + + + + + Filter the asset list to only include assets for which the given filter method returns true. + + + + + Initializes a new instance of the class. + + + + + The AssetSelector attribute can be used on all Unity types and will prepend a small button next to the object field that when clicked, + will present the user with a dropdown of assets to select from which can be customized from the attribute. + + + + + True by default. + + + + + True by default. If the ValueDropdown attribute is applied to a list, then disabling this, + will render all child elements normally without using the ValueDropdown. The ValueDropdown will + still show up when you click the add button on the list drawer, unless is true. + + + + + False by default. + + + + + If the ValueDropdown attribute is applied to a list, and is set to true, then enabling this, + will exclude existing values, instead of rendering a checkbox indicating whether the item is already included or not. + + + + + If the dropdown renders a tree-view, then setting this to true will ensure everything is expanded by default. + + + + + By default, the dropdown will create a tree view. + + + + + Gets or sets the width of the dropdown. Default is zero. + + + + + Gets or sets the height of the dropdown. Default is zero. + + + + + Gets or sets the title for the dropdown. Null by default. + + + + + Specify which folders to search in. Specifying no folders will make it search in your entire project. + Use the property for a more clean way of populating this array through attributes. + + + + + The filters we should use when calling AssetDatabase.FindAssets. + + + + + + Specify which folders to search in. Specifying no folders will make it search in your entire project. + You can decalir multiple paths using '|' as the seperator. + Example: [AssetList(Paths = "Assets/Textures|Assets/Other/Textures")] + + + This property is simply a more clean way of populating the array. + + + + + + AssetsOnly is used on object properties, and restricts the property to project assets, and not scene objects. + Use this when you want to ensure an object is from the project, and not from the scene. + + + The following example shows a component with a game object property, that must be a prefab from the project, and not a scene object. + + public MyComponent : MonoBehaviour + { + [AssetsOnly] + public GameObject MyPrefab; + } + + + + + + + BoxGroup is used on any property and organizes the property in a boxed group. + Use this to cleanly organize relevant values together in the inspector. + + + The following example shows how BoxGroup is used to organize properties together into a box. + + public class BoxGroupExamples : MonoBehaviour + { + // Box with a centered title. + [BoxGroup("Centered Title", centerLabel: true)] + public int A; + + [BoxGroup("Centered Title", centerLabel: true)] + public int B; + + [BoxGroup("Centered Title", centerLabel: true)] + public int C; + + // Box with a title. + [BoxGroup("Left Oriented Title")] + public int D; + + [BoxGroup("Left Oriented Title")] + public int E; + + // Box with a title recieved from a field. + [BoxGroup("$DynamicTitle1"), LabelText("Dynamic Title")] + public string DynamicTitle1 = "Dynamic box title"; + + [BoxGroup("$DynamicTitle1")] + public int F; + + // Box with a title recieved from a property. + [BoxGroup("$DynamicTitle2")] + public int G; + + [BoxGroup("$DynamicTitle2")] + public int H; + + // Box without a title. + [InfoBox("You can also hide the label of a box group.")] + [BoxGroup("NoTitle", false)] + public int I; + + [BoxGroup("NoTitle")] + public int J; + + [BoxGroup("NoTitle")] + public int K; + + #if UNITY_EDITOR + public string DynamicTitle2 + { + get { return UnityEditor.PlayerSettings.productName; } + } + #endif + + [BoxGroup("Boxed Struct"), HideLabel] + public SomeStruct BoxedStruct; + + public SomeStruct DefaultStruct; + + [Serializable] + public struct SomeStruct + { + public int One; + public int Two; + public int Three; + } + } + + + + + + + + + + + If true a label for the group will be drawn on top. + + + + + If true the header label will be places in the center of the group header. Otherwise it will be in left side. + + + + + If non-null, this is used instead of the group's name as the title label. + + + + + Adds the property to the specified box group. + + The box group. + If true a label will be drawn for the group. + If set to true the header label will be centered. + The order of the group in the inspector. + + + + Initializes a new instance of the class. Use the other constructor overloads in order to show a header-label on the box group. + + + + + Combines the box group with another group. + + The other group. + + + + Buttons are used on functions, and allows for clickable buttons in the inspector. + + + The following example shows a component that has an initialize method, that can be called from the inspector. + + public class MyComponent : MonoBehaviour + { + [Button] + private void Init() + { + // ... + } + } + + + + The following example show how a Button could be used to test a function. + + public class MyBot : MonoBehaviour + { + [Button] + private void Jump() + { + // ... + } + } + + + + The following example show how a Button can named differently than the function it's been attached to. + + public class MyComponent : MonoBehaviour + { + [Button("Function")] + private void MyFunction() + { + // ... + } + } + + + + + + + + Use this to override the label on the button. + + + + + The style in which to draw the button. + + + + + If the button contains parameters, you can disable the foldout it creates by setting this to true. + + + + + Whether to display the button method's parameters (if any) as values in the inspector. True by default. + If this is set to false, the button method will instead be invoked through an ActionResolver or ValueResolver (based on whether it returns a value), giving access to contextual named parameter values like "InspectorProperty property" that can be passed to the button method. + + + + + Whether the containing object or scene (if there is one) should be marked dirty when the button is clicked. True by default. Note that if this is false, undo for any changes caused by the button click is also disabled, as registering undo events also causes dirtying. + + + + + Gets the height of the button. If it's zero or below then use default. + + + + + The icon to be displayed inside the button. + + + + + The alignment of the icon that is displayed inside the button. + + + + + The alignment of the button represented by a range from 0 to 1 where 0 is the left edge of the available space and 1 is the right edge. + ButtonAlignment only has an effect when Stretch is set to false. + + + + + Whether the button should stretch to fill all of the available space. Default value is true. + + + + + If the button has a return type, set this to false to not draw the result. Default value is true. + + + + + Creates a button in the inspector named after the method. + + + + + Creates a button in the inspector named after the method. + + The size of the button. + + + + Creates a button in the inspector named after the method. + + The size of the button. + + + + Creates a button in the inspector with a custom name. + + Custom name for the button. + + + + Creates a button in the inspector with a custom name. + + Custom name for the button. + Size of the button. + + + + Creates a button in the inspector with a custom name. + + Custom name for the button. + Size of the button in pixels. + + + + Creates a button in the inspector named after the method. + + Button style for methods with parameters. + + + + Creates a button in the inspector named after the method. + + The size of the button. + Button style for methods with parameters. + + + + Creates a button in the inspector named after the method. + + The size of the button. + Button style for methods with parameters. + + + + Creates a button in the inspector with a custom name. + + Custom name for the button. + Button style for methods with parameters. + + + + Creates a button in the inspector with a custom name. + + Custom name for the button. + Size of the button. + Button style for methods with parameters. + + + + Creates a button in the inspector with a custom name. + + Custom name for the button. + Size of the button in pixels. + Button style for methods with parameters. + + + + Creates a button in the inspector with a custom icon. + + The icon to be displayed inside the button. + The alignment of the icon that is displayed inside the button. + + + + Creates a button in the inspector with a custom icon. + + The icon to be displayed inside the button. + + + + Creates a button in the inspector with a custom icon. + + The icon to be displayed inside the button. + Custom name for the button. + + + + ButtonGroup is used on any instance function, and adds buttons to the inspector organized into horizontal groups. + Use this to organize multiple button in a tidy horizontal group. + + + The following example shows how ButtonGroup is used to organize two buttons into one group. + + public class MyComponent : MonoBehaviour + { + [ButtonGroup("MyGroup")] + private void A() + { + // .. + } + + [ButtonGroup("MyGroup")] + private void B() + { + // .. + } + } + + + + The following example shows how ButtonGroup can be used to create multiple groups of buttons. + + public class MyComponent : MonoBehaviour + { + [ButtonGroup("First")] + private void A() + { } + + [ButtonGroup("First")] + private void B() + { } + + [ButtonGroup("")] + private void One() + { } + + [ButtonGroup("")] + private void Two() + { } + + [ButtonGroup("")] + private void Three() + { } + } + + + + + + + + + + + + + Gets the height of the button. If it's zero or below then use default. + + + + + The alignment of the icon that is displayed inside the button. + + + + + The alignment of the button represented by a range from 0 to 1 where 0 is the left edge of the available space and 1 is the right edge. + + + + + Whether the button should stretch to fill all of the available space. Default value is true. + + + + + Organizes the button into the specified button group. + + The group to organize the button into. + The order of the group in the inspector.. + + + + Button style for methods with parameters. + + + + + Draws a foldout box around the parameters of the method with the button on the box header itself. + This is the default style of a method with parameters. + + + + + Draws a button with a foldout to expose the parameters of the method. + + + + + Draws a foldout box around the parameters of the method with the button at the bottom of the box. + + + + + The ChildGameObjectsOnly attribute can be used on Components and GameObject fields and will prepend a small button next to the object-field that + will search through all child gameobjects for assignable objects and present them in a dropdown for the user to choose from. + + + + + + ColorPalette is used on any Color property, and allows for choosing colors from different definable palettes. + Use this to allow the user to choose from a set of predefined color options. + + + See and edit the color palettes in Tools > Odin > Inspector > Preferences > Drawers > Color Palettes. + The color property is not tied to the color palette, and can be edited. Therefore the color will also not update if the ColorPalette is edited. + + + The following example shows how ColorPalette is applied to a property. The user can freely choose between all available ColorPalettes. + + public class ColorPaletteExamples : MonoBehaviour + { + [ColorPalette] + public Color ColorOptions; + + [ColorPalette("Underwater")] + public Color UnderwaterColor; + + [ColorPalette("Fall"), HideLabel] + public Color WideColorPalette; + + [ColorPalette("My Palette")] + public Color MyColor; + + [ColorPalette("Clovers")] + public Color[] ColorArray; + } + + + + + + Gets the name of the palette. + + + + + Indicates if the color palette should show alpha values or not. + + + + + Adds a color palette options to a Color property. + + + + + Adds color options to a Color property from a specific palette. + + Name of the palette. + + + + CustomContextMenu is used on any property, and adds a custom options to the context menu for the property. + Use this for when you want to add custom actions to the context menu of a property. + + + CustomContextMenu currently does not support static functions. + + + The following example shows how CustomContextMenu is used to add a custom option to a property. + + public class MyComponent : MonoBehaviour + { + [CustomContextMenu("My custom option", "MyAction")] + public Vector3 MyVector; + + private void MyAction() + { + MyVector = Random.onUnitSphere; + } + } + + + + + + + The name of the menu item. + + + + + The name of the callback method. Obsolete; use the Action member instead. + + + + + A resolved string defining the action to take when the context menu is clicked. + + + + + Adds a custom option to the context menu of the property. + + The name of the menu item. + A resolved string defining the action to take when the context menu is clicked. + + + + Instead of making a new attribute, and a new drawer, for a one-time thing, you can with this attribute, make a method that acts as a custom property drawer. + These drawers will out of the box have support for undo/redo and multi-selection. + + + Usage: + + public class CustomDrawerExamples : MonoBehaviour + { + public float From = 2, To = 7; + + [CustomValueDrawer("MyStaticCustomDrawerStatic")] + public float CustomDrawerStatic; + + [CustomValueDrawer("MyStaticCustomDrawerInstance")] + public float CustomDrawerInstance; + + [CustomValueDrawer("MyStaticCustomDrawerArray")] + public float[] CustomDrawerArray; + + #if UNITY_EDITOR + + private static float MyStaticCustomDrawerStatic(float value, GUIContent label) + { + return EditorGUILayout.Slider(value, 0f, 10f); + } + + private float MyStaticCustomDrawerInstance(float value, GUIContent label) + { + return EditorGUILayout.Slider(value, this.From, this.To); + } + + private float MyStaticCustomDrawerArray(float value, GUIContent label) + { + return EditorGUILayout.Slider(value, this.From, this.To); + } + + #endif + } + + + + + + Name of the custom drawer method. Obsolete; use the Action member instead. + + + + + A resolved string that defines the custom drawer action to take, such as an expression or method invocation. + + + + + Instead of making a new attribute, and a new drawer, for a one-time thing, you can with this attribute, make a method that acts as a custom property drawer. + These drawers will out of the box have support for undo/redo and multi-selection. + + A resolved string that defines the custom drawer action to take, such as an expression or method invocation. + + + + Delays applying changes to properties while they still being edited in the inspector. + Similar to Unity's built-in Delayed attribute, but this attribute can also be applied to properties. + + + + + DetailedInfoBox is used on any property, and displays a message box that can be expanded to show more details. + Use this to convey a message to a user, and give them the option to see more details. + + + The following example shows how DetailedInfoBox is used on a field. + + public class MyComponent : MonoBehaviour + { + [DetailedInfoBox("This is a message", "Here is some more details about that message")] + public int MyInt; + } + + + + + + + The message for the message box. + + + + + The hideable details of the message box. + + + + + Type of the message box. + + + + + Optional name of a member to hide or show the message box. + + + + + Displays a message box with hideable details. + + The message for the message box. + The hideable details of the message box. + Type of the message box. + Optional name of a member to hide or show the message box. + + + + Customize the behavior for dictionaries in the inspector. + + + + + Specify an alternative key label for the dictionary drawer. + + + + + Specify an alternative value label for the dictionary drawer. + + + + + Specify how the dictionary should draw its items. + + + + + Gets or sets a value indicating whether this instance is read only. + + + + + Gets or sets a value indicating the default key column width of the dictionary. + + + + + DisableContextMenu is used on any property and disables the context menu for that property. + Use this if you do not want the context menu to be available for a property. + + + The following example shows how DisableContextMenu is used on a property. + + public class MyComponent : MonoBehaviour + { + [DisableContextMenu] + public Vector3 MyVector; + } + + + + + + + Whether to disable the context menu for the member itself. + + + + + Whether to disable the context menu for collection elements. + + + + + Initializes a new instance of the class. + + Whether to disable the context menu for the member itself. + Whether to also disable the context menu of collection elements. + + + + DisableIf is used on any property, and can disable or enable the property in the inspector. + Use this to disable properties when they are irrelevant. + + + The following example shows how a property can be disabled by the state of a field. + + public class MyComponent : MonoBehaviour + { + public bool DisableProperty; + + [DisableIf("DisableProperty")] + public int MyInt; + + public SomeEnum SomeEnumField; + + [DisableIf("SomeEnumField", SomeEnum.SomeEnumMember)] + public string SomeString; + } + + + + The following examples show how a property can be disabled by a function. + + public class MyComponent : MonoBehaviour + { + [EnableIf("MyDisableFunction")] + public int MyInt; + + private bool MyDisableFunction() + { + // ... + } + } + + + + + + + + The name of a bool member field, property or method. Obsolete; use the Condition member instead. + + + + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + + The optional condition value. + + + + + Disables a property in the inspector, based on the value of a resolved string. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + Disables a property in the inspector, if the resolved string evaluates to the specified value. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + Value to check against. + + + + Disables a member based on which type of a prefab and instance it is in. + + + + + DisableInEditorMode is used on any property, and disables the property when not in play mode. + Use this when you only want a property to be editable when in play mode. + + + The following example shows how DisableInEditorMode is used to disable a property when in the editor. + + public class MyComponent : MonoBehaviour + { + [DisableInEditorMode] + public int MyInt; + } + + + + + + + + + Disables a property if it is drawn within an . + + + + + Disables a property if it is drawn from a non-prefab asset or instance. + + + + + DisableInPlayMode is used on any property, and disables the property when in play mode. + Use this to prevent users from editing a property when in play mode. + + + The following example shows how DisableInPlayMode is used to disable a property when in play mode. + + public class MyComponent : MonoBehaviour + { + [DisableInPlayMode] + public int MyInt; + } + + + + + + + + + + + Disables a property if it is drawn from a prefab asset. + + + + + Disables a property if it is drawn from a prefab instance. + + + + + Disables a property if it is drawn from a prefab asset or a prefab instance. + + + + + DisallowModificationsIn disables / grays out members, preventing modifications from being made and enables validation, + providing error messages in case a modification was made prior to introducing the attribute. + + + + + + + + DisplayAsString is used on any property, and displays a string in the inspector as text. + Use this for when you want to show a string in the inspector, but not allow for any editing. + + + DisplayAsString uses the property's ToString method to display the property as a string. + + + The following example shows how DisplayAsString is used to display a string property as text in the inspector. + + public class MyComponent : MonoBehaviour + { + [DisplayAsString] + public string MyInt = 5; + + // You can combine with to display a message in the inspector. + [DisplayAsString, HideLabel] + public string MyMessage = "This string will be displayed as text in the inspector"; + + [DisplayAsString(false)] + public string InlineMessage = "This string is very long, but has been configured to not overflow."; + } + + + + + + + + If true, the string will overflow past the drawn space and be clipped when there's not enough space for the text. + If false the string will expand to multiple lines, if there's not enough space when drawn. + + + + + How the string should be aligned. + + + + + The size of the font. + + + + + If true the string will support rich text. + + + + + String for formatting the value. Type must implement the IFormattable interface. + + + + + Displays the property as a string in the inspector. + + + + + Displays the property as a string in the inspector. + + Value indicating if the string should overflow past the available space, or expand to multiple lines when there's not enough horizontal space. + + + + Displays the property as a string in the inspector. + + How the string should be aligned. + + + + Displays the property as a string in the inspector. + + The size of the font. + + + + Displays the property as a string in the inspector. + + Value indicating if the string should overflow past the available space, or expand to multiple lines when there's not enough horizontal space. + How the string should be aligned. + + + + Displays the property as a string in the inspector. + + Value indicating if the string should overflow past the available space, or expand to multiple lines when there's not enough horizontal space. + The size of the font. + + + + Displays the property as a string in the inspector. + + The size of the font. + How the string should be aligned. + + + + Displays the property as a string in the inspector. + + Value indicating if the string should overflow past the available space, or expand to multiple lines when there's not enough horizontal space. + The size of the font. + How the string should be aligned. + + + + Displays the property as a string in the inspector. + + How the string should be aligned. + If true the string will support rich text. + + + + Displays the property as a string in the inspector. + + The size of the font. + If true the string will support rich text. + + + + Displays the property as a string in the inspector. + + Value indicating if the string should overflow past the available space, or expand to multiple lines when there's not enough horizontal space. + How the string should be aligned. + If true the string will support rich text. + + + + Displays the property as a string in the inspector. + + Value indicating if the string should overflow past the available space, or expand to multiple lines when there's not enough horizontal space. + The size of the font. + If true the string will support rich text. + + + + Displays the property as a string in the inspector. + + The size of the font. + How the string should be aligned. + If true the string will support rich text. + + + + Displays the property as a string in the inspector. + + Value indicating if the string should overflow past the available space, or expand to multiple lines when there's not enough horizontal space. + The size of the font. + How the string should be aligned. + If true the string will support rich text. + + + + Indicates that the member should not be drawn as a value reference, if it becomes a reference to another value in the tree. Beware, and use with care! This may lead to infinite draw loops! + + + + + DontApplyToListElements is used on other attributes, and indicates that those attributes should be applied only to the list, and not to the elements of the list. + Use this on attributes that should only work on a list or array property as a whole, and not on each element of the list. + + + The following example shows how DontApplyToListElements is used on . + + [DontApplyToListElements] + [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)] + public sealed class VisibleIfAttribute : Attribute + { + public string MemberName { get; private set; } + + public VisibleIfAttribute(string memberName) + { + this.MemberName = memberName; + } + } + + + + + + Tells the validation system that this member should not be validated. It will not show validation messages in the inspector, and it will not be scanned by the project validator. + + + + + DrawWithUnity can be applied to a field or property to make Odin draw it using Unity's old drawing system. Use it if you want to selectively disable Odin drawing for a particular member. + + + Note that this attribute does not mean "disable Odin completely for this property"; it is visual only in nature, and in fact represents an Odin drawer which calls into Unity's old property drawing system. As Odin is still ultimately responsible for arranging the drawing of the property, and since other attributes exist with a higher priority than this attribute, and it is not guaranteed that Unity will draw the property if another attribute is present to override this one. + + + + + Force Odin to draw this value as an IMGUI-embedded UI Toolkit Visual Element. + + + + + An attribute that enables GUI. + + + + public class InlineEditorExamples : MonoBehaviour + { + [EnableGUI] + public string SomeReadonlyProperty { get { return "My GUI is usually disabled." } } + } + + + + + + + EnableIf is used on any property, and can enable or disable the property in the inspector. + Use this to enable properties when they are relevant. + + + The following example shows how a property can be enabled by the state of a field. + + public class MyComponent : MonoBehaviour + { + public bool EnableProperty; + + [EnableIf("EnableProperty")] + public int MyInt; + + public SomeEnum SomeEnumField; + + [EnableIf("SomeEnumField", SomeEnum.SomeEnumMember)] + public string SomeString; + } + + + + The following examples show how a property can be enabled by a function. + + public class MyComponent : MonoBehaviour + { + [EnableIf("MyEnableFunction")] + public int MyInt; + + private bool MyEnableFunction() + { + // ... + } + } + + + + + + + + + + + The name of a bool member field, property or method. Obsolete; use the Condition member instead. + + + + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + + The optional condition value. + + + + + Enables a property in the inspector, based on the value of a resolved string. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + Enables a property in the inspector, if the resolved string evaluates to the specified value. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + Value to check against. + + + + Enables a member based on which type of a prefab and instance it is. + + + + + Draws an enum selector in the inspector with next and previous buttons to let you cycle through the available values for the enum property. + + + + public enum MyEnum + { + One, + Two, + Three, + } + + public class MyMonoBehaviour : MonoBehaviour + { + [EnumPaging] + public MyEnum Value; + } + + + + + + + Draws an enum in a horizontal button group instead of a dropdown. + + + + public class MyComponent : MonoBehvaiour + { + [EnumToggleButtons] + public MyBitmaskEnum MyBitmaskEnum; + + [EnumToggleButtons] + public MyEnum MyEnum; + } + + [Flags] + public enum MyBitmaskEnum + { + A = 1 << 1, // 1 + B = 1 << 2, // 2 + C = 1 << 3, // 4 + ALL = A | B | C + } + + public enum MyEnum + { + A, + B, + C + } + + + + + + + FilePath is used on string properties, and provides an interface for file paths. + + + The following example demonstrates how FilePath is used. + + public class FilePathExamples : MonoBehaviour + { + // By default, FilePath provides a path relative to the Unity project. + [FilePath] + public string UnityProjectPath; + + // It is possible to provide custom parent path. Parent paths can be relative to the Unity project, or absolute. + [FilePath(ParentFolder = "Assets/Plugins/Sirenix")] + public string RelativeToParentPath; + + // Using parent path, FilePath can also provide a path relative to a resources folder. + [FilePath(ParentFolder = "Assets/Resources")] + public string ResourcePath; + + // Provide a comma seperated list of allowed extensions. Dots are optional. + [FilePath(Extensions = "cs")] + public string ScriptFiles; + + // By setting AbsolutePath to true, the FilePath will provide an absolute path instead. + [FilePath(AbsolutePath = true)] + [BoxGroup("Conditions")] + public string AbsolutePath; + + // FilePath can also be configured to show an error, if the provided path is invalid. + [FilePath(RequireValidPath = true)] + public string ValidPath; + + // By default, FilePath will enforce the use of forward slashes. It can also be configured to use backslashes instead. + [FilePath(UseBackslashes = true)] + public string Backslashes; + + // FilePath also supports member references with the $ symbol. + [FilePath(ParentFolder = "$DynamicParent", Extensions = "$DynamicExtensions")] + public string DynamicFilePath; + + public string DynamicParent = "Assets/Plugin/Sirenix"; + + public string DynamicExtensions = "cs, unity, jpg"; + } + + + + + + + + If true the FilePath will provide an absolute path, instead of a relative one. + + + + + Comma separated list of allowed file extensions. Dots are optional. + Supports member referencing with $. + + + + + ParentFolder provides an override for where the path is relative to. ParentFolder can be relative to the Unity project, or an absolute path. + Supports member referencing with $. + + + + + If true an error will be displayed for invalid, or missing paths. + + + + + If true an error will be displayed for non-existing paths. + + + + + By default FilePath enforces forward slashes. Set UseBackslashes to true if you want backslashes instead. + + + + + If true the file path will include the file's extension. + + + + + Gets or sets a value indicating whether the path should be read only. + + + + + FolderPath is used on string properties, and provides an interface for directory paths. + + + The following example demonstrates how FolderPath is used. + + public class FolderPathExamples : MonoBehaviour + { + // By default, FolderPath provides a path relative to the Unity project. + [FolderPath] + public string UnityProjectPath; + + // It is possible to provide custom parent patn. ParentFolder paths can be relative to the Unity project, or absolute. + [FolderPath(ParentFolder = "Assets/Plugins/Sirenix")] + public string RelativeToParentPath; + + // Using ParentFolder, FolderPath can also provide a path relative to a resources folder. + [FolderPath(ParentFolder = "Assets/Resources")] + public string ResourcePath; + + // By setting AbsolutePath to true, the FolderPath will provide an absolute path instead. + [FolderPath(AbsolutePath = true)] + public string AbsolutePath; + + // FolderPath can also be configured to show an error, if the provided path is invalid. + [FolderPath(RequireValidPath = true)] + public string ValidPath; + + // By default, FolderPath will enforce the use of forward slashes. It can also be configured to use backslashes instead. + [FolderPath(UseBackslashes = true)] + public string Backslashes; + + // FolderPath also supports member references with the $ symbol. + [FolderPath(ParentFolder = "$DynamicParent")] + public string DynamicFolderPath; + + public string DynamicParent = "Assets/Plugins/Sirenix"; + } + + + + + + + + If true the FolderPath will provide an absolute path, instead of a relative one. + + + + + ParentFolder provides an override for where the path is relative to. ParentFolder can be relative to the Unity project, or an absolute path. + Supports member referencing with $. + + + + + If true an error will be displayed for invalid, or missing paths. + + + + + If true an error will be displayed for non-existing paths. + + + + + By default FolderPath enforces forward slashes. Set UseBackslashes to true if you want backslashes instead. + + + + + FoldoutGroup is used on any property, and organizes properties into a foldout. + Use this to organize properties, and to allow the user to hide properties that are not relevant for them at the moment. + + + The following example shows how FoldoutGroup is used to organize properties into a foldout. + + public class MyComponent : MonoBehaviour + { + [FoldoutGroup("MyGroup")] + public int A; + + [FoldoutGroup("MyGroup")] + public int B; + + [FoldoutGroup("MyGroup")] + public int C; + } + + + + The following example shows how properties can be organizes into multiple foldouts. + + public class MyComponent : MonoBehaviour + { + [FoldoutGroup("First")] + public int A; + + [FoldoutGroup("First")] + public int B; + + [FoldoutGroup("Second")] + public int C; + } + + + + + + + + + + + Gets a value indicating whether or not the foldout should be expanded by default. + + + + + Gets a value indicating whether or not the Expanded property has been set. + + + + + Adds the property to the specified foldout group. + + Name of the foldout group. + The order of the group in the inspector. + + + + Adds the property to the specified foldout group. + + Name of the foldout group. + Whether or not the foldout should be expanded by default. + The order of the group in the inspector. + + + + Combines the foldout property with another. + + The group to combine with. + + + + GUIColor is used on any property and changes the GUI color used to draw the property. + + + The following example shows how GUIColor is used on a properties to create a rainbow effect. + + public class MyComponent : MonoBehaviour + { + [GUIColor(1f, 0f, 0f)] + public int A; + + [GUIColor(1f, 0.5f, 0f, 0.2f)] + public int B; + + [GUIColor("GetColor")] + public int C; + + private Color GetColor() { return this.A == 0 ? Color.red : Color.white; } + } + + + + + + The GUI color of the property. + + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Sets the GUI color for the property. + + The red channel. + The green channel. + The blue channel. + The alpha channel. + + + + Sets the GUI color for the property. + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). + + + + Indicates that Odin should hide the reference box, if this property would otherwise be drawn as a reference to another property, due to duplicate reference values being encountered. + Note that if the value is referencing itself recursively, then the reference box will be drawn regardless of this attribute in all recursive draw calls. + + + + + HideIf is used on any property and can hide the property in the inspector. + Use this to hide irrelevant properties based on the current state of the object. + + + This example shows a component with fields hidden by the state of another field. + + public class MyComponent : MonoBehaviour + { + public bool HideProperties; + + [HideIf("HideProperties")] + public int MyInt; + + [HideIf("HideProperties", false)] + public string MyString; + + public SomeEnum SomeEnumField; + + [HideIf("SomeEnumField", SomeEnum.SomeEnumMember)] + public string SomeString; + } + + + + This example shows a component with a field that is hidden when the game object is inactive. + + public class MyComponent : MonoBehaviour + { + [HideIf("MyVisibleFunction")] + public int MyHideableField; + + private bool MyVisibleFunction() + { + return !this.gameObject.activeInHierarchy; + } + } + + + + + + + + + The name of a bool member field, property or method. Obsolete; use the Condition member instead. + + + + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + + The optional condition value. + + + + + Whether or not to slide the property in and out when the state changes. + + + + + Hides a property in the inspector, based on the value of a resolved string. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + Whether or not to slide the property in and out when the state changes. + + + + Hides a property in the inspector, if the resolved string evaluates to the specified value. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + Value to check against. + Whether or not to slide the property in and out when the state changes. + + + +

HideIfGroup allows for showing or hiding a group of properties based on a condition.

+

The attribute is a group attribute and can therefore be combined with other group attributes, and even be used to show or hide entire groups.

+

Note that in the vast majority of cases where you simply want to be able to control the visibility of a single group, it is better to use the VisibleIf parameter that *all* group attributes have.

+
+ + + + + +
+ + + Whether or not to visually animate group visibility changes. + + + + + The optional member value. + + + + + Name of member to use when to hide the group. Defaults to the name of the group, by can be overriden by setting this property. + + + + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + + Makes a group that can be shown or hidden based on a condition. + + The group path. + If true then a fade animation will be played when the group is hidden or shown. + + + + Makes a group that can be shown or hidden based on a condition. + + The group path. + The value the member should equal for the property to shown. + If true then a fade animation will be played when the group is hidden or shown. + + + + Combines HideIfGroup attributes. + + Another ShowIfGroup attribute. + + + + Hides a member based on which type of a prefab and instance it is in. + + + + + HideInEditorMode is used on any property, and hides the property when not in play mode. + Use this when you only want a property to only be visible play mode. + + + The following example shows how HideInEditorMode is used to hide a property when in the editor. + + public class MyComponent : MonoBehaviour + { + [HideInEditorMode] + public int MyInt; + } + + + + + + + + + + Hides a property if it is drawn within an . + + + + + Hides a property if it is drawn from a non prefab instance or asset. + + + + + HideInPlayMode is used on any property, and hides the property when not in editor mode. + Use this when you only want a property to only be visible the editor. + + + The following example shows how HideInPlayMode is used to hide a property when in play mode. + + public class MyComponent : MonoBehaviour + { + [HideInPlayMode] + public int MyInt; + } + + + + + + + + + + Hides a property if it is drawn from a prefab asset. + + + + + Hides a property if it is drawn from a prefab instance. + + + + + Hides a property if it is drawn from a prefab instance or a prefab asset. + + + + + The HideInTables attribute is used to prevent members from showing up as columns in tables drawn using the . + + + + + HideLabel is used on any property, and hides the label in the inspector. + Use this to hide the label of properties in the inspector. + + + The following example show how HideLabel is used to hide the label of a game object property. + + public class MyComponent : MonoBehaviour + { + [HideLabel] + public GameObject MyGameObjectWithoutLabel; + } + + + + + + + Apply HideMonoScript to your class to prevent the Script property from being shown in the inspector. + + This attribute has the same effect on a single type that the global configuration option "Show Mono Script In Editor" in "Preferences -> Odin Inspector -> General -> Drawers" has globally when disabled. + + + + The following example shows how to use this attribute. + + [HideMonoScript] + public class MyComponent : MonoBehaviour + { + // The Script property will not be shown for this component in the inspector + } + + + + + + + Apply HideNetworkBehaviourFields to your class to prevent the special "Network Channel" and "Network Send Interval" properties from being shown in the inspector for a NetworkBehaviour. + This attribute has no effect on classes that are not derived from NetworkBehaviour. + + + The following example shows how to use this attribute. + + [HideNetworkBehaviourFields] + public class MyComponent : NetworkBehaviour + { + // The "Network Channel" and "Network Send Interval" properties will not be shown for this component in the inspector + } + + + + + + + Hides the polymorphic object-picker shown above the properties of non-Unity serialized reference types. + + + When the object picker is hidden, you can right click and set the instance to null, in order to set a new value. + If you don't want this behavior, you can use attribute to ensure people can't change the value. + + + + + public class MyComponent : SerializedMonoBehaviour + { + [Header("Hidden Object Pickers")] + [Indent] + [HideReferenceObjectPicker] + public MyCustomReferenceType OdinSerializedProperty1; + + [Indent] + [HideReferenceObjectPicker] + public MyCustomReferenceType OdinSerializedProperty2; + + [Indent] + [Header("Shown Object Pickers")] + public MyCustomReferenceType OdinSerializedProperty3; + + [Indent] + public MyCustomReferenceType OdinSerializedProperty4; + + public class MyCustomReferenceType + { + public int A; + public int B; + public int C; + } + } + + + + + + HorizontalGroup is used group multiple properties horizontally in the inspector. + The width can either be specified as percentage or pixels. + All values between 0 and 1 will be treated as a percentage. + If the width is 0 the column will be automatically sized. + Margin-left and right can only be specified in pixels. + + + The following example shows how three properties have been grouped together horizontally. + + // The width can either be specified as percentage or pixels. + // All values between 0 and 1 will be treated as a percentage. + // If the width is 0 the column will be automatically sized. + // Margin-left and right can only be specified in pixels. + + public class HorizontalGroupAttributeExamples : MonoBehaviour + { + [HorizontalGroup] + public int A; + + [HideLabel, LabelWidth (150)] + [HorizontalGroup(150)] + public LayerMask B; + + // LabelWidth can be helpfull when dealing with HorizontalGroups. + [HorizontalGroup("Group 1"), LabelWidth(15)] + public int C; + + [HorizontalGroup("Group 1"), LabelWidth(15)] + public int D; + + [HorizontalGroup("Group 1"), LabelWidth(15)] + public int E; + + // Having multiple properties in a column can be achived using multiple groups. Checkout the "Combining Group Attributes" example. + [HorizontalGroup("Split", 0.5f, PaddingRight = 15)] + [BoxGroup("Split/Left"), LabelWidth(15)] + public int L; + + [BoxGroup("Split/Right"), LabelWidth(15)] + public int M; + + [BoxGroup("Split/Left"), LabelWidth(15)] + public int N; + + [BoxGroup("Split/Right"), LabelWidth(15)] + public int O; + + // Horizontal Group also has supprot for: Title, MarginLeft, MarginRight, PaddingLeft, PaddingRight, MinWidth and MaxWidth. + [HorizontalGroup("MyButton", MarginLeft = 0.25f, MarginRight = 0.25f)] + public void SomeButton() + { + + } + } + + + + + + + + + + + The width. Values between 0 and 1 will be treated as percentage, 0 = auto, otherwise pixels. + + + + + The margin left. Values between 0 and 1 will be treated as percentage, 0 = ignore, otherwise pixels. + + + + + The margin right. Values between 0 and 1 will be treated as percentage, 0 = ignore, otherwise pixels. + + + + + The padding left. Values between 0 and 1 will be treated as percentage, 0 = ignore, otherwise pixels. + + + + + The padding right. Values between 0 and 1 will be treated as percentage, 0 = ignore, otherwise pixels. + + + + + The minimum Width. Values between 0 and 1 will be treated as percentage, 0 = ignore, otherwise pixels. + + + + + The maximum Width. Values between 0 and 1 will be treated as percentage, 0 = ignore, otherwise pixels. + + + + + The width between each column. Values between 0 and 1 will be treated as percentage, otherwise pixels. + + + + + Adds a title above the horizontal group. + + + + + Fallback to using the default label width, whatever that might be. + + + + + The label width, 0 = auto. + + + + + Organizes the property in a horizontal group. + + The group for the property. + The width of the property. Values between 0 and 1 are interpolated as a percentage, otherwise pixels. + The left margin in pixels. + The right margin in pixels. + The order of the group in the inspector. + + + + Organizes the property in a horizontal group. + + The width of the property. Values between 0 and 1 are interpolated as a percentage, otherwise pixels. + The left margin in pixels. + The right margin in pixels. + The order of the group in the inspector. + + + + Merges the values of two group attributes together. + + The other group to combine with. + + + + Indent is used on any property and moves the property's label to the right. + Use this to clearly organize properties in the inspector. + + + The following example shows how a property is indented by Indent. + + public class MyComponent : MonoBehaviour + { + [Indent] + public int IndentedInt; + } + + + + + + Indicates how much a property should be indented. + + + + + Indents a property in the inspector. + + How much a property should be indented. + + + + InfoBox is used on any property, and display a text box above the property in the inspector. + Use this to add comments or warn about the use of different properties. + + + The following example shows different info box types. + + public class MyComponent : MonoBehaviour + { + [InfoBox("This is an int property")] + public int MyInt; + + [InfoBox("This info box is a warning", InfoMessageType.Warning)] + public float MyFloat; + + [InfoBox("This info box is an error", InfoMessageType.Error)] + public object MyObject; + + [InfoBox("This info box is just a box", InfoMessageType.None)] + public Vector3 MyVector; + } + + + + The following example how info boxes can be hidden by fields and properties. + + public class MyComponent : MonoBehaviour + { + [InfoBox("This info box is hidden by an instance field.", "InstanceShowInfoBoxField")] + public int MyInt; + public bool InstanceShowInfoBoxField; + + [InfoBox("This info box is hideable by a static field.", "StaticShowInfoBoxField")] + public float MyFloat; + public static bool StaticShowInfoBoxField; + + [InfoBox("This info box is hidden by an instance property.", "InstanceShowInfoBoxProperty")] + public int MyOtherInt; + public bool InstanceShowInfoBoxProperty { get; set; } + + [InfoBox("This info box is hideable by a static property.", "StaticShowInfoBoxProperty")] + public float MyOtherFloat; + public static bool StaticShowInfoBoxProperty { get; set; } + } + + + + The following example shows how info boxes can be hidden by functions. + + public class MyComponent : MonoBehaviour + { + [InfoBox("This info box is hidden by an instance function.", "InstanceShowFunction")] + public int MyInt; + public bool InstanceShowFunction() + { + return this.MyInt == 0; + } + + [InfoBox("This info box is hidden by a static function.", "StaticShowFunction")] + public short MyShort; + public bool StaticShowFunction() + { + return true; + } + + // You can also specify a function with the same type of parameter. + // Use this to specify the same function, for multiple different properties. + [InfoBox("This info box is hidden by an instance function with a parameter.", "InstanceShowParameterFunction")] + public GameObject MyGameObject; + public bool InstanceShowParameterFunction(GameObject property) + { + return property != null; + } + + [InfoBox("This info box is hidden by a static function with a parameter.", "StaticShowParameterFunction")] + public Vector3 MyVector; + public bool StaticShowParameterFunction(Vector3 property) + { + return property.magnitude == 0f; + } + } + + + + + + + + The message to display in the info box. + + + + + The type of the message box. + + + + + Optional member field, property or function to show and hide the info box. + + + + + When true the InfoBox will ignore the GUI.enable flag and always draw as enabled. + + + + + The icon to be displayed next to the message. + + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Displays an info box above the property. + + The message for the message box. Supports referencing a member string field, property or method by using $. + The type of the message box. + Name of member bool to show or hide the message box. + + + + Displays an info box above the property. + + The message for the message box. Supports referencing a member string field, property or method by using $. + Name of member bool to show or hide the message box. + + + + Displays an info box above the property. + + The message for the message box. Supports referencing a member string field, property or method by using $. + The icon to be displayed next to the message. + Name of member bool to show or hide the message box. + + + + The inline button adds a button to the end of a property. + + + Due to a bug, multiple inline buttons are currently not supported. + + + The following examples demonstrates how InlineButton can be used. + + public class MyComponent : MonoBehaviour + { + // Adds a button to the end of the A property. + [InlineButton("MyFunction")] + public int A; + + // This is example demonstrates how you can change the label of the button. + // InlineButton also supports refering to string members with $. + [InlineButton("MyFunction", "Button")] + public int B; + + private void MyFunction() + { + // ... + } + } + + + + + + + + Name of member method to call when the button is clicked. Obsolete; use the Action member instead. + + + + + A resolved string that defines the action to perform when the button is clicked, such as an expression or method invocation. + + + + + Optional label of the button. + + + + + Optional resolved string that specifies a condition for whether to show the inline button or not. + + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Draws a button to the right of the property. + + A resolved string that defines the action to perform when the button is clicked, such as an expression or method invocation. + Optional label of the button. + + + + Draws a button to the right of the property. + + A resolved string that defines the action to perform when the button is clicked, such as an expression or method invocation. + The icon to be shown inside the button. + Optional label of the button. + + + + InlineAttribute is used on any property or field with a type that inherits from UnityEngine.Object. This includes components and assets etc. + + + + public class InlineEditorExamples : MonoBehaviour + { + [DisableInInlineEditors] + public Vector3 DisabledInInlineEditors; + + [HideInInlineEditors] + public Vector3 HiddenInInlineEditors; + + [InlineEditor] + public Transform InlineComponent; + + [InlineEditor(InlineEditorModes.FullEditor)] + public Material FullInlineEditor; + + [InlineEditor(InlineEditorModes.GUIAndHeader)] + public Material InlineMaterial; + + [InlineEditor(InlineEditorModes.SmallPreview)] + public Material[] InlineMaterialList; + + [InlineEditor(InlineEditorModes.LargePreview)] + public GameObject InlineObjectPreview; + + [InlineEditor(InlineEditorModes.LargePreview)] + public Mesh InlineMeshPreview; + } + + + + + + + + If true, the inline editor will start expanded. + + + + + Draw the header editor header inline. + + + + + Draw editor GUI inline. + + + + + Draw editor preview inline. + + + + + Maximum height of the inline editor. If the inline editor exceeds the specified height, a scrollbar will appear. + Values less or equals to zero will let the InlineEditor expand to its full size. + + + + + The size of the editor preview if drawn together with GUI. + + + + + The size of the editor preview if drawn alone. + + + + + If false, this will prevent the InlineEditor attribute from incrementing the InlineEditorAttributeDrawer.CurrentInlineEditorDrawDepth. + This is helpful in cases where you want to draw the entire editor, and disregard attributes + such as [] and []. + + + + + How the InlineEditor attribute drawer should draw the object field. + + + + + Whether to set GUI.enabled = false when drawing an editor for an asset that is locked by source control. Defaults to true. + + + + + Where to draw the preview. + + + + + Initializes a new instance of the class. + + The inline editor mode. + How the object field should be drawn. + + + + Initializes a new instance of the class. + + How the object field should be drawn. + + + + The Inline Property is used to place the contents of a type next to the label, instead of being rendered in a foldout. + + + + public class InlinePropertyExamples : MonoBehaviour + { + public Vector3 Vector3; + + public Vector3Int Vector3Int; + + [InlineProperty(LabelWidth = 12)] // It can be placed on classes as well as members + public Vector2Int Vector2Int; + + } + + [Serializable] + [InlineProperty(LabelWidth = 12)] // It can be placed on classes as well as members + public struct Vector3Int + { + [HorizontalGroup] + public int X; + + [HorizontalGroup] + public int Y; + + [HorizontalGroup] + public int Z; + } + + [Serializable] + public struct Vector2Int + { + [HorizontalGroup] + public int X; + + [HorizontalGroup] + public int Y; + } + + + + + + + Specify a label width for all child properties. + + + + + LabelText is used to change the labels of properties. + Use this if you want a different label than the name of the property. + + + The following example shows how LabelText is applied to a few property fields. + + public MyComponent : MonoBehaviour + { + [LabelText("1")] + public int MyInt1; + + [LabelText("2")] + public int MyInt2; + + [LabelText("3")] + public int MyInt3; + } + + + + + + + The new text of the label. + + + + + Whether the label text should be nicified before it is displayed, IE, "m_someField" becomes "Some Field". + If the label text is resolved via a member reference, an expression, or the like, then the evaluated result + of that member reference or expression will be nicified. + + + + + The icon to be displayed. + + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Give a property a custom label. + + The new text of the label. + + + + Give a property a custom icon. + + The icon to be shown next to the property. + + + + Give a property a custom label. + + The new text of the label. + Whether to nicify the label text. + + + + Give a property a custom label with a custom icon. + + The new text of the label. + The icon to be displayed. + + + + Give a property a custom label with a custom icon. + + The new text of the label. + Whether to nicify the label text. + The icon to be displayed. + + + + LabelWidth is used to change the width of labels for properties. + + + The following example shows how LabelText is applied to a few property fields. + + public MyComponent : MonoBehaviour + { + [LabelWidth("3")] + public int MyInt3; + } + + + + + + + The new text of the label. + + + + + Give a property a custom label. + + The width of the label. + + + + Customize the behavior for lists and arrays in the inspector. + + + This example shows how you can add your own custom add button to a list. + + [ListDrawerSettings(HideAddButton = true, OnTitleBarGUI = "DrawTitleBarGUI")] + public List<MyType> SomeList; + + #if UNITY_EDITOR + private void DrawTitleBarGUI() + { + if (SirenixEditorGUI.ToolbarButton(EditorIcons.Plus)) + { + this.SomeList.Add(new MyType()); + } + } + #endif + + + + This attribute is scheduled for refactoring. + + + + + If true, the add button will not be rendered in the title toolbar. You can use OnTitleBarGUI to implement your own add button. + + + true if [hide add button]; otherwise, false. + + + + + If true, the remove button will not be rendered on list items. You can use OnBeginListElementGUI and OnEndListElementGUI to implement your own remove button. + + + true if [hide remove button]; otherwise, false. + + + + + Specify the name of a member inside each list element which defines the label being drawn for each list element. + + + + + Override the default behaviour for adding objects to the list. + If the referenced member returns the list type element, it will be called once per selected object. + If the referenced method returns void, it will only be called once regardless of how many objects are selected. + + + + + Calls a method before each list element. The member referenced must have a return type of void, and an index parameter of type int which represents the element index being drawn. + + + + + Calls a method after each list element. The member referenced must have a return type of void, and an index parameter of type int which represents the element index being drawn. + + + + + If true, object/type pickers will never be shown when the list add button is clicked, and default(T) will always be added instantly instead, where T is the element type of the list. + + + + + Whether adding a new element should copy the last element. False by default. + + + + A resolved string with "int index" and "Color defaultColor" parameters that lets you control the color of individual elements. Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Override the default setting specified in the Advanced Odin Preferences window and explicitly tell whether paging should be enabled or not. + + + + + Override the default setting specified in the Advanced Odin Preferences window and explicitly tell whether items should be draggable or not. + + + + + Override the default setting specified in the Advanced Odin Preferences window and explicitly tells how many items each page should contain. + + + + + Mark a list as read-only. This removes all editing capabilities from the list such as Add, Drag and delete, + but without disabling GUI for each element drawn as otherwise would be the case if the was used. + + + + + Override the default setting specified in the Advanced Odin Preferences window and explicitly tell whether or not item count should be shown. + + + + + Whether to show a foldout for the collection or not. If this is set to false, the collection will *always* be expanded. + + + + + Whether to show a foldout for the collection or not. If this is set to false, the collection will *always* be expanded. + + This documentation used to wrongly state that this value would override the default setting specified in the Advanced Odin Preferences + window and explicitly tell whether or not the list should be expanded or collapsed by default. This value *would* do that, but it would + also simultaneously act as ShowFoldout, leading to weird and unintuitive behaviour. + + + + + + Override the default setting specified in the Odin Preferences window and explicitly tell whether or not the list should be expanded or collapsed by default. + Note that this will override the persisted expand state, as this is set *every time* the collection drawer is initialized. + + + + + If true, a label is drawn for each element which shows the index of the element. + + + + + Use this to inject custom GUI into the title-bar of the list. + + + + + Whether the Paging property is set. + + + + + Whether the ShowItemCount property is set. + + + + + Whether the NumberOfItemsPerPage property is set. + + + + + Whether the Draggable property is set. + + + + + Whether the IsReadOnly property is set. + + + + + Whether the ShowIndexLabels property is set. + + + + + Whether the DefaultExpandedState property is set. + + + + + MaxValue is used on primitive fields. It caps value of the field to a maximum value. + Use this to define a maximum value for the field. + + + Note that this attribute only works in the editor! Values changed from scripting will not be capped at a maximum. + + + The following example shows a component where a speed value must be less than or equal to 200. + + public class Car : MonoBehaviour + { + // The speed of the car must be less than or equal to 200. + [MaxValue(200)] + public float Speed; + } + + + + The following example shows how MaxValue can be combined with . + + public class Health : MonoBehaviour + { + // The speed value must be between 0 and 200. + [MinValue(0), MaxValue(200)] + public float Speed; + } + + + + + + + The maximum value for the property. + + + + + The string with which to resolve a maximum value. This could be a field, property or method name, or an expression. + + + + + Sets a maximum value for the property in the inspector. + + The max value. + + + + Sets a maximum value for the property in the inspector. + + The string with which to resolve a maximum value. This could be a field, property or method name, or an expression. + + + + Draw a special slider the user can use to specify a range between a min and a max value. + Uses a Vector2 where x is min and y is max. + + + The following example shows how MinMaxSlider is used. + + public class Player : MonoBehaviour + { + [MinMaxSlider(4, 5)] + public Vector2 SpawnRadius; + } + + + + + + The hardcoded min value for the slider. + + + + + The hardcoded max value for the slider. + + + + + The name of a field, property or method to get the min value from. Obsolete; use MinValueGetter instead. + + + + + A resolved string that should evaluate to a float value, which is used as the min bounds. + + + + + The name of a field, property or method to get the max value from. Obsolete; use MaxValueGetter instead. + + + + + A resolved string that should evaluate to a float value, which is used as the max bounds. + + + + + The name of a Vector2 field, property or method to get the min max values from. Obsolete; use MinMaxValueGetter instead. + + + + + A resolved string that should evaluate to a Vector2 value, which is used as the min/max bounds. If this is non-null, it overrides the behaviour of the MinValue, MinValueGetter, MaxValue and MaxValueGetter members. + + + + + Draw float fields for min and max value. + + + + + Draws a min-max slider in the inspector. X will be set to min, and Y will be set to max. + + The min value. + The max value. + If true number fields will drawn next to the MinMaxSlider. + + + + Draws a min-max slider in the inspector. X will be set to min, and Y will be set to max. + + A resolved string that should evaluate to a float value, which is used as the min bounds. + The max value. + If true number fields will drawn next to the MinMaxSlider. + + + + Draws a min-max slider in the inspector. X will be set to min, and Y will be set to max. + + The min value. + A resolved string that should evaluate to a float value, which is used as the max bounds. + If true number fields will drawn next to the MinMaxSlider. + + + + Draws a min-max slider in the inspector. X will be set to min, and Y will be set to max. + + A resolved string that should evaluate to a float value, which is used as the min bounds. + A resolved string that should evaluate to a float value, which is used as the max bounds. + If true number fields will drawn next to the MinMaxSlider. + + + + Draws a min-max slider in the inspector. X will be set to min, and Y will be set to max. + + A resolved string that should evaluate to a Vector2 value, which is used as the min/max bounds. If this is non-null, it overrides the behaviour of the MinValue, MinValueGetter, MaxValue and MaxValueGetter members. + If true number fields will drawn next to the MinMaxSlider. + + + + MinValue is used on primitive fields. It caps value of the field to a minimum value. + Use this to define a minimum value for the field. + + + Note that this attribute only works in the editor! Values changed from scripting will not be capped at a minimum. + + + The following example shows a player component that must have at least 1 life. + + public class Player : MonoBehaviour + { + // The life value must be set to at least 1. + [MinValue(1)] + public int Life; + } + + + + The following example shows how MinValue can be combined with + + public class Health : MonoBehaviour + { + // The health value must be between 0 and 100. + [MinValue(0), MaxValue(100)] + public float Health; + } + + + + + + + The minimum value for the property. + + + + + The string with which to resolve a minimum value. This could be a field, property or method name, or an expression. + + + + + Sets a minimum value for the property in the inspector. + + The minimum value. + + + + Sets a minimum value for the property in the inspector. + + The string with which to resolve a minimum value. This could be a field, property or method name, or an expression. + + + + MultiLineProperty is used on any string property. + Use this to allow users to edit strings in a multi line textbox. + + + MultiLineProperty is similar to Unity's but can be applied to both fields and properties. + + + The following example shows how MultiLineProperty is applied to properties. + + public class MyComponent : MonoBehaviour + { + [MultiLineProperty] + public string MyString; + + [ShowInInspector, MultiLineProperty(10)] + public string PropertyString; + } + + + + + + The number of lines for the text box. + + + + + Makes a multiline textbox for editing strings. + + The number of lines for the text box. + + + + + OnCollectionChanged can be put on collections, and provides an event callback when the collection is about to be changed through the inspector, + and when the collection has been changed through the inspector. Additionally, it provides a CollectionChangeInfo struct containing information + about the exact changes made to the collection. This attribute works for all collections with a collection resolver, amongst them arrays, lists, + dictionaries, hashsets, stacks and linked lists. + + + + Note that this attribute only works in the editor! Collections changed by script will not trigger change events! + + + The following example shows how OnCollectionChanged can be used to get callbacks when a collection is being changed. + + [OnCollectionChanged("Before", "After")] + public List<string> list; + + public void Before(CollectionChangeInfo info) + { + if (info.ChangeType == CollectionChangeType.Add || info.ChangeType == CollectionChangeType.Insert) + { + Debug.Log("Adding to the list!"); + } + else if (info.ChangeType == CollectionChangeType.RemoveIndex || info.ChangeType == CollectionChangeType.RemoveValue) + { + Debug.Log("Removing from the list!"); + } + } + + public void After(CollectionChangeInfo info) + { + if (info.ChangeType == CollectionChangeType.Add || info.ChangeType == CollectionChangeType.Insert) + { + Debug.Log("Finished adding to the list!"); + } + else if (info.ChangeType == CollectionChangeType.RemoveIndex || info.ChangeType == CollectionChangeType.RemoveValue) + { + Debug.Log("Finished removing from the list!"); + } + } + + + + + + The OnInspectorDispose attribute takes in an action string as an argument (typically the name of a method to be invoked, or an expression to be executed), and executes that action when the property's drawers are disposed in the inspector. + Disposing will happen at least once, when the inspector changes selection or the property tree is collected by the garbage collector, but may also happen several times before that, most often when the type of a polymorphic property changes and it refreshes its drawer setup and recreates all its children, disposing of the old setup and children. + + + The following example demonstrates how OnInspectorDispose works. + + public class MyComponent : MonoBehaviour + { + [OnInspectorDispose(@"@UnityEngine.Debug.Log(""Dispose event invoked!"")")] + [ShowInInspector, InfoBox("When you change the type of this field, or set it to null, the former property setup is disposed. The property setup will also be disposed when you deselect this example."), DisplayAsString] + public BaseClass PolymorphicField; + + public abstract class BaseClass { public override string ToString() { return this.GetType().Name; } } + public class A : BaseClass { } + public class B : BaseClass { } + public class C : BaseClass { } + } + + + + + + This constructor should be used when the attribute is placed directly on a method. + + + + + This constructor should be used when the attribute is placed on a non-method member. + + + + + OnInspectorGUI is used on any property, and will call the specified function whenever the inspector code is running. + Use this to create custom inspector GUI for an object. + + + + + public MyComponent : MonoBehaviour + { + [OnInspectorGUI] + private void MyInspectorGUI() + { + GUILayout.Label("Label drawn from callback"); + } + } + + + + The following example shows how a callback can be set before another property. + + public MyComponent : MonoBehaviour + { + [OnInspectorGUI("MyInspectorGUI", false)] + public int MyField; + + private void MyInspectorGUI() + { + GUILayout.Label("Label before My Field property"); + } + } + + + + The following example shows how callbacks can be added both before and after a property. + + public MyComponent : MonoBehaviour + { + [OnInspectorGUI("GUIBefore", "GUIAfter")] + public int MyField; + + private void GUIBefore() + { + GUILayout.Label("Label before My Field property"); + } + + private void GUIAfter() + { + GUILayout.Label("Label after My Field property"); + } + } + + + + + + The resolved action string that defines the action to be invoked before the property is drawn, if any. + + + + + The resolved action string that defines the action to be invoked after the property is drawn, if any. + + + + + The name of the method to be called before the property is drawn, if any. Obsolete; use the Prepend member instead. + + + + + The name of the method to be called after the property is drawn, if any. Obsolete; use the Append member instead. + + + + + Calls a function decorated with this attribute, when the inspector is being drawn. + + + + + Adds callbacks to the specified action when the property is being drawn. + + The resolved action string that defines the action to be invoked. + If true the method will be called after the property has been drawn. Otherwise the method will be called before. + + + + Adds callbacks to the specified actions when the property is being drawn. + + The resolved action string that defines the action to be invoked before the property is drawn, if any. + The resolved action string that defines the action to be invoked after the property is drawn, if any. + + + + The OnInspectorInit attribute takes in an action string as an argument (typically the name of a method to be invoked, or an expression to be executed), and executes that action when the property's drawers are initialized in the inspector. + Initialization will happen at least once during the first drawn frame of any given property, but may also happen several times later, most often when the type of a polymorphic property changes and it refreshes its drawer setup and recreates all its children. + + + The following example demonstrates how OnInspectorInit works. + + public class MyComponent : MonoBehaviour + { + // Display current time for reference. + [ShowInInspector, DisplayAsString, PropertyOrder(-1)] + public string CurrentTime { get { GUIHelper.RequestRepaint(); return DateTime.Now.ToString(); } } + + // OnInspectorInit executes the first time this string is about to be drawn in the inspector. + // It will execute again when the example is reselected. + [OnInspectorInit("@TimeWhenExampleWasOpened = DateTime.Now.ToString()")] + public string TimeWhenExampleWasOpened; + + // OnInspectorInit will not execute before the property is actually "resolved" in the inspector. + // Remember, Odin's property system is lazily evaluated, and so a property does not actually exist + // and is not initialized before something is actually asking for it. + // + // Therefore, this OnInspectorInit attribute won't execute until the foldout is expanded. + [FoldoutGroup("Delayed Initialization", Expanded = false, HideWhenChildrenAreInvisible = false)] + [OnInspectorInit("@TimeFoldoutWasOpened = DateTime.Now.ToString()")] + public string TimeFoldoutWasOpened; + } + + + + + + This constructor should be used when the attribute is placed directly on a method. + + + + + This constructor should be used when the attribute is placed on a non-method member. + + + + + + OnStateUpdate provides an event callback when the property's state should be updated, when the StateUpdaters run on the property instance. + This generally happens at least once per frame, and the callback will be invoked even when the property is not visible. This can be used to + approximate custom StateUpdaters like [ShowIf] without needing to make entire attributes and StateUpdaters for one-off cases. + + + + The following example shows how OnStateUpdate can be used to control the visible state of a property. + + public class MyComponent : MonoBehaviour + { + [OnStateUpdate("@$property.State.Visible = ToggleMyInt")] + public int MyInt; + + public bool ToggleMyInt; + } + + + + The following example shows how OnStateUpdate can be used to control the expanded state of a list. + + public class MyComponent : MonoBehaviour + { + [OnStateUpdate("@$property.State.Expanded = ExpandList")] + public List<string> list; + + public bool ExpandList; + } + + The following example shows how OnStateUpdate can be used to control the state of another property. + + public class MyComponent : MonoBehaviour + { + public List>string< list; + + [OnStateUpdate("@#(list).State.Expanded = $value")] + public bool ExpandList; + } + + + + + + + OnValueChanged works on properties and fields, and calls the specified function + whenever the value has been changed via the inspector. + + + + Note that this attribute only works in the editor! Properties changed by script will not call the function. + + + The following example shows how OnValueChanged is used to provide a callback for a property. + + public class MyComponent : MonoBehaviour + { + [OnValueChanged("MyCallback")] + public int MyInt; + + private void MyCallback() + { + // .. + } + } + + + + The following example show how OnValueChanged can be used to get a component from a prefab property. + + public class MyComponent : MonoBehaviour + { + [OnValueChanged("OnPrefabChange")] + public GameObject MyPrefab; + + // RigidBody component of MyPrefab. + [SerializeField, HideInInspector] + private RigidBody myPrefabRigidbody; + + private void OnPrefabChange() + { + if(MyPrefab != null) + { + myPrefabRigidbody = MyPrefab.GetComponent<Rigidbody>(); + } + else + { + myPrefabRigidbody = null; + } + } + } + + + + + + Name of callback member function. Obsolete; use the Action member instead. + + + + + A resolved string that defines the action to perform when the value is changed, such as an expression or method invocation. + + + + + Whether to perform the action when a child value of the property is changed. + + + + + Whether to perform the action when an undo or redo event occurs via UnityEditor.Undo.undoRedoPerformed. True by default. + + + + + Whether to perform the action when the property is initialized. This will generally happen when the property is first viewed/queried (IE when the inspector is first opened, or when its containing foldout is first expanded, etc), and whenever its type or a parent type changes, or it is otherwise forced to rebuild. + + + + + Adds a callback for when the property's value is changed. + + A resolved string that defines the action to perform when the value is changed, such as an expression or method invocation. + Whether to perform the action when a child value of the property is changed. + + + + Overrides the 'Reference Required by Default' rule to allow for null values. + Has no effect if the rule is disabled. + + This attribute does not do anything unless you have Odin Validator and the 'Reference Required by Default' rule is enabled. + + + + + Specifies how non-default constructors are handled. + + + + + Excludes types with non default constructors from the Selector. + + + + + Attempts to find the most straightforward constructor to call, prioritizing default values. + + + + + Uses if no default constructor is found. + + + + + Logs a warning instead of constructing the object, indicating that an attempt was made to construct an object without a default constructor. + + + + + Determines whether the base type should be displayed in the drawer. + + + + + Indicates if the drawer should be read-only once a value is assigned. + + + + + Specifies how non-default constructors are handled. + + + + + Specifies a custom function for creating an instance of the selected . + + Does not get called for UnityEngine.Object types. + + + The resolver expects any method that takes a single parameter of , where the parameter is named 'type', and which returns an . + + + Implementation example: public object Method(Type type). + + + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + These object fields can also be selectively enabled and customized globally from the Odin preferences window. + + + + The following example shows how PreviewField is applied to a few property fields. + + public MyComponent : MonoBehaviour + { + [PreviewField] + public UnityEngine.Object SomeObject; + + [PreviewField] + public Texture SomeTexture; + + [HorizontalGroup, HideLabel, PreviewField(30)] + public Material A, B, C, D, F; + } + + + + + + + The height of the object field + + + + + The FilterMode to be used for the preview. + + + + + Left aligned. + + + + + Whether an alignment value is specified. + + + + + A resolved value that should resolve to the desired preview texture. + + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + The height of the preview field. + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + A resolved value that should resolve to the desired preview texture. + The filter mode to be used for the preview texture. + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + A resolved value that should resolve to the desired preview texture. + The height of the preview field. + The filter mode to be used for the preview texture. + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + The height of the preview field. + The alignment of the preview field. + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + A resolved value that should resolve to the desired preview texture. + The alignment of the preview field. + The filter mode to be used for the preview texture. + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + A resolved value that should resolve to the desired preview texture. + The height of the preview field. + The alignment of the preview field. + The filter mode to be used for the preview texture. + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + The alignment of the preview field. + + + + Draws a horizontal progress bar based on the value of the property. + Use it for displaying a meter to indicate how full an inventory is, or to make a visual indication of a health bar. + + + The following example shows how ProgressBar can be used. + + public class ProgressBarExample : MonoBehaviour + { + // Default progress bar. + [ProgressBar(0, 100)] + public int ProgressBar; + + // Health bar. + [ProgressBar(0, 100, ColorMember = "GetHealthBarColor")] + public float HealthBar = 50; + + private Color GetHealthBarColor(float value) + { + // Blends between red, and yellow color for when the health is below 30, + // and blends between yellow and green color for when the health is above 30. + return Color.Lerp(Color.Lerp( + Color.red, Color.yellow, MathUtilities.LinearStep(0f, 30f, value)), + Color.green, MathUtilities.LinearStep(0f, 100f, value)); + } + + // Stacked health bar. + // The ProgressBar attribute is placed on property, without a set method, so it can't be edited directly. + // So instead we have this Range attribute on a float to change the value. + [Range(0, 300)] + public float StackedHealth; + + [ProgressBar(0, 100, ColorMember = "GetStackedHealthColor", BackgroundColorMember = "GetStackHealthBackgroundColor")] + private float StackedHealthProgressBar + { + // Loops the stacked health value between 0, and 100. + get { return this.StackedHealth - 100 * (int)((this.StackedHealth - 1) / 100); } + } + + private Color GetStackedHealthColor() + { + return + this.StackedHealth > 200 ? Color.cyan : + this.StackedHealth > 100 ? Color.green : + Color.red; + } + + private Color GetStackHealthBackgroundColor() + { + return + this.StackedHealth > 200 ? Color.green : + this.StackedHealth > 100 ? Color.red : + new Color(0.16f, 0.16f, 0.16f, 1f); + } + + // Custom color and height. + [ProgressBar(-100, 100, r: 1, g: 1, b: 1, Height = 30)] + public short BigProgressBar = 50; + + // You can also reference members by name to dynamically assign the min and max progress bar values. + [ProgressBar("DynamicMin", "DynamicMax")] + public float DynamicProgressBar; + + public float DynamicMin, DynamicMax; + } + + + + + + + + + The minimum value. + + + + + The maximum value. + + + + + The name of a field, property or method to get the min values from. Obsolete; use the MinGetter member instead. + + + + + A resolved string that should evaluate to a float value, and will be used as the min bounds. + + + + + The name of a field, property or method to get the max values from. Obsolete; use the MaxGetter member instead. + + + + + A resolved string that should evaluate to a float value, and will be used as the max bounds. + + + + + The red channel of the color of the progress bar. + + + + + The green channel of the color of the progress bar. + + + + + The blue channel of the color of the progress bar. + + + + + The height of the progress bar in pixels. Defaults to 12 pixels. + + + + + Optional reference to a Color field, property or method, to dynamically change the color of the progress bar. Obsolete; use the ColorGetter member instead. + + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Optional reference to a Color field, property or method, to dynamically change the background color of the progress bar. + Default background color is (0.16, 0.16, 0.16, 1). + Obsolete; use the BackgroundColorGetter member instead. + + + + Optional resolved string that should evaluate to a Color value, to dynamically change the background color of the progress bar. Default background color is (0.16, 0.16, 0.16, 1). It supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + If true then the progress bar will be drawn in tiles. + + + + + References a member by name to get a custom value label string from. Obsolete; use the CustomValueStringGetter member instead. + + + + + A resolved string to get a custom value label string from. + + + + + Draws a progress bar for the value. + + The minimum value. + The maximum value. + The red channel of the color of the progress bar. + The green channel of the color of the progress bar. + The blue channel of the color of the progress bar. + + + + Draws a progress bar for the value. + + A resolved string that should evaluate to a float value, and will be used as the min bounds. + The maximum value. + The red channel of the color of the progress bar. + The green channel of the color of the progress bar. + The blue channel of the color of the progress bar. + + + + Draws a progress bar for the value. + + The minimum value. + A resolved string that should evaluate to a float value, and will be used as the max bounds. + The red channel of the color of the progress bar. + The green channel of the color of the progress bar. + The blue channel of the color of the progress bar. + + + + Draws a progress bar for the value. + + A resolved string that should evaluate to a float value, and will be used as the min bounds. + A resolved string that should evaluate to a float value, and will be used as the max bounds. + The red channel of the color of the progress bar. + The green channel of the color of the progress bar. + The blue channel of the color of the progress bar. + + + + If true then there will be drawn a value label on top of the progress bar. + + + + + Gets a value indicating if the user has set a custom DrawValueLabel value. + + + + + The alignment of the value label on top of the progress bar. Defaults to center. + + + + + Gets a value indicating if the user has set a custom ValueLabelAlignment value. + + + + + Attribute to derive from if you wish to create a new property group type, such as box groups or tab groups. + Note that this attribute has special behaviour for "combining" several attributes into one, as one group, + may be declared across attributes in several members, completely out of order. See . + + + All group attributes for a group with the same name (and of the same attribute type) are combined into a single representative group attribute using the method, which is called by the method. + This behaviour is a little unusual, but it is important that you understand it when creating groups with many custom parameters that may have to be combined. + + + This example shows how could be implemented. + + [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)] + public class BoxGroupAttribute : PropertyGroupAttribute + { + public string Label { get; private set; } + public bool ShowLabel { get; private set; } + public bool CenterLabel { get; private set; } + + public BoxGroupAttribute(string group, bool showLabel = true, bool centerLabel = false, float order = 0) + : base(group, order) + { + this.Label = group; + this.ShowLabel = showLabel; + this.CenterLabel = centerLabel; + } + + protected override void CombineValuesWith(PropertyGroupAttribute other) + { + // The given attribute parameter is *guaranteed* to be of type BoxGroupAttribute. + var attr = other as BoxGroupAttribute; + + // If this attribute has no label, we the other group's label, thus preserving the label across combines. + if (this.Label == null) + { + this.Label = attr.Label; + } + + // Combine ShowLabel and CenterLabel parameters. + this.ShowLabel |= attr.ShowLabel; + this.CenterLabel |= attr.CenterLabel; + } + } + + + + + + + + + + + The ID used to grouping properties together. + + + + + The name of the group. This is the last part of the group ID if there is a path, otherwise it is just the group ID. + + + + + The order of the group. + + + + + Whether to hide the group by default when all its children are not visible. True by default. + + + + + If not null, this resolved string controls the group's visibility. Note that if is true, there must be *both* a visible child *and* this condition must be true, before the group is shown. + + + + + Whether to animate the visibility changes of this group or make the visual transition instantly. True by default. + + + + + Initializes a new instance of the class. + + The group identifier. + The group order. + + + + Initializes a new instance of the class. + + The group identifier. + + + + Combines this attribute with another attribute of the same type. + This method invokes the virtual method to invoke custom combine logic. + All group attributes are combined to one attribute used by a single OdinGroupDrawer. + Example: protected override void CombineValuesWith(PropertyGroupAttribute other) { this.Title = this.Title ?? (other as MyGroupAttribute).Title; } + + The attribute to combine with. + The instance that the method was invoked on. + The argument 'other' was null. + + Attributes to combine are not of the same type. + or + PropertyGroupAttributes to combine must have the same group id. + + + + + Override this method to add custom combine logic to your group attribute. This method determines how your group's parameters combine when spread across multiple attribute declarations in the same class. + Remember, in .NET, member order is not guaranteed, so you never know which order your attributes will be combined in. + + The attribute to combine with. This parameter is guaranteed to be of the correct attribute type. + + This example shows how attributes are combined. + + protected override void CombineValuesWith(PropertyGroupAttribute other) + { + // The given attribute parameter is *guaranteed* to be of type BoxGroupAttribute. + var attr = other as BoxGroupAttribute; + + // If this attribute has no label, we the other group's label, thus preserving the label across combines. + if (this.Label == null) + { + this.Label = attr.Label; + } + + // Combine ShowLabel and CenterLabel parameters. + this.ShowLabel |= attr.ShowLabel; + this.CenterLabel |= attr.CenterLabel; + } + + + + + + PropertyOrder is used on any property, and allows for ordering of properties. + Use this to define in which order your properties are shown. + + + Lower order values will be drawn before higher values. + There is unfortunately no way of ensuring that properties are in the same order, as they appear in your class. PropertyOrder overcomes this. + + + The following example shows how PropertyOrder is used to order properties in the inspector. + + public class MyComponent : MonoBehaviour + { + [PropertyOrder(1)] + public int MySecondProperty; + + [PropertyOrder(-1)] + public int MyFirstProperty; + } + + + + + + The order for the property. + + + + + Initializes a new instance of the class. + + + + + Defines a custom order for the property. + + The order for the property. + + + + PropertyRange attribute creates a slider control to set the value of a property to between the specified range. + This is equivalent to Unity's Range attribute, but this attribute can be applied to both fields and property. + + The following example demonstrates how PropertyRange is used. + + public class MyComponent : MonoBehaviour + { + [PropertyRange(0, 100)] + public int MyInt; + + [PropertyRange(-100, 100)] + public float MyFloat; + + [PropertyRange(-100, -50)] + public decimal MyDouble; + + // This attribute also supports dynamically referencing members by name to assign the min and max values for the range field. + [PropertyRange("DynamicMin", "DynamicMax"] + public float MyDynamicValue; + + public float DynamicMin, DynamicMax; + } + + + + + + + + + The minimum value. + + + + + The maximum value. + + + + + The name of a field, property or method to get the min value from. Obsolete; use the MinGetter member instead. + + + + + A resolved string that should evaluate to a float value, and will be used as the min bounds. + + + + + The name of a field, property or method to get the max value from. Obsolete; use the MaxGetter member instead. + + + + + A resolved string that should evaluate to a float value, and will be used as the max bounds. + + + + + Creates a slider control to set the value of the property to between the specified range.. + + The minimum value. + The maximum value. + + + + Creates a slider control to set the value of the property to between the specified range.. + + A resolved string that should evaluate to a float value, and will be used as the min bounds. + The maximum value. + + + + Creates a slider control to set the value of the property to between the specified range.. + + The minimum value. + A resolved string that should evaluate to a float value, and will be used as the max bounds. + + + + Creates a slider control to set the value of the property to between the specified range.. + + A resolved string that should evaluate to a float value, and will be used as the min bounds. + A resolved string that should evaluate to a float value, and will be used as the max bounds. + + + + The PropertySpace attribute have the same function as Unity's existing Space attribute, but can be applied anywhere as opposed to just fields. + + + The following example demonstrates the usage of the PropertySpace attribute. + + [PropertySpace] // Defaults to a space of 8 pixels just like Unity's Space attribute. + public int MyField; + + [ShowInInspector, PropertySpace(16)] + public int MyProperty { get; set; } + + [ShowInInspector, PropertySpace(16, 16)] + public int MyProperty { get; set; } + + [Button, PropertySpace(32)] + public void MyMethod() + { + ... + } + + [PropertySpace(-8)] // A negative space can also be remove existing space between properties. + public int MovedUp; + + + + + + + + + + The space between properties in pixels. + + + + + The space between properties in pixels. + + + + + Adds a space of 8 pixels between properties. + + + + + Adds a space between properties. + + + + + Adds a space between properties. + + + + + PropertyTooltip is used on any property, and creates tooltips for when hovering the property in the inspector. + Use this to explain the purpose, or how to use a property. + + + This is similar to Unity's but can be applied to both fields and properties. + + + The following example shows how PropertyTooltip is applied to various properties. + + public class MyComponent : MonoBehaviour + { + [PropertyTooltip("This is an int property.")] + public int MyField; + + [ShowInInspector, PropertyTooltip("This is another int property.")] + public int MyProperty { get; set; } + } + + + + + + + + + + + The message shown in the tooltip. + + + + + Adds a tooltip to the property in the inspector. + + The message shown in the tooltip. + + + + ReadOnly is used on any property, and prevents the property from being changed in the inspector. + Use this for when you want to see the value of a property in the inspector, but don't want it to be changed. + + + This attribute only affects the inspector! Values can still be changed by script. + + + The following example shows how a field can be displayed in the editor, but not be editable. + + public class Health : MonoBehaviour + { + public int MaxHealth; + + [ReadOnly] + public int CurrentHealth; + } + + + + ReadOnly can also be combined with . + + public class Health : MonoBehaviour + { + public int MaxHealth; + + [ShowInInspector, ReadOnly] + private int currentHealth; + } + + + + + + + Required is used on any object property, and draws a message in the inspector if the property is missing. + Use this to clearly mark fields as necessary to the object. + + + The following example shows different uses of the Required attribute. + + public class MyComponent : MonoBehaviour + { + [Required] + public GameObject MyPrefab; + + [Required(InfoMessageType.Warning)] + public Texture2D MyTexture; + + [Required("MyMesh is nessessary for this component.")] + public Mesh MyMesh; + + [Required("MyTransform might be important.", InfoMessageType.Info)] + public Transform MyTransform; + } + + + + + + + + The message of the info box. + + + + + The type of the info box. + + + + + Adds an error box to the inspector, if the property is missing. + + + + + Adds an info box to the inspector, if the property is missing. + + The message to display in the error box. + The type of info box to draw. + + + + Adds an error box to the inspector, if the property is missing. + + The message to display in the error box. + + + + Adds an info box to the inspector, if the property is missing. + + The type of info box to draw. + + + + Makes a member required based on which type of a prefab and instance it is in. + + + + + The message of the info box. + + + + + The type of the info box. + + + + + Adds an error box to the inspector, if the property is missing. + + + + + Adds an info box to the inspector, if the property is missing. + + The message to display in the error box. + The type of info box to draw. + + + + Adds an error box to the inspector, if the property is missing. + + The message to display in the error box. + + + + Adds an info box to the inspector, if the property is missing. + + The type of info box to draw. + + + + The message of the info box. + + + + + The type of the info box. + + + + + Adds an error box to the inspector, if the property is missing. + + + + + Adds an info box to the inspector, if the property is missing. + + The message to display in the error box. + The type of info box to draw. + + + + Adds an error box to the inspector, if the property is missing. + + The message to display in the error box. + + + + Adds an info box to the inspector, if the property is missing. + + The type of info box to draw. + + + + + The minimum length of the collection. If not set, there is no minimum length restriction. + + + + + The maximum length of the collection. If not set, there is no maximum length restriction. + + + + + A C# expression for getting the minimum length of the collection, for example "@this.otherList.Count". + If set, MinLength will be the fallback in case nothing in case MinLengthGetter returns null. + + + + + A C# expression for getting the maximum length of the collection, for example "@this.otherList.Count". + If set, MaxLength will be the fallback in case nothing in case MaxLengthGetter returns null. + + + + + Limits the collection to be contain the specified number of elements. + + + + + Limits the collection to be contain the specified number of elements. + + The minimum and maximum length of the collection. + + + + Limits the collection to be contain the specified number of elements. + + The minimum length of the collection. + The maximum length of the collection. + + + + Limits the collection to be contain the specified number of elements. + + The minimum length of the collection. + A C# expression for getting the maximum length of the collection, for example "@this.otherList.Count". If set, MaxLength will be the fallback in case nothing in case MaxLengthGetter returns null. + + + + Limits the collection to be contain the specified number of elements. + + The minimum and maximum length of the collection. + + + + Limits the collection to be contain the specified number of elements. + + A C# expression for getting the minimum length of the collection, for example "@this.otherList.Count". If set, MinLength will be the fallback in case nothing in case MinLengthGetter returns null. + A C# expression for getting the maximum length of the collection, for example "@this.otherList.Count". If set, MaxLength will be the fallback in case nothing in case MaxLengthGetter returns null. + + + + Limits the collection to be contain the specified number of elements. + + A C# expression for getting the minimum length of the collection, for example "@this.otherList.Count". If set, MinLength will be the fallback in case nothing in case MinLengthGetter returns null. + The maximum length of the collection. + + + + Groups buttons into a group that will position and resize the buttons based on the amount of available layout space. + + + + [ResponsiveButtonGroup] + public void Foo() { } + + [ResponsiveButtonGroup] + public void Bar() { } + + [ResponsiveButtonGroup] + public void Baz() { } + + + + + [ResponsiveButtonGroup(UniformLayout = true)] + public void Foo() { } + + [ResponsiveButtonGroup] + public void Bar() { } + + [ResponsiveButtonGroup] + public void Baz() { } + + + + + [ResponsiveButtonGroupAttribute(UniformLayout = true, DefaultButtonSize = ButtonSizes.Large)] + public void Foo() { } + + [GUIColor(0, 1, 0))] + [Button(ButtonSizes.Large)] + [ResponsiveButtonGroup] + public void Bar() { } + + [ResponsiveButtonGroup] + public void Baz() { } + + + + + [TabGroup("SomeTabGroup", "SomeTab")] + [ResponsiveButtonGroup("SomeTabGroup/SomeTab/SomeBtnGroup")] + public void Foo() { } + + [ResponsiveButtonGroup("SomeTabGroup/SomeTab/SomeBtnGroup")] + public void Bar() { } + + [ResponsiveButtonGroup("SomeTabGroup/SomeTab/SomeBtnGroup")] + public void Baz() { } + + + + + + The default size of the button. + + + + + If true then the widths of a line of buttons will be the same. + + + + + Draws a button that will be placed in a group that will respond to the horizontal space available to the group. + + The name of the group to place the button in. + + + + Merges the values of this group with another ResponsiveButtonGroupAttribute. + + The attribute to combine with. + + + + SceneObjectsOnly is used on object properties, and restricts the property to scene objects, and not project assets. + Use this when you want to ensure an object is a scene object, and not from a project asset. + + + The following example shows a component with a game object property, that must be from a scene, and not a prefab asset. + + public MyComponent : MonoBehaviour + { + [SceneObjectsOnly] + public GameObject MyPrefab; + } + + + + + + + Adds a search filter that can search the children of the field or type on + which it is applied. Note that this does not currently work when directly + applied to dictionaries, though a search field "above" the dictionary will + still search the dictionary's properties if it is searching recursively. + + + + + Whether to use fuzzy string matching for the search. + Default value: true. + + + + + The options for which things to use to filter the search. + Default value: All. + + + + + Whether to search recursively, or only search the top level properties. + Default value: true. + + + + + + ShowDrawerChain lists all prepend, append and value drawers being used in the inspector. + This is great in situations where you want to debug, and want to know which drawers might be involved in drawing the property. + + Your own custom drawers are highlighted with a green label. + Drawers, that have not been called during the draw chain, will be greyed out in the inspector to make it clear which drawers have had an effect on the properties. + + + + public class MyComponent : MonoBehaviour + { + [ShowDrawerChain] + public int IndentedInt; + } + + + + + + ShowIf is used on any property and can hide the property in the inspector. + Use this to hide irrelevant properties based on the current state of the object. + + + This example shows a component with fields hidden by the state of another field. + + public class MyComponent : MonoBehaviour + { + public bool ShowProperties; + + [ShowIf("showProperties")] + public int MyInt; + + [ShowIf("showProperties", false)] + public string MyString; + + public SomeEnum SomeEnumField; + + [ShowIf("SomeEnumField", SomeEnum.SomeEnumMember)] + public string SomeString; + } + + + + This example shows a component with a field that is hidden when the game object is inactive. + + public class MyComponent : MonoBehaviour + { + [ShowIf("MyVisibleFunction")] + public int MyHideableField; + + private bool MyVisibleFunction() + { + return this.gameObject.activeInHierarchy; + } + } + + + + + + + + + The name of a bool member field, property or method. Obsolete; use the Condition member instead. + + + + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + + The optional condition value. + + + + + Whether or not to slide the property in and out when the state changes. + + + + + Shows a property in the inspector, based on the value of a resolved string. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + Whether or not to slide the property in and out when the state changes. + + + + Shows a property in the inspector, if the resolved string evaluates to the specified value. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + Value to check against. + Whether or not to slide the property in and out when the state changes. + + + +

ShowIfGroup allows for showing or hiding a group of properties based on a condition.

+

The attribute is a group attribute and can therefore be combined with other group attributes, and even be used to show or hide entire groups.

+

Note that in the vast majority of cases where you simply want to be able to control the visibility of a single group, it is better to use the VisibleIf parameter that *all* group attributes have.

+
+ + + + + +
+ + + Whether or not to visually animate group visibility changes. Alias for AnimateVisibility. + + + + + The optional member value. + + + + + Name of member to use when to hide the group. Defaults to the name of the group, by can be overriden by setting this property. + + + + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + + Makes a group that can be shown or hidden based on a condition. + + The group path. + If true then a fade animation will be played when the group is hidden or shown. + + + + Makes a group that can be shown or hidden based on a condition. + + The group path. + The value the member should equal for the property to shown. + If true then a fade animation will be played when the group is hidden or shown. + + + + Combines ShowIfGroup attributes. + + Another ShowIfGroup attribute. + + + + Shows a member based on which type of a prefab and instance it is in. + + + + + Only shows a property if it is drawn within an . + + + + + ShowInInspector is used on any member, and shows the value in the inspector. Note that the value being shown due to this attribute DOES NOT mean that the value is being serialized. + + + This can for example be combined with to allow for live debugging of values. + + + + The following example shows how ShowInInspector is used to show properties in the inspector, that otherwise wouldn't. + + public class MyComponent : MonoBehaviour + { + [ShowInInspector] + private int myField; + + [ShowInInspector] + public int MyProperty { get; set; } + } + + + + + + Marks a type as being specially serialized. Odin uses this attribute to check whether it should include non-Unity-serialized members in the inspector. + + + + + + ShowPropertyResolver shows the property resolver responsible for bringing the member into the property tree. + This is useful in situations where you want to debug why a particular member that is normally not shown in the inspector suddenly is. + + + + + public class MyComponent : MonoBehaviour + { + [ShowPropertyResolver] + public int IndentedInt; + } + + + + + + The SuffixLabel attribute draws a label at the end of a property. + Use this for conveying intend about a property. Is the distance measured in meters, kilometers, or in light years?. + Is the angle measured in degrees or radians? + Using SuffixLabel, you can place a neat label at the end of a property, to clearly show how the the property is used. + + + The following example demonstrates how SuffixLabel is used. + + public class MyComponent : MonoBehaviour + { + // The SuffixLabel attribute draws a label at the end of a property. + // It's useful for conveying intend about a property. + // Fx, this field is supposed to have a prefab assigned. + [SuffixLabel("Prefab")] + public GameObject GameObject; + + // Using the Overlay property, the suffix label will be drawn on top of the property instead of behind it. + // Use this for a neat inline look. + [SuffixLabel("ms", Overlay = true)] + public float Speed; + + [SuffixLabel("radians", Overlay = true)] + public float Angle; + + // The SuffixLabel attribute also supports string member references by using $. + [SuffixLabel("$Suffix", Overlay = true)] + public string Suffix = "Dynamic suffix label"; + } + + + + + + + + + + The label displayed at the end of the property. + + + + + If true the suffix label will be drawn on top of the property, instead of after. + + + + + The icon to be displayed. + + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Draws a label at the end of the property. + + The text of the label. + If true the suffix label will be drawn on top of the property, instead of after. + + + + Draws a label at the end of the property. + + The text of the label. + The icon to be displayed. + If true the suffix label will be drawn on top of the property, instead of after. + + + + Draws a label at the end of the property. + + The icon to be displayed. + + + + SuppressInvalidAttributeError is used on members to suppress the inspector error message you get when applying an attribute to a value that it's not supposed to work on. + This can be very useful for applying attributes to generic parameter values, when it only applies to some of the possible types that the value might become. + + + The following example shows a case where the attribute might be useful. + + public class NamedValue<T> + { + public string Name; + + // The Range attribute will be applied if T is compatible with it, but if T is not compatible, an error will not be shown. + [SuppressInvalidAttributeError, Range(0, 10)] + public T Value; + } + + + + + + TabGroup is used on any property, and organizes properties into different tabs. + Use this to organize different value to make a clean and easy to use inspector. + + + Use groups to create multiple tab groups, each with multiple tabs and even sub tabs. + + + The following example shows how to create a tab group with two tabs. + + public class MyComponent : MonoBehaviour + { + [TabGroup("First")] + public int MyFirstInt; + + [TabGroup("First")] + public int AnotherInt; + + [TabGroup("Second")] + public int MySecondInt; + } + + + + The following example shows how multiple groups of tabs can be created. + + public class MyComponent : MonoBehaviour + { + [TabGroup("A", "FirstGroup")] + public int FirstGroupA; + + [TabGroup("B", "FirstGroup")] + public int FirstGroupB; + + // The second tab group has been configured to have constant height across all tabs. + [TabGroup("A", "SecondGroup", true)] + public int SecondgroupA; + + [TabGroup("B", "SecondGroup")] + public int SecondGroupB; + + [TabGroup("B", "SecondGroup")] + public int AnotherInt; + } + + + + This example demonstrates how multiple tabs groups can be combined to create tabs in tabs. + + public class MyComponent : MonoBehaviour + { + [TabGroup("ParentGroup", "First Tab")] + public int A; + + [TabGroup("ParentGroup", "Second Tab")] + public int B; + + // Specify 'First Tab' as a group, and another child group to the 'First Tab' group. + [TabGroup("ParentGroup/First Tab/InnerGroup", "Inside First Tab A")] + public int C; + + [TabGroup("ParentGroup/First Tab/InnerGroup", "Inside First Tab B")] + public int D; + + [TabGroup("ParentGroup/Second Tab/InnerGroup", "Inside Second Tab")] + public int E; + } + + + + + + + The default tab group name which is used when the single-parameter constructor is called. + + + + + Name of the tab. + + + + + Should this tab be the same height as the rest of the tab group. + + + + + If true, the content of each page will not be contained in any box. + + + + + If true, the tab group will be hidden if it only contains one tab. + + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Specify how tabs should be layouted. + + + + + Organizes the property into the specified tab in the default group. + Default group name is '_DefaultTabGroup' + + The tab. + if set to true [use fixed height]. + The order. + + + + Organizes the property into the specified tab in the specified group. + + The group to attach the tab to. + The name of the tab. + Set to true to have a constant height across the entire tab group. + The order of the group. + + + + Organizes the property into the specified tab in the specified group. + + The group to attach the tab to. + The name of the tab. + Set to true to have a constant height across the entire tab group. + The order of the group. + + + + Name of all tabs in this group. + + + + + The TableColumnWidth attribute is used to further customize the width of a column in tables drawn using the . + + + + [TableList] + public List<SomeType> TableList = new List<SomeType>(); + + [Serializable] + public class SomeType + { + [LabelWidth(30)] + [TableColumnWidth(130, false)] + [VerticalGroup("Combined")] + public string A; + + [LabelWidth(30)] + [VerticalGroup("Combined")] + public string B; + + [Multiline(2), Space(3)] + public string fields; + } + + + + + + + The width of the column. + + + + + Whether the column should be resizable. True by default. + + + + + Initializes a new instance of the class. + + The width of the column in pixels. + If true then the column can be resized in the inspector. + + + + Renders lists and arrays in the inspector as tables. + + + + + + + If ShowPaging is enabled, this will override the default setting specified in the Odin Preferences window. + + + + + Mark the table as read-only. This removes all editing capabilities from the list such as Add and delete, + but without disabling GUI for each element drawn as otherwise would be the case if the was used. + + + + + The default minimum column width - 40 by default. This can be overwriten by individual columns using the . + + + + + If true, a label is drawn for each element which shows the index of the element. + + + + + Whether to draw all rows in a scroll-view. + + + + + The number of pixels before a scroll view appears. 350 by default. + + + + + The number of pixels before a scroll view appears. 0 by default. + + + + + If true, expanding and collapsing the table from the table title-bar is no longer an option. + + + + + Whether to hide the toolbar containing the add button and pagin etc.s + + + + + The cell padding. + + + + + Whether paging buttons should be added to the title bar. The default value of this, can be customized from the Odin Preferences window. + + + + + Whether the ShowPaging property has been set. + + + + + Sets the Min and Max ScrollViewHeight. + + + + + The TableMatrix attribute is used to further specify how Odin should draw two-dimensional arrays. + + + + // Inheriting from SerializedMonoBehaviour is only needed if you want Odin to serialize the multi-dimensional arrays for you. + // If you prefer doing that yourself, you can still make Odin show them in the inspector using the ShowInInspector attribute. + public class TableMatrixExamples : SerializedMonoBehaviour + { + [InfoBox("Right-click and drag column and row labels in order to modify the tables."), PropertyOrder(-10), OnInspectorGUI] + private void ShowMessageAtOP() { } + + [BoxGroup("Two Dimensional array without the TableMatrix attribute.")] + public bool[,] BooleanTable = new bool[15, 6]; + + [BoxGroup("ReadOnly table")] + [TableMatrix(IsReadOnly = true)] + public int[,] ReadOnlyTable = new int[5, 5]; + + [BoxGroup("Labled table")] + [TableMatrix(HorizontalTitle = "X axis", VerticalTitle = "Y axis")] + public GameObject[,] LabledTable = new GameObject[15, 10]; + + [BoxGroup("Enum table")] + [TableMatrix(HorizontalTitle = "X axis")] + public InfoMessageType[,] EnumTable = new InfoMessageType[4,4]; + + [BoxGroup("Custom table")] + [TableMatrix(DrawElementMethod = "DrawColoredEnumElement", ResizableColumns = false)] + public bool[,] CustomCellDrawing = new bool[30,30]; + + #if UNITY_EDITOR + + private static bool DrawColoredEnumElement(Rect rect, bool value) + { + if (Event.current.type == EventType.MouseDown && rect.Contains(Event.current.mousePosition)) + { + value = !value; + GUI.changed = true; + Event.current.Use(); + } + + UnityEditor.EditorGUI.DrawRect(rect.Padding(1), value ? new Color(0.1f, 0.8f, 0.2f) : new Color(0, 0, 0, 0.5f)); + + return value; + } + + #endif + } + + + + + + If true, inserting, removing and dragging columns and rows will become unavailable. But the cells themselves will remain modifiable. + If you want to disable everything, you can use the attribute. + + + + + Whether or not columns are resizable. + + + + + The vertical title label. + + + + + The horizontal title label. + + + + + Override how Odin draws each cell. + [TableMatrix(DrawElementMethod='DrawMyElement')] + public MyType[,] myArray; + private static MyType DrawElement(Rect rect, MyType value) { return GUI.DrawMyType(rect, value); } + + + + + The height for all rows. 0 = default row height. + + + + + If true, the height of each row will be the same as the width of the first cell. + + + + + If true, no column indices drawn. + + + + + If true, no row indices drawn. + + + + + Whether the drawn table should respect the current GUI indent level. + + + + + If true, tables are drawn with rows/columns reversed (C# initialization order). + + + + + A resolved string that should evaluate to a tuple (string, LabelDirection) which will be used as the label for the rows and columns of the table. + + + [TableMatrix(SquareCells = true, Labels = "GetLabel")] + public int[,] ChessBoard = new int[8, 8]; + + private (string, LabelDirection) GetLabel(int[,] array, TableAxis axis, int index) + { + var chessFileLetters = "ABCDEFGH"; + + switch (axis) + { + case TableAxis.Y: + return ((array.GetLength(1) - index).ToString(), LabelDirection.LeftToRight); + case TableAxis.X: + return (chessFileLetters[index].ToString(), LabelDirection.TopToBottom); + default: + return (index.ToString(), LabelDirection.LeftToRight); + } + } + + + + + Title is used to make a bold header above a property. + + + The following example shows how Title is used on different properties. + + public class TitleExamples : MonoBehaviour + { + [Title("Titles and Headers")] + [InfoBox( + "The Title attribute has the same purpose as Unity's Header attribute," + + "but it also supports properties, and methods." + + "\n\nTitle also offers more features such as subtitles, options for horizontal underline, bold text and text alignment." + + "\n\nBoth attributes, with Odin, supports either static strings, or refering to members strings by adding a $ in front.")] + public string MyTitle = "My Dynamic Title"; + public string MySubtitle = "My Dynamic Subtitle"; + + [Title("Static title")] + public int C; + public int D; + + [Title("Static title", "Static subtitle")] + public int E; + public int F; + + [Title("$MyTitle", "$MySubtitle")] + public int G; + public int H; + + [Title("Non bold title", "$MySubtitle", bold: false)] + public int I; + public int J; + + [Title("Non bold title", "With no line seperator", horizontalLine: false, bold: false)] + public int K; + public int L; + + [Title("$MyTitle", "$MySubtitle", TitleAlignments.Right)] + public int M; + public int N; + + [Title("$MyTitle", "$MySubtitle", TitleAlignments.Centered)] + public int O; + public int P; + + [Title("$Combined", titleAlignment: TitleAlignments.Centered)] + public int Q; + public int R; + + [ShowInInspector] + [Title("Title on a Property")] + public int S { get; set; } + + [Title("Title on a Method")] + [Button] + public void DoNothing() + { } + + public string Combined { get { return this.MyTitle + " - " + this.MySubtitle; } } + } + + + + + + + + The title displayed above the property in the inspector. + + + + + Optional subtitle. + + + + + If true the title will be displayed with a bold font. + + + + + Gets a value indicating whether or not to draw a horizontal line below the title. + + + + + Title alignment. + + + + + Creates a title above any property in the inspector. + + The title displayed above the property in the inspector. + Optional subtitle + Title alignment + Horizontal line + If true the title will be drawn with a bold font. + + + + Groups properties vertically together with a title, an optional subtitle, and an optional horizontal line. + + + + + Optional subtitle. + + + + + Title alignment. + + + + + Gets a value indicating whether or not to draw a horizontal line below the title. + + + + + If true the title will be displayed with a bold font. + + + + + Gets a value indicating whether or not to indent all group members. + + + + + Groups properties vertically together with a title, an optional subtitle, and an optional horizontal line. + + The title- + Optional subtitle. + The text alignment. + Horizontal line. + Bold text. + Whether or not to indent all group members. + The group order. + + + + Combines TitleGroup attributes. + + The other group attribute to combine with. + + + + Toggle is used on any field or property, and allows to enable or disable the property in the inspector. + Use this to create a property that can be turned off or on. + + + Toggle does current not support any static members for toggling. + + + The following example shows how Toggle is used to create a toggleable property. + + public class MyComponent : MonoBehaviour + { + [Toggle("Enabled")] + public MyToggleable MyToggler = new MyToggleable(); + } + + public class MyToggleable + { + public bool Enabled; + + public int MyValue; + } + + + + + + + + Name of any bool field or property to enable or disable the object. + + + + + If true, all other open toggle groups will collapse once another one opens. + + + + + Create a togglable property in the inspector. + + Name of any bool field or property to enable or disable the object. + + + + ToggleGroup is used on any field, and create a toggleable group of options. + Use this to create options that can be enabled or disabled. + + + The functions as the ID for the ToggleGroup, and therefore all members of a toggle group must specify the same toggle member. + This attribute does not support static members! + + + The following example shows how ToggleGroup is used to create two separate toggleable groups. + + public class MyComponent : MonoBehaviour + { + // This attribute has a title specified for the group. The title only needs to be applied to a single attribute for a group. + [ToggleGroup("FirstToggle", order: -1, groupTitle: "First")] + public bool FirstToggle; + + [ToggleGroup("FirstToggle")] + public int MyInt; + + // This group specifies a member string as the title of the group. A property or a function can also be used. + [ToggleGroup("SecondToggle", titleStringMemberName: "SecondGroupTitle")] + public bool SecondToggle { get; set; } + + [ToggleGroup("SecondToggle")] + public float MyFloat; + + [HideInInspector] + public string SecondGroupTitle = "Second"; + } + + + + "/> + + + + Title of the toggle group in the inspector. + If null will be used instead. + + + + + If true, all other open toggle groups will collapse once another one opens. + + + + + Creates a ToggleGroup. See . + + Name of any bool field or property to enable or disable the ToggleGroup. + The order of the group. + Use this to name the group differently than toggleMemberName. + + + + Creates a ToggleGroup. See . + + Name of any bool field or property to enable or disable the ToggleGroup. + Use this to name the group differently than toggleMemberName. + + + + Obsolete constructor overload. + + Obsolete overload. + Obsolete overload. + Obsolete overload. + Obsolete overload. + + + + Name of any bool field, property or function to enable or disable the ToggleGroup. + + + + + Name of any string field, property or function, to title the toggle group in the inspector. + If null will be used instead. + + + + + Combines the ToggleGroup with another ToggleGroup. + + Another ToggleGroup. + + + + Draws the checkbox before the label instead of after. + + ToggleLeftAttribute can be used an all fields and properties of type boolean + + + public class MyComponent : MonoBehaviour + { + [ToggleLeft] + public bool MyBoolean; + } + + + + + + Specifies whether a base type should be used instead of all types. + + + + + Filters the result. + + + + + Name of any field, property or method member that implements IList. E.g. arrays or Lists. Obsolete; use the FilterGetter member instead. + + + + + A resolved string that should evaluate to a value that is assignable to IList; e.g, arrays and lists are compatible. + + + + + Gets or sets the title for the dropdown. Null by default. + + + + + If true, the value will be drawn normally after the type selector dropdown has been drawn. False by default. + + + + + Creates a dropdown menu for a property. + + A resolved string that should evaluate to a value that is assignable to IList; e.g, arrays and lists are compatible. + + + + The TypeInfoBox attribute adds an info box to the very top of a type in the inspector. + Use this to add an info box to the top of a class in the inspector, without having to use neither the PropertyOrder nor the OnInspectorGUI attribute. + + + The following example demonstrates the use of the TypeInfoBox attribute. + + [TypeInfoBox("This is my component and it is mine.")] + public class MyComponent : MonoBehaviour + { + // Class implementation. + } + + + + + + + + The message to display in the info box. + + + + + Draws an info box at the top of a type in the inspector. + + The message to display in the info box. + + + Specifies if the '<none>' item is shown. + + + Specifies if categories are shown. + + + + Specifies if namespaces are preferred over assembly category names for category names. + + + + + Function for filtering types displayed in the Type Selector. + + + + The resolver expects any method that takes a single parameter of , with the parameter name 'type', and which returns a indicating whether the is included or not; + + + Implementation example: public bool SomeFilterMethod(Type type). + + + + + + The unit of underlying value. + + + + + The unit displayed in the number field. + + + + + Name of the underlying unit. + + + + + Name of the unit displayed in the number field. + + + + + If true the number field is drawn as read-only text. + + + + + If true disables the option to change display unit with the right-click context menu. + + + + + Displays the number as a unit field. + + The unit of underlying value. + + + + Displays the number as a unit field. + + The name of the underlying value. + + + + Displays the number as a unit field. + + The unit of underlying value. + The unit to display the value as in the inspector. + + + + Displays the number as a unit field. + + The unit of underlying value. + The unit to display the value as in the inspector. + + + + Displays the number as a unit field. + + The unit of underlying value. + The unit to display the value as in the inspector. + + + + Displays the number as a unit field. + + The unit of underlying value. + The unit to display the value as in the inspector. + + + + Units for use with and . + + + + + ValidateInput is used on any property, and allows to validate input from inspector. + Use this to enforce correct values. + + + ValidateInput refuses invalid values. + ValidateInput only works in the editor. Values changed through scripting will not be validated. + + + The following examples shows how a speed value can be forced to be above 0. + + public class MyComponent : MonoBehaviour + { + [ValidateInput("ValidateInput")] + public float Speed; + + // Specify custom output message and message type. + [ValidateInput("ValidateInput", "Health must be more than 0!", InfoMessageType.Warning)] + public float Health; + + private bool ValidateInput(float property) + { + return property > 0f; + } + } + + + + The following example shows how a static function could also be used. + + public class MyComponent : MonoBehaviour + { + [ValidateInput("StaticValidateFunction")] + public int MyInt; + + private static bool StaticValidateFunction(int property) + { + return property != 0; + } + } + + + + + + + + Default message for invalid values. + + + + + OBSOLETE; use the Condition member instead. + A resolved string that should evaluate to a boolean value, and which should validate the input. Note that in expressions, the $value named parameter, and in methods, a parameter named value, can be used to get the validated value instead of referring to the value by its containing member. This makes it easier to reuse validation strings. + + + + + A resolved string that should evaluate to a boolean value, and which should validate the input. Note that in expressions, the $value named parameter, and in methods, a parameter named value, can be used to get the validated value instead of referring to the value by its containing member. This makes it easier to reuse validation strings. + + + + + The type of the message. + + + + + Whether to also trigger validation when changes to child values happen. This is true by default. + + + + + If true, the validation method will not only be executed when the User has changed the value. It'll run once every frame in the inspector. + + + + + Initializes a new instance of the class. + + A resolved string that should evaluate to a boolean value, and which should validate the input. Note that in expressions, the $value named parameter, and in methods, a parameter named value, can be used to get the validated value instead of referring to the value by its containing member. This makes it easier to reuse validation strings. + Default message for invalid values. + Type of the message. + + + + Obsolete. Rejecting invalid input is no longer supported. Use the other constructors instead. + + Obsolete overload. + Obsolete overload. + Obsolete overload. + Obsolete overload. + + + + ValueDropdown is used on any property and creates a dropdown with configurable options. + Use this to give the user a specific set of options to select from. + + + Due to a bug in Unity, enums will sometimes not work correctly. The last example shows how this can be fixed. + + + The following example shows a how the ValueDropdown can be used on an int property. + + public class MyComponent : MonoBehaviour + { + [ValueDropdown("myValues")] + public int MyInt; + + // The selectable values for the dropdown. + private int[] myValues = { 1, 2, 3 }; + } + + + + The following example shows how ValueDropdownList can be used for objects, that do not implement a usable ToString. + + public class MyComponent : MonoBehaviour + { + [ValueDropdown("myVectorValues")] + public Vector3 MyVector; + + // The selectable values for the dropdown, with custom names. + private ValueDropdownList<Vector3> myVectorValues = new ValueDropdownList<Vector3>() + { + {"Forward", Vector3.forward }, + {"Back", Vector3.back }, + {"Up", Vector3.up }, + {"Down", Vector3.down }, + {"Right", Vector3.right }, + {"Left", Vector3.left }, + }; + } + + + + The following example shows how the ValueDropdown can on any member that implements IList. + + public class MyComponent : MonoBehaviour + { + // Member field of type float[]. + private float[] valuesField; + + [ValueDropdown("valuesField")] + public float MyFloat; + + // Member property of type List<thing>. + private List<string> ValuesProperty { get; set; } + + [ValueDropdown("ValuesProperty")] + public string MyString; + + // Member function that returns an object of type IList. + private IList<ValueDropdownItem<int>> ValuesFunction() + { + return new ValueDropdownList<int> + { + { "The first option", 1 }, + { "The second option", 2 }, + { "The third option", 3 }, + }; + } + + [ValueDropdown("ValuesFunction")] + public int MyInt; + } + + + + Due to a bug in Unity, enums member arrays will in some cases appear as empty. This example shows how you can get around that. + + public class MyComponent : MonoBehaviour + { + // Make the field static. + private static MyEnum[] MyStaticEnumArray = MyEnum[] { ... }; + + // Force Unity to serialize the field, and hide the property from the inspector. + [SerializeField, HideInInspector] + private MyEnum MySerializedEnumArray = MyEnum[] { ... }; + } + + + + + + + Name of any field, property or method member that implements IList. E.g. arrays or Lists. Obsolete; use the ValuesGetter member instead. + + + + + A resolved string that should evaluate to a value that is assignable to IList; e.g, arrays and lists are compatible. + + + + + The number of items before enabling search. Default is 10. + + + + + False by default. + + + + + True by default. If the ValueDropdown attribute is applied to a list, then disabling this, + will render all child elements normally without using the ValueDropdown. The ValueDropdown will + still show up when you click the add button on the list drawer, unless is true. + + + + + False by default. + + + + + If the ValueDropdown attribute is applied to a list, and is set to true, then enabling this, + will exclude existing values, instead of rendering a checkbox indicating whether the item is already included or not. + + + + + If the dropdown renders a tree-view, then setting this to true will ensure everything is expanded by default. + + + + + If true, instead of replacing the drawer with a wide dropdown-field, the dropdown button will be a little button, drawn next to the other drawer. + + + + + Disables the the GUI for the appended drawer. False by default. + + + + + By default, a single click selects and confirms the selection. + + + + + By default, the dropdown will create a tree view. + + + + + Gets or sets the width of the dropdown. Default is zero. + + + + + Gets or sets the height of the dropdown. Default is zero. + + + + + Gets or sets the title for the dropdown. Null by default. + + + + + False by default. + + + + + Whether to draw all child properties in a foldout. + + + + + Whether values selected by the value dropdown should be copies of the original or references (in the case of reference types). Defaults to true. + + + + + If this is set to true, the actual property value will *only* be changed *once*, when the selection in the dropdown is fully confirmed. + + + + + Creates a dropdown menu for a property. + + A resolved string that should evaluate to a value that is assignable to IList; e.g, arrays and lists are compatible. + + + + + + + + + Gets the label for the dropdown item. + + The label text for the item. + + + + Gets the value of the dropdown item. + + The value for the item. + + + + Use this with to specify custom names for values. + + The type of the value. + + + + Adds the specified value with a custom name. + + The name of the item. + The value. + + + + Adds the specified value. + + The value. + + + + + + + + + The name of the item. + + + + + The value of the item. + + + + + Initializes a new instance of the class. + + The text to display for the dropdown item. + The value for the dropdown item. + + + + The name of this item. + + + + + Gets the text. + + + + + Gets the value. + + + + + + + + + + The name of the item. + + + + + The value of the item. + + + + + Initializes a new instance of the class. + + The text to display for the dropdown item. + The value for the dropdown item. + + + + Gets the text. + + + + + Gets the value. + + + + + The name of this item. + + + + + VerticalGroup is used to gather properties together in a vertical group in the inspector. + This doesn't do much in and of itself, but in combination with other groups, such as it can be very useful. + + + The following example demonstrates how VerticalGroup can be used in conjunction with + + public class MyComponent : MonoBehaviour + { + [HorizontalGroup("Split")] + [VerticalGroup("Split/Left")] + public Vector3 Vector; + + [VerticalGroup("Split/Left")] + public GameObject First; + + [VerticalGroup("Split/Left")] + public GameObject Second; + + [VerticalGroup("Split/Right", PaddingTop = 18f)] + public int A; + + [VerticalGroup("Split/Right")] + public int B; + } + + + + + + + + + + + Space in pixels at the top of the group. + + + + + Space in pixels at the bottom of the group. + + + + + Groups properties vertically. + + The group ID. + The group order. + + + + Groups properties vertically. + GroupId: _DefaultVerticalGroup + + The group order. + + + + Combines properties that have been group vertically. + + The group attribute to combine with. + + + + Wrap is used on most primitive property, and allows for wrapping the value when it goes out of the defined range. + Use this when you want a value that goes around in circle, like for example an angle. + + + Currently unsigned primitives are not supported. + + + The following example show how Wrap is used on a property. + + public class MyComponent : MonoBehaviour + { + [Wrap(-100, 100)] + public float MyFloat; + } + + + + + + + The lowest value for the property. + + + + + The highest value for the property. + + + + + Wraps the value of the property round when the values goes out of range. + + The lowest value for the property. + The highest value for the property. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Various built-in button sizes. + + + + + Small button size, fits well with properties in the inspector. + + + + + A larger button. + + + + + A very large button. + + + + + A gigantic button. Twice as big as Large + + + + + Various display modes for the dictionary to draw its items. + + + + + Draws all dictionary items in two columns. The left column contains all key values, the right column displays all values. + + + + + Draws each dictionary item in a box with the key in the header and the value inside the box. + Whether or not the box is expanded or collapsed by default, is determined by the + "Expand Foldout By Default" setting found in the preferences window "Tools > Odin > Inspector > Preferences > Drawers > Settings". + + + + + Draws each dictionary item in a collapsed foldout with the key in the header and the value inside the box. + + + + + Draws each dictionary item in an expanded foldout with the key in the header and the value inside the box. + + + + + When this attribute is added is added to another attribute, then attributes from that attribute + will also be added to the property in the attribute processing step. + + + + + Type of info message box. This enum matches Unity's MessageType enum which could not be used since it is located in the UnityEditor assembly. + + + + + Generic message box with no type. + + + + + Information message box. + + + + + Warning message box. + + + + + Error message box. + + + + + Editor modes for + + + + + + Draws only the editor GUI + + + + + Draws the editor GUI and the editor header. + + + + + Draws the editor GUI to the left, and a small editor preview to the right. + + + + + Draws a small editor preview without any GUI. + + + + + Draws a large editor preview without any GUI. + + + + + Draws the editor header and GUI to the left, and a small editor preview to the right. + + + + + How the InlineEditor attribute drawer should draw the object field. + + + + + Draws the object field in a box. + + + + + Draws the object field with a foldout. + + + + + Hides the object field unless it's null. + + + + + Hidden the object field also when the object is null. + + + + + Implement this interface to create custom matching + logic for search filtering in the inspector. + + + The following example shows how you might do this: + + public class MyCustomClass : ISearchFilterable + { + public bool SearchEnabled; + public string MyStr; + + public bool IsMatch(string searchString) + { + if (SearchEnabled) + { + return MyStr.Contains(searchString); + } + + return false; + } + } + + + + + + Any type implementing this interface will be considered to be validating itself using the implemented logic, as if a custom validator had been written for it. + + + + + Not yet documented. + + + + + Not yet documented. + + Not yet documented. + + + + Not yet documented. + + Not yet documented. + Not yet documented. + + + + How the square object field should be aligned. + + + + + + Left aligned. + + + + + Aligned to the center. + + + + + Right aligned. + + + + + The prefab kind returned by + + + + + None. + + + + + Instances of prefabs in scenes. + + + + + Instances of prefabs nested inside other prefabs. + + + + + Regular prefab assets. + + + + + Prefab variant assets. + + + + + Non-prefab component or gameobject instances in scenes. + + + + + Instances of regular prefabs, and prefab variants in scenes or nested in other prefabs. + + + + + Prefab assets and prefab variant assets. + + + + + Prefab Instances, as well as non-prefab instances. + + + + + All kinds + + + + + Options for filtering search. + + + + + Title alignment enum used by various attributes. + + + + + + + Title and subtitle left aligned. + + + + + Title and subtitle centered aligned. + + + + + Title and subtitle right aligned. + + + + + Title on the left, subtitle on the right. + + + + Specifies the types to include based on certain criteria. + + + Represents types that are not interfaces, abstracts, or generics. + +
+
diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml.meta new file mode 100644 index 0000000..ba9d6b6 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 47a84ebde4ec47fabb620b30cc7a096f +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll new file mode 100644 index 0000000..6bfccca Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll.meta new file mode 100644 index 0000000..57f5b0e --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: a4865f1ab4504ed8a368670db22f409c +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml new file mode 100644 index 0000000..d38ea0a --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml @@ -0,0 +1,11290 @@ + + + + Sirenix.OdinInspector.Editor + + + + + An ActionResolver resolves a string to an action, given an InspectorProperty instance to use as context. Call to get an instance of an ActionResolver. + Action resolvers are a globally extendable system that can be hooked into and modified or changed by creating and registering an . + See Odin's tutorials for details and examples of how to use ActionResolvers. + + + + + The context of this ActionResolver, containing all of its configurations and values it needs to function. For performance and simplicity reasons, this is a single very large struct that is passed around by ref to anything that needs it. + + + + + The delegate that executes the actual action. You should not call this manually, but instead call . + + + + + The current error message that the resolver has, or null if there is no error message. This is a shortcut for writing "resolver.Context.ErrorMessage". + + + + + Whether there is an error message at the moment. This is a shortcut for writing "resolver.Context.ErrorMessage != null". + + + + + Draws an error message box if there is an error, and does nothing if there is no error. + + + + + Executes the resolved action for a given selection index. + + The selection index to execute the action on. Defaults to 0. + + + + Executes the action for all selection indices. + + + + + Creates a new action resolver instance from a pre-built context struct. This is a more advanced use that requires you to + know how the context needs to be set up before action resolution happens. However, this allows you to do more advanced + things like adjust various context values before string resolution happens. + + The pre-built context that should be used to get a resolver. + + + + Creates a new action resolver instance for a given string. + + The property that is the context for the resolution to happen in. + The string that should be resolved to an action. + + + + Creates a new action resolver instance for a given string. + + The property that is the context for the resolution to happen in. + The string that should be resolved to an action. + The extra named args that this resolver has access to. Passing in a named arg that already exists will silently override the pre-existing named arg. + + + + Gets a nicely formatted string that lists all the errors in the given set of action resolvers. The returned value is null if there are no errors. + + + + + Gets a nicely formatted string that lists all the errors in the given set of action resolvers. The returned value is null if there are no errors. + + + + + Draws error boxes for all errors in the given action resolvers, or does nothing if there are no errors. This is equivalent to calling DrawError() on all resolvers passed to this method. + + + + + Draws error boxes for all errors in the given action resolvers, or does nothing if there are no errors. This is equivalent to calling DrawError() on all resolvers passed to this method. + + + + + This struct contains all of an ActionResolver's configurations and values it needs to function. For performance and simplicity reasons, this is a single very large struct that lives on an ActionResolver instance and is passed around by ref to anything that needs it. + + + + + The property that *provides* the context for the action resolution. This is the instance that was passed to the resolver when it was created. Note that this is different from , which is based on this value, but almost always isn't the same InspectorProperty instance. + + + + + The error message, if a valid action resolution wasn't found, or if creation of the action resolver failed because was invalid, or if the action was executed but threw an exception. (In this last case, will be true.) + + + + + The named values that are available to the action resolver. Use this field only to get and set named values - once the ValueResolver has been created, new named values will have no effect. + + + + + This will be true if is not null and the message was caused by an exception thrown by code invoked during execution of the resolved action. + + + + + Whether exceptions thrown during action execution should be logged to the console. + + + + + The string that is resolved to perform an action. + + + + + Whether the action resolver should sync ref parameters of invoked methods with named values. If this is true, then if a ref or out parameter value is changed during action execution, the named value associated with that parameter will also be changed to the same value. + + + + + Whether this context has been resolved. + + + + + The type that is the parent of the action resolution, ie, the type that is the context. This is the same as .ValueEntry.TypeOfValue. + + + + + The property that *is* the context for the action resolution. This is not the instance that was passed to the resolver when it was created, but this value is based on that instance. This is the property that provides the actual context - for example, if is for a member of a type - or for an element in a collection contained by a member - this value will be the parent property for the type that contains that member. Only if is the tree's root property is the same as . + + + + + Gets the parent value which provides the context of the resolver. + + The selection index of the parent value to get. + + + + Sets the parent value which provides the context of the resolver. + + The selection index of the parent value to set. + The value to set. + + + + Adds the default named values of "property" and "value" to the context's named values. + This method is usually automatically invoked when a resolver is created, so there + is no need to invoke it manually. + + + + + A color palette. + + + + + Name of the color palette. + + + + + The colors. + + + + + Whether to show the alpha channel. + + + + + Add, Edit or remove custom color palettes used by the . + + You can modify the configuration in the Odin Preferences window found in 'Tools -> Odin Inspector -> Preferences -> Drawers -> Color Palettes', + or by locating the configuration file stored as a serialized object in the Sirenix folder under 'Odin Inspector/Config/Editor/ColorPaletteManager'. + + + + + + Specify the amount of spacing between each color in a color palette. + + + + + Specify the width of each color in a color palette. If StretchPalette is set to true, this will become the min-width. + + + + + If true, all color in a color palette is stretch so that the entire color-palette area is filled. + + + + + If true, a toolbar with the name of the color palette is shown above each color palette. + + + + + Gives you the list of all custom color palettes. + Remember to call UnityEditor.EditorUtility.SetDirty(ColorPaletteManager.Instance) after modifying the list. + + + + + Editor Only Mode Utility. + + + + + Gaither all necessary information about the editor only state. + + + + + Disables Editor Only Mode. + + + + + Enables editor only mode. + + + + + Checks to see whether Editor Only Mode is enabled. + + + + + Checks to see whether Odin Inspector is installed in Source Code mode. + + + + + Contains general configuration for all Odin drawers. + + You can modify the configuration in the Odin Preferences window found in 'Tools -> Odin Inspector -> Preferences -> Drawers -> General', + or by locating the configuration file stored as a serialized object in the Sirenix folder under 'Odin Inspector/Config/Editor/GeneralDrawerConfig'. + + + + + + Specify whether or not the script selector above components should be drawn. + + + + + Specify whether or not the script selector above components should be drawn. + + + + + Specify whether or not the warning for properties that do not support prefab modifications should be shown in the inspector. + + + + + Specify whether or not the warning for properties that do not support prefab modifications should be shown in the inspector. + + + + + Specifies the maximum depth to which a property can draw itself recursively before the system refuses to draw it any deeper. + + + + + If set to true, most foldouts throughout the inspector will be expanded by default. + + + + + If set to true, buttons will show the result values from invoking them in the inspector by default. + + + + + Specify the animation speed for most foldouts throughout the inspector. + + + + + Specify the shaking duration for most shaking animations throughout the inspector. + + + + + Specify the animation speed for + + + + + When true the component labels, for vector fields, will be hidden when the field is too narrow. + + + + + Specify how the Quaternion struct should be shown in the inspector. + + + + + Gets or sets a value indicating whether [use improved enum drop down]. + + + + + Gets or sets a value indicating whether [use improved enum drop down]. + + + + + Specify whether or not a list should hide the foldout triangle when the list is empty. + + + + + Specifies whether a list should hide the foldout triangle when the list is empty. + + + + + Specify whether or not lists should hide the paging buttons when the list is collapsed. + + + + + Specify whether or not lists should hide the paging buttons when there is only one page. + + + + + Specify the number of elements drawn per page. + + + + + Specify whether or not lists should be expanded or collapsed by default. + + + + + Specify whether or not to include a button which expands the list, showing all pages at once. + + + + + Specify whether or not lists should show item count. + + + + + Specify whether or not lists should show item count. + + + + + Specify the color of even list elements when in the dark skin. + + + + + Specify the color of odd list elements when in the dark skin. + + + + + Specify the color of even list elements when in the light skin. + + + + + Specify the color of odd list elements when in the light skin. + + + + + Gets or sets the default size of the preview object field. + + + + + Gets or sets the default alignment of the preview object field. + + + + + Gets or sets which types should be drawn by default by the preview object field. + + + + + Resets all settings to default. + + + + + Configurations for Odin DLLs import settings. + + + + + Gets or sets a value indicating whether or not Odin should automatically configure the import settings of its DLLs in a preprocess build step. + Keep in mind that this feature is only supported by Unity version 5.6 and up. + + + + + Gets a value indicating whether or not automatic configuration of Odin's DLL import settings is supported by the current Unity version. + + + + + + Tell Odin which types should be drawn or should not be drawn by Odin. + + + You can modify which types should be drawn by Odin in the Preferences window found in 'Tools -> Odin Inspector -> Preferences -> Editor Types', + or by locating the configuration file stored as a serialized object in the Sirenix folder under 'Odin Inspector/Config/Editor/InspectorConfig'. + + + + + + Whether Odin is enabled in the inspector or not. + + + + + InspectorDefaultEditors is a bitmask used to tell which types should have an Odin Editor generated. + + + + + The config which contains configuration data for which types Odin should draw in the inspector. + + + + + Updates Unity with the current Odin editor configuration. + + + + + InspectorDefaultEditors is a bitmask used to tell which types should have an Odin Editor generated. + + + + + + Excludes all types. + + + + + UserTypes includes all custom user scripts that are not located in an editor or plugin folder. + + + + + PluginTypes includes all types located in the plugins folder and are not located in an editor folder. + + + + + UnityTypes includes all types depended on UnityEngine and from UnityEngine, except editor, plugin and user types. + + + + + OtherTypes include all other types that are not depended on UnityEngine or UnityEditor. + + + + + Contains configuration data for which types Odin should draw in the inspector. + + + Note that this class supports assigning arbitrary editor types to inspect any Unity object type. The Editor Types GUI in preferences simply does not, as of now, support assigning editors of any other type than . However, the API is open to further customization. + When an editor is generated for a type, a new editor type is added to the GeneratedOdinEditors assembly, which is derived from the assigned editor type - in most cases, . + You can check if an editor is compatible using . + + . + . + + + + The type binder that the uses to bind types to names, and names to types. + This is usually an instance of . + + + + + Resets the drawing configuration to the default values. + + + + + Gets a list of all drawn types that have entries in the drawing config. + + + + + Forces the config's internal drawer type to value type lookup cache to rebuild itself. + + + + + Clears the editor type entry for the given drawer, so it will be set to Unity's default. + + The drawn type to clear the editor for. + drawnType is null + + + + Assigns a given editor to draw a given type. + + The drawn type to assign an editor type for. + The editor type to assign. When generating editors, a type derived from this editor will be created and set to draw the given drawn type. + drawnType + The type " + editorType.GetNiceName() + " is not a valid base editor for type " + drawnType.GetNiceName() + ". Check criteria using . + + + + Determines whether an editor value has been assigned for a given drawn type. + + The drawn type to check. + drawnType is null + + + + Gets which editor type would draw the given type. If the type has not been assigned a custom editor type in the config, the default editor type is returned using . + + The drawn type to get an editor type for. + The editor that would draw the given type. + drawnType is null + + + + Gets the default editor that this type would have, if no custom editor was set for this type in particular. This is calculated using the value of . + + The drawn type to get the default editor for. + The editor that would draw this type by default, or null, if there is no default Odin-defined editor for the drawn type. + drawnType is null + + + + Checks whether the given editor can be assigned to draw any type using the class. + + Type of the editor to check. + True if the editor is valid, otherwise false + + + + Checks whether the given editor can be assigned to draw a given type using the class. + This method checks the attribute on the type for whether the given type is compatible. + + Type of the editor to check. + Type of the drawn value to check. If this parameter is null, the drawn type is not checked for compatibility with the editor type; only the editor type itself is checked for validity. + True if the editor is valid, otherwise false + editorType + + + + Gets the type that an editor draws, by extracting it from the editor's attribute, if it is declared. + This method returns null for abstract editor types, as those can never draw anything. + + Type of the editor. + Whether the editor in question is also an editor for types derived from the given type. + + editorType + + + + A type that indicates that a drawer is missing. + + + + + Draws an instance, and contains methods getting all types that should be drawn by Odin. + Note that this class keeps a lot of static state, and is only intended to draw the instance of that exists in the singleton asset. If used to draw other instances, odd behaviour may occur. + + . + . + + + + Determines whether Odin is capable of creating a custom editor for a given type. + + + + + Gets an array of all assigned editor types, and the types they have to draw. + + + + + Draws the property. + + + + + Installed Odin Inspector Version Info. + + + + + Gets the name of the current running version of Odin Inspector. + + + + + Gets the current running version of Odin Inspector. + + + + + Whether the current version of Odin is an enterprise version. + + + + + Contains information about an editor type which is assigned to draw a certain type in the inspector. + This class uses the instance to bind types to names, and names to types. + + . + . + . + + + + A default, empty value. + + + + + The name of the type to be drawn. + + + + + The name of the editor type. + + + + + Initializes a new instance of the struct. + + The drawn type. + drawnType is null + + + + Initializes a new instance of the struct. + + The drawn type. + The editor type. + drawnType is null + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Implements the operator ==. + + The x. + The y. + + The result of the operator. + + + + + Implements the operator !=. + + The x. + The y. + + The result of the operator. + + + + + A contextual value attached to an , mapped to a key, contained in a . + + + + + The contained value. + + + + + Creates a new PropertyContext. + + + + + Performs an explicit conversion from to . + + The context. + + The result of the conversion. + + + + + Returns a that represents this instance, of the format ": Value.ToString()". + + + A that represents this instance. + + + + + Contains a context for an , which offers the ability to address persistent values by key across several editor GUI frames. + Use this in drawers to store contextual editor-only values such as the state of a foldout. + + + + + Initializes a new instance of the class. + + The property. + property + + + + Gets a global context value for a given key, using a given delegate to generate a default value if the context doesn't already exist. + Global contexts are not associated with any one specific drawer, and so are shared across all drawers for this property. + + The type of the context value to get. + The key of the context value to get. + A delegate for generating a default value. + The found context. + + + + Gets a global context value for a given key, using a given default value if the context doesn't already exist. + Global contexts are not associated with any one specific drawer, and so are shared across all drawers for this property. + + The type of the context value to get. + The key of the context value to get. + The default value to set if the context value doesn't exist yet. + The found context. + + + + Gets a global context value for a given key, and creates a new instance of as a default value if the context doesn't already exist. + Global contexts are not associated with any one specific drawer, and so are shared across all drawers for this property. + + The type of the context value to get. + The key of the context value to get. + The found context. + + + + Gets a object and creates a object for it. + + The type of the value of the context. + The instance of the drawer. + The key for the context. + The default value for the context. + + + + Gets a object and creates a object for it. + Returns true when the is first created. Otherwise false. + + The type of the value of the context. + The instance of the drawer. + The key for the context. + The object. + Returns true when the is first created. Otherwise false. + + + + Swaps context values with a given . + + The context to swap with. + + + + An can implement this interface to indicate that it defines right-click context menu items for properties that it draws. + + + + + Method that is invoked when a user has right-clicked a property, and the context menu is being built. The method is invoked in order of drawer priority. + + The property that has been right-clicked on. + The generic menu instance that is being built. Add items to this. + + + + A polymorphic alias for getting and setting the values of an . + + The type of the owner. + The type of the value. + The type of the property owner. + The type of the property value. + + + + Gets the type of the owner. + + + + + Gets the type of the value. + + + + + Whether the value is readonly. + + + + + Initializes a new instance of the class. + + The information. + info + + + + Gets the value from a given weakly typed owner. + + The weakly typed owner. + The found value. + + + + Gets the value from a given owner. + + The owner. + owner is null + + + + Sets the weakly typed value on a given weakly typed owner. + + The owner. + The value. + + + + Sets the value on a given owner. + + The owner. + The value. + + + + Responsible for getting and setting values on properties. + + The type of the owner. + The type of the value. + + + + + Whether the value is readonly. + + + + + Gets the type of the owner. + + + + + Gets the type of the value. + + + + + Initializes a new instance of the class. + + The field member to represent. + if set to true [is readonly]. + + + + Initializes a new instance of the class. + + The getter. + The setter. + getter + + + + Initializes a new instance of the class. + + The getter. + The setter. + getter + + + + Gets the value from a given owner. + + The owner. + The found value. + owner is null + + + + Gets the value from a given weakly typed owner. + + The weakly typed owner. + The found value. + + + + Sets the weakly typed value on a given weakly typed owner. + + The owner. + The value. + + + + Sets the value on a given owner. + + The owner. + The value. + + + + Contains meta-data information about a property in the inspector, that can be used to create an actual property instance. + + + + + The name of the property. + + + + + Gets a value indicating whether this InspectorPropertyInfo has any backing members. + + + + + Gets a value indicating whether this InspectorPropertyInfo has only a single backing member. + + + + + The member info of the property. If the property has many member infos, such as if it is a group property, the first member info of is returned. + + + + + Indicates which type of property it is. + + + + + The serialization backend for this property. + + + + + The type on which this property is declared. + + + + + The base type of the value which this property represents. If there is no value, this will be null. + + + + + Whether this property is editable or not. + + + + + All member infos of the property. There will only be more than one member if it is an . + + + + + The order value of this property. Properties are (by convention) ordered by ascending order, IE, lower order values are shown first in the inspector. The final actual ordering of properties is decided upon by the property resolver. + + + + + The attributes associated with this property. + + + + + Whether this property only exists as a Unity , and has no associated managed member to represent it. + This case requires some special one-off custom behaviour in a few places. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the first attribute of a given type on this property. + + + + + Gets the first attribute of a given type on this property, which is not contained in a given hashset. + + The attributes to exclude. + + + + Gets all attributes of a given type on the property. + + + + + The s of all the individual properties in this group. + + + + + Gets the property's method delegate, if there is one. Note that this is null if a method property is backed by an actual method member. + + + + + Gets all s for a given type. + + The parent property. + The type to get infos for. + if set to true members that are serialized by Odin will be included. + + + + Gets an aliased version of a member, with the declaring type name included in the member name, so that there are no conflicts with private fields and properties with the same name in different classes in the same inheritance hierarchy. + + + + + Represents a property in the inspector, and provides the hub for all functionality related to that property. + + + + + Gets the property which is the ultimate root of this property's serialization. + + + + + The name of the property. + + + + + The nice name of the property, usually as converted by . + + + + + The cached label of the property, usually containing . + + + + + The full Odin path of the property. To get the Unity property path, see . + + + + + The child index of this property. + + + + + Gets the resolver for this property's children. + + + + + The current recursive draw depth, incremented for each time that the property has caused itself to be drawn recursively. + Note that this is the current recursion level, not the total amount of recursions so far this frame. + + + + + The amount of times that the property has been drawn so far this frame. + + + + + How deep in the drawer chain the property currently is, in the current drawing session as determined by . + + + + + Whether this property supports having prefab modifications applied or not. + + + + + Gets an immutable list of the components attached to the property. + + + + + Gets an immutable list of processed attributes for the property. + + + + + Gets an array of the state updaters of the property. Don't change the contents of this array! + + + + + The value entry that represents the base value of this property. + + + + + The value entry that represents the strongly typed value of the property; this is possibly an alias entry in case of polymorphism. + + + + + The parent of the property. If null, this property is a root-level property in the . + + + + + The of this property. + + + + + The that this property exists in. + + + + + The children of this property. + + + + + The context container of this property. + + + + + The last rect that this property was drawn within. + + + + + The type on which this property is declared. This is the same as . + + + + + The parent values of this property, by selection index; this represents the values that 'own' this property, on which it is declared. + + + + + The full Unity property path of this property; note that this is merely a converted version of , and not necessarily a path to an actual Unity property. + In the case of Odin-serialized data, for example, no Unity properties will exist at this path. + + + + + The full path of this property as used by deep reflection, containing all the necessary information to find this property through reflection only. This is used as the path for prefab modifications. + + + + + The full path of this property as used by prefab modifications and the deep reflection system, containing all the necessary information to find this property through reflection only. + + + + + The PropertyState of the property at the current draw count index. + + + + + Gets the component of a given type on the property, or null if the property does not have a component of the given type. + + + + + Marks the property's serialization root values dirty if they are derived from UnityEngine.Object. + + + + + Records the property's serialization root for undo to prepare for undoable changes, with a custom string that includes the property path and Unity object name. If a message is specified, it is included in the custom undo string. + + + + + Gets the first attribute of a given type on this property. + + + + + Gets the first attribute of a given type on this property, which is not contained in a given hashset. + + The attributes to exclude. + + + + Gets all attributes of a given type on the property. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Draws this property in the inspector. + + + + + Draws this property in the inspector with a given default label. This default label may be overridden by attributes on the drawn property. + + + + + Push a draw session. This is used by and . + + + + + Increments the current drawer chain index. This is used by . + + + + + Pop a draw session. This is used by and . + + + + + Gets the next property in the , or null if none is found. + + Whether to include children or not. + Whether to only include visible properties. + + + + Finds the first parent property that matches a given predicate. + + + + + Finds the first child recursively, that matches a given predicate. + + + + + Updates the property. This method resets the temporary context, and updates the value entry and the property children. + + If true, the property will update regardless of whether it has already updated for the current . + + + + Populates a generic menu with items from all drawers for this property that implement . + + + + + Determines whether this property is the child of another property in the hierarchy. + + The property to check whether this property is the child of. + other is null + + + + Determines whether this property is a parent of another property in the hierarchy. + + The property to check whether this property is the parent of. + other is null + + + + Handles all prefab modifications that apply to the targets of a property tree, if any. This class determines which properties have modifications, what the modifications are, auto-applies modifications if the current instance values do not correspond to the prefab values, and also provides an API for modifying those modifications. + NOTE: This class is liable to see a lot of changes, as the prefab modification system is slated to be redesigned for increased extendability in the future. Do not depend overly on the current API. + + + + + The prefabs for each prefab instance represented by the property tree, if any. + + + + + Whether any of the values the property tree represents are prefab instances. + + + + + A prefab tree for the prefabs of this property tree's prefab instances, if any exist. + + + + + Gets the Unity PropertyModification for the property at this path, if there are any. + + The property path to get the modification for. + The index of the tree target to get the modification for. + Whether any children of the path have modifications registered. + + + + + Gets the Odin prefab modification type of a given property, if any. + + The property to check. + + + The prefab modification type of the property if it has one, otherwise null. + + + + + Registers a modification of type for a given property. + + The property to register a modification for. + Selection index of the target to register a modification for. + The modified list length. + + Property " + property.Path + " does not have a value entry; cannot register prefab modification to this property. + or + newLength cannot be negative! + + + + + Registers a modification of type for a given property. + + The property to register a modification for. + Selection index of the target to register a modification for. + Whether to force the change to be registered immediately, rather than at the end of frame. + Property " + property.Path + " does not have a value entry; cannot register prefab modification to this property. + + + + Calculates a delta between the current dictionary property and its prefab counterpart, and registers that delta as a modification. + + The property to register a modification for. + Selection index of the target. + Property " + property.Path + " does not have a value entry; cannot register prefab modification to this property. + + + + Adds a remove key modification to the dictionary modifications of a given property. + + The property to register a modification for. + Selection index of the target. + The key to be removed. + Property " + property.Path + " does not have a value entry; cannot register prefab modification to this property. + + + + Adds an add key modification to the dictionary modifications of a given property. + + The property to register a modification for. + Selection index of the target. + The key to be added. + Property " + property.Path + " does not have a value entry; cannot register prefab modification to this property. + + + + Removes all dictionary modifications on a property for a given dictionary key value. + + The property to remove a key modification for. + Selection index of the target. + The key to remove modifications for. + key + + + + Removes all prefab modifications of a given type on a given property. + + The property to remove modifications for. + Selection index of the target. + Type of the modification to remove. + + + + Gets all prefab modifications in this property tree for a given selection index. + + + + + + + Represents the children of an . + + + + + The that this instance handles children for. + + + + + Gets a child by index. This is an alias for . + + The index of the child to get. + The child at the given index. + + + + Gets a child by name. This is an alias for . + + The name of the child to get. + The child, if a child was found; otherwise, null. + + + + Gets a child by name. This is an alias for . + + The name of the child to get. + The child, if a child was found; otherwise, null. + + + + Initializes a new instance of the class. + + The property to handle children for. + property is null + + + + The number of children on the property. + + + + + Updates this instance of . + + + + + Gets a child by name. + + The name of the child to get. + The child, if a child was found; otherwise, null. + name + + + + Gets a child by name. + + The name of the child to get. + The child, if a child was found; otherwise, null. + name + + + + Gets a child by index. + + The index of the child to get. + + The child at the given index. + + The given index was out of range. + + + + Gets the path of the child at a given index. + + The index to get the path of. + The path of the child at the given index. + The given index was out of range. + + + + Returns an IEnumerable that recursively yields all children of the property, depth first. + + + + + Gets the property's already created children. If the child count is less than or equal to 10000, children are returned in order. If the count is larger than 10000, they are returned in no particular order. + + + + + Gets the enumerator. + + + + + Gets the enumerator. + + + + + This is a class for creating, getting and modifying a property's various states. An instance of this class always comes attached to an InspectorProperty. + See Odin's tutorials for more information about usage of the state system. + + + + + If set to true, all state changes for this property will be logged to the console. + + + + + Whether the property is visible in the inspector. + + + + + Whether the Visible state was true or not during the last layout event. + + + + + Whether the property is enabled in the inspector. + + + + + Whether the Enabled state was true or not during the last layout event. + + + + + Whether the property is expanded in the inspector. + + + + + Whether the Expanded state was true or not during the last layout event. + + + + + Creates a custom state with a given name. + + + + + + + + + Determines whether a state with the given key exists. + + The key to check. + True if the state exists, otherwise, false. + + + + Determines whether a state with the given key exists. + + The key to check. + If the state exists, this out parameter will be true if the state is persistent. + True if the state exists, otherwise, false. + + + + Determines whether a state with the given key exists. + + The key to check. + If the state exists, this out parameter will contain the type of value that the state contains. + True if the state exists, otherwise, false. + + + + Determines whether a state with the given key exists. + + The key to check. + If the state exists, this out parameter will be true if the state is persistent. + If the state exists, this out parameter will contain the type of value that the state contains. + True if the state exists, otherwise, false. + + + + Gets the value of a given state as an instance of type T. + + The type to get the state value as. An will be thrown if the state's value type cannot be assigned to T. + The key of the state to get. An will be thrown if a state with the given key does not exist. + The value of the state. + + + + Gets the value that a given state contained last layout as an instance of type T. + + The type to get the state value as. An will be thrown if the state's value type cannot be assigned to T. + The key of the state to get. An will be thrown if a state with the given key does not exist. + The value of the state during the last layout event. + + + + Sets the value of a given state to a given value. + + The type to set the state value as. An will be thrown if T cannot be assigned to the state's value type. + The key of the state to set the value of. An will be thrown if a state with the given key does not exist. + The value to set. + + + + Cleans the property state and prepares it for cached reuse of its containing PropertyTree. This will also reset the state. + + + + + Resets all states to their default values. Persistent states will be updated to their persistent cached value if one exists. + + + + + Represents a set of values of the same type as a tree of properties that can be drawn in the inspector, and provides an array of utilities for querying the tree of properties. + + + + + Delegate for on property value changed callback. + + + + + This will be replaced by an IMGUIDrawingComponent in patch 3.2. + + + + + The component providers that create components for each property in the tree. If you change this list after the tree has been used, you should call tree.RootProperty.RefreshSetup() to make the changes update properly throughout the tree. + + + + + The that this tree represents, if the tree was created for a . + + + + + The current update ID of the tree. This is incremented once, each update, and is used by to avoid updating multiple times in the same update round. + + + + + The type of the values that the property tree represents. + + + + + The actual values that the property tree represents. + + + + + The number of root properties in the tree. + + + + + The prefab modification handler of the tree. + + + + + Whether this property tree also represents members that are specially serialized by Odin. + + + + + Gets a value indicating whether or not to draw the mono script object field at the top of the property tree. + + + + + Gets a value indicating whether or not the PropertyTree is inspecting a static type. + + + + + The serialization backend used to determine how to draw this property tree. Set this to control. + + + + + Gets or sets the for the PropertyTree. + + + + + Gets or sets the for the PropertyTree. + + + + + Gets or sets the for the PropertyTree. + + + + + Gets or sets the for the PropertyTree. + + + + + An event that is invoked whenever an undo or a redo is performed in the inspector. + The advantage of using this event on a property tree instance instead of + is that this event will be desubscribed from + when the selection changes and the property + tree is no longer being used, allowing the GC to collect the property tree. + + + + + This event is invoked whenever the value of any property in the entire property tree is changed through the property system. + + + + + Creates a new for all target values of a . + + + + + Gets the root property of the tree. + + + + + Gets the secret root property of the tree, which hosts the property resolver used to resolve the "actual" root properties of the tree. + + + + + Registers that a given property is dirty and needs its changes to be applied at the end of the current frame. + + + + + Schedules a delegate to be invoked at the end of the current GUI frame. + + The action delegate to be delayed. + + + + Schedules a delegate to be invoked at the end of the next Repaint GUI frame. + + The action to be delayed. + + + + Enumerates over the properties of the tree. + + Whether to include children of the root properties or not. If set to true, every property in the entire tree will be enumerated. + Whether to only include visible properties. Properties whose parents are invisible are considered invisible. + + + + Gets the property at the given path. Note that this is the path found in , not the Unity path. + + The path of the property to get. + + + + Gets the property at the given path. Note that this is the path found in , not the Unity path. + + The path of the property to get. + + + + + Gets the property at the given Unity path. + + The Unity path of the property to get. + + + + Gets the property at the given Unity path. + + The Unity path of the property to get. + + + + + Gets the property at the given deep reflection path. + + The deep reflection path of the property to get. + + + + Gets the property at the given Odin prefab modification path. + + The prefab modification path of the property to get. + + + + Gets the property at the given Odin prefab modification path. + + The prefab modification path of the property to get. + + + + + Draw the property tree, and handles management of undo, as well as marking scenes and drawn assets dirty. + + This is a shorthand for calling + , + and . + . + + + + + + Draws a search bar for the property tree, and draws the search results if the search bar is used. + If this method returns true, the property tree should generally not be drawn normally afterwards. + Note that this method will throw exceptions if the property tree is not set up to be searchable; for that, see . + + True if the property tree is being searched and is currently drawing its search results, otherwise false. + + + + Gets a Unity property for the given Odin or Unity path. If there is no for this property tree, or no such property is found in the , a property will be emitted using . + + The Odin or Unity path to the property to get. + + + + Gets a Unity property for the given Odin or Unity path. If there is no for this property tree, or no such property is found in the , a property will be emitted using . + + The Odin or Unity path to the property to get. + The backing field of the Unity property. + + + + Checks whether a given object instance is referenced anywhere in the tree, and if it is, gives the path of the first time the object reference was encountered as an out parameter. + + The reference value to check. + The first found path of the object. + + + + Gets the number of references to a given object instance in this tree. + + + + + Updates all properties in the entire tree, and validates the prefab state of the tree, if applicable. + + + + + Replaces all occurrences of a value with another value, in the entire tree. + + The value to find all instances of. + The value to replace the found values with. + + + + Gets the root tree property at a given index. + + The index of the property to get. + + + + Invokes the actions that have been delayed using and . + + + + + Applies all changes made with properties to the inspected target tree values, and marks all changed Unity objects dirty. + + true if any values were changed, otherwise false + + + + Invokes the OnValidate method on the property tree's targets if they are derived from and have the method defined. + + + + + Registers an object reference to a given path; this is used to ensure that objects are always registered after having been encountered once. + + The referenced object. + The property that contains the reference. + + + + Creates a PropertyTree to inspect the static values of the given type. + + The type to inspect. + A PropertyTree instance for inspecting the type. + + + + Creates a new for a given target value. + + The target to create a tree for. + target is null + + + + Creates a new for a given target value. + + The target to create a tree for. + The serialization backend to use for the tree root. + target is null + + + + Creates a new for a set of given target values. + Note that the targets all need to be of the same type. + + The targets to create a tree for. + targets is null + + + + Creates a new for all target values of a . + + The serialized object to create a tree for. + serializedObject is null + + + + Creates a new for all target values of a . + + The serialized object to create a tree for. + serializedObject is null + The serialization backend to use for the tree root. + + + + Creates a new for a set of given target values. + Note that the targets all need to be of the same type. + + The targets to create a tree for. + + + + Creates a new for a set of given target values. + Note that the targets all need to be of the same type. + + The targets to create a tree for. + The serialization backend to use for the tree root. + + + + Creates a new for a set of given target values, represented by a given . + Note that the targets all need to be of the same type. + + The targets to create a tree for. + The serialized object to create a tree for. Note that the target values of the given must be the same values given in the targets parameter. + + + + Creates a new for a set of given target values, represented by a given . + Note that the targets all need to be of the same type. + + The targets to create a tree for. + The serialized object to create a tree for. Note that the target values of the given must be the same values given in the targets parameter. + The serialization backend to use for the tree root. + + + + Sets whether the property tree should be searchable or not, and allows the passing in of a custom SearchableAttribute instance to configure the search. + + Whether the tree should be set to be searchable or not. + If the tree is set to be searchable, then if this parameter is not null, it will be used to configure the property tree search. If the parameter is null, the SearchableAttribute on the tree's will be used. If that property has no such attribute, then default search settings will be applied. + + + + Represents a set of strongly typed values as a tree of properties that can be drawn in the inspector, and provides an array of utilities for querying the tree of properties. + This class also handles management of prefab modifications. + + + + + Gets the root property of the tree. + + + + + Gets the secret root property of the PropertyTree. + + + + + Gets the for the PropertyTree. + + + + + The current update ID of the tree. This is incremented once, each update, and is used by to avoid updating multiple times in the same update round. + + + + + The that this tree represents, if the tree was created for a . + + + + + The type of the values that the property tree represents. + + + + + The strongly types actual values that the property tree represents. + + + + + The weakly types actual values that the property tree represents. + + + + + The number of root properties in the tree. + + + + + Whether this property tree also represents members that are specially serialized by Odin. + + + + + Initializes a new instance of the class, inspecting only the target () type's static members. + + + + + Initializes a new instance of the class. + + The serialized object to represent. + + + + Initializes a new instance of the class. + + The targets to represent. + + + + Initializes a new instance of the class. + + The targets to represent. + The serialized object to represent. Note that the target values of the given must be the same values given in the targets parameter. + targets is null + + There must be at least one target. + or + A given target is a null value. + + + + + Initializes a new instance of the class. + + The targets to represent. + The serialized object to represent. Note that the target values of the given must be the same values given in the targets parameter. + The serialization backend to use for the tree root. + targets is null + + There must be at least one target. + or + A given target is a null value. + + + + + Applies all changes made with properties to the inspected target tree values. + + + true if any values were changed, otherwise false + + + + + Registers that a given property is dirty and needs its changes to be applied at the end of the current frame. + + + + + + + Updates all properties in the entire tree, and validates the prefab state of the tree, if applicable. + + + + + Checks whether a given object instance is referenced anywhere in the tree, and if it is, gives the path of the first time the object reference was encountered as an out parameter. + + The reference value to check. + The first found path of the object. + + + + Gets the number of references to a given object instance in this tree. + + + + + + Gets the property at the given path. Note that this is the path found in , not the Unity path. + + The path of the property to get. + + + + Gets the property at the given path. Note that this is the path found in , not the Unity path. + + The path of the property to get. + + + + + Finds the property at the specified unity path. + + The unity path for the property. + The property found at the path. + + + + Finds the property at the specified unity path. + + The unity path for the property. + + The property found at the path. + + + + Finds the property at the specified modification path. + + The prefab modification path for the property. + The property found at the path. + + + + Finds the property at the specified modification path. + + The prefab modification path for the property. + + The property found at the path. + + + + Gets a Unity property for the given Odin or Unity path. If there is no for this property tree, or no such property is found in the , a property will be emitted using . + + The Odin or Unity path to the property to get. + The backing field of the Unity property. + + + + Enumerates over the properties of the tree. WARNING: For tree that have large targets with lots of data, this may involve massive amounts of work as the full tree structure is resolved. USE THIS METHOD SPARINGLY AND ONLY WHEN ABSOLUTELY NECESSARY! + + Whether to include children of the root properties or not. If set to true, every property in the entire tree will be enumerated. + /// Whether to only include visible properties. Properties whose parents are invisible are considered invisible. + + + + Replaces all occurrences of a value with another value, in the entire tree. + + The value to find all instances of. + The value to replace the found values with. + + The value to replace with must either be null or be the same type as the value to replace (" + from.GetType().Name + "). + + + + Gets the root tree property at a given index. + + The index of the property to get. + + + + Schedules a delegate to be invoked at the end of the current GUI frame. + + The action delegate to be delayed. + action + + + + Schedules a delegate to be invoked at the end of the next Repaint GUI frame. + + The action to be delayed. + action + + + + Invokes the actions that have been delayed using and . + + + + + Enumeration describing the different types of properties that exist. + + + + + Property represents a value. + + + + + Property represents a method. + + + + + Property represents a named group of properties. + + + + + Enumeration for designating whether a has a special state,. + + + + + The value entry has no special state. + + + + + The property is a reference to another property. Get the path of the referenced property from . + + + + + The value entry is a null value. + + + + + The value entry has a primitive value conflict across selected indices. + A primitive value conflict is when primitive values, such a strings or floats, differ. + + + + + The value entry has a reference value conflict across selected indices. + A reference value conflict is when the types of reference type values differ, or when some values are null while others are not. + + + + + The value entry has a reference path conflict across selected indices. + A reference path conflict is when the property consists of references to many conflicting paths. Use to get paths to all referenced objects. + + + + + The value entry has a collection length conflict across selected indices. + A collection length conflict is when the property represents multiple parallel collections, and their lengths differ. + + + + + This attribute processor will take any attribute already applied to the property with the applied to, + and take all attributes applied to the attribute (except any ) and add to them to the property. + This allows for adding attributes to attributes in the property system. + + + + + Looks for attributes in the attributes list with a applied, and adds the attribute from those attributes to the property. + + The parent of the member. + The member that is being processed. + The list of attributes currently applied to the property. + + + + Finds all attributes attached to the specified member and adds to them to attribute list. + + + + + This attribute processor can only process for members. + + The property to process. + false. + + + + Finds all attributes attached to the specified member and adds to them to the attributes list. + + The parent property of the specified member. + The member to process attributes for. + The current attributes applied to the property. + + + + Attribute processor that can add, change and remove attributes from a property. + + + + + Instanciates an OdinAttributeProcessor instance of the specified type. + + The type of processor to instanciate. The type must inherit from . + A new instance of the specified type. + + + + Checks if the processor can process attributes for the specified member. + + The parent property of the member. + The member to be processed. + true if the processor can process for the specified member. Otherwise false. + + + + Checks if the processor can process attributes for the specified property. + + The property to process. + true if the processor can process attributes for the specified property. Otherwise false. + + + + Processes attributes for the specified member. + + The parent property of the specified member. + The member to process attributes for. + The current attributes applied to the property. + + + + Processes attributes for the specified property. + + The property to process attributes for. + The current attributes applied to the property. + + + + Attribute processor that can add, change and remove attributes from a property. + + + + + Find attributes attached to the type definition of a property and adds to them to attribute list. + + + + + This attribute processor can only process for properties. + + The parent of the specified member. + The member to process. + false. + + + + This attribute processor can only process for properties with an attached value entry. + + The property to process. + true if the specified property has a value entry. Otherwise false. + + + + Finds all attributes attached to the type and base types of the specified property value and adds them to the attribute list. + + The property to process. + The list of attributes for the property. + + + + Default implementation and the version that will be used when no other OdinAttributeProcessorLocator instance have been given to a PropertyTree. + This implementation will find all AttributeProcessor definitions not marked with the . + + + + + Singleton instance of the DefaultOdinAttributeProcessorLocator class. + + + + + Type search index used for matching to properties. + + + + + Gets a list of to process attributes for the specified child member of the parent property. + + The parent of the member. + Child member of the parent property. + List of to process attributes for the specified member. + + + + Gets a list of to process attributes for the specified property. + + The property to find attribute porcessors for. + List of to process attributes for the speicied member. + + + + Default implementation and the version that will be used by if no other instance have been specified. + + + + + Singleton instance of . + + + + + Gets an instance for the specified property. + + The property to get an instance for. + An instance of to resolver the specified property. + + + + Base class definition for OdinAttributeProcessorLocator. Responsible for finding and creating instances to process attributes for properties. + Default OdinAttributeProcessorLocator have been implemented as . + + + + + Gets a list of to process attributes for the specified child member of the parent property. + + The parent of the member. + Child member of the parent property. + List of to process attributes for the specified member. + + + + Gets a list of to process attributes for the specified property. + + The property to find attribute porcessors for. + List of to process attributes for the speicied member. + + + + Base class for locator of . Use for default implementation. + + + + + Gets an instance for the specified property. + + The property to get an instance for. + An instance of to resolver the specified property. + + + + Note: this interface may be temporary, and may eventually be substituted for a public-facing way of extending the prefab modification system. + + For now, it only exists to denote which internally defined resolvers support prefab modifications being set. + + + + + Contains information about a change that is going to occur/has occurred to a collection. + + + + + + Specifies the kinds of changes that can occur to collections. + + + + + Unknown collection change, the change was not specified by the invoking code. + + + + + The change is adding a value to the collection. Value and SelectionIndex will be set. + + + + + The change is inserting a value into the collection. Index, Value and SelectionIndex will be set. + + + + + The change is removing a value from the collection. Value and SelectionIndex will be set. + + + + + The change is removing a value at an index from the collection. Index and SelectionIndex will be set. + + + + + The change is clearing the collection. SelectionIndex will be set. + + + + + The change is removing a key from the collection. Key and SelectionIndex will be set. + + + + + The change is setting the value of a key in the collection. Key, Value and SelectionIndex will be set. + + + + + Class that describes the different possible serialization backends that a property can have, + and specifies the capabilities of each backend. + + + + + The property is serialized by Unity's polymorphic serialization backend via the [SerializeReference] attribute. Polymorphism, null values and cyclical references are supported. + + + + + The property is serialized by Unity's classic serialization backend. Polymorphism, null values and types such as are not supported. + + + + + The property is serialized by Odin. Polymorphism, null values and types such as are supported. + + + + + The property is not serialized by anything - possibly because it is a method, possibly because it is a field or property shown in the inspector without being serialized. + In the case of fields or properties, polymorphism, null values and types such as are supported, but will not be saved. + + + + + The property is not serialized by anything - possibly because it is a method, possibly because it is a field or property shown in the inspector without being serialized. + In the case of fields or properties, polymorphism, null values and types such as are supported, but will not be saved. + + + + + The property is serialized by Unity's classic serialization backend. Polymorphism, null values and types such as are not supported. + + + + + The property is serialized by Unity's polymorphic serialization backend via the [SerializeReference] attribute. Polymorphism, null values and cyclical references are supported. + + + + + The property is serialized by Odin. Polymorphism, null values and types such as are supported. + + + + + Gets the attribute that the OdinAttributeStateUpdater applies to. + + + + + Gets the strongly typed ValueEntry of the OdinAttributeStateUpdater's property. + + + + + Gets the strongly typed ValueEntry of the OdinValueStateUpdater's property. + + + + + Represents a weakly typed collection of values for a - one value per selected inspector target. + + + + + Whether the values have been changed since was last called. + + + + + Marks the value collection as being clean again. This is typically called at the end of the current GUI frame, during . + + + + + Marks the value collection as being dirty, regardless of any value changes. + + + + + Reverts the value collection to its origin values (found in ) from the last call, and marks the value collection as being clean again. + + + + + Force sets the value, ignoring whether it is editable or not. + Note that this will fail on list element value entries where is true on the parent value entry. + + The selection index of the value. + The value to be set. + + + + The original values of the value collection, such as they were immediately after the last call. + + + + + Represents a strongly typed collection of values for a - one value per selected inspector target. + + + + + Gets the value at the given selection index. + + + + + The number of values in the collection. + + + + + The original values of the value collection, such as they were immediately after the last call. + + + + + Force sets the value, ignoring whether it is editable or not. + Note that this will fail on list element value entries where is true on the parent value entry. + + The selection index of the value. + The value to be set. + + + + Represents the values of an , and contains utilities for querying the values' type and getting and setting them. + + + + + The number of parallel values this entry represents. This will always be exactly equal to the count of . + + + + + Whether this value entry is editable or not. + + + + + If this value entry has the override type , this is the path of the property it references. + + + + + The actual serialization backend for this value entry, possibly inherited from the serialization backend of the root property this entry is a child of. + Note that this is *not* always equal to . + + + + + The property whose values this value entry represents. + + + + + Provides access to the weakly typed values of this value entry. + + + + + Whether this value entry has been changed from its prefab counterpart. + + + + + Whether this value entry has had its list length changed from its prefab counterpart. + + + + + Whether this value entry has had its dictionary values changes from its prefab counterpart. + + + + + A weakly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + The type from which this value entry comes. If this value entry represents a member value, this is the declaring type of the member. If the value entry represents a collection element, this is the type of the collection. + + + + + The most precise known contained type of the value entry. If polymorphism is in effect, this will be some type derived from . + + + + + The base type of the value entry. If this is value entry represents a member value, this is the type of the member. If the value entry represents a collection element, this is the element type of the collection. + + + + + The special state of the value entry. + + + + + Whether this value entry is an alias, or not. Value entry aliases are used to provide strongly typed value entries in the case of polymorphism. + + + + + The context container of this property. + + + + + Whether this type is marked as an atomic type using a . + + + + + An event that is invoked during , when any values have changed. + + + + + An event that is invoked during , when any child values have changed. + + + + + Updates the values contained in this value entry to the actual values in the target objects, and updates its state (override, type of value, etc.) accordingly. + + + + + Applies the changes made to this value entry to the target objects, and registers prefab modifications as necessary. + + True if any changes were made, otherwise, false. + + + + Checks whether the values in this value entry are equal to the values in another value entry. + Note, both value entries must have the same value type, and must represent values that are .NET value types. + + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + Represents the strongly typed values of an , and contains utilities for querying the values' type and getting and setting them. + + + + + Provides access to the strongly typed values of this value entry. + + + + + A strongly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + An internally used interface that is used by value entries during , that lets value entries force each other to set values directly to their target objects. + This interface should not be used by people who do not know what they are doing. + + + + + Sets the actual value of a value entry, for a given selection index. + + + + + An internally used interface that is used by value entries during , that lets value entries force each other to set values directly to their target objects. + This interface should not be used by people who do not know what they are doing. + + + + + Sets the actual value of a value entry, for a given selection index. + + + + + Represents a weakly typed collection of values for a - one value per selected inspector target. + + + + + The property whose values are represented. + + + + + Initializes a new instance of the class. + + The property to represent. + property is null + + + + Whether the values have been changed since was last called. + + + + + The number of values in the collection. + + + + + Gets a value indicating whether this instance is synchronized. + + + true if this instance is synchronized; otherwise, false. + + + + + Gets the synchronization root object. + + + The synchronization root object. + + + + + The original values of the (loosely typed) value collection, such as they were immediately after the last call. + + + + + Gets or sets the weakly typed at the specified index. + + + The value. + + The index to set. + + + + Gets an enumerator for the collection. + + + + + Marks the value collection as being clean again. This is typically called at the end of the current GUI frame, during . + + + + + Reverts the value collection to its origin values (found in ) from the last call, and marks the value collection as being clean again. + + + + + Determines whether the collection contains the specified value. + + The value. + + true if the collection contains the specified value; otherwise, false. + + + + + Copies the collection to an array. + + The array to copy to. + The index to copy from. + + + + Gets the index of the given value, or -1 if the value was not found. + + The value to get the index of. + The index of the given value, or -1 if the value was not found. + + + + Gets the weakly typed value at the given index. + + The index of the value to get. + The weakly typed value at the given index + + + + Sets the weakly typed value at the given index. + + The index to set the value of. + The value to set. + + + + Force sets the value, ignoring whether it is editable or not. + Note that this will fail on list element value entries where is true on the parent value entry. + + The selection index of the value. + The value to be set. + + + + Marks the value collection as being dirty, regardless of any value changes. + + + + + Represents a strongly typed collection of values for a - one value per selected inspector target. + + The element type of the collection. + + + + + Initializes a new instance of the class. + + The property. + The internal array. + The original array. + The internal atom array. + The original atom array. + + + + Whether the values have been changed since was last called. + + + + + The number of values in the collection. + + + + + Gets a value indicating whether this instance is synchronized. + + + true if this instance is synchronized; otherwise, false. + + + + + Gets the synchronization root object. + + + The synchronization root object. + + + + + The original values of the (loosely typed) value collection, such as they were immediately after the last call. + + + + + Gets or sets the at the specified index. + + + The . + + The index. + + + + + Gets an enumerator for the collection. + + + + + Marks the value collection as being clean again. This is typically called at the end of the current GUI frame, during . + + + + + Reverts the value collection to its origin values (found in ) from the last call, and marks the value collection as being clean again. + + + + + Copies the collection to an array. + + The array to copy to. + The index to copy from. + + + + Gets the weakly typed value at the given index. + + The index of the value to get. + + The weakly typed value at the given index + + + + + Sets the weakly typed value at the given index. + + The index to set the value of. + The value to set. + + + + Determines whether the collection contains the specified value. + + The value. + + true if the collection contains the specified value; otherwise, false. + + + + + Gets the index of the given value, or -1 if the value was not found. + + The value to get the index of. + + The index of the given value, or -1 if the value was not found. + + + + + Force sets the value, ignoring whether it is editable or not. + Note that this will fail on list element value entries where is true on the parent value entry. + + The selection index of the value. + The value to be set. + + + + Force sets the value, ignoring whether it is editable or not. + Note that this will fail on list element value entries where is true on the parent value entry. + + The selection index of the value. + The value to be set. + + + + + Marks the value collection as being dirty, regardless of any value changes. + + + + + Represents an alias for a strongly typed collection of values for a - one value per selected inspector target. + This class ensures that polymorphism works in the inspector, and can be strongly typed in applicable cases. + + The type of the aliased collection. + The polymorphic type of this collection, which is assignable to . + + + + + + Initializes a new instance of the class. + + The property. + The aliased collection. + Not yet documented. + Not yet documented. + aliasedCollection + + + + Whether the values have been changed since was last called. + + + + + The number of values in the collection. + + + + + Gets a value indicating whether this instance is synchronized. + + + true if this instance is synchronized; otherwise, false. + + + + + Gets the synchronization root object. + + + The synchronization root object. + + + + + The original values of the (loosely typed) value collection, such as they were immediately after the last call. + + + + + The original values of the value collection, such as they were immediately after the last call. + + + + + Gets or sets the at the specified index. + + + The . + + The index. + + + + + Gets an enumerator for the collection. + + + + + + Marks the value collection as being clean again. This is typically called at the end of the current GUI frame, during . + + + + + Reverts the value collection to its origin values (found in ) from the last call, and marks the value collection as being clean again. + + + + + Determines whether the collection contains the specified value. + + The value. + + true if the collection contains the specified value; otherwise, false. + + + + + Gets the index of the given value, or -1 if the value was not found. + + The value to get the index of. + + The index of the given value, or -1 if the value was not found. + + + + + Copies the collection to an array. + + The array to copy to. + The index to copy from. + + + + Gets the weakly typed value at the given index. + + The index of the value to get. + + The weakly typed value at the given index + + + + + Sets the weakly typed value at the given index. + + The index to set the value of. + The value to set. + + + + Force sets the value, ignoring whether it is editable or not. + Note that this will fail on list element value entries where is true on the parent value entry. + + The selection index of the value. + The value to be set. + + + + Force sets the value, ignoring whether it is editable or not. + Note that this will fail on list element value entries where is true on the parent value entry. + + The selection index of the value. + The value to be set. + + + + Marks the value collection as being dirty, regardless of any value changes. + + + + + Represents the values of an , and contains utilities for querying the values' type and getting and setting them. + + + + + + Delegate type used for the events and . + + + + + The nearest parent property that has a value. + That is, the property from which this value + entry will fetch its parentvalues from in order + to extract its own values. + + If is null, this is a root property. + + + + + Whether this value entry represents a boxed value type. + + + + + The number of parallel values this entry represents. This will always be exactly equal to the count of . + + + + + Whether this value entry is editable or not. + + + + + If this value entry has the override type , this is the path of the property it references. + + + + + The actual serialization backend for this value entry, possibly inherited from the serialization backend of the root property this entry is a child of. + Note that this is *not* always equal to . + + + + + The property whose values this value entry represents. + + + + + Provides access to the weakly typed values of this value entry. + + + + + Whether this value entry has been changed from its prefab counterpart. + + + + + Whether this value entry has had its list length changed from its prefab counterpart. + + + + + Whether this value entry has had its dictionary values changes from its prefab counterpart. + + + + + A weakly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + The type from which this value entry comes. If this value entry represents a member value, this is the declaring type of the member. If the value entry represents a collection element, this is the type of the collection. + + + + + The most precise known contained type of the value entry. If polymorphism is in effect, this will be some type derived from . + + + + + The base type of the value entry. If this is value entry represents a member value, this is the type of the member. If the value entry represents a collection element, this is the element type of the collection. + + + + + The special state of the value entry. + + + + + Whether this value entry is an alias, or not. Value entry aliases are used to provide strongly typed value entries in the case of polymorphism. + + + + + The context container of this property. + + + + + Whether this type is marked as an atomic type using a . + + + + + An event that is invoked during , when any values have changed. + + + + + An event that is invoked during , when any child values have changed. + + + + + Updates the values contained in this value entry to the actual values in the target objects, and updates its state (override, type of value, etc.) accordingly. + + + + + Checks whether the values in this value entry are equal to the values in another value entry. + Note, both value entries must have the same value type, and must represent values that are .NET value types. + + + + + + + Applies the changes made to this value entry to the target objects, and registers prefab modifications as necessary. + + + True if any changes were made, otherwise, false. + + + + + Determines the value state of this value entry. + + + + + Determines what the most precise contained type is on this value entry. + + + + + Updates all values in this value entry from the target tree values. + + + + + Initializes this value entry. + + + + + Creates an alias value entry of a given type, for a given value entry. This is used to implement polymorphism in Odin. + + + + + Creates a value entry for a given property, of a given value type. Note that the created value entry is returned un-updated, and needs to have called on it before it can be used. + + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + Represents the values of an , and contains utilities for querying the values' type and getting and setting them. + + The type of the value. + + + + + An equality comparer for comparing values of type . This is gotten using . + + + + + Whether .is a primitive type; that is, the type is primitive, a string, or an enum. + + + + + Whether is a value type. + + + + + Whether is derived from . + + + + + Whether the type of the value is marked atomic. + + + + + If the type of the value is marked atomic, this an instance of an atom handler for the value type. + + + + + Initializes a new instance of the class. + + + + + Provides access to the weakly typed values of this value entry. + + + + + Provides access to the strongly typed values of this value entry. + + + + + Whether this type is marked as an atomic type using a . + + + + + A weakly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + A strongly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + An array containing the original values as they were at the beginning of frame. + + + + + An array containing the current modified set of values. + + + + + An array containing the current modified set of atomic values. + + + + + An array containing the original set of atomic values. + + + + + Initializes this value entry. + + + + + Sets the actual target tree value. + + + + + Checks whether the values in this value entry are equal to the values in another value entry. + Note, both value entries must have the same value type, and must represent values that are .NET value types. + + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + Represents the values of an , and contains utilities for querying the values' type and getting and setting them. + + The type of the parent. + The type of the value. + + + + + The type from which this value entry comes. If this value entry represents a member value, this is the declaring type of the member. If the value entry represents a collection element, this is the type of the collection. + + + + + Determines what the most precise contained type is on this value entry. + + + + + Initializes this value entry. + + + + + Updates all values in this value entry from the target tree values. + + + + + Determines the value state of this value entry. + + + + + Applies the changes made to this value entry to the target objects, and registers prefab modifications as necessary. + + + True if any changes were made, otherwise, false. + + + + + Gets the parent value at the given index. + + + + + A polymorphic alias for a instance, used to implement strongly typed polymorphism in Odin. + + + + + The number of parallel values this entry represents. This will always be exactly equal to the count of . + + + + + Whether this value entry is editable or not. + + + + + If this value entry has the override type , this is the path of the property it references. + + + + + The actual serialization backend for this value entry, possibly inherited from the serialization backend of the root property this entry is a child of. + Note that this is *not* always equal to . + + + + + The property whose values this value entry represents. + + + + + Provides access to the weakly typed values of this value entry. + + + + + Whether this value entry has been changed from its prefab counterpart. + + + + + Whether this value entry has had its list length changed from its prefab counterpart. + + + + + Whether this value entry has had its dictionary values changes from its prefab counterpart. + + + + + A weakly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + The type from which this value entry comes. If this value entry represents a member value, this is the declaring type of the member. If the value entry represents a collection element, this is the type of the collection. + + + + + The most precise known contained type of the value entry. If polymorphism is in effect, this will be some type derived from . + + + + + The base type of the value entry. If this is value entry represents a member value, this is the type of the member. If the value entry represents a collection element, this is the element type of the collection. + + + + + The special state of the value entry. + + + + + Whether this value entry is an alias, or not. Value entry aliases are used to provide strongly typed value entries in the case of polymorphism. + + + + + The context container of this property. + + + + + Whether this type is marked as an atomic type using a . + + + + + An event that is invoked during , when any values have changed. + + + + + An event that is invoked during , when any child values have changed. + + + + + Applies the changes made to this value entry to the target objects, and registers prefab modifications as necessary. + + + True if any changes were made, otherwise, false. + + + + + Updates the values contained in this value entry to the actual values in the target objects, and updates its state (override, type of value, etc.) accordingly. + + + + + Checks whether the values in this value entry are equal to the values in another value entry. + Note, both value entries must have the same value type, and must represent values that are .NET value types. + + + + + Sets the actual value of a value entry, for a given selection index. + + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + A polymorphic alias for a instance, used to implement strongly typed polymorphism in Odin. + + + + + Initializes a new instance of the class. + + The value entry to alias. + valueEntry is null + + + + Provides access to the strongly typed values of this value entry. + + + + + A strongly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + A weakly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + The number of parallel values this entry represents. This will always be exactly equal to the count of . + + + + + Whether this value entry is editable or not. + + + + + If this value entry has the override type , this is the path of the property it references. + + + + + The actual serialization backend for this value entry, possibly inherited from the serialization backend of the root property this entry is a child of. + Note that this is *not* always equal to . + + + + + The property whose values this value entry represents. + + + + + Provides access to the weakly typed values of this value entry. + + + + + Whether this value entry has been changed from its prefab counterpart. + + + + + Whether this value entry has had its list length changed from its prefab counterpart. + + + + + Whether this value entry has had its dictionary values changes from its prefab counterpart. + + + + + The type from which this value entry comes. If this value entry represents a member value, this is the declaring type of the member. If the value entry represents a collection element, this is the type of the collection. + + + + + The most precise known contained type of the value entry. If polymorphism is in effect, this will be some type derived from . + + + + + The base type of the value entry. If this is value entry represents a member value, this is the type of the member. If the value entry represents a collection element, this is the element type of the collection. + + + + + The special state of the value entry. + + + + + Whether this type is marked as an atomic type using a . + + + + + An event that is invoked during , when any values have changed. + + + + + An event that is invoked during , when any child values have changed. + + + + + Applies the changes made to this value entry to the target objects, and registers prefab modifications as necessary. + + + True if any changes were made, otherwise, false. + + + + + Updates the values contained in this value entry to the actual values in the target objects, and updates its state (override, type of value, etc.) accordingly. + + + + + Checks whether the values in this value entry are equal to the values in another value entry. + Note, both value entries must have the same value type, and must represent values that are .NET value types. + + + + + Sets the actual value of a value entry, for a given selection index. + + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + Draws properties marked with . + Displays a configurable list of assets, where each item can be enabled or disabled. + + + + + + + + + + Draws the property. + + + + + Populates the generic menu for the property. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Initializes this instance. + + + + + Draws the property with GUILayout support. This method is called by DrawPropertyImplementation if the GUICallType is set to GUILayout, which is the default. + + + + + Odin drawer for . + + + + + Initializes the drawer. + + + + + Not yet documented. + + + + + Draws Color properties marked with . + + + + + Draws the property. + + + + + Draws Color properties marked with . + + + + + Draws the property. + + + + + Adds a generic menu option to properties marked with . + + + + + + + + Populates the generic menu for the property. + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + Draws char properties marked with . + + + + + Draws the property. + + + + + Draws string properties marked with . + + + + + Draws the property. + + + + + Draws sbyte properties marked with . + + + + + Draws the property. + + + + + Draws byte properties marked with . + + + + + Draws the property. + + + + + Draws short properties marked with . + + + + + Draws the property. + + + + + Draws ushort properties marked with . + + + + + Draws the property. + + + + + Draws int properties marked with . + + + + + Draws the property. + + + + + Draws uint properties marked with . + + + + + Draws the property. + + + + + Draws long properties marked with . + + + + + Draws the property. + + + + + Draws ulong properties marked with . + + + + + Draws the property. + + + + + Draws float properties marked with . + + + + + Draws the property. + + + + + Draws double properties marked with . + + + + + Draws the property. + + + + + Draws decimal properties marked with . + + + + + Draws the property. + + + + + Draws char properties marked with . + + + + + Draws the property. + + + + + Draws string properties marked with . + + + + + Draws the property. + + + + + Draws sbyte properties marked with . + + + + + Draws the property. + + + + + Draws byte properties marked with . + + + + + Draws the property. + + + + + Draws short properties marked with . + + + + + Draws the property. + + + + + Draws ushort properties marked with . + + + + + Draws the property. + + + + + Draws int properties marked with . + + + + + Draws the property. + + + + + Draws uint properties marked with . + + + + + Draws the property. + + + + + Draws long properties marked with . + + + + + Draws the property. + + + + + Draws ulong properties marked with . + + + + + Draws the property. + + + + + Draws float properties marked with . + + + + + Draws the property. + + + + + Draws double properties marked with . + + + + + Draws the property. + + + + + Draws decimal properties marked with . + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + + + + Initializes this instance. + + + + + Draws the property. + + + + + Draws properties marked with . + Calls the properties ToString method to get the string to draw. + + + + + + + + + + + Draws the property. + + + + + Draws members marked with . + + + + + Odin drawer for the . + + + + + Returns true if the drawer can draw the type. + + + + + Draws the property. + + + + + Draws an enum in a horizontal button group instead of a dropdown. + + + + + Returns true if the drawer can draw the type. + + + + + Draws the property. + + + + + Not yet documented. + + + + + Initializes the drawer. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Initializes the drawer. + + + + + Not yet documented. + + + + + Adds customs generic menu options. + + + + + Draws properties marked with . + This drawer sets the current GUI color, before calling the next drawer in the chain. + + + + + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + Draws the property. + + + + + Draws properties marked with . + Draws an info box above the property. Error and warning info boxes can be tracked by Odin Scene Validator. + + + + + + + + + Draws the property. + + + + + Draws properties marked with + + + + + Draws the property. + + + + + Static GUI information reguarding the InlineEditor attribute. + + + + + Gets a value indicating how many InlineEditors we are currently in. + + + + + Draws properties marked with . + + + + + + + Initializes this instance. + + + + + Draws the property layout. + + The label. + + + + Drawer for the attribute. + + + + + Draws the property. + + + + + Draws properties marked with . + Creates a new GUIContent, with the provided label text, before calling further down in the drawer chain. + + + + + + + + + + + + Draws the attribute. + + + + + Draws properties marked with the . + + + + + + + + + + + + Draws the attribute. + + + + + Draws Vector2 properties marked with . + + + + + + + + + + + Draws string properties marked with . + This drawer only works for string fields, unlike . + + + + + + + + + + Draws the property. + + + + + Draws string properties marked with . + This drawer works for both string field and properties, unlike . + + + + + + + + + + Draws the property. + + + + + Draws a warning message for non-serialized properties that sports both the SerializeField and the ShowInInspector attribute. + + + + + Determines if the drawer can draw the property. + + The property to test. + true if the drawer can draw the property; otherwise false. + + + + Initializes the drawer. + + + + + Draws the warning message and calls the next drawer. + + The label for the property. + + + + + When first learning to use the Odin Inspector, it is common for people to misunderstand the OdinSerialize attribute, + and use it in places where it does not achive the deceired goal. + + + This drawer will display a warning message if the OdinSerialize attribute is potentially used in such cases. + + + + + + + Draws The Property. + + + + + Draws properties marked with . + + + + + + + + + + Draws properties marked with . + Calls the method, the attribute is either attached to, or the method that has been specified in the attribute, to allow for custom GUI drawing. + + + + + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + + + + + Draws properties marked with as a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + + + Draws the property. + + + + + Common base implementation for progress bar attribute drawers. + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Generic implementation of progress bar field drawing. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a byte property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a sbyte property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a short property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a ushort property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for an int property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a uint property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a long property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a ulong property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a float property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a double property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a decimal property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws byte properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws double properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws float properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws decimal properties marked with . + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws short properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws int properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws long properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws sbyte properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws ushort properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws uint properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws ulong properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws a space for properties marked with the PropertySpace attribute. + + + + + Initializes this instance. + + + + + Draws the property. + + + + + Draws byte properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws double properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws float properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws decimal properties marked with . + + + + + Draws the property. + + + + + Draws short properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws int properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws long properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws sbyte properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws ushort properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws uint properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws ulong properties marked with . + + + + + + + + + + + Draws the property. + + + + + Show drawer chain attribute drawer. + + + + + Draws the property. + + + + + Drawer for the ShowPropertyResolver attribute. + + + + + + Draws properties marked with . + + + + + + Initializes this instance. + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + + + + Draws the property. + + + + + TextArea attribute drawer. + + + + + Draws the property in the Rect provided. This method does not support the GUILayout, and is only called by DrawPropertyImplementation if the GUICallType is set to Rect, which is not the default. + If the GUICallType is set to Rect, both GetRectHeight and DrawPropertyRect needs to be implemented. + If the GUICallType is set to GUILayout, implementing DrawPropertyLayout will suffice. + + The label. This can be null, so make sure your drawer supports that. + + + + Draws properties marked with . + + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + Initializes this instance. + + + + + Draws the property with GUILayout support. This method is called by DrawPropertyImplementation if the GUICallType is set to GUILayout, which is the default. + + + + + Draws all Unity DecoratorDrawers within prepend attribute drawers within Odin. + + + + + Initializes the class. + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + Draws the property. + + + + + Initializes this instance. + + + + + Draws the property with GUILayout support. This method is called by DrawPropertyImplementation if the GUICallType is set to GUILayout, which is the default. + + + + + Draws Vector2Int properties marked with . + + + + + Initializes the drawer by resolving any optional references to members for min/max value. + + + + + Draws the property. + + + + + Vector2Int proprety drawer. + + + + + Draws the property. + + + + + Populates the generic menu for the property. + + + + + Vector3Int property drawer. + + + + + Draws the property. + + + + + Populates the generic menu for the property. + + + + + Draws all properties grouped together with the + + + + + + Initializes this instance. + + + + + Draws the property. + + + + + Draws all properties grouped together with the + + + + + + Draws the property. + + + + + Draws all properties grouped together with the + + + + + + Initializes this instance. + + + + + Draws the property. + + + + + Drawer for the + + + + + + Draws the property. + + + + + Drawer for the ResponsiveButtonGroupAttribute. + + + + + Draws the property with GUILayout support. + + + + + Draws all properties grouped together with the + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + + Draws the property. + + + + + Draws all properties grouped together with the + + + + + + Draws the property. + + + + + Drawer for the + + + + + + Draws the property. + + + + + The default method drawer that draws most buttons. + + + + + Initializes this instance. + + + + + Draws the property layout. + + + + + Returns a value that indicates if this drawer can be used for the given property. + + + + + Evaluates all strings, enums and primitive types and ensures EditorGUI.showMixedValue is true if there are any value conflicts in the current selection. + + + + + Sets the drawer to only be evaluated on primitive types, strings and enums. + + + + + Draws the property. + + + + + Adds the right click area. + + + + + Adds the right click area. + + + + + Opens a context menu for any given property on right click. The context menu is populated by all relevant drawers that implements . + + + + + + Initializes the drawer. + + + + + Draws the property. + + + + + Draws all reference type properties, which has already been drawn elsewhere. This drawer adds an additional foldout to prevent infinite draw depth. + + + + + Prevents the drawer from being applied to UnityEngine.Object references since they are shown as an object field, and is not drawn in-line. + + + + + Draws the property. + + + + + Draws properties with a set. + + + + + Draws the property. + + + + + + When multiple objects are selected and inspected, this his drawer ensures UnityEditor.EditorGUI.showMixedValue + gets set to true if there are any conflicts in the selection for any given property. + Otherwise the next drawer is called. + + This drawer also implements and provides a right-click context menu item for resolving conflicts if any. + + + + + Draws the property. + + + + + Animation curve property drawer. + + + + + Bool property drawer. + + + + + Draws the property. + + + + + Byte property drawer. + + + + + Draws the property. + + + + + Char property drawer. + + + + + Draws the property. + + + + + Property drawer for anything that has a . + + + + + Initializes the drawer. + + + + + Draws the property. + + + + + Color32 property drawer. + + + + + Draws the property. + + + + + Color property drawer. + + + + + Draws the property. + + + + + Color palette property drawer. + + + + + Draws the property. + + + + + Drawer for composite properties. + + + + + Draws the property. + + + + + Decimal property drawer. + + + + + Draws the property. + + + + + Delegate property drawer. This drawer is rather simplistic for now, and will receive significant upgrades in the future. + + + + + See . + + + + + Draws the property. + + + + + Property drawer for . + + + + + Draws the property. + + + + + Double property drawer. + + + + + Draws the property. + + + + + Base class to derive from for value drawers that merely wish to cause a value to be drawn by Unity. + + + + + Draws the property. + + + + + Enum property drawer. + + + + + Returns true if the drawer can draw the type. + + + + + Draws the property. + + + + + Gradient property drawer. + + + + + Int property drawer. + + + + + Draws the property. + + + + + The GUIStyleState Drawer + + + + + + Initializes this instance. + + + + + Draws the property with GUILayout support. + + + + + Short property drawer. + + + + + Draws the property. + + + + + Int property drawer. + + + + + Draws the property. + + + + + Long property drawer. + + + + + Draws the property. + + + + + LayerMask property drawer. + + + + + Draws the property. + + + + + Property drawer for nullables. + + + + + Draws the property. + + + + + Quaternion property drawer. + + + + + Draws the property. + + + + + Populates the generic menu for the property. + + + + + SByte property drawer. + + + + + Draws the property. + + + + + Retrieves the index of a filtered item; if the collection is not filtered, it just returns the passed index. + + The index to find. + + + The index in the collection of the filtered item, + or the passed index if the collection is not filtered. + + + + This is thrown if it's unable to find the index in the original collection, + this indicates a discrepancy between the filtered collection and the original collection. + + + + + Float property drawer. + + + + + Draws the property. + + + + + String property drawer. + + + + + Draws the property. + + + + + The TableList attirbute drawer. + + + + + + Determines whether this instance [can draw attribute property] the specified property. + + + + + Initializes this instance. + + + + + Draws the property layout. + + + + + Base class for two-dimensional array drawers. + + + + + Override this method in order to define custom type constraints to specify whether or not a type should be drawn by the drawer. + Note that Odin's has full support for generic class constraints, so most often you can get away with not overriding CanDrawTypeFilter. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Draws the property. + + + + + This method gets called from DrawPropertyLayout right before the table and error message is drawn. + + + + + Compares the element. + + + + + Draws a table cell element. + + The rect. + The input value. + The output value. + + + + Draws the element. + + + + + Type property drawer + + + + + + Draws the property. + + + + + Ushort property drawer. + + + + + Draws the property. + + + + + Uint property drawer. + + + + + Draws the property. + + + + + Ulong property drawer. + + + + + Draws the property. + + + + + Unity event drawer. + + + + + Draws the property. + + + + + Unity object drawer. + + + + + Initializes this instance. + + + + + Draws the property. + + + + + Vector2 proprety drawer. + + + + + Draws the property. + + + + + Populates the generic menu for the property. + + + + + Vector3 property drawer. + + + + + Draws the property. + + + + + Populates the generic menu for the property. + + + + + Vector4 property drawer. + + + + + Draws the property. + + + + + Populates the generic menu for the property. + + + + + Draws properties marked with . + + + + + + + + + Draws the property. + + + + + Draws short properties marked with . + + + + + + Not yet documented. + + + + + Draws int properties marked with . + + + + + + Not yet documented. + + + + + Draws long properties marked with . + + + + + + Not yet documented. + + + + + Draws float properties marked with . + + + + + + Not yet documented. + + + + + Draws double properties marked with . + + + + + + Not yet documented. + + + + + Draws decimal properties marked with . + + + + + + Not yet documented. + + + + + Draws Vector2 properties marked with . + + + + + + Not yet documented. + + + + + Draws Vector3 properties marked with . + + + + + + Not yet documented. + + + + + Draws Vector4 properties marked with . + + + + + + Not yet documented. + + + + + Base drawer to inherit from to draw methods. + + + + + + Base class for attribute drawers. Use this class to create your own custom attribute drawers that will work for all types. + Alternatively you can derive from if you want to only support specific types. + + + + Odin supports the use of GUILayout and takes care of undo for you. It also takes care of multi-selection + in many simple cases. Check the manual for more information on handling multi-selection. + + + + Also note that Odin does not require that your custom attribute inherits from Unity's PropertyAttribute. + + + + The attribute that this drawer should be applied to. + + + Checkout the manual for more information. + + + + Example using the . + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)] + public class CustomRangeAttribute : System.Attribute + { + public float Min; + public float Max; + + public CustomRangeAttribute(float min, float max) + { + this.Min = min; + this.Max = max; + } + } + + // Remember to wrap your custom attribute drawer within a #if UNITY_EDITOR condition, or locate the file inside an Editor folder. + + public sealed class CustomRangeAttributeDrawer : OdinAttributeDrawer<CustomRangeAttribute, float> + { + protected override void DrawPropertyLayout(GUIContent label) + { + this.ValueEntry.SmartValue = EditorGUILayout.Slider(label, this.ValueEntry.SmartValue, this.Attribute.Min, this.Attribute.Max); + } + } + + // Usage: + public class MyComponent : MonoBehaviour + { + [CustomRangeAttribute(0, 1)] + public float MyFloat; + } + + + + + Example using the . + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)] + public class GUITintColorAttribute : System.Attribute + { + public Color Color; + + public GUITintColorAttribute(float r, float g, float b, float a = 1) + { + this.Color = new Color(r, g, b, a); + } + } + + // Remember to wrap your custom attribute drawer within a #if UNITY_EDITOR condition, or locate the file inside an Editor folder. + + public sealed class GUITintColorAttributeDrawer : OdinAttributeDrawer<GUITintColorAttribute> + { + protected override void DrawPropertyLayout(GUIContent label) + { + Color prevColor = GUI.color; + GUI.color *= this.Attribute.Color; + this.CallNextDrawer(label); + GUI.color = prevColor; + } + } + + // Usage: + public class MyComponent : MonoBehaviour + { + [GUITintColor(0, 1, 0)] + public float MyFloat; + } + + + + + + Odin uses multiple drawers to draw any given property, and the order in which these drawers are + called are defined using the . + Your custom drawer injects itself into this chain of drawers based on its . + If no is defined, a priority is generated automatically based on the type of the drawer. + Each drawer can ether choose to draw the property or not, or pass on the responsibility to the + next drawer by calling CallNextDrawer(), as the f attribute does in the example above. + + + + This means that there is no guarantee that your drawer will be called, sins other drawers + could have a higher priority than yours and choose not to call CallNextDrawer(). + + + + Note that Odin's has full support for generic class constraints, + and if that is not enough, you can also add additional type constraints by overriding CanDrawTypeFilter + + + + Also note that all custom property drawers needs to handle cases where the label provided by the DrawPropertyLayout is null, + otherwise exceptions will be thrown when in cases where the label is hidden. For instance when [HideLabel] is used, or the property is drawn within a list where labels are also not shown. + + + + [DrawerPriority(DrawerPriorityLevel.AttributePriority)] + public sealed class MyCustomAttributeDrawer<T> : OdinAttributeDrawer<MyCustomAttribute, T> where T : class + { + public override bool CanDrawTypeFilter(Type type) + { + return type != typeof(string); + } + + protected override void DrawPropertyLayout(GUIContent label) + { + // Draw property here. + } + } + + + + + + + + + + + + + + + + + + Gets the attribute that the OdinAttributeDrawer draws for. + + + + + Tells whether or not multiple attributes are allowed. + + + + + Draws the property with the given label. + Override this to implement your custom OdinAttributeDrawer. + + Optional label for the property. + + + + Tests if the drawer can draw for the specified property. + + The property to test. + true if the drawer can drawn the property. Otherwise false. + + + + Tests if the attribute drawer can draw for the specified property. + + The property to test. + true if the drawer can drawn the property. Otherwise false. + + + + + Base class for all type specific attribute drawers. For non-type specific attribute drawers see . + + + + Odin supports the use of GUILayout and takes care of undo for you. It also takes care of multi-selection + in many simple cases. Checkout the manual for more information on handling multi-selection. + + + + Also note that Odin does not require that your custom attribute inherits from Unity's PropertyAttribute. + + + + The attribute that this drawer should be applied to. + The type of the value the drawer should be drawing. Note that Odin's has full support for generic constraints. + + + Checkout the manual for more information. + + + + Example using the . + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)] + public class CustomRangeAttribute : System.Attribute + { + public float Min; + public float Max; + + public CustomRangeAttribute(float min, float max) + { + this.Min = min; + this.Max = max; + } + } + + // Remember to wrap your custom attribute drawer within a #if UNITY_EDITOR condition, or locate the file inside an Editor folder. + + public sealed class CustomRangeAttributeDrawer : OdinAttributeDrawer<CustomRangeAttribute, float> + { + protected override void DrawPropertyLayout(GUIContent label) + { + this.ValueEntry.SmartValue = EditorGUILayout.Slider(label, this.ValueEntry.SmartValue, this.Attribute.Min, this.Attribute.Max); + } + } + + // Usage: + public class MyComponent : MonoBehaviour + { + [CustomRangeAttribute(0, 1)] + public float MyFloat; + } + + + + + Example using the . + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)] + public class GUITintColorAttribute : System.Attribute + { + public Color Color; + + public GUITintColorAttribute(float r, float g, float b, float a = 1) + { + this.Color = new Color(r, g, b, a); + } + } + + // Remember to wrap your custom attribute drawer within a #if UNITY_EDITOR condition, or locate the file inside an Editor folder. + + public sealed class GUITintColorAttributeDrawer : OdinAttributeDrawer<GUITintColorAttribute> + { + protected override void DrawPropertyLayout(GUIContent label) + { + Color prevColor = GUI.color; + GUI.color *= this.Attribute.Color; + this.CallNextDrawer(label); + GUI.color = prevColor; + } + } + + // Usage: + public class MyComponent : MonoBehaviour + { + [GUITintColor(0, 1, 0)] + public float MyFloat; + } + + + + + + Odin uses multiple drawers to draw any given property, and the order in which these drawers are + called is defined using the . + Your custom drawer injects itself into this chain of drawers based on its . + If no is defined, a priority is generated automatically based on the type of the drawer. + Each drawer can ether choose to draw the property or not, or pass on the responsibility to the + next drawer by calling CallNextDrawer(), as the GUITintColor attribute does in the example above. + + + + This means that there is no guarantee that your drawer will be called, since other drawers + could have a higher priority than yours and choose not to call CallNextDrawer(). + + + + Note that Odin's has full support for generic class constraints, + and if that is not enough, you can also add additional type constraints by overriding CanDrawTypeFilter + + + + Also note that all custom property drawers needs to handle cases where the label provided by the DrawPropertyLayout is null, + otherwise exceptions will be thrown when in cases where the label is hidden. For instance when [HideLabel] is used, or the property is drawn within a list where labels are also not shown. + + + + [DrawerPriority(DrawerPriorityLevel.AttributePriority)] + public class MyCustomAttributeDrawer<T> : OdinAttributeDrawer<MyCustomAttribute, T> where T : class + { + public override bool CanDrawTypeFilter(Type type) + { + return type != typeof(string); + } + + protected override void DrawPropertyLayout(GUIContent label) + { + // Draw property here. + } + } + + + + + + + + + + + + + + + + + + Gets the strongly typed ValueEntry of the OdinAttributeDrawer's property. + + + + + Draws the property with the given label. + Override this to implement your custom OdinAttributeDrawer. + + Optional label for the property. + + + + Tests if the drawer can draw for the specified property. + + The property to test. + true if the drawer can drawn the property. Otherwise false. + + + + Tests if the attribute drawer can draw for the specified property. + + The property to test. + true if the drawer can drawn the property. Otherwise false. + + + + + Base class for all Odin drawers. In order to create your own custom drawers you need to derive from one of the following drawers: + + + + + + + + Remember to provide your custom drawer with an in order for it to be located by the . + Drawers require a context, and are instantiated automatically by the . + Odin supports the use of GUILayout and takes care of undo for you. It also takes care of multi-selection in many simple cases. Checkout the manual for more information. + + + + + + + + + + + + + + + + + If true then this drawer will be skipped in the draw chain. Otherwise the drawer will be called as normal in the draw chain. + + + + + Gets a value indicating if the drawer has been initialized yet. + + + + + Gets the property this drawer draws for. + + + + + Override this method in order to define custom type constraints to specify whether or not a type should be drawn by the drawer. + Note that Odin's has full support for generic class constraints, so most often you can get away with not overriding CanDrawTypeFilter. + + The type. + + Returns true by default, unless overridden. + + + + + Initializes the drawer instance. + + + + + + Initializes the drawer instance. Override this to implement your own initialization logic. + + + + + Draws the property with a custom label. + + The label. Null is allow if you wish no label should be drawn. + + + + Draws the property with GUILayout support. + + The label. This can be null, so make sure your drawer supports that. + + + + Calls the next drawer in the draw chain. + + The label to pass on to the next drawer. + + + + Gets a value indicating if the drawer can draw for the specified property. + Override this to implement a custom property filter for your drawer. + + The property to test. + true if the drawer can draw for the property. Otherwise false. + + + + OdinDrawer extensions. + + + + + Gets a persistent value that will survive past multiple Unity Editor Application sessions. + The value is stored in the PersistentContextCache, which has a customizable max cache size. + + + + + Draws the default Odin inspector. + + + + + Draws the default Unity inspector. + + + + + Not yet documented. + + + + + Draws the property tree. + + + + + Called by Unity. + + + + + Called by Unity. + + + + + + Base class for all group drawers. Use this class to create your own custom group drawers. OdinGroupDrawer are used to group multiple properties together using an attribute. + + + + Note that all box group attributes needs to inherit from the + + + + Remember to provide your custom drawer with an + in order for it to be located by the . + + + + + + Checkout the manual for more information. + + + + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] + public class MyBoxGroupAttribute : PropertyGroupAttribute + { + public MyBoxGroupAttribute(string group, float order = 0) : base(group, order) + { + } + } + + // Remember to wrap your custom group drawer within a #if UNITY_EDITOR condition, or locate the file inside an Editor folder. + + public class BoxGroupAttributeDrawer : OdinGroupDrawer<MyBoxGroupAttribute> + { + protected override void DrawPropertyGroupLayout(InspectorProperty property, MyBoxGroupAttribute attribute, GUIContent label) + { + GUILayout.BeginVertical("box"); + for (int i = 0; i < property.Children.Count; i++) + { + InspectorUtilities.DrawProperty(property.Children[i]); + } + GUILayout.EndVertical(); + } + } + + // Usage: + public class MyComponent : MonoBehaviour + { + [MyBoxGroup("MyGroup")] + public int A; + + [MyBoxGroup("MyGroup")] + public int B; + + [MyBoxGroup("MyGroup")] + public int C; + } + + + + + + + + + + + + + + + + + + Draws the property with GUILayout support. + + The label. This can be null, so make sure your drawer supports that. + + + + + Base class for all value drawers. Use this class to create your own custom drawers for any specific type. + + + + Remember to provide your custom drawer with an + in order for it to be located by the . + + + + Odin supports the use of GUILayout and takes care of undo for you. It also takes care of multi-selection + in many simple cases. Checkout the manual for more information on handling multi-selection. + + + + + Checkout the manual for more information. + + + + + public class MyCustomBaseType + { + + } + + public class MyCustomType : MyCustomBaseType + { + + } + + // Remember to wrap your custom attribute drawer within a #if UNITY_EDITOR condition, or locate the file inside an Editor folder. + + public sealed class MyCustomBaseTypeDrawer<T> : OdinValueDrawer<T> where T : MyCustomBaseType + { + protected override void DrawPropertyLayout(IPropertyValueEntry<T> entry, GUIContent label) + { + T value = entry.SmartValue; + // Draw your custom drawer here using GUILayout and EditorGUILAyout. + } + } + + // Usage: + // Both values will be drawn using the MyCustomBaseTypeDrawer + public class MyComponent : SerializedMonoBehaviour + { + public MyCustomBaseType A; + + public MyCustomType B; + } + + + + + + Odin uses multiple drawers to draw any given property, and the order in which these drawers are + called are defined using the . + Your custom drawer injects itself into this chain of drawers based on its . + If no is defined, a priority is generated automatically based on the type of the drawer. + Each drawer can ether choose to draw the property or not, or pass on the responsibility to the + next drawer by calling CallNextDrawer(). An example of this is provided in the documentation for . + + + + This means that there is no guarantee that your drawer will be called, sins other drawers + could have a higher priority than yours and choose not to call CallNextDrawer(). + + + + To avoid this, you can tell Odin, that your drawer is a PrependDecorator or an AppendDecorator drawer (see ) as shown in the example shows below. + Prepend and append decorators are always drawn and are also ordered by the . + + + + Note that Odin's have full support for generic class constraints, + and if that is not enough, you can also add additional type constraints by overriding CanDrawTypeFilter(Type type). + + + + Also note that all custom property drawers needs to handle cases where the label provided by the DrawPropertyLayout is null, + otherwise exceptions will be thrown when in cases where the label is hidden. For instance when [HideLabel] is used, or the property is drawn within a list where labels are also not shown. + + + + // [OdinDrawer(OdinDrawerBehaviour.DrawProperty)] // default + // [OdinDrawer(OdinDrawerBehaviour.AppendDecorator)] + [OdinDrawer(OdinDrawerBehaviour.PrependDecorator)] + [DrawerPriority(DrawerPriorityLevel.AttributePriority)] + public sealed class MyCustomTypeDrawer<T> : OdinValueDrawer<T> where T : MyCustomType + { + public override bool CanDrawTypeFilter(Type type) + { + return type != typeof(SomeType); + } + + protected override void DrawPropertyLayout(IPropertyValueEntry<T> entry, GUIContent label) + { + T value = entry.SmartValue; + // Draw property here. + } + } + + + + + + + + + + + + + + + + + + + The value entry of the property. + + + + + Draws the property with GUILayout support. + + The label. This can be null, so make sure your drawer supports that. + + + + Gets a value indicating if the drawer can draw for the specified property. + + The property to test. + true if the drawer can draw for the property. Otherwise false. + + + + Gets a value indicating if the drawer can draw for the specified property. + Override this to implement a custom property filter for your drawer. + + The property to test. + true if the drawer can draw for the property. Otherwise false. + + + + Unity property drawer for abstract types. + + + + + Initializes the property drawer. + + + + + Draws the property. + + + + + Property drawer for primitive composite properties. + + + + + Draws the property. + + + + + Draws the property field. + + + + + Unity property attribute drawer. + + + + + Initializes the drawer. + + + + + Draws the proprety. + + + + + Unity property drawer. + + + + + Initializes the property drawer. + + + + + Draws the property. + + + + + Descripes an attribute example. + + + + + The type of the example object. + + + + + The name of the example. + + + + + The description of the example. + + + + + Raw code of the example. + + + + + The example declared as a Unity component. + + + + + Sorting value of the example. Examples with lower order values should come before examples with higher order values. + + + + + Preview object of the example. + + + + + Checks whether the allocated has data associated with it. + + The index of the to check. + true if the has data associated with it; otherwise false. + + + + Gets the data associated with the at the given ; this is the second parameter assigned in the method. + + The index of the to retrieve the associated data from. + The associated data. + + + + Gets the data associated with the at the given ; this is the second parameter assigned in the method. + + The index of the to retrieve the associated data from. + The expected associated data type. + The associated data. + + + + Gets the indentation set for the at the given . + + The of the to retrieve the indentation for. + The indentation for the . + The indentation is set using during and . + + + + Creates a representing all the visible 's combined. + + The created . + + + + Allocates an in the view, with the option to associate a given with it. + + + + Ensure is called before calling this, and ensure is called after you're done with + + + Temporary. + This implementation will get refactored. + + + Temporary. + This implementation will get refactored. + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Whether to allow scene objects. + Determines if the Field is read-only. + Will be used for setting and updating the value, this provides a more consistent way to the handle changes. + If a property is assigned through the parameters, the return value should not be used for setting the , the drawer will handle that. + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Whether to allow scene objects. + Determines if the Field is read-only. + Will be used for setting and updating the value, this provides a more consistent way to the handle changes. + If a property is assigned through the parameters, the return value should not be used for setting the , the drawer will handle that. + + + + TODO + + + + + + + + + + + + + + + + If a property is assigned through the parameters, the return value should not be used for setting the , the drawer will handle that. + + + + TODO + + + + + + + + + + + + + + + + If a property is assigned through the parameters, the return value should not be used for setting the , the drawer will handle that. + + + + Contains a set of Unique IDs used for various parts of Odin that don't rely on ControlIds as the ID identifier for OdinObjectSelector. + + + + + Handles instantiating different versions of the Type Selector depending on the context. + + This handler only handles shared constructors between the two versions, for obsolete or unique constructors use the desired selector. + + + + Some drawers don't want to have its GUI disabled, even if the property is read-only or a ReadOnly attribute is defined on the property. + Use this attribute on any drawer to force GUI being enabled in these cases. + + + + + [AllowGUIEnabledForReadonly] + public sealed class SomeDrawerDrawer<T> : OdinValueDrawer<T> where T : class + { + } + + + + + + Extension method for List<Attribute> + + + + + Determines whether the list contains a specific attribute type. + + The type of attribute. + The attribute list. + + true if the specified attribute list has attribute; otherwise, false. + + + + + Adds a new instance of the given type of attribute if it's not in the list. + + The type of attribute. + The attribute list. + + + + + Gets the first instance of an attribute of the given type in the list. + + The type of attribute. + The attribute list. + + + + + Adds a new instance of the attribute to the list. + + The type of attribute. + The attribute list. + + + + + Removes all instances of the given type in the list. + + The type of attribute. + The attribute list. + + + + + + DrawerPriority is used in conjunction with + to specify the priority of any given drawer. It consists of 3 components: + Super, Wrapper, Value, where Super is the most significant component, + and Standard is the least significant component. + + + + + + + + Auto priority is defined by setting all of the components to zero. + If no is defined on a drawer, it will default to AutoPriority. + + + + + The standard priority. Mostly used by s. + + + + + The attribute priority. Mostly used by s. + + + + + The wrapper priority. Mostly used by drawers used to decorate properties. + + + + + The super priority. Mostly used by drawers that wants to wrap the entire property but don't draw the actual property. + These drawers typically don't draw the property itself, and calls CallNextDrawer. + + + + + The value priority. Mostly used by s and s. + + + + + The wrapper priority. Mostly used by drawers used to decorate properties. + + + + + The super priority. Mostly used by drawers that wants to wrap the entire property but don't draw the actual property. + These drawers typically don't draw the property itself, and calls CallNextDrawer. + + + + + Initializes a new instance of the struct. + + The priority. + + + + Initializes a new instance of the struct. + + + The super priority. Mostly used by drawers that wants to wrap the entire property but don't draw the actual property. + These drawers typically don't draw the property itself, and calls CallNextDrawer. + The wrapper priority. Mostly used by drawers used to decorate properties. + The value priority. Mostly used by s and s. + + + + Implements the operator >. + + The LHS. + The RHS. + + The result of the operator. + + + + + Implements the operator <. + + The LHS. + The RHS. + + The result of the operator. + + + + + Implements the operator <=. + + The LHS. + The RHS. + + The result of the operator. + + + + + Implements the operator >=. + + The LHS. + The RHS. + + The result of the operator. + + + + + Implements the operator +. + + The LHS. + The RHS. + + The result of the operator. + + + + + Implements the operator -. + + The LHS. + The RHS. + + The result of the operator. + + + + + Implements the operator ==. + + The LHS. + The RHS. + + The result of the operator. + + + + + Implements the operator !=. + + The LHS. + The RHS. + + The result of the operator. + + + + + Gets the priority level. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + + A that represents this instance. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Equals the specified other. + + The other. + + + + + Compares to. + + The other. + + + + + DrawerPriority is used on inspector drawers and indicates the priority of the drawer. + Use this to make your custom drawer to come before or after other drawers, and potentially hide other drawers. + + + The following example shows how DrawerPriority could be apply to a value drawer. + + [DrawerPriority(DrawerPriorityLevel.ValuePriority)] + + public sealed class MyIntDrawer : InspectorValuePropertyDrawer<int> + { + // ... + } + + + + The following example shows how DrawerPriority is used to mark a custom int drawer as a high priority drawer. + + [DrawerPriority(1, 0, 0)] + + public sealed class MySpecialIntDrawer : InspectorValuePropertyDrawer<int> + { + // ... + } + + + + + + + + The priority of the drawer. + + + + + Indicates the priority of an inspector drawer. + + Option for priority for the inspector drawer. + + + + Indicates the priority of an inspector drawer. + + + The super priority. Mostly used by drawers that wants to wrap the entire property but don't draw the actual property. + These drawers typically don't draw the property itself, and calls CallNextDrawer. + The wrapper priority. Mostly used by drawers used to decorate properties. + The value priority. Mostly used by s and s. + + + + + DrawerPriorityLevel is used in conjunction with . + + + + + + + + Auto priority is defined by setting all of the components to zero. + If no is defined on a drawer, it will default to AutoPriority. + + + + + The value priority. Mostly used by s. + + + + + The attribute priority. Mostly used by s. + + + + + The wrapper priority. Mostly used by drawers used to decorate properties. + + + + + The super priority. Mostly used by drawers that wants to wrap the entire property but don't draw the actual property. + These drawers typically don't draw the property itself, and calls CallNextDrawer. + + + + + Odin has its own implementations for these attribute drawers; never use Unity's. + + + + + Gets the priority of a given drawer type. + + + + + Base class for emitted MonoBehaviour-derived types that have been created by the . + + + + + The field that backs the value of this MonoBehaviour. + + + + + Sets the value contained in this scriptable object. + + + + + Gets the value contained in this scriptable object. + + + + + Strongly typed base class for emitted MonoBehaviour-derived types that have been created by the . + + + + + Sets the value contained in this scriptable object. + + + + + Gets the value contained in this scriptable object. + + + + + Sets the value contained in this scriptable object. + + + + + Gets the value contained in this scriptable object. + + + + + Base class for emitted ScriptableObject-derived types that have been created by the . + + + + + The field that backs the value of this scriptable object. + + + + + Sets the value contained in this scriptable object. + + + + + Gets the value contained in this scriptable object. + + + + + Strongly typed base class for emitted scriptable object types that have been created by the . + + + + + Sets the value contained in this scriptable object. + + + + + Gets the value contained in this scriptable object. + + + + + Sets the value contained in this scriptable object. + + + + + Gets the value contained in this scriptable object. + + + + + Unwraps TargetInvocationException and TypeInitializationException + + + + + This class fixes Unity's about window, by invoking "UnityEditor.VisualStudioIntegration.UnityVSSupport.GetAboutWindowLabel" before any dynamic assemblies have been defined. + This is because dynamic assemblies in the current AppDomain break that method, and Unity's about window depends on it. + + + + + + If you mark any of Unity's assemblies with the [AssemblyVersion] attribute to get a rolling assembly + version that changes sometimes (or all the time), Odin's hardcoded assembly references to user types + will break. + + + To fix this case, and all other cases of references to wrongly versioned Unity types not being resolved, + we overload the app domain's type resolution and resolve Unity user assemblies properly regardless of + version. + + + + + + This class fixes a bug where Unity's Undo.RecordObject does not mark ScriptableObjects dirty when + a change is recorded for them. It does this by subscribing to the Undo.postprocessModifications + event, and marking all modified ScriptableObjects dirty manually. + + + + + Specifies hows any given drawer should drawer the property. + Changing this behavior, also changes which methods should be overridden in the drawer. + + + + + + + + + GUILayout enabled the use of GUILayout, EditorGUILayout and + + + + + Draws the property using Unity's GUI, and EditorGUI. + + + + + Helper class to get values from InspectorProperties. This class is deprecated and fully replaced by . + + + + + If any error occurred while looking for members, it will be stored here. + + + + + Gets the referenced member information. + + + + + Gets the value. + + + + + Gets all values from all targets. + + + + + Provides a variety of miscellaneous utilities widely used in the inspector. + + + + + Converts an Odin property path to a deep reflection path. + + + + + Converts an Odin property path (without groups included) into a Unity property path. + + + + + Prepares a property tree for drawing, and handles management of undo, as well as marking scenes and drawn assets dirty. + + The tree to be drawn. + Whether to register undo commands for the changes made to the tree. This can only be set to true if the tree has a to represent. + tree is null + + + + Ends drawing a property tree, and handles management of undo, as well as marking scenes and drawn assets dirty. + + The tree. + + + + Draws all properties in a given property tree; must be wrapped by a and . + + The tree to be drawn. + + + + Draws a property in the inspector using a given label. + + + + + Odin property system exception. + + + + + Initializes a new instance of OdinPropertyException. + + The message for the exception. + An inner exception. + + + + Custom types used by the can choose to implement the ITemporaryContext + interface in order to be notified when the context gets reset. + + + + + Called by when the context gets reset. + + + + + Used by all InspectorProperty to tell Odin how to set or get a value on any given property. + + + + + Whether the value is readonly. + + + + + Gets the type of the owner. + + + + + Gets the type of the value. + + + + + Sets the weakly typed value on a given weakly typed owner. + + The owner. + The value. + + + + Gets the value from a given weakly typed owner. + + The weakly typed owner. + The found value. + + + + Used by all to tell Odin how to set or get a value on any given property. + + + + + Sets the value on a given owner. + + The owner. + The value. + + + + Gets the value from a given owner. + + The owner. + + + + The content padding + + + + + Draws the menu tree. + + + + + Gets the value selected value. + + + + + Invokes BuildMenuTree. + + + + + Use this attribute to prevent a type from being included in Odin systems. + The attribute can be applied to Odin drawers, Odin property resolvers and Odin attribute processor types. + + + + + When creating custom property drawers with or etc, + an OdinDrawerAttribute must be defined on the custom drawer class itself in order to specify that the drawer is meant to be included in the inspector. + If no OdinDrawerAttribute is defined, the will ignore your drawer. + + + Checkout the manual for more information. + + + + // Specify that this drawer must be included in the inspector; without this, it will not be drawn + public class MyCustomTypeDrawer<T> : OdinValueDrawer<T> where T : MyCustomBaseType + { + protected override void DrawPropertyLayout(IPropertyValueEntry<T> entry, GUIContent label) + { + T value = entry.SmartValue; + // Draw property here. + + // Optionally, call the next drawer in line. + this.CallNextDrawer(entry, label); + } + } + + + + + + + + + + + + Initializes a new instance of the class. + + + + + Priority for and types. + + + + + Priority of the resolver. + + + + + Initializes a new instance of the class. + + The higher the priority, the earlier it will be processed. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Sirenix preferences window. + + + + + Opens the Odin inspector preferences window. + + + + + Opens the Odin inspector preferences window. + + + + + This class has been made fully obsolete, and has been replaced by . + It was a helper class to handle strings for labels and other similar purposes. + + + + + If any error occurred while looking for members, it will be stored here. + + + + + Obsolete. Use other constructor. + + + + + Obsolete. Use other constructor. + + + + + Creates a StringMemberHelper to get a display string. + + Inspector property to get string from. + The input string. If the first character is a '$', then StringMemberHelper will look for a member string field, property or method, and will try to parse it as an expression if it starts with '@'. + + + + Creates a StringMemberHelper to get a display string. + + Inspector property to get string from. + The input string. If the first character is a '$', then StringMemberHelper will look for a member string field, property or method, and will try to parse it as an expression if it starts with '@'./// The input string. If the first character is a '$', then StringMemberHelper will look for a member string field, property or method. + + + + Gets a value indicating whether or not the string is retrived from a from a member. + + + + + Gets the type of the object. + + + + + Gets the string from the StringMemberHelper. + Only updates the string buffer in Layout events. + + The property entry, to get the instance reference from. + The current display string. + + + + Gets the string from the StringMemberHelper. + Only updates the string buffer in Layout events. + + The property, to get the instance reference from. + The current string. + + + + Gets the string from the StringMemberHelper. + Only updates the string buffer in Layout events. + + The instance, for evt. member references. + The current string. + + + + Gets the string from the StringMemberHelper. + + The property entry, to get the instance reference from. + The current string. + + + + Gets the string from the StringMemberHelper. + + The property, to get the instance reference from. + The current string. + + + + Gets the string from the StringMemberHelper. + + The instance, for evt. member references. + The current string. + + + + To safely change anything in the type cache, you must be holding this lock. + + + + + + + + + This is checked using . + + + + + Gets a unique key for any given property within a drawer. + + + + + public class MyCustomTypeDrawer<T> : OdinValueDrawer<T> where T : MyCustomBaseType + { + protected override void DrawPropertyLayout(IPropertyValueEntry<T> entry, GUIContent label) + { + var isToggled = entry.Context(this, "toggled", false); + isToggled.Value = SirenixEditorGUI.Label(isToggled.Value, label); + if (SirenixEditorGUI.BeginFadeGroup(UniqueDrawerKey.Create(entry, this), isToggled.Value)) + { + EditorGUI.indentLevel++; + this.CallNextDrawer(entry.Property, null); + EditorGUI.indentLevel--; + } + SirenixEditorGUI.EndFadeGroup(); + } + } + + + + + + Gets a unique key for any given property within a drawer. + + The property entry. + The drawer. + + + + + Gets a unique key for any given property within a drawer. + + The property. + The drawer. + + + + + Checks if two keys are identical. + + The other key. + + + + Checks if two keys are identical. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Provides utilities for emitting ScriptableObject and MonoBehaviour-derived types with specific property names and types, and providing instances of with those names and types. + + + + + A handle for a set of emitted Unity objects. When disposed (or collected by the GC) this handle will queue the emitted object instances for destruction. + + + + + The unity property to represent. + + + + + The Unity objects to represent. + + + + + Initializes a new instance of the class. + + The unity property to represent. + The objects to represent. + + + + Finalizes an instance of the class. + + + + + Creates an emitted MonoBehaviour-based . + + Name of the field to emit. + Type of the value to create a property for. + The target count of the tree to create a property for. + The game object that the MonoBehaviour of the property is located on. + + fieldName is null + or + valueType is null + + Target count must be equal to or higher than 1. + + + + Creates an emitted ScriptableObject-based . + + Name of the field to emit. + Type of the value to create a property for. + The target count of the tree to create a property for. + + fieldName is null + or + valueType is null + + Target count must be equal to or higher than 1. + + + + Base class for creating editor windows using Odin. + + + + public class SomeWindow : OdinEditorWindow + { + [MenuItem("My Game/Some Window")] + private static void OpenWindow() + { + GetWindow<SomeWindow>().Show(); + } + + [Button(ButtonSizes.Large)] + public void SomeButton() { } + + [TableList] + public SomeType[] SomeTableData; + } + + + + + public class DrawSomeSingletonInAnEditorWindow : OdinEditorWindow + { + [MenuItem("My Game/Some Window")] + private static void OpenWindow() + { + GetWindow<DrawSomeSingletonInAnEditorWindow>().Show(); + } + + protected override object GetTarget() + { + return MySingleton.Instance; + } + } + + + + + private void InspectObjectInWindow() + { + OdinEditorWindow.InspectObject(someObject); + } + + private void InspectObjectInDropDownWithAutoHeight() + { + var btnRect = GUIHelper.GetCurrentLayoutRect(); + OdinEditorWindow.InspectObjectInDropDown(someObject, btnRect, btnRect.width); + } + + private void InspectObjectInDropDown() + { + var btnRect = GUIHelper.GetCurrentLayoutRect(); + OdinEditorWindow.InspectObjectInDropDown(someObject, btnRect, new Vector2(btnRect.width, 100)); + } + + private void InspectObjectInACenteredWindow() + { + var window = OdinEditorWindow.InspectObject(someObject); + window.position = GUIHelper.GetEditorWindowRect().AlignCenter(270, 200); + } + + private void OtherStuffYouCanDo() + { + var window = OdinEditorWindow.InspectObject(this.someObject); + + window.position = GUIHelper.GetEditorWindowRect().AlignCenter(270, 200); + window.titleContent = new GUIContent("Custom title", EditorIcons.RulerRect.Active); + window.OnClose += () => Debug.Log("Window Closed"); + window.OnBeginGUI += () => GUILayout.Label("-----------"); + window.OnEndGUI += () => GUILayout.Label("-----------"); + } + + + + + + + Occurs when the window is closed. + + + + + Occurs at the beginning the OnGUI method. + + + + + Occurs at the end the OnGUI method. + + + + + Gets the label width to be used. Values between 0 and 1 are treated as percentages, and values above as pixels. + + + + + Gets or sets the window padding. x = left, y = right, z = top, w = bottom. + + + + + Gets a value indicating whether the window should draw a scroll view. + + + + + Gets a value indicating whether the window should draw a Unity editor preview, if possible. + + + + + Gets the default preview height for Unity editors. + + + + + Gets the target which which the window is supposed to draw. By default it simply returns the editor window instance itself. By default, this method is called by (). + + + + + Gets the targets to be drawn by the editor window. By default this simply yield returns the method. + + + + + At the start of each OnGUI event when in the Layout event, the GetTargets() method is called and cached into a list which you can access from here. + + + + + + Pops up an editor window for the given object in a drop-down window which closes when it loses its focus. + This particular overload uses a few frames to calculate the height of the content before showing the window with a height that matches its content. + + Protip: You can subscribe to OnClose if you want to know when that occurs. + + + + + Measures the GUILayout content height and adjusts the window height accordingly. + Note that this feature becomes pointless if any layout group expands vertically. + + The max height of the window. + When the window height expands below the screen bounds, it will move the window + upwards when needed, enabling this will move it back down when the window height is decreased. + + + + + Pops up an editor window for the given object in a drop-down window which closes when it loses its focus. + + Protip: You can subscribe to OnClose if you want to know when that occurs. + + + + + + Pops up an editor window for the given object in a drop-down window which closes when it loses its focus. + + Protip: You can subscribe to OnClose if you want to know when that occurs. + + + + + + Pops up an editor window for the given object in a drop-down window which closes when it loses its focus. + + Protip: You can subscribe to OnClose if you want to know when that occurs. + + + + + + Pops up an editor window for the given object in a drop-down window which closes when it loses its focus. + + Protip: You can subscribe to OnClose if you want to know when that occurs. + + + + + + Pops up an editor window for the given object in a drop-down window which closes when it loses its focus. + + Protip: You can subscribe to OnClose if you want to know when that occurs. + + + + + + Pops up an editor window for the given object in a drop-down window which closes when it loses its focus. + + Protip: You can subscribe to OnClose if you want to know when that occurs. + + + + + Pops up an editor window for the given object. + + + + + Inspects the object using an existing OdinEditorWindow. + + + + + Creates an editor window instance for the specified object, without opening the window. + + + + + Creates an editor window instance for the specified object, without opening the window. + + + + + The Odin property tree drawn. + + + + + Draws the Odin Editor Window. + + + + + Calls DrawEditor(index) for each of the currently drawing targets. + + + + + Initialize get called by OnEnable and by OnGUI after assembly reloads + which often happens when you recompile or enter and exit play mode. + + + + + Called when the window is enabled. Remember to call base.OnEnable(); + + + + + Draws the editor for the this.CurrentDrawingTargets[index]. + + + + + Uses the method to draw a preview for the this.CurrentDrawingTargets[index]. + + + + + Called when the window is destroyed. Remember to call base.OnDestroy(); + + + + + Called before starting to draw all editors for the . + + + + + Called after all editors for the has been drawn. + + + + + See ISerializationCallbackReceiver.OnBeforeSerialize for documentation on how to use this method. + + + + + Implement this method to receive a callback after unity serialized your object. + + + + + Draws an editor window with a menu tree. + + + + public class OdinMenuEditorWindowExample : OdinMenuEditorWindow + { + [SerializeField, HideLabel] + private SomeData someData = new SomeData(); + + protected override OdinMenuTree BuildMenuTree() + { + OdinMenuTree tree = new OdinMenuTree(supportsMultiSelect: true) + { + { "Home", this, EditorIcons.House }, // draws the someDataField in this case. + { "Odin Settings", null, SdfIconType.GearFill }, + { "Odin Settings/Color Palettes", ColorPaletteManager.Instance, EditorIcons.EyeDropper }, + { "Odin Settings/AOT Generation", AOTGenerationConfig.Instance, EditorIcons.SmartPhone }, + { "Camera current", Camera.current }, + { "Some Class", this.someData } + }; + + tree.AddAllAssetsAtPath("More Odin Settings", SirenixAssetPaths.OdinEditorConfigsPath, typeof(ScriptableObject), true) + .AddThumbnailIcons(); + + tree.AddAssetAtPath("Odin Getting Started", SirenixAssetPaths.SirenixPluginPath + "Getting Started With Odin.asset"); + + var customMenuItem = new OdinMenuItem(tree, "Menu Style", tree.DefaultMenuStyle); + tree.MenuItems.Insert(2, customMenuItem); + + tree.Add("Menu/Items/Are/Created/As/Needed", new GUIContent()); + tree.Add("Menu/Items/Are/Created", new GUIContent("And can be overridden")); + + // As you can see, Odin provides a few ways to quickly add editors / objects to your menu tree. + // The API also gives you full control over the selection, etc.. + // Make sure to check out the API Documentation for OdinMenuEditorWindow, OdinMenuTree and OdinMenuItem for more information on what you can do! + + return tree; + } + } + + + + + + + + + + + + + Called when the window is destroyed. Remember to call base.OnDestroy(); + + + + + Builds the menu tree. + + + + + Gets or sets the width of the menu. + + + + + Gets a value indicating whether the menu is resizable. + + + + + Gets the menu tree. + + + + + Gets or sets a value indicating whether to draw the menu search bar. + + + + + Gets or sets the custom search function. + + + + + Forces the menu tree rebuild. + + + + + Tries to select the menu item with the specified object. + + + + + Draws the menu tree selection. + + + + + Draws the Odin Editor Window. + + + + + The method that draws the menu. + + + + + A menu item that represents one or more objects. + + + + + + + + + + The default toggled state + + + + + Initializes a new instance of the class. + + The Odin menu tree instance the menu item belongs to. + The name of the menu item. + The instance the value item represents. + + + + Occurs right after the menu item is done drawing, and right before mouse input is handles so you can take control of that. + + + + + Occurs when the user has right-clicked the menu item. + + + + + Gets the child menu items. + + + The child menu items. + + + + + Gets the index location of the menu item. + + + + + Gets or sets a value indicating whether the menu item is visible. + Not that setting this to false will not hide its children as well. For that see use Toggled. + + + + + Gets or sets the icon that is used when the menu item is not selected. + + + + + Gets or sets the icon that is used when the menu item is selected. + + + + + Gets a value indicating whether this instance is selected. + + + + + Determines whether this instance is selectable. + + + + + Determines whether this instance is enabled. + + + + + Gets the menu tree instance. + + + + + Gets or sets the raw menu item name. + + + + + Gets or sets the search string used when searching for menu items. + + + + + Gets the next visual menu item. + + + + + Gets the next selectable visual menu item. + + + + + Gets the parent menu item. + + + + + Gets the previous visual menu item. + + + + + Gets the previous selectable visual menu item. + + + + + Gets the drawn rect. + + + + + Gets the drawn label rect. + + + + + Gets or sets the style. If null is specified, then the menu trees DefaultMenuStyle is used. + + + + + Deselects this instance. + + + + + Selects the specified add to selection. + + + + + Gets the child menu items recursive in a DFS. + + Whether to include it self in the collection. + + + + Gets the child menu items recursive in a DFS. + + Whether to include it self in the collection. + Whether to include the root. + + + + Gets the full menu item path. + + + + + Gets the first object of the + + + + + Gets the object instances the menu item represents + + + + + Sets the object instance + + + + + Sets the object instances + + + + + Gets or sets the value the menu item represents. + + + + + Gets a nice menu item name. If the raw name value is null or a dollar sign, then the name is retrieved from the object itself via ToString(). + + + + + Gets or sets a value indicating whether this is toggled / expanded. This value tries it best to be persistent. + + + + + Gets or sets the icon getter. + + + + + Draws this menu item followed by all of its child menu items + + The indent level. + + + + Draws the menu item with the specified indent level. + + + + + Override this to add custom GUI to the menu items. + This is called right after the menu item is done drawing, and right before mouse input is handles so you can take control of that. + + + + + Handles the mouse events. + + The rect. + The triangle rect. + + + + The style settings used by . + + A nice trick to style your menu is to add the tree.DefaultMenuStyle to the tree itself, + and style it live. Once you are happy, you can hit the Copy CSharp Snippet button, + remove the style from the menu tree, and paste the style directly into your code. + + + + + + + + + + + Gets or sets the default selected style. + + + + + Gets or sets the selected label style. + + + + + The height of the menu item. + + + + + The global offset of the menu item content + + + + + The vertical offset of the menu item label + + + + + The number of pixels to indent per level indent level. + + + + + The size of the icon. + + + + + The size of the icon. + + + + + The transparency of icons when the menu item is not selected. + + + + + The padding between the icon and other content. + + + + + Whether to draw the a foldout triangle for menu items with children. + + + + + The size of the foldout triangle icon. + + + + + The padding between the foldout triangle icon and other content. + + + + + Whether or not to align the triangle left or right of the content. + If right, then the icon is pushed all the way to the right at a fixed position ignoring the indent level. + + + + + Whether to draw borders between menu items. + + + + + The horizontal border padding. + + + + + The border alpha. + + + + + The background color for when a menu item is selected. + + + + + The background color for when a menu item is selected. + + + + + The background color for when a menu item is selected. + + + + + The background color for when a menu item is selected. + + + + + The background color for when a menu item is selected. + + + + + The background color for when a menu item is selected. + + + + + Sets the height of the menu item. + + + + + Sets the global offset of the menu item content + + + + + Sets the number of pixels to indent per level indent level. + + + + + Sets the size of the icon. + + + + + Sets the size of the icon. + + + + + Sets the transparency of icons when the menu item is not selected. + + + + + Sets the padding between the icon and other content. + + + + + Sets whether to draw the a foldout triangle for menu items with children. + + + + + Sets the size of the foldout triangle icon. + + + + + Sets the padding between the foldout triangle icon and other content. + + + + + Sets whether or not to align the triangle left or right of the content. + If right, then the icon is pushed all the way to the right at a fixed position ignoring the indent level. + + + + + Sets whether to draw borders between menu items. + + + + + Sets the border alpha. + + + + + Sets the border alpha. + + + + + Sets the background color for when a menu item is selected. + + + + + Sets the background color for when a menu item is selected. + + + + + Creates and returns an instance of a menu style that makes it look like Unity's project window. + + + + + OdinMenuTree provides a tree of s, and helps with selection, inserting menu items into the tree, and can handle keyboard navigation for you. + + + + OdinMenuTree tree = new OdinMenuTree(supportsMultiSelect: true) + { + { "Home", this, EditorIcons.House }, + { "Odin Settings", null, SdfIconType.GearFill }, + { "Odin Settings/Color Palettes", ColorPaletteManager.Instance, EditorIcons.EyeDropper }, + { "Odin Settings/AOT Generation", AOTGenerationConfig.Instance, EditorIcons.SmartPhone }, + { "Camera current", Camera.current }, + { "Some Class", this.someData } + }; + + tree.AddAllAssetsAtPath("Some Menu Item", "Some Asset Path", typeof(ScriptableObject), true) + .AddThumbnailIcons(); + + tree.AddAssetAtPath("Some Second Menu Item", "SomeAssetPath/SomeAssetFile.asset"); + + var customMenuItem = new OdinMenuItem(tree, "Menu Style", tree.DefaultMenuStyle); + tree.MenuItems.Insert(2, customMenuItem); + + tree.Add("Menu/Items/Are/Created/As/Needed", new GUIContent()); + tree.Add("Menu/Items/Are/Created", new GUIContent("And can be overridden")); + + OdinMenuTrees are typically used with s but is made to work perfectly fine on its own for other use cases. + OdinMenuItems can be inherited and and customized to fit your needs. + + // Draw stuff + someTree.DrawMenuTree(); + // Draw stuff + someTree.HandleKeybaordMenuNavigation(); + + + + + + + + + + + Gets the currently active menu tree. + + + + + Gets the selection. + + + + + Gets the root menu items. + + + + + Gets the root menu item. + + + + + If true, all indent levels will be ignored, and all menu items with IsVisible == true will be drawn. + + + + + Adds a menu item with the specified object instance at the the specified path. + + + + + Adds a menu item with the specified object instance and icon at the the specified path. + + + + + Adds a menu item with the specified object instance and icon at the the specified path. + + + + + Adds a menu item with the specified object instance and icon at the the specified path. + + + + + Adds a menu item with the specified object instance and icon at the the specified path. + + + + + Adds a collection of objects to the menu tree and returns all menu items created in random order. + + + + + Adds a collection of objects to the menu tree and returns all menu items created in random order. + + + + + Gets or sets the default menu item style from Config.DefaultStyle. + + + + + Gets or sets the default drawing configuration. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + if set to true [supports multi select]. + + + + Initializes a new instance of the class. + + if set to true [supports multi select]. + The default menu item style. + + + + Initializes a new instance of the class. + + + + + Sets the focus to the . + + + + + Scrolls to the specified menu item. + + + + + Enumerates the tree with a DFS. + + if set to true then the invisible root menu item is included. + + + + Enumerates the tree with a DFS. + + The predicate. + if set to true then the invisible root menu item is included. + + + + Enumerates the tree with a DFS. + + + + + Draws the menu tree recursively. + + + + + Marks the dirty. This will cause a tree.UpdateTree() in the beginning of the next Layout frame. + + + + + Indicates that the layout has changed and needs to be recomputed. + This is used when is enabled. + + + + + Draws the search toolbar. + + + + + Updates the menu tree. This method is usually called automatically when needed. + + + + + Handles the keyboard menu navigation. Call this at the end of your GUI scope, to prevent the menu tree from stealing input events from other text fields. + + Returns true, if anything was changed via the keyboard. + + + + Handles the keyboard menu navigation. Call this at the end of your GUI scope, to prevent the menu tree from stealing input events from other text fields. + + Returns true, if anything was changed via the keyboard. + + + + The config used by OdinMenuTree to specify which features of the Menu Tree should be used when drawing. + + + + + Gets or sets the default menu item style. + + + + + The automatic scroll on selection changed. True by default. + + + + + Whether to draw the tree in a scrollable view. True by default. + + + + + Whether to handle keyboard navigation after it's done drawing. True by default. + + + + + Whether to draw a searchbar above the menu tree. True by default. + + + + + Whether to the menu items expanded state should be cached. True by default. + + + + + Whether to automatically set focus on the search bar when the tree is drawn for the first time. True by default. + + + + + Whether to select menu items on mouse down, or on click. False by default. + + + + + The scroll-view position. + + + + + The search term. + + + + + The height of the search toolbar. + + + + + Will only handle layouting when there has been a hierarchical change (such as an item being expanded or collapsed). + + + This expects every item to have the same height specified in the style (). + This means no custom layouting is supported with this on. + + + + + Gets or sets the search function. Null by default. + + + + + By default, the MenuTree.Selection is confirmed when menu items are double clicked, + Set this to false if you don't want that behaviour. + + + + + By default, the MenuTree.Selection is confirmed when menu items are double clicked, + Set this to false if you don't want that behaviour. + + + + + Class with utility methods for s and s. + + + + OdinMenuTree tree = new OdinMenuTree(); + tree.AddAllAssetsAtPath("Some Menu Item", "Some Asset Path", typeof(ScriptableObject), true) + .AddThumbnailIcons(); + tree.AddAssetAtPath("Some Second Menu Item", "SomeAssetPath/SomeAssetFile.asset"); + // etc... + + + + + + + + + + + Adds the menu item at the specified menu item path and populates the result list with all menu items created in order to add the menuItem at the specified path. + + The tree instance. + The result list. + The menu item path. + The menu item. + + + + Adds the menu item at specified menu item path, and returns all menu items created in order to add the menuItem at the specified path. + + The tree. + The menu item path. + The menu item. + Returns all menu items created in order to add the menu item at the specified menu item path. + + + + Gets the menu item at the specified path, returns null non was found. + + + + + Adds all asset instances from the specified path and type into a single at the specified menu item path, and returns all menu items created in order to add the menuItem at the specified path.. + + The tree. + The menu item path. + The asset folder path. + The type of objects. + Whether to search for assets in subdirectories as well. + Returns all menu items created in order to add the menu item at the specified menu item path. + + + + Adds all assets at the specified path. Each asset found gets its own menu item inside the specified menu item path. + + The tree. + The menu item path. + The asset folder path. + The type. + Whether to search for assets in subdirectories as well. + If true, sub-directories in the assetFolderPath will no longer get its own sub-menu item at the specified menu item path. + Returns all menu items created in order to add the menu item at the specified menu item path. + + + + Adds all assets at the specified path. Each asset found gets its own menu item inside the specified menu item path. + + The tree. + The menu item path. + The asset folder path. + Whether to search for assets in subdirectories as well. + If true, sub-directories in the assetFolderPath will no longer get its own sub-menu item at the specified menu item path. + Returns all menu items created in order to add the menu item at the specified menu item path. + + + + Adds the asset at the specified menu item path and returns all menu items created in order to end up at the specified menu path. + + The tree. + The menu item path. + The asset path. + Returns all menu items created in order to add the menu item at the specified menu item path. + + + + Adds the asset at the specified menu item path and returns all menu items created in order to end up at the specified menu path. + + The tree. + The menu item path. + The asset path. + The type. + Returns all menu items created in order to add the menu item at the specified menu item path. + + + + Sorts the entire tree of menu items recursively by name with respects to numbers. + + + + + Sorts the collection of menu items recursively by name with respects to numbers. This is a stable sort, meaning that equivalently ordered items will remain in the same order as they start. + + + + + Sorts the collection of menu items recursively using a given custom comparison. This is a stable sort, meaning that equivalently ordered items will remain in the same order as they start. + + + + + Adds the specified object at the specified menu item path and returns all menu items created in order to end up at the specified menu path. + + The tree. + The menu path. + The object instance. + Set this to true if you want Odin serialzied members such as dictionaries and generics to be shown as well. + Returns all menu items created in order to add the menu item at the specified menu item path. + + + + Assigns the specified icon to all menu items in the collection with the specified ObjectInstanceType. + + + + + Assigns the specified icon to all menu items in the collection with the specified ObjectInstanceType. + + + + + Assigns the specified icon to all menu items in the collection. + + + + + Assigns the specified icon to all menu items in the collection. + + + + + Assigns the specified icon to the last menu item in the collection. + + + + + Assigns the specified icon to the last menu item in the collection. + + + + + Assigns the specified icon to the last menu item in the collection. + + + + + Assigns the specified icon to the last menu item in the collection. + + + + + Assigns the specified icon to the last menu item in the collection. + + + + + Assigns the specified icon to all menu items in the collection. + + + + + Assigns the specified icon to all menu items in the collection. + + + + + Assigns the specified icon to all menu items in the collection. + + + + + Assigns the asset mini thumbnail as an icon to all menu items in the collection. If the menu items object is null then a Unity folder icon is assigned. + + + + + Assigns the asset mini thumbnail as an icon to all menu items in the collection. If the menu items object is null then a Unity folder icon is assigned. + + + + + Constants which describe the type of change that was made to the OdinMenuTrees's Selection + + + + + + A menu item was removed. + + + + + A menu item was selected. + + + + + The selection was cleared. + + + + + Handles the selection of a Odin Menu Tree with support for multi selection. + + + + + + + + + + Initializes a new instance of the class. + + if set to true [supports multi select]. + + + + Occurs whenever the selection has changed. + + + + + Occurs whenever the selection has changed. + + + + + Usually occurs whenever the user hits return, or double click a menu item. + + + + + Gets the count. + + + + + Gets the first selected value, returns null if non is selected. + + + + + Gets all selected values. + + + + + Gets or sets a value indicating whether multi selection is supported. + + + + + Gets the at the specified index. + + + + + Adds a menu item to the selection. If the menu item is already selected, then the item is pushed to the bottom of the selection list. + If multi selection is off, then the previous selected menu item is removed first. + Adding a item to the selection triggers . + + The item. + + + + Clears the selection and triggers . + + + + + Determines whether an OdinMenuItem is selected. + + + + + Copies all the elements of the current array to the specified array starting at the specified destination array index. + + + + + Gets the enumerator. + + + + + Searches for the specified menu item and returns the index location. + + + + + Removes the specified menu item and triggers . + + + + + Removes the menu item at the specified index and triggers . + + + + + Triggers OnSelectionConfirmed. + + + + + A feature-rich enum selector with support for flag enums. + + + + KeyCode someEnumValue; + + [OnInspectorGUI] + void OnInspectorGUI() + { + // Use the selector manually. See the documentation for OdinSelector for more information. + if (GUILayout.Button("Open Enum Selector")) + { + EnumSelector<KeyCode> selector = new EnumSelector<KeyCode>(); + selector.SetSelection(this.someEnumValue); + selector.SelectionConfirmed += selection => this.someEnumValue = selection.FirstOrDefault(); + selector.ShowInPopup(); // Returns the Odin Editor Window instance, in case you want to mess around with that as well. + } + + // Draw an enum dropdown field which uses the EnumSelector popup: + this.someEnumValue = EnumSelector<KeyCode>.DrawEnumField(new GUIContent("My Label"), this.someEnumValue); + } + + // All Odin Selectors can be rendered anywhere with Odin. This includes the EnumSelector. + EnumSelector<KeyCode> inlineSelector; + + [ShowInInspector] + EnumSelector<KeyCode> InlineSelector + { + get { return this.inlineSelector ?? (this.inlineSelector = new EnumSelector<KeyCode>()); } + set { } + } + + + + + + + + + + + + By default, the enum type will be drawn as the title for the selector. No title will be drawn if the string is null or empty. + + + + + Gets a value indicating whether this instance is flag enum. + + + + + Initializes a new instance of the class. + + + + + Populates the tree with all enum values. + + + + + When ShowInPopup is called, without a specified window width, this method gets called. + Here you can calculate and give a good default width for the popup. + The default implementation returns 0, which will let the popup window determine the width itself. This is usually a fixed value. + + + + + Gets the currently selected enum value. + + + + + Selects an enum. + + + + + Draws an enum selector field using the enum selector. + + + + + Draws an enum selector field using the enum selector. + + + + + Draws an enum selector field using the enum selector. + + + + + Draws an enum selector field using the enum selector. + + + + + In simple one-off use cases, making a custom OdinSelector might not be needed, as the GenericSelecor + can be populated with anything and customized a great deal. + + + + SomeType someValue; + + [OnInspectorGUI] + void OnInspectorGUI() + { + if (GUILayout.Button("Open Generic Selector Popup")) + { + List<SomeType> source = ...; + GenericSelector<SomeType> selector = new GenericSelector<SomeType>("Title", false, x => x.Path, source); + selector.SetSelection(this.someValue); + selector.SelectionTree.Config.DrawSearchToolbar = false; + selector.SelectionTree.DefaultMenuStyle.Height = 22; + selector.SelectionConfirmed += selection => this.someValue = selection.FirstOrDefault() + var window = selector.ShowInPopup(); + window.OnEndGUI += () => { EditorGUILayout.HelpBox("A quick way of injecting custom GUI to the editor window popup instance.", MessageType.Info); }; + window.OnClose += selector.SelectionTree.Selection.ConfirmSelection; // Confirm selection when window clses. + } + } + + + + + + + + + + + + Gets or sets a value indicating whether [flattened tree]. + + + + + Gets or sets a value indicating whether [checkbox toggle]. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Gets the title. No title will be drawn if the string is null or empty. + + + + + Draws the selection tree. This gets drawn using the OnInspectorGUI attribute. + + + + + Builds the selection tree. + + + + + Used in to associate name to a value in the GenericSelector. + + + + + + The value. + + + + + The name. + + + + + Initializes a new instance of the struct. + + + + + If the + + + + + OdinSelectors is an abstract base class that combines OdinMenuTrees and OdinEditorWindows to help making feature-rich selectors and popup selectors. + + + + public class MySelector : OdinSelector<SomeType> + { + private readonly List<SomeType> source; + private readonly bool supportsMultiSelect; + + public MySelector(List<SomeType> source, bool supportsMultiSelect) + { + this.source = source; + this.supportsMultiSelect = supportsMultiSelect; + } + + protected override void BuildSelectionTree(OdinMenuTree tree) + { + tree.Config.DrawSearchToolbar = true; + tree.Selection.SupportsMultiSelect = this.supportsMultiSelect; + + tree.Add("Defaults/None", null); + tree.Add("Defaults/A", new SomeType()); + tree.Add("Defaults/B", new SomeType()); + + tree.AddRange(this.source, x => x.Path, x => x.SomeTexture); + } + + [OnInspectorGUI] + private void DrawInfoAboutSelectedItem() + { + SomeType selected = this.GetCurrentSelection().FirstOrDefault(); + + if (selected != null) + { + GUILayout.Label("Name: " + selected.Name); + GUILayout.Label("Data: " + selected.Data); + } + } + } + + Usage: + + void OnGUI() + { + if (GUILayout.Button("Open My Selector")) + { + List<SomeType> source = this.GetListOfThingsToSelectFrom(); + MySelector selector = new MySelector(source, false); + + selector.SetSelection(this.someValue); + + selector.SelectionCancelled += () => { }; // Occurs when the popup window is closed, and no slection was confirmed. + selector.SelectionChanged += col => { }; + selector.SelectionConfirmed += col => this.someValue = col.FirstOrDefault(); + + selector.ShowInPopup(); // Returns the Odin Editor Window instance, in case you want to mess around with that as well. + } + } + + // All Odin Selectors can be rendered anywhere with Odin. + [ShowInInspector] + MySelector inlineSelector; + + + + + + + + + + + + If true, a confirm selection button will be drawn in the title-bar. + + + + + Enables the single click to select. + + + + + Occurs when the window is closed, and no slection was confirmed. + + + + + Occurs when the menuTrees selection is changed and IsValidSelection returns true. + + + + + Occurs when the menuTrees selection is confirmed and IsValidSelection returns true. + + + + + Gets the selection menu tree. + + + + + Gets the title. No title will be drawn if the string is null or empty. + + + + + Gets the current selection from the menu tree whether it's valid or not. + + + + + Determines whether the specified collection is a valid collection. + If false, the SlectionChanged and SelectionConfirm events will not be called. + By default, this returns true if the collection contains one or more items. + + + + + Sets the selection. + + + + + Sets the selection. + + + + + Opens up the selector instance in a popup at the specified rect position. + The width of the popup is determined by DefaultWindowWidth, and the height is automatically calculated. + + + + + Opens up the selector instance in a popup at the specified rect position. + + + + + Opens up the selector instance in a popup at the specified rect position. + + + + + The mouse position is used as the position for the window. + Opens up the selector instance in a popup at the specified position. + + + + + Opens up the selector instance in a popup at the specified position. + + + + + Opens up the selector instance in a popup at the specified rect position. + + + + + Opens up the selector instance in a popup at the specified position. + The width of the popup is determined by DefaultWindowWidth, and the height is automatically calculated. + + + + + Opens up the selector instance in a popup with the specified width and height. + The mouse position is used as the position for the window. + + + + + Builds the selection tree. + + + + + When ShowInPopup is called, without a specifed window width, this methods gets called. + Here you can calculate and give a good default width for the popup. + The default implementation returns 0, which will let the popup window determain the width itself. This is usually a fixed value. + + + + + Triggers the selection changed event, but only if the current selection is valid. + + + + + Draw the selecotr manually. + + + + + Draws the selection tree. This gets drawn using the OnInspectorGUI attribute. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Builds the selection tree. + + + + + 450 + + + + + Sets the selected types. + + + + + The that was used in the last 'Show' call. + + + + + The key to identify who called the selector. + + + + + The id to identify who called the selector. + + + + + The current selected object. + + + + + True if is used; otherwise false. + + + + + The type of the value used in the last 'Show' call. + + + + + The base type of the value used in the last 'Show' call. + + + + + Shows a selector. + + The key used to identify who called the selector; this can be null. + The ID used to identify who called the selector; this can be 0. + The current value selected. + The base type of the 'value'. + Determines if scene objects are allowed. + Determines if null values are allowed. + The position where the selector should appear. + Thrown if the selector was opened for a case that it didn't expect. + + Either '' or '' must be set, but both can also be set for more consistent results. + + + + + Shows a selector. + + The key used to identify who called the selector; this can be null. + The ID used to identify who called the selector; this can be 0. + + Used to provide values for all parameters in the full declaration of this method. + It also allows for customization of various stages of the selector with attributes. + This also sets the . + + Determines if the default Unity Object Selector should be the one to appear. + Thrown if the selector was opened for a case that it didn't expect. + + Either '' or '' must be set, but both can also be set for more consistent results. + + + + + Shows a selector. + + The position where the selector should appear; can be . + The key used to identify who called the selector; this can be null. + The ID used to identify who called the selector; this can be 0. + + Used to provide values for all parameters in the full declaration of this method. + It also allows for customization of various stages of the selector with attributes. + This also sets the . + + Determines if the default Unity Object Selector should be the one to appear. + Thrown if the selector was opened for a case that it didn't expect. + + Either '' or '' must be set, but both can also be set for more consistent results. + + + + + Shows a selector. + + The key used to identify who called the selector; this can be null. + The ID used to identify who called the selector; this can be 0. + The current value selected. + The base type of the 'value'. + Determines if scene objects are allowed. + Determines if null values are allowed. + Used for various stages of the selector that can be customized with attributes. This also sets the . + Determines if the default Unity Object Selector should be the one to appear. + Thrown if the selector was opened for a case that it didn't expect. + + Either '' or '' must be set, but both can also be set for more consistent results. + + + + + Shows a selector. + + The key used to identify who called the selector; this can be null. + The ID used to identify who called the selector; this can be 0. + The current value selected. + The type of the 'value'. + The base type of the 'value'. + Determines if scene objects are allowed. + Determines if null values are allowed. + Used for various stages of the selector that can be customized with attributes. This also sets the . + Determines if the default Unity Object Selector should be the one to appear. + Thrown if the selector was opened for a case that it didn't expect. + + Either '' or '' must be set, but both can also be set for more consistent results. + + + + + Shows a selector. + + The position where the selector should appear; can be . + The key used to identify who called the selector; this can be null. + The ID used to identify who called the selector; this can be 0. + The current value selected. + The base type of the 'value'. + Determines if scene objects are allowed. + Determines if null values are allowed. + Used for various stages of the selector that can be customized with attributes. This also sets the . + Determines if the default Unity Object Selector should be the one to appear. + Thrown if the selector was opened for a case that it didn't expect. + + Either '' or '' must be set, but both can also be set for more consistent results. + + + + + Shows a selector. + + The position where the selector should appear; can be . + The key used to identify who called the selector; this can be null. + The ID used to identify who called the selector; this can be 0. + The current value selected. + The type of the 'value'. + The base type of the 'value'. + Determines if scene objects are allowed. + Determines if null values are allowed. + Used for various stages of the selector that can be customized with attributes. This also sets the . + Determines if the default Unity Object Selector should be the one to appear. + Thrown if the selector was opened for a case that it didn't expect. + + Either '' or '' must be set, but both can also be set for more consistent results. + + + + + If the object was changed since the last time this method was called, it returns the changed object (); otherwise, it returns the provided value. + + The current value; the value to return if no change has occurred. + The key to identify who showed the current selector. + The ID to identify who showed the current selector. + The type of object to expect as a return value. + if it was marked as changed, otherwise . + + + + Checks if the selector's object is ready to be claimed. + + The key to identify who showed the current selector. + The ID to identify who showed the current selector. + true if the selector's object () is ready to be claimed; otherwise, false. + + + + Determines whether the specified and combination match the currently open selectors. + + The key to match. + The ID to match. + true if the combination is a match; otherwise, false. + + + + Claims the current . + + The if it is ready to be claimed; otherwise, NULL with an accompanying error message. + + + + Claims the current and copies a specified amount () of instances of the . + + The number of instances to copy. + + An array of copies, where element 0 is always the original value, + if the is ready to be claimed; otherwise, NULL with an accompanying error message. + + + + + Claims the current and, if ready, assigns it to the specified . + If the is not ready to be claimed, an error message will be logged. + + The to assign the to. + + + + Context that persists across reloading and restarting Unity. + + + + + Time stamp for when the persistent context value was last used. + Used for purging unused context. + + + + + Instatiates a persistent context. + + + + + Updates the time stamp to now. + + + + + Context that persists across reloading and restarting Unity. + + The type of the context value. + + + + The value of the context. + + + + + Creates a new persistent context object. + + + + + Formats a string with the time stamp, and the value. + + + + + Helper class that provides a local copy of a . + When the local value is changed, it also changed the global value, but the global value does not change the local value. + + The type of the context value. + + + + The value of the context. + Changing this value, also changes the global context value, but the global value does not change the local value. + + + + + Creates a local context object for the provided global context. + + The global context object. + + + + Updates the local value to the current global value. + + + + + Provides context objects that still persist when Unity reloads or is restarted. + + + + + Gets a GlobalPersistentContext object for the specified key. + + The type of the first key. + The type of the value stored in the context object. + The first key. + The default value, used for when the context object is first created. + + + + Gets a GlobalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the value stored in the context object. + The first key. + The second key. + The default value, used for when the context object is first created. + + + + Gets a GlobalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The default value, used for when the context object is first created. + + + + Gets a GlobalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The default value, used for when the context object is first created. + + + + Gets a GlobalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the fifth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The fifth key. + The default value, used for when the context object is first created. + + + + Gets a GlobalPersistentContext object for the specified key. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the value stored in the context object. + The first key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a GlobalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the value stored in the context object. + The first key. + The second key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a GlobalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a GlobalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a GlobalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the fifth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The fifth key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a LocalPersistentContext object for the specified key. + + The type of the first key. + The type of the value stored in the context object. + The first key. + The default value, used for when the context object is first created. + + + + Gets a LocalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the value stored in the context object. + The first key. + The second key. + The default value, used for when the context object is first created. + + + + Gets a LocalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The default value, used for when the context object is first created. + + + + Gets a LocalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The default value, used for when the context object is first created. + + + + Gets a LocalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the fifth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The fifth key. + The default value, used for when the context object is first created. + + + + Gets a LocalPersistentContext object for the specified key. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the value stored in the context object. + The first key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a LocalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the value stored in the context object. + The first key. + The second key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a LocalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a LocalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a LocalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the fifth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The fifth key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Persistent Context cache object. + + + + + Estimated cache size in bytes. + + + + + The current number of context entries in the cache. + + + + + If true then persistent context is disabled entirely. + + + + + If true the context will be saved to a file in the temp directory. + + + + + The max size of the cache in bytes. + + + + + Delete the persistent cache file. + + + + + Put this attribute on a validator class to prevent the ValidatorDrawer from running that validator in the inspector. + Typically you would use this for a validation-related attribute that has its own, complex custom drawer that should + handle the validation and error/warning drawing while the inspector is being drawn, but still needs a validator to + run for the project validation scans. + + + + + Apply this to an assembly to register validators for the validation system. + This enables locating of all relevant validator types very quickly. + + + + + + Use to initialize an empty . + + + + + This attribute can be placed on an assembly to register a value resolver creator that should be queried when a value resolver is being created. + + + + + This attribute can be placed on an assembly to register a value resolver creator that should be queried when a value resolver is being created. + + The resolver + + + + + A ValueResolver resolves a string to a value of a given type, given an InspectorProperty instance to use as context. Call to get an instance of a ValueResolver. + Value resolvers are a globally extendable system that can be hooked into and modified or changed by creating and registering a . + See Odin's tutorials for details and examples of how to use ValueResolvers. + + + + + The context of this ValueResolver, containing all of its configurations and values it needs to function. For performance and simplicity reasons, this is a single very large struct that is passed around by ref to anything that needs it. + + + + + The current error message that the resolver has, or null if there is no error message. This is a shortcut for writing "resolver.Context.ErrorMessage". + + + + + Whether there is an error message at the moment. This is a shortcut for writing "resolver.Context.ErrorMessage != null". + + + + + The type of value that this resolver instance is supposed to get. + + + + + Gets a value from the value resolver in a weakly typed manner. + + The selection index at which to get the value, in the case of multi-selection. Defaults to 0. + The value that was gotten. + + + + Draws an error message box if there is an error, and does nothing if there is no error. + + + + + Creates a new value resolver instance from a pre-built context struct, in a weakly typed fashion, though the result + is the same as using a strongly typed generic overload. This is a more advanced use that requires you to + know how the context needs to be set up before value resolution happens. However, this allows you to do more advanced + things like adjust various context values before string resolution happens. + + The pre-built context that should be used to get a resolver. + + + + Creates a new value resolver instance from a pre-built context struct. This is a more advanced use that requires you to + know how the context needs to be set up before value resolution happens. However, this allows you to do more advanced + things like adjust various context values before string resolution happens. + + The pre-built context that should be used to get a resolver. + + + + Creates a new value resolver instance in a weakly typed fashion, though the result is the same as using a strongly typed generic overload. + This is useful when you don't know at compile time which type you want to resolve. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + + + + Creates a new value resolver instance in a weakly typed fashion, though the result is the same as using a strongly typed generic overload. + This is useful when you don't know at compile time which type you want to resolve. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + The extra named args that this resolver has access to. Passing in a named arg that already exists will silently override the pre-existing named arg. + + + + Creates a new value resolver instance. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + + + + Creates a new value resolver instance. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + The extra named args that this resolver has access to. Passing in a named arg that already exists will silently override the pre-existing named arg. + + + + Creates a new value resolver instance in a weakly typed fashion, though the result is the same as using a strongly typed generic overload. + This is useful when you don't know at compile time which type you want to resolve. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + The value that the resolver should return if the string cannot be resolved to anything, or if there is an error in creating a resolver, or if resolution itself throws an exception. + + + + Creates a new value resolver instance in a weakly typed fashion, though the result is the same as using a strongly typed generic overload. + This is useful when you don't know at compile time which type you want to resolve. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + The value that the resolver should return if the string cannot be resolved to anything, or if there is an error in creating a resolver, or if resolution itself throws an exception. + The extra named args that this resolver has access to. Passing in a named arg that already exists will silently override the pre-existing named arg. + + + + Creates a new value resolver instance meant to resolve a string value in particular. This is a shorthand for creating a string resolver that has the resolved string as a fallback value. + This special case will get you the behaviour where, if you pass in a string that is not meant to be resolved in a special way, the value resolver will just pass you that string back as the result value. + + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + + + + Creates a new value resolver instance meant to resolve a string value in particular. This is a shorthand for creating a string resolver that has the resolved string as a fallback value. + This special case will get you the behaviour where, if you pass in a string that is not meant to be resolved in a special way, the value resolver will just pass you that string back as the result value. + + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + The extra named args that this resolver has access to. Passing in a named arg that already exists will silently override the pre-existing named arg. + + + + Creates a new value resolver instance. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + The value that the resolver should return if the string cannot be resolved to anything, or if there is an error in creating a resolver, or if resolution itself throws an exception. + + + + Creates a new value resolver instance. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + The value that the resolver should return if the string cannot be resolved to anything, or if there is an error in creating a resolver, or if resolution itself throws an exception. + The extra named args that this resolver has access to. Passing in a named arg that already exists will silently override the pre-existing named arg. + + + + Gets a nicely formatted string that lists all the errors in the given set of value resolvers. The returned value is null if there are no errors. + + + + + Gets a nicely formatted string that lists all the errors in the given set of value resolvers. The returned value is null if there are no errors. + + + + + Draws error boxes for all errors in the given value resolvers, or does nothing if there are no errors. This is equivalent to calling DrawError() on all resolvers passed to this method. + + + + + Draws error boxes for all errors in the given value resolvers, or does nothing if there are no errors. This is equivalent to calling DrawError() on all resolvers passed to this method. + + + + + A ValueResolver resolves a string to a value of a given type, given an InspectorProperty instance to use as context. Call to get an instance of a ValueResolver. + Value resolvers are a globally extendable system that can be hooked into and modified or changed by creating and registering a . + See Odin's tutorials for details and examples of how to use ValueResolvers. + + + + + The delegate that does the actual value resolution. You should not call this manually, but instead call . + + + + + The type of value that this resolver instance is supposed to get. Always equal to typeof(). + + + + + Gets a value from the value resolver. + + The selection index at which to get the value, in the case of multi-selection. Defaults to 0. + The value that was gotten. + + + + Gets a value from the value resolver in a weakly typed manner. + + The selection index at which to get the value, in the case of multi-selection. Defaults to 0. + The value that was gotten. + + + + This struct contains all of a ValueResolver's configurations and values it needs to function. For performance and simplicity reasons, this is a single very large struct that lives on a ValueResolver instance and is passed around by ref to anything that needs it. + + + + + The property that *provides* the context for the value resolution. This is the instance that was passed to the resolver when it was created. Note that this is different from , which is based on this value, but almost always isn't the same InspectorProperty instance. + + + + + The error message, if a valid value resolution wasn't found, or if creation of the value resolver failed because was invalid, or if value resolution was run but threw an exception. (In this last case, will be true.) + + + + + The named values that are available to the value resolver. Use this field only to get and set named values - once the ValueResolver has been created, new named values will have no effect. + + + + + This is the fallback value that the value resolver will return if there is an error or failed resolution for any reason. + + + + + Whether there is a fallback value. This boolean exists because then null is also a valid fallback value. This boolean will always be true if an overload is used that takes a fallback value parameter. + + + + + This will be true if is not null and the message was caused by an exception thrown by code invoked during an actual value resolution. + + + + + Whether exceptions thrown during value resolution should be logged to the console. + + + + + The type of value that the resolver is resolving. + + + + + The string that is resolved to get a value. + + + + + Whether the value resolver should sync ref parameters of invoked methods with named values. If this is true, then if a ref or out parameter value is changed during value resolution, the named value associated with that parameter will also be changed to the same value. + + + + + Whether this context has been resolved. + + + + + The type that is the parent of the value resolution, ie, the type that is the context. This is the same as .ValueEntry.TypeOfValue. + + + + + The property that *is* the context for the value resolution. This is not the instance that was passed to the resolver when it was created, but this value is based on that instance. This is the property that provides the actual context - for example, if is for a member of a type - or for an element in a collection contained by a member - this value will be the parent property for the type that contains that member. Only if is the tree's root property is the same as . + + + + + Gets the parent value which provides the context of the resolver. + + The selection index of the parent value to get. + + + + Sets the parent value which provides the context of the resolver. + + The selection index of the parent value to set. + The value to set. + + + + Adds the default named values of "property" and "value" to the context's named values. + This method is usually automatically invoked when a resolver is created, so there + is no need to invoke it manually. + + + + + Opens a window which displays a list of all icons available from . + + + + + Opens a window which displays a list of all icons available from . + + + + + Builds the selection tree. + + + + + Gets a texture of an odin bg symbol. + + + + + Adds menu items to the Unity Editor, draws the About window, and the preference window found under Edit > Preferences > Odin Inspector. + + + + + Access the StaticInspectorWindow from Tools > Odin > Inspector > Static Inspector. + + + + + Member filter for access modifiers. + + + + + include public members. + + + + + Include Non-public members. + + + + + Include both public and non-public members. + + + + + Member filter for member types. + + + + + No members included. + + + + + Include field members. + + + + + Include property members. + + + + + Include method members. + + + + + Include group members. + + + + + Include members from the base types. + + + + + Include members marked with the Obsolete attribute. + + + + + Include all members except members marked with the Obsolete attribute. + + + + + Shows the window. + + + + + Opens a new static inspector window for the given type. + + + + + Draws the Odin Editor Window. + + + + + Draws the editor for the this.CurrentDrawingTargets[index]. + + + + + Contains references to UnityEngine.Networking types. These types have been removed in Unity 2019+, and thus may be null. + + + + + Contains configuration for generating an assembly that provides increased AOT support in Odin. + + + + + + Whether to automatically scan the project and generate an AOT dll, right before builds. This will only affect platforms that are in the list. + + + **This will only work on Unity 5.6 and higher!** + + + + + + Whether to automatically delete the generated AOT dll after a build has completed. + + + + + A list of platforms to automatically scan the project and generate an AOT dll for, right before builds. This will do nothing unless is true. + + + + + The path to the AOT folder that the AOT .dll and linker file is created in, relative to the current project folder. + + + + + Scans the entire project for types to support AOT serialization for. + + + + + Generates an AOT DLL, using the current configuration of the AOTGenerationConfig instance. + + + + + Defines the ODIN_INSPECTOR symbol. + + + + + The Odin Inspector Serialization Debugger Window. + + + + + + Opens the Serialization Debugger Window with the last debugged type. + + + + + Opens the Serialization Debugger Window and debugs the given type. + + The type to debug serialization of. + + + + Initializes the Serialization Debugger Window. + + + + diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml.meta new file mode 100644 index 0000000..9015656 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a4865f1ab4504ed8a368670db22f096f +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll new file mode 100644 index 0000000..79a1800 Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll.meta new file mode 100644 index 0000000..5c91f29 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 61824742f78323c439d83403f8272d41 +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll new file mode 100644 index 0000000..a4a0219 Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll.meta new file mode 100644 index 0000000..cc2b4d3 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 74721b9f0af448f5ae2e91102a1a5edd +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 1 + settings: + Exclude Android: 0 + Exclude Editor: 0 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude N3DS: 0 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude PS4: 0 + Exclude PSM: 0 + Exclude PSP2: 0 + Exclude SamsungTV: 0 + Exclude Tizen: 0 + Exclude WebGL: 0 + Exclude WiiU: 0 + Exclude Win: 0 + Exclude Win64: 0 + Exclude WindowsStoreApps: 0 + Exclude XboxOne: 0 + Exclude iOS: 0 + Exclude tvOS: 0 + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.xml b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.xml new file mode 100644 index 0000000..f9e16ab --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.xml @@ -0,0 +1,202 @@ + + + + Sirenix.Serialization.Config + + + + + A helper class for quickly and easily defining custom loggers. + + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Specifies a data format to read and write in. + + + + + A custom packed binary format. This format is most efficient and almost allocation-free, + but its serialized data is not human-readable. + + + + + A JSON format compliant with the json specification found at "http://www.json.org/". + + This format has rather sluggish performance and allocates frightening amounts of string garbage. + + + + + A format that does not serialize to a byte stream, but to a list of data nodes in memory + which can then be serialized by Unity. + + This format is highly inefficient, and is primarily used for ensuring that Unity assets + are mergeable by individual values when saved in Unity's text format. This makes + serialized values more robust and data recovery easier in case of issues. + + This format is *not* recommended for use in builds. + + + + + Defines default loggers for serialization and deserialization. This class and all of its loggers are thread safe. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + The policy for handling errors during serialization and deserialization. + + + + + Attempts will be made to recover from errors and continue serialization. Data may become invalid. + + + + + Exceptions will be thrown when errors are logged. + + + + + Exceptions will be thrown when warnings or errors are logged. + + + + + Not yet documented. + + + + + Text for the cautionary serialization warning shown in the inspector. + + + + + Text for the hide button for the cautionary serialization warning shown in the inspector. + + + + + Text for the hide button for the cautionary prefab warning shown in the inspector. + + + + + Whether the user has chosen to hide the cautionary serialization warning. + + + + + Whether the user has chosen to hide the warning messages related to the OdinSerialize attribute. + + + + + Whether the user has chosen to hide the warning messages related to the SerializeField and ShowInInspector attributes on non-serialized members. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Implements methods for logging warnings, errors and exceptions during serialization and deserialization. + + + + + Logs a warning. + + The warning to log. + + + + Logs an error. + + The error to log. + + + + Logs an exception. + + The exception to log. + + + + The policy for which level of logging to do during serialization and deserialization. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.xml.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.xml.meta new file mode 100644 index 0000000..4334acc --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 74721b9f0af448f5ae2e91102a1a096f +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll new file mode 100644 index 0000000..2d2b7c5 Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll.meta new file mode 100644 index 0000000..063427b --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 5f3147f7af4c49739579b966c458f5e4 +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.xml b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.xml new file mode 100644 index 0000000..84808d2 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.xml @@ -0,0 +1,9864 @@ + + + + Sirenix.Serialization + + + + + Provides basic functionality and overridable abstract methods for implementing a data reader. + + If you inherit this class, it is VERY IMPORTANT that you implement each abstract method to the *exact* specifications the documentation specifies. + + + + + + + Initializes a new instance of the class. + + The base stream of the reader. + The deserialization context to use. + The stream or context is null. + Cannot read from stream. + + + + Gets the current node id. If this is less than zero, the current node has no id. + + + The current node id. + + + + + Gets the current node depth. In other words, the current count of the node stack. + + + The current node depth. + + + + + Gets the name of the current node. + + + The name of the current node. + + + + + Gets or sets the base stream of the reader. + + + The base stream of the reader. + + value + Cannot read from stream + + + + Gets the deserialization context. + + + The deserialization context. + + + + + Tries to enter a node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + + This call will change the values of the , , and properties to the correct values for the current node. + + The type of the node. This value will be null if there was no metadata, or if the reader's serialization binder failed to resolve the type name. + true if entering a node succeeded, otherwise false + + + + Exits the current node. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the current node. + + true if the method exited a node, false if it reached the end of the stream. + + + + Tries to enters an array node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + + This call will change the values of the , , and properties to the correct values for the current array node. + + The length of the array that was entered. + true if an array was entered, otherwise false + + + + Exits the closest array. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the exited array node. + + true if the method exited an array, false if it reached the end of the stream. + + + + Reads a primitive array value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The element type of the primitive array. Valid element types can be determined using . + The resulting primitive array. + true if reading a primitive array succeeded, otherwise false + + + + Peeks ahead and returns the type of the next entry in the stream. + + The name of the next entry, if it has one. + The type of the next entry. + + + + Reads an internal reference id. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The internal reference id. + true if reading the value succeeded, otherwise false + + + + Reads an external reference index. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference index. + true if reading the value succeeded, otherwise false + + + + Reads an external reference guid. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference guid. + true if reading the value succeeded, otherwise false + + + + Reads an external reference string. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference string. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the string of the entry is longer than 1 character, the first character of the string will be taken as the result. + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a null value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + true if reading the value succeeded, otherwise false + + + + Skips the next entry value, unless it is an or an . If the next entry value is an or an , all of its contents will be processed, deserialized and registered in the deserialization context, so that internal reference values are not lost to entries further down the stream. + + + + + Disposes all resources and streams kept by the data reader. + + + + + Tells the reader that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same reader is used to deserialize several different, unrelated values. + + + + + Gets a dump of the data being read by the writer. The format of this dump varies, but should be useful for debugging purposes. + + + + + Peeks the current entry. + + The peeked entry. + + + + Consumes the current entry, and reads to the next one. + + The next entry. + + + + Implements functionality that is shared by both data readers and data writers. + + + + + Gets or sets the context's or writer's serialization binder. + + + The reader's or writer's serialization binder. + + + + + Gets a value indicating whether the reader or writer is in an array node. + + + true if the reader or writer is in an array node; otherwise, false. + + + + + Gets the current node depth. In other words, the current count of the node stack. + + + The current node depth. + + + + + Gets the current nodes array. The amount of nodes contained in it is stored in the property. The remainder of the array's length is buffer space. + + + The current node array. + + + + + Gets the current node, or if there is no current node. + + + The current node. + + + + + Pushes a node onto the node stack. + + The node to push. + + + + Pushes a node with the given name, id and type onto the node stack. + + The name of the node. + The id of the node. + The type of the node. + + + + Pushes an array node onto the node stack. This uses values from the current node to provide extra info about the array node. + + + + + Pops the current node off of the node stack. + + The name of the node to pop. + + There are no nodes to pop. + or + Tried to pop node with given name, but the current node's name was different. + + + + + Pops the current node if the current node is an array node. + + + + + Provides basic functionality and overridable abstract methods for implementing a data writer. + + If you inherit this class, it is VERY IMPORTANT that you implement each abstract method to the *exact* specifications the documentation specifies. + + + + + + + Initializes a new instance of the class. + + The base stream of the writer. + The serialization context to use. + The stream or context is null. + Cannot write to the stream. + + + + Gets or sets the base stream of the writer. + + + The base stream of the writer. + + value + Cannot write to stream + + + + Gets the serialization context. + + + The serialization context. + + + + + Flushes everything that has been written so far to the writer's base stream. + + + + + Writes the beginning of a reference node. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the reference node. + The type of the reference node. If null, no type metadata will be written. + The id of the reference node. This id is acquired by calling . + + + + Begins a struct/value type node. This is essentially the same as a reference node, except it has no internal reference id. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the struct node. + The type of the struct node. If null, no type metadata will be written. + + + + Ends the current node with the given name. If the current node has another name, an is thrown. + + The name of the node to end. This has to be the name of the current node. + + + + Begins an array node of the given length. + + The length of the array to come. + + + + Ends the current array node, if the current node is an array node. + + + + + Writes a primitive array to the stream. + + The element type of the primitive array. Valid element types can be determined using . + The primitive array to write. + + + + Writes a null value to the stream. + + The name of the value. If this is null, no name will be written. + + + + Writes an internal reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external index reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external guid reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external string reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Disposes all resources and streams kept by the data writer. + + + + + Tells the writer that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same writer is used to serialize several different, unrelated values. + + + + + Gets a dump of the data currently written by the writer. The format of this dump varies, but should be useful for debugging purposes. + + + + + Reads data from a stream that has been written by a . + + + + + + Initializes a new instance of the class. + + The base stream of the reader. + The deserialization context to use. + + + + Disposes all resources kept by the data reader, except the stream, which can be reused later. + + + + + Peeks ahead and returns the type of the next entry in the stream. + + The name of the next entry, if it has one. + + The type of the next entry. + + + + + Tries to enters an array node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + This call will change the values of the , , and properties to the correct values for the current array node. + + The length of the array that was entered. + + true if an array was entered, otherwise false + + + + + Tries to enter a node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + This call will change the values of the , , and properties to the correct values for the current node. + + The type of the node. This value will be null if there was no metadata, or if the reader's serialization binder failed to resolve the type name. + + true if entering a node succeeded, otherwise false + + + + + Exits the closest array. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the exited array node. + + + true if the method exited an array, false if it reached the end of the stream. + + + + + Exits the current node. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the current node. + + + true if the method exited a node, false if it reached the end of the stream. + + + + + Reads a primitive array value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The element type of the primitive array. Valid element types can be determined using . + The resulting primitive array. + + true if reading a primitive array succeeded, otherwise false + + Type + typeof(T).Name + is not a valid primitive array type. + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the string of the entry is longer than 1 character, the first character of the string will be taken as the result. + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an external reference guid. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference guid. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an external reference index. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference index. + + true if reading the value succeeded, otherwise false + + + + + Reads an external reference string. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference string. + + true if reading the value succeeded, otherwise false + + + + + Reads a null value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + + true if reading the value succeeded, otherwise false + + + + + Reads an internal reference id. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The internal reference id. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Tells the reader that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same reader is used to deserialize several different, unrelated values. + + + + + Peeks the current entry. + + The peeked entry. + + + + Consumes the current entry, and reads to the next one. + + The next entry. + + + + Writes data to a stream that can be read by a . + + + + + + Initializes a new instance of the class. + + The base stream of the writer. + The serialization context to use. + + + + Begins an array node of the given length. + + The length of the array to come. + + + + Writes the beginning of a reference node. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the reference node. + The type of the reference node. If null, no type metadata will be written. + The id of the reference node. This id is acquired by calling . + + + + Begins a struct/value type node. This is essentially the same as a reference node, except it has no internal reference id. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the struct node. + The type of the struct node. If null, no type metadata will be written. + + + + Disposes all resources kept by the data writer, except the stream, which can be reused later. + + + + + Ends the current array node, if the current node is an array node. + + + + + Ends the current node with the given name. If the current node has another name, an is thrown. + + The name of the node to end. This has to be the name of the current node. + + + + Writes a primitive array to the stream. + + The element type of the primitive array. Valid element types can be determined using . + The primitive array to write. + Type + typeof(T).Name + is not a valid primitive array type. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external guid reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external index reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external string reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a null value to the stream. + + The name of the value. If this is null, no name will be written. + + + + Writes an internal reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Tells the writer that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same writer is used to serialize several different, unrelated values. + + + + + Entry types in the binary format written by . + + + + + An invalid entry. + + + + + Entry denoting a named start of a reference node. + + + + + Entry denoting an unnamed start of a reference node. + + + + + Entry denoting a named start of a struct node. + + + + + Entry denoting an unnamed start of a struct node. + + + + + Entry denoting an end of node. + + + + + Entry denoting the start of an array. + + + + + Entry denoting the end of an array. + + + + + Entry denoting a primitive array. + + + + + Entry denoting a named internal reference. + + + + + Entry denoting an unnamed internal reference. + + + + + Entry denoting a named external reference by index. + + + + + Entry denoting an unnamed external reference by index. + + + + + Entry denoting a named external reference by guid. + + + + + Entry denoting an unnamed external reference by guid. + + + + + Entry denoting a named sbyte. + + + + + Entry denoting an unnamed sbyte. + + + + + Entry denoting a named byte. + + + + + Entry denoting an unnamed byte. + + + + + Entry denoting a named short. + + + + + Entry denoting an unnamed short. + + + + + Entry denoting a named ushort. + + + + + Entry denoting an unnamed ushort. + + + + + Entry denoting a named int. + + + + + Entry denoting an unnamed int. + + + + + Entry denoting a named uint. + + + + + Entry denoting an unnamed uint. + + + + + Entry denoting a named long. + + + + + Entry denoting an unnamed long. + + + + + Entry denoting a named ulong. + + + + + Entry denoting an unnamed ulong. + + + + + Entry denoting a named float. + + + + + Entry denoting an unnamed float. + + + + + Entry denoting a named double. + + + + + Entry denoting an unnamed double. + + + + + Entry denoting a named decimal. + + + + + Entry denoting an unnamed decimal. + + + + + Entry denoting a named char. + + + + + Entry denoting an unnamed char. + + + + + Entry denoting a named string. + + + + + Entry denoting an unnamed string. + + + + + Entry denoting a named guid. + + + + + Entry denoting an unnamed guid. + + + + + Entry denoting a named boolean. + + + + + Entry denoting an unnamed boolean. + + + + + Entry denoting a named null. + + + + + Entry denoting an unnamed null. + + + + + Entry denoting a type name. + + + + + Entry denoting a type id. + + + + + Entry denoting that the end of the stream has been reached. + + + + + Entry denoting a named external reference by string. + + + + + Entry denoting an unnamed external reference by string. + + + + + Provides a set of methods for reading data stored in a format written by a corresponding class. + + If you implement this interface, it is VERY IMPORTANT that you implement each method to the *exact* specifications the documentation specifies. + + It is strongly recommended to inherit from the class if you wish to implement a new data reader. + + + + + + Gets or sets the reader's serialization binder. + + + The reader's serialization binder. + + + + + Gets or sets the base stream of the reader. + + + The base stream of the reader. + + + + + Gets a value indicating whether the reader is in an array node. + + + true if the reader is in an array node; otherwise, false. + + + + + Gets the name of the current node. + + + The name of the current node. + + + + + Gets the current node id. If this is less than zero, the current node has no id. + + + The current node id. + + + + + Gets the current node depth. In other words, the current count of the node stack. + + + The current node depth. + + + + + Gets the deserialization context. + + + The deserialization context. + + + + + Gets a dump of the data being read by the writer. The format of this dump varies, but should be useful for debugging purposes. + + + + + Tries to enter a node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + + This call will change the values of the , , and properties to the correct values for the current node. + + The type of the node. This value will be null if there was no metadata, or if the reader's serialization binder failed to resolve the type name. + true if entering a node succeeded, otherwise false + + + + Exits the current node. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the current node. + + true if the method exited a node, false if it reached the end of the stream. + + + + Tries to enters an array node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + + This call will change the values of the , , and properties to the correct values for the current array node. + + The length of the array that was entered. + true if an array was entered, otherwise false + + + + Exits the closest array. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the exited array node. + + true if the method exited an array, false if it reached the end of the stream. + + + + Reads a primitive array value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The element type of the primitive array. Valid element types can be determined using . + The resulting primitive array. + true if reading a primitive array succeeded, otherwise false + + + + Peeks ahead and returns the type of the next entry in the stream. + + The name of the next entry, if it has one. + The type of the next entry. + + + + Reads an internal reference id. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The internal reference id. + true if reading the value succeeded, otherwise false + + + + Reads an external reference index. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference index. + true if reading the value succeeded, otherwise false + + + + Reads an external reference guid. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference guid. + true if reading the value succeeded, otherwise false + + + + Reads an external reference string. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference string. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the string of the entry is longer than 1 character, the first character of the string will be taken as the result. + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a null value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + true if reading the value succeeded, otherwise false + + + + Skips the next entry value, unless it is an or an . If the next entry value is an or an , all of its contents will be processed, deserialized and registered in the deserialization context, so that internal reference values are not lost to entries further down the stream. + + + + + Tells the reader that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same reader is used to deserialize several different, unrelated values. + + + + + Provides a set of methods for reading data stored in a format that can be read by a corresponding class. + + If you implement this interface, it is VERY IMPORTANT that you implement each method to the *exact* specifications the documentation specifies. + + It is strongly recommended to inherit from the class if you wish to implement a new data writer. + + + + + + Gets or sets the reader's serialization binder. + + + The reader's serialization binder. + + + + + Gets or sets the base stream of the writer. + + + The base stream of the writer. + + + + + Gets a value indicating whether the writer is in an array node. + + + true if the writer is in an array node; otherwise, false. + + + + + Gets the serialization context. + + + The serialization context. + + + + + Gets a dump of the data currently written by the writer. The format of this dump varies, but should be useful for debugging purposes. + + + + + Flushes everything that has been written so far to the writer's base stream. + + + + + Writes the beginning of a reference node. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the reference node. + The type of the reference node. If null, no type metadata will be written. + The id of the reference node. This id is acquired by calling . + + + + Begins a struct/value type node. This is essentially the same as a reference node, except it has no internal reference id. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the struct node. + The type of the struct node. If null, no type metadata will be written. + + + + Ends the current node with the given name. If the current node has another name, an is thrown. + + The name of the node to end. This has to be the name of the current node. + + + + Begins an array node of the given length. + + The length of the array to come. + + + + Ends the current array node, if the current node is an array node. + + + + + Writes a primitive array to the stream. + + The element type of the primitive array. Valid element types can be determined using . + The primitive array to write. + + + + Writes a null value to the stream. + + The name of the value. If this is null, no name will be written. + + + + Writes an internal reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external index reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external guid reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external string reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Tells the writer that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same writer is used to serialize several different, unrelated values. + + + + + Contains various string constants used by the , and classes. + + + + + The named of a node id entry. + + + + + The name of a type entry. + + + + + The name of a regular array length entry. + + + + + The name of a primitive array length entry. + + + + + The name of a regular array content entry. + + + + + The name of a primitive array content entry. + + + + + The beginning of the content of an internal reference entry. + + + + + The beginning of the content of an external reference by index entry. + + + + + The beginning of the content of an external reference by guid entry. + + + + + The beginning of the content of an external reference by string entry. This is an old entry using an invalid data format where the ref string is dumped inline without escaping. + + + + + The beginning of the content of an external reference by string entry. This is a new entry using the valid format where the ref string is written as an escaped string. + + + + + Reads json data from a stream that has been written by a . + + + + + + Initializes a new instance of the class. + + The base stream of the reader. + The deserialization context to use. + + + + Gets or sets the base stream of the reader. + + + The base stream of the reader. + + + + + Disposes all resources kept by the data reader, except the stream, which can be reused later. + + + + + Peeks ahead and returns the type of the next entry in the stream. + + The name of the next entry, if it has one. + + The type of the next entry. + + + + + Tries to enter a node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + This call will change the values of the , , and properties to the correct values for the current node. + + The type of the node. This value will be null if there was no metadata, or if the reader's serialization binder failed to resolve the type name. + + true if entering a node succeeded, otherwise false + + + + + Exits the current node. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the current node. + + + true if the method exited a node, false if it reached the end of the stream. + + + + + Tries to enters an array node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + This call will change the values of the , , and properties to the correct values for the current array node. + + The length of the array that was entered. + + true if an array was entered, otherwise false + + + + + Exits the closest array. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the exited array node. + + + true if the method exited an array, false if it reached the end of the stream. + + + + + Reads a primitive array value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The element type of the primitive array. Valid element types can be determined using . + The resulting primitive array. + + true if reading a primitive array succeeded, otherwise false + + Type + typeof(T).Name + is not a valid primitive array type. + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an internal reference id. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The internal reference id. + + true if reading the value succeeded, otherwise false + + + + + Reads an external reference index. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference index. + + true if reading the value succeeded, otherwise false + + + + + Reads an external reference guid. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference guid. + + true if reading the value succeeded, otherwise false + + + + + Reads an external reference string. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference string. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the string of the entry is longer than 1 character, the first character of the string will be taken as the result. + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a null value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + + true if reading the value succeeded, otherwise false + + + + + Tells the reader that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same reader is used to deserialize several different, unrelated values. + + + + + Peeks the current entry. + + The peeked entry. + + + + Consumes the current entry, and reads to the next one. + + The next entry. + + + + Writes json data to a stream that can be read by a . + + + + + + Initializes a new instance of the class. + + The base stream of the writer. + The serialization context to use.> + Whether the json should be packed, or formatted as human-readable. + + + + Gets or sets a value indicating whether the json should be packed, or formatted as human-readable. + + + true if the json should be formatted as human-readable; otherwise, false. + + + + + Whether to enable an optimization that ensures any given type name is only written once into the json stream, and thereafter kept track of by ID. + + + + + Enable the "just started" flag, causing the writer to start a new "base" json object container. + + + + + Flushes everything that has been written so far to the writer's base stream. + + + + + Writes the beginning of a reference node. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the reference node. + The type of the reference node. If null, no type metadata will be written. + The id of the reference node. This id is acquired by calling . + + + + Begins a struct/value type node. This is essentially the same as a reference node, except it has no internal reference id. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the struct node. + The type of the struct node. If null, no type metadata will be written. + + + + Ends the current node with the given name. If the current node has another name, an is thrown. + + The name of the node to end. This has to be the name of the current node. + + + + Begins an array node of the given length. + + The length of the array to come. + + + + Ends the current array node, if the current node is an array node. + + + + + Writes a primitive array to the stream. + + The element type of the primitive array. Valid element types can be determined using . + The primitive array to write. + Type + typeof(T).Name + is not a valid primitive array type. + array + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a null value to the stream. + + The name of the value. If this is null, no name will be written. + + + + Writes an internal reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external index reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external guid reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external string reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Disposes all resources kept by the data writer, except the stream, which can be reused later. + + + + + Tells the writer that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same writer is used to serialize several different, unrelated values. + + + + + Parses json entries from a stream. + + + + + + The current deserialization context used by the text reader. + + + + + Initializes a new instance of the class. + + The stream to parse from. + The deserialization context to use. + The stream is null. + Cannot read from the stream. + + + + Resets the reader instance's currently peeked char and emergency playback queue. + + + + + Disposes all resources kept by the text reader, except the stream, which can be reused later. + + + + + Reads to (but not past) the beginning of the next json entry, and returns the entry name, contents and type. + + The name of the entry that was parsed. + The content of the entry that was parsed. + The type of the entry that was parsed. + + + + A serialization node as used by the format. + + + + + The name of the node. + + + + + The entry type of the node. + + + + + The data contained in the node. Depending on the entry type and name, as well as nodes encountered prior to this one, the format can vary wildly. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Tries to enters an array node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + This call will change the values of the , , and properties to the correct values for the current array node. + + The length of the array that was entered. + + true if an array was entered, otherwise false + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Reads a primitive array value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The element type of the primitive array. Valid element types can be determined using . + The resulting primitive array. + + true if reading a primitive array succeeded, otherwise false + + Type + typeof(T).Name + is not a valid primitive array type. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Peeks the current entry. + + The peeked entry. + + + + Consumes the current entry, and reads to the next one. + + The next entry. + + + + Shared config class for and . + + + + + The string to use to separate node id's from their names. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Begins an array node of the given length. + + The length of the array to come. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Utility class for locating and caching formatters for all non-primitive types. + + + + + Editor-only event that fires whenever an emittable formatter has been located. + This event is used by the AOT formatter pre-emitter to locate types that need to have formatters pre-emitted. + + + + + Editor-only event that fires whenever a formatter has been located. + + + + + This event is invoked before everything else when a formatter is being resolved for a given type. If any invoked delegate returns a valid formatter, that formatter is used and the resolve process stops there. + + This can be used to hook into and extend the serialization system's formatter resolution logic. + + + + + Gets a formatter for the type . + + The type to get a formatter for. + The serialization policy to use if a formatter has to be emitted. If null, is used. + + A formatter for the type . + + + + + Gets a formatter for a given type. + + The type to get a formatter for. + The serialization policy to use if a formatter has to be emitted. If null, is used. + + A formatter for the given type. + + The type argument is null. + + + + Gets a formatter for a given type. + + The type to get a formatter for. + The serialization policy to use if a formatter has to be emitted. If null, is used. + Whether to allow the use of weak fallback formatters which do not implement the strongly typed , but which conversely do not need to have had AOT support generated. + + A formatter for the given type. + + The type argument is null. + + + + Formatter for all non-primitive one-dimensional arrays. + + The element type of the formatted array. + + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom formatter for the type . + + + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Provides common functionality for serializing and deserializing values of type , and provides automatic support for the following common serialization conventions: + + , , , , and . + + The type which can be serialized and deserialized by the formatter. + + + + + The on serializing callbacks for type . + + + + + The on serialized callbacks for type . + + + + + The on deserializing callbacks for type . + + + + + The on deserialized callbacks for type . + + + + + Whether the serialized value is a value type. + + + + + Gets the type that the formatter can serialize. + + + The type that the formatter can serialize. + + + + + Serializes a value using a specified . + + The value to serialize. + The writer to use. + + + + Deserializes a value using a specified . + + The reader to use. + + The deserialized value. + + + + + Deserializes a value of type using a specified . + + The reader to use. + + The deserialized value. + + + + + Serializes a value of type using a specified . + + The value to serialize. + The writer to use. + + + + Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins. + You will have to call and immediately after creating the object yourself during deserialization. + + An uninitialized object of type . + + + + Registers the given object reference in the deserialization context. + + NOTE that this method only does anything if is not a value type. + + The value to register. + The reader which is currently being used. + + + + Invokes all methods on the object with the [OnDeserializing] attribute. + + WARNING: This method will not be called automatically if you override GetUninitializedObject and return null! You will have to call it manually after having created the object instance during deserialization. + + The value to invoke the callbacks on. + The deserialization context. + + + + Invokes all methods on the object with the [OnDeserializing] attribute. + + WARNING: This method will not be called automatically if you override GetUninitializedObject and return null! You will have to call it manually after having created the object instance during deserialization. + + The value to invoke the callbacks on. + The deserialization context. + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Provides common functionality for serializing and deserializing weakly typed values of a given type, and provides automatic support for the following common serialization conventions: + + , , , , and . + + + + + + Serializes a value using a specified . + + The value to serialize. + The writer to use. + + + + Deserializes a value using a specified . + + The reader to use. + + The deserialized value. + + + + + Registers the given object reference in the deserialization context. + + NOTE that this method only does anything if is not a value type. + + The value to register. + The reader which is currently being used. + + + + Invokes all methods on the object with the [OnDeserializing] attribute. + + WARNING: This method will not be called automatically if you override GetUninitializedObject and return null! You will have to call it manually after having created the object instance during deserialization. + + The value to invoke the callbacks on. + The deserialization context. + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Formatter for all delegate types. + + This formatter can handle anything but delegates for dynamic methods. + + + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins. + You will have to call and immediately after creating the object yourself during deserialization. + + + An uninitialized object of type . + + + + + Emergency hack class to support serialization of types derived from dictionary + + + + + Returns null. + + + A value of null. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom generic formatter for the generic type definition . + + The type of the dictionary key. + The type of the dictionary value. + + + + + Creates a new instance of . + + + + + Returns null. + + + A value of null. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom Odin serialization formatter for . + + Type of primary key. + Type of secondary key. + Type of value. + + + + Creates a new instance of . + + + + + Returns null. + + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides an easy way of implementing custom formatters. + + The type which can be serialized and deserialized by the formatter. + + + + Reads through all entries in the current node one at a time, and calls for each entry. + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Calls directly. + + The value to serialize. + The writer to serialize with. + + + + Reads a data entry into the value denoted by the entry name. + + The value to read into. + The name of the entry. + The type of the entry. + The reader currently used for deserialization. + + + + Write the serialized values of a value of type . + + The value to serialize. + The writer currently used for serialization. + + + + Indicates that this formatter type has been emitted. Never put this on a type! + + + + + A formatter for empty types. It writes no data, and skips all data that is to be read, deserializing a "default" value. + + + + + Skips the entry to read. + + + + + Does nothing at all. + + + + + Utility class for emitting formatters using the namespace. + + NOTE: Some platforms do not support emitting. Check whether you can emit on the current platform using . + + + + + Used for generating unique formatter helper type names. + + + + + The name of the pre-generated assembly that contains pre-emitted formatters for use on AOT platforms where emitting is not supported. Note that this assembly is not always present. + + + + + The name of the runtime-generated assembly that contains runtime-emitted formatters for use on non-AOT platforms where emitting is supported. Note that this assembly is not always present. + + + + + Base type for all AOT-emitted formatters. + + + + + Shortcut class that makes it easier to emit empty AOT formatters. + + + + + Skips the entry to read. + + + + + Does nothing at all. + + + + + Gets an emitted formatter for a given type. + + NOTE: Some platforms do not support emitting. On such platforms, this method logs an error and returns null. Check whether you can emit on the current platform using . + + The type to emit a formatter for. + The serialization policy to use to determine which members the emitted formatter should serialize. If null, is used. + The type of the emitted formatter. + The type argument is null. + + + + Emits a formatter for a given type into a given module builder, using a given serialization policy to determine which members to serialize. + + Type to create a formatter for. + The module builder to emit a formatter into. + The serialization policy to use for creating the formatter. + The fully constructed, emitted formatter type. + + + + Utility class for the class. + + + + + Determines whether the specified type can be formatted by a . + + The following criteria are checked: type implements , type is not abstract, type is not a generic type definition, type is not an interface, type has a public parameterless constructor. + + The collection type to check. + The element type of the collection. + true if the type can be formatted by a , otherwise false + The type argument is null. + + + + Formatter for all eligible types that implement the interface , and which have no other formatters specified. + + Eligibility for formatting by this class is determined by the method. + + The type of the collection. + The type of the element. + + + + Creates a new instance of . + + + + + Gets a new object of type . + + + A new object of type . + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Gets a new object of type . + + + A new object of type . + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom generic formatter for the generic type definition . + + The element type of the formatted list. + + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Serializes and deserializes a given type. + + NOTE that if you are implementing a custom formatter and registering it using the , it is not enough to implement - you have to implement . + + + + + Gets the type that the formatter can serialize. + + + The type that the formatter can serialize. + + + + + Serializes a value using a specified . + + The value to serialize. + The writer to use. + + + + Deserializes a value using a specified . + + The reader to use. + + The deserialized value. + + + + + Serializes and deserializes a given type T. + + The type which can be serialized and deserialized by the formatter. + + + + Serializes a value of type using a specified . + + The value to serialize. + The writer to use. + + + + Deserializes a value of type using a specified . + + The reader to use. + + The deserialized value. + + + + + Custom generic formatter for the generic type definition . + + The type of the key. + The type of the value. + + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Custom generic formatter for the generic type definition . + + The element type of the formatted list. + + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom formatter for MethodInfo, since Unity Mono's MethodInfo ISerializable implementation will often crash if the method no longer exists upon deserialization. + + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins. + You will have to call and immediately after creating the object yourself during deserialization. + + + An uninitialized object of type . + + + + + Minimal baseline formatter. Doesn't come with all the bells and whistles of any of the other BaseFormatter classes. + Common serialization conventions aren't automatically supported, and common deserialization callbacks are not automatically invoked. + + The type which can be serialized and deserialized by the formatter. + + + + Whether the serialized value is a value type. + + + + + Gets the type that the formatter can serialize. + + + The type that the formatter can serialize. + + + + + Deserializes a value of type using a specified . + + The reader to use. + + The deserialized value. + + + + + Serializes a value of type using a specified . + + The value to serialize. + The writer to use. + + + + Serializes a value using a specified . + + The value to serialize. + The writer to use. + + + + Deserializes a value using a specified . + + The reader to use. + + The deserialized value. + + + + + Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered. + You will have to call immediately after creating the object yourself during deserialization. + + An uninitialized object of type . + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Registers the given object reference in the deserialization context. + + NOTE that this method only does anything if is not a value type. + + The value to register. + The reader which is currently being used. + + + + Whether the serialized value is a value type. + + + + + Gets the type that the formatter can serialize. + + + The type that the formatter can serialize. + + + + + Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered. + You will have to call immediately after creating the object yourself during deserialization. + + An uninitialized object of type . + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Registers the given object reference in the deserialization context. + + NOTE that this method only does anything if the serialized type is not a value type. + + The value to register. + The reader which is currently being used. + + + + Formatter for all arrays with more than one dimension. + + The type of the formatted array. + The element type of the formatted array. + + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Formatter for all types. + + The type that is nullable. + + + + + Creates a new instance of . + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Formatter for all primitive one-dimensional arrays. + + The element type of the formatted array. This type must be an eligible primitive array type, as determined by . + + + + + Returns null. + + + A null value. + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Returns null. + + + A null value. + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom generic formatter for the generic type definition . + + The element type of the formatted queue. + + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Final fallback formatter for all types which have no other formatters. This formatter relies on reflection to work, and is thus comparatively slow and creates more garbage than a custom formatter. + + The type which can be serialized and deserialized by the formatter. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Formatter for types that implement the interface. + + + + + + + Calls on the value to deserialize. + + + + + Calls on the value to deserialize. + + + + + Calls on the value to deserialize. + + + + + Calls on the value to deserialize. + + + + + Formatter for all types that implement the ISerializable interface. + + The type which can be serialized and deserialized by the formatter. + + + + + Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins. + You will have to call and immediately after creating the object yourself during deserialization. + + + An uninitialized object of type . + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Creates and reads into a instance using a given reader and context. + + The reader to use. + + The which was read. + + + + + Writes the given using the given writer. + + The to write. + The writer to use. + + + + Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins. + You will have to call and immediately after creating the object yourself during deserialization. + + + An uninitialized object of type . + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom generic formatter for the generic type definition and types derived from it. + + The element type of the formatted stack. + + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Formatter for the type which uses the reader/writer's to bind types. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Returns null. + + null. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + + Applying this attribute to a type indicates that in the case where, when expecting to deserialize an instance of the type + or any of its derived types, but encountering an incompatible, uncastable type in the data being read, the serializer + should attempt to deserialize an instance of the expected type using the stored, possibly invalid data. + + + This is equivalent to the option, expect type-specific instead + of global. + + + + + + Use this attribute to specify that a type that implements the + interface should *always* format itself regardless of other formatters being specified. + + This means that the interface will be used to format all types derived from the type that + is decorated with this attribute, regardless of custom formatters for the derived types. + + + + + + This class gathers info about the current architecture for the purpose of determinining + the unaligned read/write capabilities that we have to work with. + + + + + This will be false on some ARM architectures, such as ARMv7. + In these cases, we will have to perform slower but safer int-by-int read/writes of data. + + Since this value will never change at runtime, performance hits from checking this + everywhere should hopefully be negligible, since branch prediction from speculative + execution will always predict it correctly. + + + + + Provides a way of claiming and releasing cached array buffers. + + The element type of the array to buffer. + + + + + Gets the total element count of the buffered array. This will always be a power of two. + + + The total element count of the buffered array. + + Cannot access a buffer while it is freed. + + + + Gets the buffered array. + + + The buffered array. + + Cannot access a buffer while it is freed. + + + + Gets a value indicating whether this buffer is free. + + + true if this buffer is free; otherwise, false. + + + + + Claims a buffer with the specified minimum capacity. Note: buffers always have a capacity equal to or larger than 256. + + The minimum capacity. + A buffer which has a capacity equal to or larger than the specified minimum capacity. + Requested size of buffer must be larger than 0. + + + + Frees the specified buffer. + + The buffer to free. + The buffer argument is null. + + + + Frees this buffer. + + + + + Frees this buffer. + + + + + Attribute indicating that a class which implements the interface somewhere in its hierarchy is a custom formatter for the type T. + + + + + + The priority of the formatter. Of all the available custom formatters, the formatter with the highest priority is always chosen. + + + + + Initializes a new instance of the class with priority 0. + + + + + Initializes a new instance of the class. + + The priority of the formatter. Of all the available custom formatters, the formatter with the highest priority is always chosen. + + + + Attribute indicating that a generic type definition class which implements the interface somewhere in its hierarchy is a custom formatter for *any variation* of the generic type definition T. + + The formatter's generic type parameters are mapped onto the serialized type's generic type parameters. + + For example, implements , where T is . + + + + + + The generic type definition of the serialized type. + + + + + Initializes a new instance of the class. + + The generic type definition of the serialized type. + The priority of the formatter. Of all the available custom formatters, the formatter with the highest priority is always chosen. + was null. + The type given in is not a generic type definition. + + + + Helper class for quickly and easily implementing the interface. + + + + + Initializes a new instance of the class. + + The policy ID. + if set to true non serializable types will be allowed. + The delegate to use for determining whether members should be serialized. + + The id argument or the shouldSerializeFunc argument was null. + + + + + Gets the identifier of the policy. This can be stored in the serialization metadata, so the policy used to serialize it can be recovered without knowing the policy at runtime. This ID should preferably be unique. + + + The identifier of the policy. + + + + + Gets a value indicating whether to allow non serializable types. (Types which are not decorated with .) + + + true if serializable types are allowed; otherwise, false. + + + + + Gets a value indicating whether a given should be serialized or not. + + The member to check. + + true if the given member should be serialized, otherwise, false. + + + + + An attribute that lets you help the DefaultSerializationBinder bind type names to types. This is useful if you're renaming a type, + that would result in data loss, and what to specify the new type name to avoid loss of data. + + + + + [assembly: OdinSerializer.BindTypeNameToType("Namespace.OldTypeName", typeof(Namespace.NewTypeName))] + //[assembly: OdinSerializer.BindTypeNameToType("Namespace.OldTypeName, OldFullAssemblyName", typeof(Namespace.NewTypeName))] + + namespace Namespace + { + public class SomeComponent : SerializedMonoBehaviour + { + public IInterface test; // Contains an instance of OldTypeName; + } + + public interface IInterface { } + + public class NewTypeName : IInterface { } + + //public class OldTypeName : IInterface { } + } + + + + + + Initializes a new instance of the class. + + Old old full type name. If it's moved to new a new assembly you must specify the old assembly name as well. See example code in the documentation. + The new type. + + + + Provides a default, catch-all implementation. This binder only includes assembly names, without versions and tokens, in order to increase compatibility. + + + + + + + Bind a type to a name. + + The type to bind. + The debug context to log to. + + The name that the type has been bound to. + + The type argument is null. + + + + Determines whether the specified type name is mapped. + + + + + Binds a name to type. + + The name of the type to bind. + The debug context to log to. + + The type that the name has been bound to, or null if the type could not be resolved. + + The typeName argument is null. + + + + The context of a given deserialization session. This class maintains all internal and external references during deserialization. + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The streaming context to use. + + + + Initializes a new instance of the class. + + The formatter converter to use. + + + + Initializes a new instance of the class. + + The streaming context to use. + The formatter converter to use. + The formatterConverter parameter is null. + + + + Gets or sets the context's type binder. + + + The context's serialization binder. + + + + + Gets or sets the string reference resolver. + + + The string reference resolver. + + + + + Gets or sets the Guid reference resolver. + + + The Guid reference resolver. + + + + + Gets or sets the index reference resolver. + + + The index reference resolver. + + + + + Gets the streaming context. + + + The streaming context. + + + + + Gets the formatter converter. + + + The formatter converter. + + + + + Gets or sets the serialization configuration. + + + The serialization configuration. + + + + + Registers an internal reference to a given id. + + The id to register the reference with. + The reference to register. + + + + Gets an internal reference from a given id, or null if the id has not been registered. + + The id of the reference to get. + An internal reference from a given id, or null if the id has not been registered. + + + + Gets an external object reference by index, or null if the index could not be resolved. + + The index to resolve. + An external object reference by the given index, or null if the index could not be resolved. + + + + Gets an external object reference by guid, or null if the guid could not be resolved. + + The guid to resolve. + An external object reference by the given guid, or null if the guid could not be resolved. + + + + Gets an external object reference by an id string, or null if the id string could not be resolved. + + The id string to resolve. + An external object reference by an id string, or null if the id string could not be resolved. + + + + Resets the deserialization context completely to baseline status, as if its constructor has just been called. + This allows complete reuse of a deserialization context, with all of its internal reference buffers. + + + + + An entry type which is part of a stream being read by a . + + + + + Could not parse entry. + + + + + Entry is a primitive value of type string or char. + + + + + Entry is a primitive value of type guid. + + + + + Entry is a primitive value of type sbyte, byte, short, ushort, int, uint, long or ulong. + + + + + Entry is a primitive value of type float, double or decimal. + + + + + Entry is a primitive boolean value. + + + + + Entry is a null value. + + + + + Entry marks the start of a node, IE, a complex type that contains values of its own. + + + + + Entry marks the end of a node, IE, a complex type that contains values of its own. + + + + + Entry contains an ID that is a reference to a node defined previously in the stream. + + + + + Entry contains the index of an external object in the DeserializationContext. + + + + + Entry contains the guid of an external object in the DeserializationContext. + + + + + Entry marks the start of an array. + + + + + Entry marks the end of an array. + + + + + Entry marks a primitive array. + + + + + Entry indicating that the reader has reached the end of the data stream. + + + + + Entry contains the string id of an external object in the DeserializationContext. + + + + + + Causes Odin's inspector to completely ignore a given member, preventing it from even being included in an Odin PropertyTree, + and such will not cause any performance hits in the inspector. + + Note that Odin can still serialize an excluded member - it is merely ignored in the inspector itself. + + + + + Provides an array of utility methods which are commonly used by serialization formatters. + + + + + Gets a map of all serializable members on the given type. This will also properly map names extracted from and to their corresponding members. + + The type to get a map for. + The serialization policy to use. If null, is used. + A map of all serializable members on the given type. + + + + Gets an array of all serializable members on the given type. + + The type to get serializable members for. + The serialization policy to use. If null, is used. + An array of all serializable members on the given type. + + + + Creates a fake Unity null value of a given type, for the given -derived owning type. + + Unity uses these kinds of values to indicate missing object references. + + Type of the null value. + Type of the owning value. This is the value which changes the which you get. + A fake Unity null value of a given type. + The nullType or owningType parameter is null. + + The type given in the nullType parameter is not a Unity object. + or + The type given in the owningType parameter is not a Unity object. + + + + + Determines whether a given type is a primitive type to the serialization system. + + The following criteria are checked: type.IsPrimitive or type.IsEnum, or type is a , or . + + The type to check. + true if the given type is a primitive type; otherwise, false. + + + + Determines whether a given type is a primitive array type. Namely, arrays with primitive array types as elements are primitive arrays. + + The following types are primitive array types: , , , , , , , , , , , , and . + + The type to check. + true if the given type is a primitive array type; otherwise, false. + + + + Gets the type contained in the given . Currently only and is supported. + + The to get the contained type of. + The type contained in the given . + Can't get the contained type of the given type. + + + + Gets the value contained in a given . Currently only and is supported. + + The to get the value of. + The instance to get the value from. + The value contained in the given . + Can't get the value of the given type. + + + + Sets the value of a given MemberInfo. Currently only and is supported. + + The to set the value of. + The object to set the value on. + The value to set. + + Property has no setter + or + Can't set the value of the given type. + + + + + Gets an aliased version of a member, with the declaring type name included in the member name, so that there are no conflicts with private fields and properties with the same name in different classes in the same inheritance hierarchy. + + Marked internal in Odin because this method MUST NOT BE CALLED FROM ODIN'S INSPECTOR CODE. + Odin has its own version of this, and there must be no conflict. These aliases must not be + mixed into Odin's own. Use InspectorPropertyInfoUtility.GetPrivateMemberAlias instead. + + + + + Resolves external guid references to reference objects during serialization and deserialization. + + + + + Gets or sets the next resolver in the chain. + + + The next resolver in the chain. + + + + + Tries to resolve a reference from a given Guid. + + The Guid to resolve. + The resolved value. + true if the value was resolved; otherwise, false. + + + + Determines whether this resolver can reference the specified value with a Guid. + + The value to check. + The Guid which references the value. + true if the value can be referenced; otherwise, false. + + + + Resolves external index references to reference objects during serialization and deserialization. + + + + + Tries to resolve the given reference index to a reference value. + + The index to resolve. + The resolved value. + true if the index could be resolved to a value, otherwise false. + + + + Determines whether the specified value can be referenced externally via this resolver. + + The value to reference. + The index of the resolved value, if it can be referenced. + true if the reference can be resolved, otherwise false. + + + + Resolves external strings references to reference objects during serialization and deserialization. + + + + + Gets or sets the next resolver in the chain. + + + The next resolver in the chain. + + + + + Tries to resolve a reference from a given Guid. + + The to resolve. + The resolved value. + true if the value was resolved; otherwise, false. + + + + Determines whether this resolver can reference the specified value with a string. + + The value to check. + The string which references the value. + true if the value can be referenced; otherwise, false. + + + + Specifies that a type is capable of serializing itself using an and an + . + + The deserialized type instance will be created without a constructor call using the + + method if it is a reference type, otherwise it will be created using default(type). + + Use to specify that a class which implements this + interface should *always* format itself regardless of other formatters being specified. + + + + + Serializes the instance's data using the given writer. + + + + + Deserializes data into the instance using the given reader. + + + + + Defines which members to serialize and deserialize when there aren't any custom formatters for a type. + Usually, it governs the behaviour of the and classes. + + + + + Gets the identifier of the policy. This can be stored in the serialization metadata, so the policy used to serialize can be recovered upon deserialization without knowing the policy ahead of time. This ID should preferably be unique. + + + The identifier of the policy. + + + + + Gets a value indicating whether to allow non serializable types. (Types which are not decorated with .) + + + true if serializable types are allowed; otherwise, false. + + + + + Gets a value indicating whether a given should be serialized or not. + + The member to check. + true if the given member should be serialized, otherwise, false. + + + + Contains information about a node during deserialization and serialization. + + + + + An empty node. + + + + + The name of the node. + + + + + The id of the node, or -1 if the node has no id. + + + + + The type of the node, or null if the node has no type metadata. + + + + + Whether the node is an array or not. + + + + + Whether the node is an empty node. + + + + + Initializes a new instance of the struct. + + The name of the node. + The id of the node. + The type of the node. + If set to true the node is an array node. + + + + Implements the operator == between and . + + The first . + The second . + + true if the nodes were equal; otherwise, false. + + + + + Implements the operator != between and . + + The first . + The second . + + true if the nodes were not equal; otherwise, false. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Indicates that an instance field or auto-property should be serialized by Odin. + + + + + + An Odin-serialized prefab modification, containing all the information necessary to apply the modification. + + + + + The type of modification to be made. + + + + + The deep reflection path at which to make the modification. + + + + + A list of all deep reflection paths in the target object where the value referenced by this modification was also located. + + + + + The modified value to set. + + + + + The new list length to set. + + + + + The dictionary keys to add. + + + + + The dictionary keys to remove. + + + + + Applies the modification to the given Object. + + + + + Types of prefab modification that can be applied. + + + + + A value has been changed at a given path. + + + + + A list length has been changed at a given path. + + + + + A dictionary has been changed at a given path. + + + + + Indicates that an instance field or auto-property was previously serialized with a different name, so that values serialized with the old name will be properly deserialized into this member. + + This does the same as Unity's FormerlySerializedAs attribute, except it can also be applied to properties. + + + + + + The former name. + + + + + Initializes a new instance of the class. + + The former name. + + + + Corresponds to the .NET class, but works only with buffers and so never allocates garbage. + + This class always writes and reads bytes in a little endian format, regardless of system architecture. + + + + + Converts a byte array into a hexadecimal string. + + + + + Converts a hexadecimal string into a byte array. + + + + + Reads two bytes from a buffer and converts them into a value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads two bytes from a buffer and converts them into a value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads four bytes from a buffer and converts them into an value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads four bytes from a buffer and converts them into an value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads eight bytes from a buffer and converts them into a value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads eight bytes from a buffer and converts them into an value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads four bytes from a buffer and converts them into an value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads eight bytes from a buffer and converts them into an value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads sixteen bytes from a buffer and converts them into a value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads sixteen bytes from a buffer and converts them into a value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Turns a value into two bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns an value into two bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns an value into four bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns an value into four bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns a value into eight bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns an value into eight bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns a value into four bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns a value into eight bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns a value into sixteen bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns a value into sixteen bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + An exception thrown when the serialization system has encountered an issue so severe that serialization is being aborted. If this exception is caught in the serialization system somewhere, it should be rethrown. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exception. + + + + Defines the configuration during serialization and deserialization. This class is thread-safe. + + + + + Initializes a new instance of the class. + + + + + + Setting this member to true indicates that in the case where, when expecting to deserialize an instance of a certain type, + but encountering an incompatible, uncastable type in the data being read, the serializer should attempt to deserialize an + instance of the expected type using the stored, possibly invalid data. + + + This is equivalent to applying the attribute, except global + instead of specific to a single type. Note that if this member is set to false, individual types may still be deserialized + with invalid data if they are decorated with the attribute. + + + + + + Gets or sets the serialization policy. This value is never null; if set to null, it will default to . + + + The serialization policy. + + + + + Gets or sets the debug context. This value is never null; if set to null, a new default instance of will be created upon the next get. + + + The debug context. + + + + + Resets the configuration to a default configuration, as if the constructor had just been called. + + + + + Defines a context for debugging and logging during serialization and deserialization. This class is thread-safe. + + + + + The logger to use for logging messages. + + + + + The logging policy to use. + + + + + The error handling policy to use. + + + + + Log a warning. Depending on the logging policy and error handling policy, this message may be suppressed or result in an exception being thrown. + + + + + Log an error. Depending on the logging policy and error handling policy, this message may be suppressed or result in an exception being thrown. + + + + + Log an exception. Depending on the logging policy and error handling policy, this message may be suppressed or result in an exception being thrown. + + + + + The context of a given serialization session. This class maintains all internal and external references during serialization. + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The streaming context to use. + + + + Initializes a new instance of the class. + + The formatter converter to use. + + + + Initializes a new instance of the class. + + The streaming context to use. + The formatter converter to use. + The formatterConverter parameter is null. + + + + Gets or sets the context's type binder. + + + The context's serialization binder. + + + + + Gets the streaming context. + + + The streaming context. + + + + + Gets the formatter converter. + + + The formatter converter. + + + + + Gets or sets the index reference resolver. + + + The index reference resolver. + + + + + Gets or sets the string reference resolver. + + + The string reference resolver. + + + + + Gets or sets the Guid reference resolver. + + + The Guid reference resolver. + + + + + Gets or sets the serialization configuration. + + + The serialization configuration. + + + + + Tries to get the id of an internally referenced object. + + The reference to get the id of. + The id that was found, or -1 if no id was found. + true if a reference was found, otherwise false. + + + + Tries to register an internal reference. Returns true if the reference was registered, otherwise, false when the reference has already been registered. + + The reference to register. + The id of the registered reference. + true if the reference was registered, otherwise, false when the reference has already been registered. + + + + Tries to register an external index reference. + + The object to reference. + The index of the referenced object. + true if the object could be referenced by index; otherwise, false. + + + + Tries to register an external guid reference. + + The object to reference. + The guid of the referenced object. + true if the object could be referenced by guid; otherwise, false. + + + + Tries to register an external string reference. + + The object to reference. + The id string of the referenced object. + true if the object could be referenced by string; otherwise, false. + + + + Resets the context's internal reference map. + + + + + Resets the serialization context completely to baseline status, as if its constructor has just been called. + This allows complete reuse of a serialization context, with all of its internal reference buffers. + + + + + Contains a set of default implementations of the interface. + + NOTE: Policies are not necessarily compatible with each other in intuitive ways. + Data serialized with the policy + will for example fail to deserialize auto-properties with , + even if only strict data is needed. + It is best to ensure that you always use the same policy for serialization and deserialization. + + This class and all of its policies are thread-safe. + + + + + Tries to get a serialization policy by its id, in case a serialization graph has the policy used for serialization stored by name. + + + + + All fields not marked with are serialized. If a field is marked with both and , then the field will be serialized. + + + + + Public fields, as well as fields or auto-properties marked with or and not marked with , are serialized. + + There are two exceptions: + 1) All fields in tuples, as well as in private nested types marked as compiler generated (e.g. lambda capture classes) are also serialized. + 2) Virtual auto-properties are never serialized. Note that properties specified by an implemented interface are automatically marked virtual by the compiler. + + + + + Only fields and auto-properties marked with or and not marked with are serialized. + + There are two exceptions: + 1) All fields in private nested types marked as compiler generated (e.g. lambda capture classes) are also serialized. + 2) Virtual auto-properties are never serialized. Note that properties specified by an implemented interface are automatically marked virtual by the compiler. + + + + + Provides an array of utility wrapper methods for easy serialization and deserialization of objects of any type. + + + + + Creates an for a given format. + + The stream to write to. + The serialization context to use. + The format to write. + + An for a given format. + + + + + + Creates an for a given format. + + The stream to read from. + The deserialization context to use. + The format to read. + + An for a given format. + + + + + + Serializes the given value using the given writer. + + The value to serialize. + The writer to use. + + + + Serializes the given value, using the given writer. + + The value to serialize. + The writer to use. + A list of the Unity objects which were referenced during serialization. + + + + Serializes the given value using the given writer. + + The type of the value to serialize. + The value to serialize. + The writer to use. + + + + Serializes the given value, using the given writer. + + The type of the value to serialize. + The value to serialize. + The writer to use. + A list of the Unity objects which were referenced during serialization. + + + + Serializes the given value to a given stream in the specified format. + + The value to serialize. + The stream to serialize to. + The format to serialize in. + The context. + + + + Serializes the given value to a given stream in the specified format. + + The value to serialize. + The stream to serialize to. + The format to serialize in. + A list of the Unity objects which were referenced during serialization. + The context. + + + + Serializes the given value to a given stream in the specified format. + + The type of the value to serialize. + The value to serialize. + The stream to serialize to. + The format to serialize in. + The context. + + + + Serializes the given value to a given stream in the specified format. + + The type of the value to serialize. + The value to serialize. + The stream to serialize to. + The format to serialize in. + A list of the Unity objects which were referenced during serialization. + The context. + + + + Serializes the given value using the specified format, and returns the result as a byte array. + + The value to serialize. + The format to use. + The context. + A byte array containing the serialized value. + + + + Serializes the given value using the specified format, and returns the result as a byte array. + + The value to serialize. + The format to use. + A list of the Unity objects which were referenced during serialization. + A byte array containing the serialized value. + + + + Serializes the given value using the specified format, and returns the result as a byte array. + + The type of the value to serialize. + The value to serialize. + The format to use. + The context to use. + A byte array containing the serialized value. + + + + Serializes the given value using the specified format and returns the result as a byte array. + + The type of the value to serialize. + The value to serialize. + The format to use. + A list of the Unity objects which were referenced during serialization. + The context to use. + A byte array containing the serialized value. + + + + Deserializes a value from the given reader. This might fail with primitive values, as they don't come with metadata. + + The reader to use. + The deserialized value. + + + + Deserializes a value from the given reader, using the given list of Unity objects for external index reference resolution. This might fail with primitive values, as they don't come with type metadata. + + The reader to use. + The list of Unity objects to use for external index reference resolution. + + The deserialized value. + + + + + Deserializes a value from the given reader. + + The type to deserialize. + The reader to use. + The deserialized value. + + + + Deserializes a value of a given type from the given reader, using the given list of Unity objects for external index reference resolution. + + The type to deserialize. + The reader to use. + The list of Unity objects to use for external index reference resolution. + + The deserialized value. + + + + + Deserializes a value from the given stream in the given format. This might fail with primitive values, as they don't come with type metadata. + + The reader to use. + The format to read. + The context. + + The deserialized value. + + + + + Deserializes a value from the given stream in the given format, using the given list of Unity objects for external index reference resolution. This might fail with primitive values, as they don't come with type metadata. + + The stream to read from. + The format to read. + The list of Unity objects to use for external index reference resolution. + The context. + + The deserialized value. + + + + + Deserializes a value of a given type from the given stream in the given format. + + The type to deserialize. + The stream to read from. + The format to read. + The context. + + The deserialized value. + + + + + Deserializes a value of a given type from the given stream in the given format, using the given list of Unity objects for external index reference resolution. + + The type to deserialize. + The stream to read from. + The format to read. + The list of Unity objects to use for external index reference resolution. + The context. + + The deserialized value. + + + + + Deserializes a value from the given byte array in the given format. This might fail with primitive values, as they don't come with type metadata. + + The bytes to deserialize from. + The format to read. + The context. + + The deserialized value. + + + + + Deserializes a value from the given byte array in the given format, using the given list of Unity objects for external index reference resolution. This might fail with primitive values, as they don't come with type metadata. + + The bytes to deserialize from. + The format to read. + The list of Unity objects to use for external index reference resolution. + + The deserialized value. + + + + + Deserializes a value of a given type from the given byte array in the given format. + + The type to deserialize. + The bytes to deserialize from. + The format to read. + The context to use. + + The deserialized value. + + + + + Deserializes a value of a given type from the given byte array in the given format, using the given list of Unity objects for external index reference resolution. + + The type to deserialize. + The bytes to deserialize from. + The format to read. + The list of Unity objects to use for external index reference resolution. + The context to use. + + The deserialized value. + + + + + Creates a deep copy of an object. Returns null if null. All Unity objects references will remain the same - they will not get copied. + Similarly, strings are not copied, nor are reflection types such as System.Type, or types derived from System.Reflection.MemberInfo, + System.Reflection.Assembly or System.Reflection.Module. + + + + + Binds types to strings during serialization, and strings to types during deserialization. + + + + + Provides a default, catch-all implementation. This binder only includes assembly names, without versions and tokens, in order to increase compatibility. + + + + + Bind a type to a name. + + The type to bind. + The debug context to log to. + The name that the type has been bound to. + + + + Binds a name to a type. + + The name of the type to bind. + The debug context to log to. + The type that the name has been bound to, or null if the type could not be resolved. + + + + Determines whether the specified type name is mapped. + + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for all complex types; IE, types which are not primitives as determined by the method. + + The type which the can serialize and deserialize. + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for all enums. + + The type of the enum to serialize and deserialize. + + + + + Reads an enum value of type . + + The reader to use. + + The value which has been read. + + + + + Writes an enum value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializes and deserializes a given type, and wraps serialization and deserialization with all the proper calls to free formatters from tedious boilerplate. + + Whenever serializing or deserializing anything, it is *strongly recommended* to use to get a proper wrapping serializer for that type. + + NOTE: This class should NOT be inherited from; it is hard-coded into the system. + + To extend the serialization system, instead create custom formatters, which are used by the class. + + + + + Editor-only event that fires whenever a serializer serializes a type. + + + + + Fires the event. + + + + + Gets a for the given value. If the value is null, it will be treated as a value of type . + + The value to get a for. + A for the given value. + + + + Gets a for type T. + + The type to get a for. + A for type T. + + + + Gets a for the given type. + + The type to get a for. + A for the given type. + The type argument is null. + + + + Reads a value weakly, casting it into object. Use this method if you don't know what type you're going to be working with at compile time. + + The reader to use. + The value which has been read. + + + + Writes a weakly typed value. Use this method if you don't know what type you're going to be working with at compile time. + + The value to write. + The writer to use. + + + + Writes a weakly typed value with a given name. Use this method if you don't know what type you're going to be working with at compile time. + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializes and deserializes the type , and wraps serialization and deserialization with all the proper calls to free formatters from tedious boilerplate. + + Whenever serializing or deserializing anything, it is *strongly recommended* to use to get a proper wrapping serializer for that type. + + NOTE: This class should NOT be inherited from; it is hard-coded into the system. + + To extend the serialization system, instead create custom formatters, which are used by the class. + + The type which the can serialize and deserialize. + + + + Reads a value of type weakly, casting it into object. Use this method if you don't know what type you're going to be working with at compile time. + + The reader to use. + + The value which has been read. + + + + + Writes a weakly typed value of type with a given name. Use this method if you don't know what type you're going to be working with at compile time. + + The name of the value to write. + The value to write. + The writer to use. + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The value to write. + The writer to use. + + + + Writes a value of type with a given name. + + The name of the value to write. + The value to write. + The writer to use. + + + + Fires the event with the T generic argument of the serializer. + + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Scans the project's build scenes and resources, plus their dependencies, for serialized types to support. Progress bars are shown during the scan. + + The serialized types to support. + Whether to scan the project's build scenes. + Whether to scan all the project's asset bundles. + Whether to scan the project's preloaded assets. + Whether to scan the project's resources. + An optional list of the resource paths to scan. Only has an effect if the scanResources argument is true. All the resources will be scanned if null. + true if the scan succeeded, false if the scan failed or was cancelled + + + + Generates an AOT DLL, using the given parameters. + + + + + Not yet documented. + + Not yet documented. + + + + Not yet documented. + + + + + Not yet documented. + + Not yet documented. + Not yet documented. + + + + Not yet documented. + + Not yet documented. + Not yet documented. + + + + Not yet documented. + + Not yet documented. + Not yet documented. + Not yet documented. + + + + Provides utility methods for handling dictionary keys in the prefab modification system. + + + + + A smart comparer for dictionary keys, that uses the most appropriate available comparison method for the given key types. + + + + + Not yet documented. + + Not yet documented. + Not yet documented. + Not yet documented. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Gets the provider identifier. + + + + + Gets the path string from key. + + The key. + + + + Gets the key from path string. + + The path string. + + + + Compares the specified x. + + The x. + The y. + + + + Not yet documented. + + + + + Gets the path string from key. + + The key. + + + + Gets the key from path string. + + The path string. + + + + Compares the specified x. + + The x. + The y. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Dictionary key path provider for + + + + + Custom formatter for the type. + + + + + + Returns null. + + + A null value. + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + + Custom formatter for the type. + This serializes nothing and always deserializes null, + and only exists to ensure that no coroutine instances + are ever created by the serialization system, since they + will in almost all cases be invalid instances. + + + Invalid coroutine instances crash Unity instantly when + they are garbage collected. + + + + + + Gets the type that the formatter can serialize. + + + The type that the formatter can serialize. + + + + + Returns null. + + + + + Returns null. + + + + + Does nothing. + + + + + Does nothing. + + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom generic formatter for the , , and types. + + The type of UnityEvent that this formatter can serialize and deserialize. + + + + + Get an uninitialized object of type . + + + An uninitialized object of type . + + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Indicates that an Odin-serialized Unity object controls its own serialization format. Every time it is serialized, it will be asked which format to use. + + + + + Gets the format to use for serialization. + + + + + Indicates that an Odin-serialized Unity object provides its own serialization policy rather than using the default policy. + + Note that THE VALUES RETURNED BY THIS INTERFACE WILL OVERRIDE THE PARAMETERS PASSED TO and . + + + + + Indicates that an Odin-serialized Unity object supports prefab serialization. + + + + + Gets or sets the serialization data of the object. + + + + + Unity serialized data struct that contains all data needed by Odin serialization. + + + + + The name of the field. + + + + + The name of the field. + + + + + The name of the field. + + + + + The data format used by the serializer. This field will be automatically set to the format specified in the global serialization config + when the Unity object gets serialized, unless the Unity object implements the interface. + + + + + The serialized data when serializing with the Binray format. + + + + + All serialized Unity references. + + + + + Whether the object contains any serialized data. + + + + + Gets a value indicating whether the struct contains any data. + If this is false, then it could mean that Unity has not yet deserialized the struct. + + + + + The serialized data when serializing with the JSON format. + + + + + The reference to the prefab this is only populated in prefab scene instances. + + + + + All serialized Unity references. + + + + + All Odin serialized prefab modifications. + + + + + The serialized data when serializing with the Nodes format. + + + + + Resets all data. + + + + + Resolves external index references to Unity objects. + + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a list of Unity objects. + + The referenced Unity objects. + + + + Gets the currently referenced Unity objects. + + A list of the currently referenced Unity objects. + + + + Sets the referenced Unity objects of the resolver to a given list, or a new list if the value is null. + + The referenced Unity objects to set, or null if a new list is required. + + + + Determines whether the specified value can be referenced externally via this resolver. + + The value to reference. + The index of the resolved value, if it can be referenced. + + true if the reference can be resolved, otherwise false. + + + + + Tries to resolve the given reference index to a reference value. + + The index to resolve. + The resolved value. + + true if the index could be resolved to a value, otherwise false. + + + + + Resets this instance. + + + + + Utility class which initializes the Sirenix serialization system to be compatible with Unity. + + + + + Initializes the Sirenix serialization system to be compatible with Unity. + + + + + Provides an array of utility wrapper methods for easy serialization and deserialization of Unity objects of any type. + Note that, during serialization, it is always assumed that we are running on Unity's main thread. Deserialization can + happen on any thread, and all API's interacting with deserialization are thread-safe. + + Note that setting the IndexReferenceResolver on contexts passed into methods on this class will have no effect, as it will always + be set to a UnityReferenceResolver. + + + + + From the new scriptable build pipeline package + + + + + Note: it is assumed that code calling this is holding the DeserializePrefabCaches_LOCK lock, and will continue to hold it while the returned hashset is being modified + + + + + Whether to always force editor mode serialization. This member only exists in the editor. + + + + + Not yet documented. + + + + + Checks whether Odin will serialize a given member. + + The member to check. + Whether to allow serialization of members that will also be serialized by Unity. + The policy that Odin should be using for serialization of the given member. If this parameter is null, it defaults to . + True if Odin will serialize the member, otherwise false. + + + + Guesses whether or not Unity will serialize a given member. This is not completely accurate. + + The member to check. + True if it is guessed that Unity will serialize the member, otherwise false. + The parameter is null. + + + + Guesses whether or not Unity will serialize a given type. This is not completely accurate. + + The type to check. + True if it is guessed that Unity will serialize the type, otherwise false. + The parameter is null. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Creates an object with default values initialized in the style of Unity; strings will be "", classes will be instantiated recursively with default values, and so on. + + + + + In 2020.1, Unity changed EditorApplication.delayCall from a field to an event, meaning + we now have to use reflection to access it consistently across all versions of Unity. + + + + + FieldInfo method extensions. + + + + + Determines whether the specified field is an alias. + + The field to check. + + true if the specified field is an alias; otherwise, false. + + + + + Returns the original, backing field of an alias field if the field is an alias. + + The field to check. + /// if set to true an exception will be thrown if the field is not aliased. + + The field was not aliased; this only occurs if throwOnNotAliased is true. + + + + Garbage free enumerator methods. + + + + + Garbage free enumerator for lists. + + + + + Garbage free enumerator for dictionaries. + + + + + Garbage free enumator for dictionary values. + + + + + Garbage free enumerator for hashsets. + + + + + List iterator. + + + + + Creates a list iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Hashset iterator. + + + + + Creates a hashset iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Dictionary iterator. + + + + + Creates a dictionary iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Dictionary value iterator. + + + + + Creates a dictionary value iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Various LinQ extensions. + + + + + Perform an action on each item. + + The source. + The action to perform. + + + + Perform an action on each item. + + The source. + The action to perform. + + + + Add a collection to the end of another collection. + + The collection. + The collection to append. + + + + MemberInfo method extensions. + + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this member + + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this member + + + + + Returns the first found custom attribute of type T on this member + Returns null if none was found + + + + + Returns the first found non-inherited custom attribute of type T on this member + Returns null if none was found + + + + + Gets all attributes of the specified generic type. + + The member. + + + + Gets all attributes of the specified generic type. + + The member. + If true, specifies to also search the ancestors of element for custom attributes. + + + + Gets all attribute instances defined on a MemeberInfo. + + The member. + + + + Gets all attribute instances on a MemberInfo. + + The member. + If true, specifies to also search the ancestors of element for custom attributes. + + + + If this member is a method, returns the full method name (name + params) otherwise the member name paskal splitted + + + + + Determines whether a FieldInfo, PropertyInfo or MethodInfo is static. + + The member. + + true if the specified member is static; otherwise, false. + + + + + + Determines whether the specified member is an alias. + + The member to check. + + true if the specified member is an alias; otherwise, false. + + + + + Returns the original, backing member of an alias member if the member is an alias. + + The member to check. + /// if set to true an exception will be thrown if the member is not aliased. + + The member was not aliased; this only occurs if throwOnNotAliased is true. + + + + Various extensions for MethodInfo. + + + + + Returns the specified method's full name "methodName(argType1 arg1, argType2 arg2, etc)" + Uses the specified gauntlet to replaces type names, ex: "int" instead of "Int32" + + + + + Returns a string representing the passed method parameters names. Ex "int num, float damage, Transform target" + + + + + Returns the specified method's full name. + + + + + Tests if a method is an extension method. + + + + + Determines whether the specified method is an alias. + + The method to check. + + true if the specified method is an alias; otherwise, false. + + + + + Returns the original, backing method of an alias method if the method is an alias. + + The method to check. + /// if set to true an exception will be thrown if the method is not aliased. + + The method was not aliased; this only occurs if throwOnNotAliased is true. + + + + Determines the type of operator. + + + + + + The == operator. + + + + + The != operator. + + + + + The + operator. + + + + + The - operator. + + + + + The * operator. + + + + + The / operator. + + + + + The < operator. + + + + + The > operator. + + + + + The <= operator. + + + + + The >= operator. + + + + + The % operator. + + + + + The >> operator. + + + + + The << operator. + + + + + The & operator. + + + + + The | operator. + + + + + The ^ operator. + + + + + The ~ operator. + + + + + The && operator. + + + + + The || operator. + + + + + The ! operator. + + + + + DirectoryInfo method extensions. + + + + + Determines whether the directory has a given directory in its hierarchy of children. + + The parent directory. + The sub directory. + + + + PropertyInfo method extensions. + + + + + Determines whether a property is an auto property with a usable getter and setter. + + + + + Determines whether the specified property is an alias. + + The property to check. + + true if the specified property is an alias; otherwise, false. + + + + + Returns the original, backing property of an alias property if the property is an alias. + + The property to check. + /// if set to true an exception will be thrown if the property is not aliased. + + The property was not aliased; this only occurs if throwOnNotAliased is true. + + + + String method extensions. + + + + + Eg MY_INT_VALUE => MyIntValue + + + + + Returns true if this string is null, empty, or contains only whitespace. + + The string to check. + true if this string is null, empty, or contains only whitespace; otherwise, false. + + + + Type method extensions. + + + + + Type name alias lookup. + TypeNameAlternatives["Single"] will give you "float", "UInt16" will give you "ushort", "Boolean[]" will give you "bool[]" etc.. + + + + + Checks whether a given string is a valid CSharp identifier name. This also checks full type names including namespaces. + + The identifier to check. + + + + Determines whether a type can be casted to another type. + + From. + To. + if set to true an implicit or explicit operator must be defined on the given type. + + + + If a type can be casted to another type, this provides a function to manually convert the type. + + From. + To. + if set to true an implicit or explicit operator must be defined on the given type. + + + + If a type can be casted to another type, this provides a function to manually convert the type. + + if set to true an implicit or explicit operator must be defined on the given type. + + + + If a type can be casted to another type, this provides the method info of the method in charge of converting the type. + + From. + To. + if set to true an implicit or explicit operator must be defined on the given type. + + + + Gets an equality comparer delegate used to compare the equality of values of a given type. In order, this will be: + + 1. The == operator, if one is defined on the type. + 2. A delegate that uses , if the type implements that interface. + 3. .NET's own + + + Note that in the special case of the type , a special equality comparer is returned that only checks whether all the Quaternion components are equal. + This is because, by default, Quaternion's equality operator is broken when operating on invalid quaternions; "default(Quaternion) == default(Quaternion)" evaluates to false, and this causes a multitude of problems. + Special delegates are also returned for float and double, that consider float.NaN to be equal to float.NaN, and double.NaN to be equal to double.NaN. + + + + + Gets the first attribute of type T. Returns null in the no attribute of type T was found. + + The type. + If true, specifies to also search the ancestors of element for custom attributes. + + + + Determines whether a type implements or inherits from another type. + + The type. + To. + + + + Determines whether a type implements an open generic interface or class such as IList<> or List<>. + + Type of the candidate. + Type of the open generic type. + + + + + Determines whether a type implements an open generic interface such as IList<>. + + Type of the candidate. + Type of the open generic interface. + + Type " + openGenericInterfaceType.Name + " is not a generic type definition and an interface. + + + + Determines whether a type implements an open generic class such as List<>. + + Type of the candidate. + Type of the open generic interface. + + + + Gets the generic arguments of an inherited open generic class or interface. + + Type of the candidate. + The open generic type to get the arguments of. + + + + Gets the generic arguments of an inherited open generic class. + + Type of the candidate. + Type of the open generic class. + + + + Gets the generic arguments of an inherited open generic interface. + + Type of the candidate. + Type of the open generic interface. + + + + Gets the MethodInfo of a specific operator kind, with the given left and right operands. This overload is *far* faster than any of the other GetOperatorMethod implementations, and should be used whenever possible. + + + + + Gets the MethodInfo of a specific operator type. + + + + + Gets the MethodInfo of a specific operator type. + + + + + Gets all members from a given type, including members from all base types if the flag isn't set. + + + + + Gets all members from a given type, including members from all base types. + + + + + Gets all members of a specific type from a type, including members from all base types, if the flag isn't set. + + + + + Gets the generic type definition of an open generic base type. + + + + + Gets the generic type definition of an open generic base type. + + + + + Returns a lazy enumerable of all the base types of this type including interfaces and classes + + + + + Returns a lazy enumerable of all the base classes of this type + + + + + Used to filter out unwanted type names. Ex "int" instead of "Int32" + + + + + Returns a nicely formatted name of a type. + + + + + Returns a nicely formatted full name of a type. + + + + + Gets the name of the compilable nice. + + The type. + + + + Gets the full name of the compilable nice. + + The type. + + + + Returns the first found custom attribute of type T on this type + Returns null if none was found + + + + + Returns the first found non-inherited custom attribute of type T on this type + Returns null if none was found + + + + + Gets all attributes of type T. + + The type. + + + + Gets all attributes of type T. + + The type + If true, specifies to also search the ancestors of element for custom attributes. + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this type + + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this type + + + + + Determines whether a type inherits or implements another type. Also include support for open generic base types such as List<>. + + + + + + Determines whether a type inherits or implements another type. Also include support for open generic base types such as List<>. + + + + + + + Gets the number of base types between given type and baseType. + + + + + Determines whether a method has the specified parameter types. + + + + + FieldInfo will return the fieldType, propertyInfo the PropertyType, MethodInfo the return type and EventInfo will return the EventHandlerType. + + The MemberInfo. + + + + Gets the value contained in a given . Currently only and is supported. + + The to get the value of. + The instance to get the value from. + The value contained in the given . + Can't get the value of the given type. + + + + Sets the value of a given MemberInfo. Currently only and is supported. + + The to set the value of. + The object to set the value on. + The value to set. + + Property has no setter + or + Can't set the value of the given type. + + + + + Tries to infer a set of valid generic parameters for a generic type definition, given a subset of known parameters. + + The generic type definition to attempt to infer parameters for. + The inferred parameters, if inferral was successful. + The known parameters to infer from. + True if the parameters could be inferred, otherwise, false. + + genericTypeDefinition is null + or + knownParameters is null + + The genericTypeDefinition parameter must be a generic type definition. + + + + Checks whether an array of types satisfy the constraints of a given generic type definition. + If this method returns true, the given parameters can be safely used with with the given generic type definition. + + The generic type definition to check. + The parameters to check validity for. + + genericType is null + or + types is null + + The genericType parameter must be a generic type definition. + + + + Checks whether an array of types satisfy the constraints of a given generic method definition. + If this method returns true, the given parameters can be safely used with with the given generic method definition. + + The generic method definition to check. + The parameters to check validity for. + + genericType is null + or + types is null + + The genericMethod parameter must be a generic method definition. + + + + Before calling this method we must ALWAYS hold a lock on the GenericConstraintsSatisfaction_LOCK object, as that is an implicit assumption it works with. + + + + + Not yet documented. + + + + + Formats a string with the specified generic parameter constraints on any given type. Example output: where T : class + + + + + Determines whether a generic type contains the specified generic argument constraints. + + The type. + The generic argument types. + + + + Determines whether a type is a fully constructed generic type. + + + + + Determines whether a type is nullable by ensuring the type is neither a PrimitiveType, ValueType or an Enum. + + + + + Gets the enum bitmask in a ulong. + + enumType + + + + Extends various Unity classes. + + + + + Determines whether a Unity object is null or "fake null", + without ever calling Unity's own equality operators. + This method is useful for checking if a Unity object is + null, destroyed or missing at times when it is not allowed + to call Unity's own equality operators, for example when + not running on the main thread. + + The Unity object to check. + True if the object is null, missing or destroyed; otherwise false. + + + + Defines how an assembly's import settings should be configured. + + + + + Include the assembly in the build, but not in the editor. + + + + + Include the assembly in the editor, but not in the build. + + + + + Include the assembly in both the build and in the editor. + + + + + Exclude the assembly from both the build and from the editor. + + + + + Utility for correctly setting import on OdinSerializer assemblies based on platform and scripting backend. + + + + + All valid Unity BuildTarget platforms. + + + + + All valid Unity BuildTarget platforms that support Just In Time compilation. + + + + + All scripting backends that support JIT. + + + + + All API compatibility levels that support JIT. + + + + + Set the import settings on the assembly. + + The path to the assembly to configure import settings from. + The import settings to configure for the assembly at the path. + + + + Set the import settings on the assembly. + + The path to the assembly to configure import settings from. + Indicates if the assembly should be included in the build. + Indicates if the assembly should be included in the Unity editor. + + + + Gets the current scripting backend for the build from the Unity editor. This method is Unity version independent. + + + + + + Gets the current API compatibility level from the Unity Editor. This method is Unity version independent. + + + + + + Gets a value that indicates if the specified platform supports JIT. + + The platform to test. + true if the platform supports JIT; otherwise false. + + + + Gets a value that indicates if the specified scripting backend supports JIT. + + The backend to test. + true if the backend supports JIT; otherwise false. + + + + Gets a value that indicates if the specified api level supports JIT. + + The api level to test. + true if the api level supports JIT; otherwise false. + + + + Gets a value that indicates if the specified build settings supports JIT. + + The platform build setting. + The scripting backend build settting. + The api level build setting. + true if the build settings supports JIT; otherwise false. + + + + Provides an easy way of claiming and freeing cached values of any non-abstract reference type with a public parameterless constructor. + + Cached types which implement the interface will receive notifications when they are claimed and freed. + + Only one thread should be holding a given cache instance at a time if is implemented, since the invocation of + is not thread safe, IE, weird stuff might happen if multiple different threads are trying to free + the same cache instance at the same time. This will practically never happen unless you're doing really strange stuff, but the case is documented here. + + The type which is cached. + + + + + Gets or sets the maximum size of the cache. This value can never go beneath 1. + + + The maximum size of the cache. + + + + + The cached value. + + + + + Gets a value indicating whether this cached value is free. + + + true if this cached value is free; otherwise, false. + + + + + Claims a cached value of type . + + A cached value of type . + + + + Releases a cached value. + + The cached value to release. + The cached value to release is null. + + + + Performs an implicit conversion from to . + + The cache to convert. + + The result of the conversion. + + + + + Releases this cached value. + + + + + Releases this cached value. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Provides utilities for using the namespace. + + This class is due for refactoring. Use at your own peril. + + + + + Gets a value indicating whether emitting is supported on the current platform. + + + true if the current platform can emit; otherwise, false. + + + + + Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the field to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the field to set a value to. + The instance describing the field to create a setter for. + A delegate which sets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The instance describing the field to create a setter for. + A delegate which sets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the instance to get a value from. + The type of the field to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the field to get a value from. + The of the instance to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the weakly typed value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The of the instance to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the instance to set a value on. + The type of the field to set a value to. + The instance describing the field to create a setter for. + A delegate which sets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the field to set a value to. + Type of the instance. + The instance describing the field to create a setter for. + + A delegate which sets the value of the given field. + + The fieldInfo parameter is null. + Field cannot be static. + + + + Creates a delegate which sets the weakly typed value of a field on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + Type of the instance. + The instance describing the field to create a setter for. + + A delegate which sets the value of the given field. + + The fieldInfo parameter is null. + Field cannot be static. + + + + Creates a delegate which gets the weakly typed value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The of the instance to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the weakly typed value of a property on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + Type of the instance. + The instance describing the property to create a setter for. + + A delegate which sets the value of the given field. + + The fieldInfo parameter is null. + Property cannot be static. + + + + Creates a delegate which sets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the property to set a value to. + The instance describing the property to create a setter for. + A delegate which sets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a delegate which gets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the property to get a value from. + The instance describing the property to create a getter for. + A delegate which gets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a delegate which sets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the instance to set a value on. + The type of the property to set a value to. + The instance describing the property to create a setter for. + A delegate which sets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a delegate which gets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the instance to get a value from. + The type of the property to get a value from. + The instance describing the property to create a getter for. + A delegate which gets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a fast delegate method which calls a given parameterless instance method and returns the result. + + The type of the class which the method is on. + The type which is returned by the given method info. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given parameterless static method. + + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given parameterless weakly typed instance method. + + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Not yet documented. + + + + + Creates a fast delegate method which calls a given weakly typed instance method with one argument and returns a value. + + The type of the result. + The type of the first argument. + The method info instance which is used. + + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + methodInfo + + Given method ' + methodInfo.Name + ' is static when it has to be an instance method. + or + Given method ' + methodInfo.Name + ' must return type + typeof(TResult) + . + or + Given method ' + methodInfo.Name + ' must have exactly one parameter. + or + The first parameter of the method ' + methodInfo.Name + ' must be of type + typeof(TArg1) + . + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Creates a fast delegate method which calls a given parameterless instance method on a reference type. + + The type of the class which the method is on. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given instance method with a given argument on a reference type. + + The type of the class which the method is on. + The type of the argument with which to call the method. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given parameterless instance method. + + The type of the class which the method is on. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given instance method with a given argument on a struct type. + + The type of the class which the method is on. + The type of the argument with which to call the method. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Compares types by reference before comparing them using the default type equality operator. + This can constitute a *significant* speedup when used as the comparer for dictionaries. + + + + + + This class encapsulates common combinations. + + + + + Search criteria encompassing all public and non-public members, including base members. + Note that you also need to specify either the Instance or Static flag. + + + + + Search criteria encompassing all public instance members, including base members. + + + + + Search criteria encompassing all non-public instance members, including base members. + + + + + Search criteria encompassing all public and non-public instance members, including base members. + + + + + Search criteria encompassing all public static members, including base members. + + + + + Search criteria encompassing all non-public static members, including base members. + + + + + Search criteria encompassing all public and non-public static members, including base members. + + + + + Search criteria encompassing all public instance members, excluding base members. + + + + + Search criteria encompassing all non-public instance members, excluding base members. + + + + + Search criteria encompassing all public and non-public instance members, excluding base members. + + + + + Search criteria encompassing all public static members, excluding base members. + + + + + Search criteria encompassing all non-public static members, excluding base members. + + + + + Search criteria encompassing all public and non-public static members, excluding base members. + + + + + Search criteria encompassing all members, including base and static members. + + + + + Search criteria encompassing all members (public and non-public, instance and static), including base members. + + + + + Provides notification callbacks for values that are cached using the class. + + + + + Called when the cached value is freed. + + + + + Called when the cached value is claimed. + + + + + Interface for immutable list. + + + + + Interface for generic immutable list. + + + + + Index accessor. + + + + + Immutable list wraps another list, and allows for reading the inner list, without the ability to change it. + + + + + Creates an immutable list around another list. + + + + + Number of items in the list. + + + + + Immutable list cannot be changed directly, so it's size is always fixed. + + + + + Immutable list are always readonly. + + + + + Returns true if the inner list is synchronized. + + + + + Gets the sync root object. + + + + + Index accessor. + + Index. + + + + Returns true if the item is contained in the list. + + The item's value. + + + + Copy the list to an array, + + Target array. + Index. + + + + Copy the list to an array, + + Target array. + Index. + + + + Gets an enumerator. + + + + + Get the index of a value. + + The item's value. + + + + Immutable list cannot be edited. + + Index. + + + + Immutable list cannot be edited. + + Index. + Item. + + + + Immutable list cannot be edited. + + Item. + + + + Immutable list cannot be edited. + + + + + Immutable list cannot be edited. + + Item. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Immutable list wraps another list, and allows for reading the inner list, without the ability to change it. + + + + + Creates an immutable list around another list. + + + + + Number of items in the list. + + + + + Immutable list are always readonly. + + + + + Index accessor. + + Index. + + + + Returns true if the item is contained in the list. + + + + + Copies the list to an array. + + + + + Gets an enumerator. + + + + + Gets the index of an item. + + + + + Provides a methods of representing imaginary fields which are unique to serialization. + + We aggregate the FieldInfo associated with this member and return a mangled form of the name. + + + + + + The default fake name separator string. + + + + + Initializes a new instance of the class. + + The field to alias. + The name prefix to use. + + + + Initializes a new instance of the class. + + The field to alias. + The name prefix to use. + The separator string to use. + + + + Gets the aliased field. + + + The aliased field. + + + + + Gets the module in which the type that declares the member represented by the current is defined. + + + + + Gets a value that identifies a metadata element. + + + + + Gets the name of the current member. + + + + + Gets the class that declares this member. + + + + + Gets the class object that was used to obtain this instance of MemberInfo. + + + + + Gets the type of the field. + + + The type of the field. + + + + + Gets a RuntimeFieldHandle, which is a handle to the internal metadata representation of a field. + + + + + Gets the attributes. + + + The attributes. + + + + + When overridden in a derived class, returns an array of all custom attributes applied to this member. + + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined. + + + + + When overridden in a derived class, returns an array of custom attributes applied to this member and identified by . + + The type of attribute to search for. Only attributes that are assignable to this type are returned. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied. + + + + + When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. + + The type of custom attribute to search for. The search includes derived types. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + True if one or more instances of or any of its derived types is applied to this member; otherwise, false. + + + + + Gets the value of the field. + + The object instance to get the value from. + The value of the field. + + + + When overridden in a derived class, sets the value of the field supported by the given object. + + The object whose field value will be set. + The value to assign to the field. + A field of Binder that specifies the type of binding that is desired (for example, Binder.CreateInstance or Binder.ExactBinding). + A set of properties that enables the binding, coercion of argument types, and invocation of members through reflection. If is null, then Binder.DefaultBinding is used. + The software preferences of a particular culture. + + + + Provides a methods of representing aliased methods. + + In this case, what we're representing is a method on a parent class with the same name. + + We aggregate the MethodInfo associated with this member and return a mangled form of the name. + The name that we return is "parentname+methodName". + + + + + + The default fake name separator string. + + + + + Initializes a new instance of the class. + + The method to alias. + The name prefix to use. + + + + Initializes a new instance of the class. + + The method to alias. + The name prefix to use. + The separator string to use. + + + + Gets the aliased method. + + + The aliased method. + + + + + Gets the custom attributes for the return type. + + + + + Gets a handle to the internal metadata representation of a method. + + + + + Gets the attributes associated with this method. + + + + + Gets the class that declares this member. + + + + + Gets the name of the current member. + + + + + Gets the class object that was used to obtain this instance of MemberInfo. + + + + + When overridden in a derived class, returns the MethodInfo object for the method on the direct or indirect base class in which the method represented by this instance was first declared. + + + A MethodInfo object for the first implementation of this method. + + + + + When overridden in a derived class, returns an array of all custom attributes applied to this member. + + true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined. + + + + + When overridden in a derived class, returns an array of custom attributes applied to this member and identified by . + + The type of attribute to search for. Only attributes that are assignable to this type are returned. + true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied. + + + + + When overridden in a derived class, returns the flags. + + + The MethodImplAttributes flags. + + + + + When overridden in a derived class, gets the parameters of the specified method or constructor. + + + An array of type ParameterInfo containing information that matches the signature of the method (or constructor) reflected by this MethodBase instance. + + + + + When overridden in a derived class, invokes the reflected method or constructor with the given parameters. + + The object on which to invoke the method or constructor. If a method is static, this argument is ignored. If a constructor is static, this argument must be null or an instance of the class that defines the constructor. + A bitmask that is a combination of 0 or more bit flags from . If is null, this parameter is assigned the value ; thus, whatever you pass in is ignored. + An object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects via reflection. If is null, the default binder is used. + An argument list for the invoked method or constructor. This is an array of objects with the same number, order, and type as the parameters of the method or constructor to be invoked. If there are no parameters, this should be null.If the method or constructor represented by this instance takes a ByRef parameter, there is no special attribute required for that parameter in order to invoke the method or constructor using this function. Any object in this array that is not explicitly initialized with a value will contain the default value for that object type. For reference-type elements, this value is null. For value-type elements, this value is 0, 0.0, or false, depending on the specific element type. + An instance of CultureInfo used to govern the coercion of types. If this is null, the CultureInfo for the current thread is used. (This is necessary to convert a String that represents 1000 to a Double value, for example, since 1000 is represented differently by different cultures.) + + An Object containing the return value of the invoked method, or null in the case of a constructor, or null if the method's return type is void. Before calling the method or constructor, Invoke checks to see if the user has access permission and verifies that the parameters are valid.CautionElements of the array that represent parameters declared with the ref or out keyword may also be modified. + + + + + When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. + + The type of custom attribute to search for. The search includes derived types. + true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + true if one or more instances of or any of its derived types is applied to this member; otherwise, false. + + + + + Provides a methods of representing imaginary properties which are unique to serialization. + + We aggregate the PropertyInfo associated with this member and return a mangled form of the name. + + + + + + The default fake name separator string. + + + + + Initializes a new instance of the class. + + The property to alias. + The name prefix to use. + + + + Initializes a new instance of the class. + + The property to alias. + The name prefix to use. + The separator string to use. + + + + The backing PropertyInfo that is being aliased. + + + + + Gets the module in which the type that declares the member represented by the current is defined. + + + + + Gets a value that identifies a metadata element. + + + + + Gets the name of the current member. + + + + + Gets the class that declares this member. + + + + + Gets the class object that was used to obtain this instance of MemberInfo. + + + + + Gets the type of the property. + + + The type of the property. + + + + + Gets the attributes. + + + The attributes. + + + + + Gets a value indicating whether this instance can read. + + + true if this instance can read; otherwise, false. + + + + + Gets a value indicating whether this instance can write. + + + true if this instance can write; otherwise, false. + + + + + When overridden in a derived class, returns an array of all custom attributes applied to this member. + + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined. + + + + + When overridden in a derived class, returns an array of custom attributes applied to this member and identified by . + + The type of attribute to search for. Only attributes that are assignable to this type are returned. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied. + + + + + When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. + + The type of custom attribute to search for. The search includes derived types. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + True if one or more instances of or any of its derived types is applied to this member; otherwise, false. + + + + + Returns an array whose elements reflect the public and, if specified, non-public get, set, and other accessors of the property reflected by the current instance. + + Indicates whether non-public methods should be returned in the MethodInfo array. true if non-public methods are to be included; otherwise, false. + + An array of objects whose elements reflect the get, set, and other accessors of the property reflected by the current instance. If is true, this array contains public and non-public get, set, and other accessors. If is false, this array contains only public get, set, and other accessors. If no accessors with the specified visibility are found, this method returns an array with zero (0) elements. + + + + + When overridden in a derived class, returns the public or non-public get accessor for this property. + + Indicates whether a non-public get accessor should be returned. true if a non-public accessor is to be returned; otherwise, false. + + A MethodInfo object representing the get accessor for this property, if is true. Returns null if is false and the get accessor is non-public, or if is true but no get accessors exist. + + + + + Gets the index parameters of the property. + + The index parameters of the property. + + + + When overridden in a derived class, returns the set accessor for this property. + + Indicates whether the accessor should be returned if it is non-public. true if a non-public accessor is to be returned; otherwise, false. + + Value Condition A object representing the Set method for this property. The set accessor is public.-or- is true and the set accessor is non-public. null is true, but the property is read-only.-or- is false and the set accessor is non-public.-or- There is no set accessor. + + + + + Gets the value of the property on the given instance. + + The object to invoke the getter on. + The to invoke with. + The binder to use. + The indices to use. + The culture to use. + The value of the property on the given instance. + + + + Sets the value of the property on the given instance. + + The object to set the value on. + The value to set. + The to invoke with. + The binder to use. + The indices to use. + The culture to use. + + + + Compares objects by reference only, ignoring equality operators completely. This is used by the property tree reference dictionaries to keep track of references. + + + + + A default, cached instance of this generic variant of the reference equality comparer. + + + + + Returns true if the object references are equal. + + + + + Returns the result of the object's own GetHashCode method. + + + + + Utility class indicating current Unity version. + + + + + Tests current Unity version is equal or greater. + + Minimum major version. + Minimum minor version. + true if the current Unity version is greater. Otherwise false. + + + + The current Unity version major. + + + + + The current Unity version minor. + + + + + Contains utilities for performing common unsafe operations. + + + + + Blindly creates an array of structs from an array of bytes via direct memory copy/blit. + + + + + Blindly creates an array of structs from an array of bytes via direct memory copy/blit. + + + + + Blindly copies an array of structs into an array of bytes via direct memory copy/blit. + + + + + Blindly copies an array of structs into an array of bytes via direct memory copy/blit. + + + + + Creates a new string from the contents of a given byte buffer. + + + + + Writes the contents of a string into a given byte buffer. + + + + + Blindly mem-copies a given number of bytes from the memory location of one object to another. WARNING: This method is ridiculously dangerous. Only use if you know what you're doing. + + + + + A Unity Behaviour which is serialized by the Sirenix serialization system. + + + + + Invoked after deserialization has taken place. + + + + + Invoked before serialization has taken place. + + + + + A Unity Component which is serialized by the Sirenix serialization system. + + + + + Invoked after deserialization has taken place. + + + + + Invoked before serialization has taken place. + + + + + A Unity MonoBehaviour which is serialized by the Sirenix serialization system. + + + + + Invoked after deserialization has taken place. + + + + + Invoked before serialization has taken place. + + + + + A Unity ScriptableObject which is serialized by the Sirenix serialization system. + + + + + Invoked after deserialization has taken place. + + + + + Invoked before serialization has taken place. + + + + + A Unity StateMachineBehaviour which is serialized by the Sirenix serialization system. + + + + + Invoked after deserialization has taken place. + + + + + Invoked before serialization has taken place. + + + + + A Unity ScriptableObject which is serialized by the Sirenix serialization system. + + + + + Invoked after deserialization has taken place. + + + + + Invoked before serialization has taken place. + + + + diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.xml.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.xml.meta new file mode 100644 index 0000000..dc046e8 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5f3147f7af4c49739579b966c458096f +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll new file mode 100644 index 0000000..c909d52 Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll.meta new file mode 100644 index 0000000..66668bb --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 5c65184932ff4fd48a343e2360256baf +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml new file mode 100644 index 0000000..d2ec54d --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml @@ -0,0 +1,9764 @@ + + + + Sirenix.Utilities.Editor + + + + + Icon for using in editor GUI. + + + + + Gets the raw input icon texture. + + + + + Gets the icon's highlighted texture. + + + + + Gets the icon's active texture. + + + + + Gets the icon's inactive texture. + + + + + Gets a GUIContent object with the active texture. + + + + + Gets a GUIContent object with the inactive texture. + + + + + Gets a GUIContent object with the highlighted texture. + + + + + Draws the icon in a square rect, with a custom shader that makes the icon look better when down-scaled. + This also handles mouseover effects, and linier color spacing. + + + + + Draws the icon in a square rect, with a custom shader that makes the icon look better when down-scaled. + This also handles mouseover effects, and linier color spacing. + + + + + Draws the icon in a square rect, with a custom shader that makes the icon look better when down-scaled. + This also handles mouseover effects, and linier color spacing. + + + + + Collection of EditorIcons for use in GUI drawing. + + + + + Gets an icon of an airplane symbol. + + + + + Gets an icon of an alert circle symbol. + + + + + Gets an icon of an alert triangle symbol. + + + + + Gets an icon of an arrow down symbol. + + + + + Gets an icon of an arrow left symbol. + + + + + Gets an icon of an arrow right symbol. + + + + + Gets an icon of an arrow up symbol. + + + + + Gets an icon of a bell symbol. + + + + + Gets an icon of a car symbol. + + + + + Gets an icon of a char1 symbol. + + + + + Gets an icon of a char2 symbol. + + + + + Gets an icon of a char3 symbol. + + + + + Gets an icon of a char graph symbol. + + + + + Gets an icon of a checkmark symbol. + + + + + Gets an icon of a clock symbol. + + + + + Gets an icon of a clouds symbol. + + + + + Gets an icon of a clouds rainy symbol. + + + + + Gets an icon of a clouds rainy sunny symbol. + + + + + Gets an icon of a clouds rainy thunder symbol. + + + + + Gets an icon of a clouds thunder symbol. + + + + + Gets an icon of a crosshair symbol. + + + + + Gets an icon of a cut symbol. + + + + + Gets an icon of a day calendar symbol. + + + + + Gets an icon of a download symbol. + + + + + Gets an icon of an eject symbol. + + + + + Gets an icon of an eye dropper symbol. + + + + + Gets an icon of a female symbol. + + + + + Gets an icon of a file symbol. + + + + + Gets an icon of a file cabinet symbol. + + + + + Gets an icon of a finnish banner symbol. + + + + + Gets an icon of a flag symbol. + + + + + Gets an icon of a flag finnish symbol. + + + + + Gets an icon of a folder symbol. + + + + + Gets an icon of a folder back symbol. + + + + + Gets an icon of a gKey symbol. + + + + + Gets an icon of a globe symbol. + + + + + Gets an icon of a grid blocks symbol. + + + + + Gets an icon of a grid image text symbol. + + + + + Gets an icon of a grid image text list symbol. + + + + + Gets an icon of a grid layout symbol. + + + + + Gets an icon of a hamburger menu symbol. + + + + + Gets an icon of a house symbol. + + + + + Gets an icon of an image symbol. + + + + + Gets an icon of an image collection symbol. + + + + + Gets an icon of an info symbol. + + + + + Gets an icon of a letter symbol. + + + + + Gets an icon of a light bulb symbol. + + + + + Gets an icon of a link symbol. + + + + + Gets an icon of a list symbol. + + + + + Gets an icon of a loading bar symbol. + + + + + Gets an icon of a lock locked symbol. + + + + + Gets an icon of a lock unlocked symbol. + + + + + Gets an icon of a lock unlocked symbol. Obsolete; use the correctly spelled LockUnlocked instead. + + + + + Gets an icon of a magnifying glass symbol. + + + + + Gets an icon of a male symbol. + + + + + Gets an icon of a marker symbol. + + + + + Gets an icon of a maximize symbol. + + + + + Gets an icon of a microphone symbol. + + + + + Gets an icon of a minimize symbol. + + + + + Gets an icon of a minus symbol. + + + + + Gets an icon of a mobile phone symbol. + + + + + Gets an icon of a money symbol. + + + + + Gets an icon of a move symbol. + + + + + Gets an icon of a multi user symbol. + + + + + Gets an icon of a next symbol. + + + + + Gets an icon of a pacman ghost symbol. + + + + + Gets an icon of a paperclip symbol. + + + + + Gets an icon of a pause symbol. + + + + + Gets an icon of a pen symbol. + + + + + Gets an icon of a pen add symbol. + + + + + Gets an icon of a pen minus symbol. + + + + + Gets an icon of a play symbol. + + + + + Gets an icon of a plus symbol. + + + + + Gets an icon of a podium symbol. + + + + + Gets an icon of a previous symbol. + + + + + Gets an icon of a reception signal symbol. + + + + + Gets an icon of a redo symbol. + + + + + Gets an icon of a refresh symbol. + + + + + Gets an icon of a rotate symbol. + + + + + Gets an icon of a ruler symbol. + + + + + Gets an icon of a ruler rect symbol. + + + + + Gets an icon of a settings cog symbol. + + + + + Gets an icon of a shopping basket symbol. + + + + + Gets an icon of a shopping cart symbol. + + + + + Gets an icon of a single user symbol. + + + + + Gets an icon of a smart phone symbol. + + + + + Gets an icon of a sound symbol. + + + + + Gets an icon of a speech bubble round symbol. + + + + + Gets an icon of a speech bubble square symbol. + + + + + Gets an icon of a speech bubbles round symbol. + + + + + Gets an icon of a speech bubbles square symbol. + + + + + Gets an icon of a star pointer symbol. + + + + + Gets an icon of a stop symbol. + + + + + Gets an icon of a stretch symbol. + + + + + Gets an icon of a table symbol. + + + + + Gets an icon of a tag symbol. + + + + + Gets an icon of a test tube symbol. + + + + + Gets an icon of a timer symbol. + + + + + Gets an icon of a traffic stop light symbol. + + + + + Gets an icon of a transparent symbol. + + + + + Gets an icon of a tree symbol. + + + + + Gets an icon of a triangle down symbol. + + + + + Gets an icon of a triangle left symbol. + + + + + Gets an icon of a triangle right symbol. + + + + + Gets an icon of a triangle up symbol. + + + + + Gets an icon of an undo symbol. + + + + + Gets an icon of an upload symbol. + + + + + Gets an icon of a wifi signal symbol. + + + + + Gets an icon of an x symbol. + + + + + Gets a texture of a test inconclusive symbol. + + + + + Gets a texture of a test failed symbol. + + + + + Gets a texture of a test normal symbol. + + + + + Gets a texture of a test passed symbol. + + + + + Gets a texture of a console info icon symbol. + + + + + Gets a texture of a console warnicon symbol. + + + + + Gets a texture of a console error icon symbol. + + + + + Gets a texture of an odin inspector logo symbol. + + + + + Gets a texture of a scene asset icon symbol. + + + + + Gets an icon representing a GameObject. + + + + + Gets an icon of a unity info icon. + + + + + Gets an icon of a unity warning icon. + + + + + Gets an icon of a unity error icon. + + + + + Gets an icon of a unity folder. + + + + + Gets the dark mode version of the ObjectFieldButton texture. + + + + + Gets the light mode version of the ObjectFieldButton texture. + + + + + Gets the ObjectFieldButton texture based on the current active theme. + + + + + Lazy loading Editor Icon. + + + + + Loads an EditorIcon from the spritesheet. + + + + + Gets the icon's highlight texture. + + + + + Gets the icon's active texture. + + + + + Gets the icon's inactive texture. + + + + + Not yet documented. + + + + + Gets a texture of an odin logo symbol. + + + + + Gets a texture of an odin inspector logo symbol. + + + + + Gets a texture of an odin serializer logo symbol. + + + + + Gets a texture of an odin validator logo symbol. + + + + + Gets a texture of an odin validator black symbol. + + + + + Utility for parsing and emitting expression delegates. + + + + + The time that the expression cache waits to clear expressions + since the last time they have been used. + + + + Parses an expression and tries to emit a delegate method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted delegate if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and tries to emit a delegate method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + The parameters of the expression delegate. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted delegate if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and tries to emit a delegate method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + The parameters of the expression delegate. + The names of the expression's parameters, for use with the named parameter syntax. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted delegate if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and tries to emit a delegate method. + The expression to parse. + The emit context. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted delegate if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and tries to emit a delegate of the specified type. + The expression to parse. + The emit context. + The type of the delegate to emit. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted delegate if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + This class is due to undergo refactoring. Use the new DragAndDropUtilities instead. + + + + + + This class is due to undergo refactoring. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Drag and drop utilities for both Unity and non-unity objects. + + + + + Gets the position from where the last drag started from in screen space. + + + + + Gets the delta position between the currrent mouse position and where the last drag originated from. + + + + + Gets the hovering accepted drop zone ID. + + + + + Gets a value indicating whether an instance is currently being dragged. + + + + + Gets the currently dragging identifier. + + + + + Gets the current hovering drop zone identifier. + + + + + Gets a more percistent id for drag and drop. + + + + + Draws a objectpicker button in the given rect. This one is designed to look good on top of DrawDropZone(). + + + + + Draws a objectpicker butter, in the given rect. This one is designed to look good on top of DrawDropZone(). + + + + + Draws the graphics for a DropZone. + + + + + Draws the graphics for a DropZone. + + + + + A draggable zone for both Unity and non-unity objects. + + + + + A draggable zone for both Unity and non-unity objects. + + + + + A drop zone area for both Unity and non-unity objects. + + + + + A drop zone area for bot Unity and non-unity objects. + + + + + A drop zone area for bot Unity and non-unity objects. + + + + + A drop zone area for bot Unity and non-unity objects. + + + + + A drop zone area for bot Unity and non-unity objects. + + + + + A drop zone area for bot Unity and non-unity objects. + + + + + A drop zone area for bot Unity and non-unity objects. + + + + + A drop zone area for bot Unity and non-unity objects. + + + + + Disalloweds the drop area for next drag zone. Follow this function call by a DragZone. + + + + + A draggable zone for both Unity and non-unity objects. + + + + + A draggable zone for both Unity and non-unity objects. + + + + + A draggable zone for both Unity and non-unity objects. + + + + + A draggable zone for both Unity and non-unity objects. + + + + + This class is due to undergo refactoring. + + + + + This class is due to undergo refactoring. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + This class is due to undergo refactoring. + + + + + This class is due to undergo refactoring. + + + + + Collection of extension methods for . + + + + + Returns true when the users mouse is hovering over the specified + + The . + The to check. + true if the mouse is over the specified otherwise false. + + + + Returns true when the user presses the specified mouse button. + + The . + The mouse button the user has to press. + If true then the method will call on the event. + true on mouse down events with the specified button. Otherwise false. + + + + Returns true when the user clicks a rect with the mouse. + + The event. + The rect the user can click on. + The button the user has to press. + If true then the method will call on the event. + true on mouse down events with the specified button. Otherwise false. + + + + Returns true when the user releases the specified mouse button. + + The . + The mouse button the user has to release. + If true then the method will call on the event. + true on mouse up events, with the specified button. Otherwise false. + + + + Returns true when the user releases the specified mouse button over the specified rect. + + The . + The rect the user has to release the mouse button over. + The mouse button the user has to release. + If true then the method will call on the event. + true on mouse up events, with the specified button and over the specified rect. Otherwise false. + + + + Returns true when the user left clicks a rect. + + The . + The rect the user can click. + If true then the method will call on the event. + true on left click events, on the specified rect. Otherwise false. + + + + Returns true when the user right clicks a rect. + + The . + The rect the user can right click. + If true then the method will call on the event. + true on context click events, on the specified rect. Otherwise false. + + + + Returns true when the user presses the specified key. + + The . + The key the user has to press. + If true then the method will call on the event. + true on key down events with the specified key code. Otherwise false. + + + + Returns true when the user releases the specified key. + + The . + The key the user has to release. + If true then the method will call on the event. + true on key up events with the specified key code. Otherwise false. + + + + Returns true whene the user moves or drags the mouse. + + The . + If true then the method will call on the event. + true on mouse move or mouse drag events. Otherwise false. + + + + Returns true when the user hovers the mouse over the specified rect. + + The . + The rect the user can hover. + true on any event where the mouse is hovering the specified rect. Otherwise false. + + + + Returns true on repaint events. + + The . + true on repaint events. Otherwise false. + + + + Returns true on layout events. + + The . + true on layout events. Otherwise false. + + + + Returns true on the specified event. + + The . + The required event type. + true on the specified event. Otherwise false. + + + + Collection of extension methods for . + + + + + Removes all menu items with a given name from the GenericMenu. + + The GenericMenu to remove items from. + The name of the items to remove. + True if any items were removed, otherwise false. + + + + Replaces the first found menu item with a given name with a new menu item, or if no such element is found, adds a new one. + + The GenericMenu to replace items in. + The name of the items to remove. + The func to replace or add. + The on value to set the new menu item with. + True if an item was replaced, otherwise false. + + + + Replaces the first found menu item with a given name with a new menu item, or if no such element is found, adds a new one. + + The GenericMenu to replace items in. + The name of the items to remove. + The on value to set the new menu item with. + The func to replace or add. + The user data. + + True if an item was replaced, otherwise false. + + + + + Emitted wrapper for the internal "UnityEngine.GUIClip" class. + + + + + Not yet documented. + + + + + Gets the top most clipped rect. + + + + + Gets the visible rect. + + + + + Gets the top rect. + + + + + Unclips the specified position. + + The position. + + + + + Unclips the specified rect. + + The rect. + + + + + This class is due to undergo refactoring. + + + + + The value. + + + + + Performs an implicit conversion from to . + + + + + Various helper function for GUI. + + + + + Gets the bold default font. + + + + + An alternative to GUI.FocusControl(null), which does not take focus away from the current GUI.Window. + + + + + Whether the inspector is currently in the progress of drawing a dictionary key. + + + + + Hides the following draw calls. Remember to call when done. + + + + + Unhides the following draw calls after having called . + + + + + Determines whether the specified EditorWindow is docked. + + The editor window. + true if the editor window is docked. Otherwise false. + + + + Not yet documented. + + + + + Opens a new inspector window for the specified object. + + The unity object. + unityObj + + + + Gets or sets a value indicating whether labels are currently bold. + + + true if this instance is bold label; otherwise, false. + + + + + Gets the size of the current window border. + + + The size of the current window border. + + + + + Gets the editor screen point offset. + + + The editor screen point offset. + + + + + Gets the current editor gui context width. Only set these if you know what it does. + Setting this has been removed. Use PushContextWidth and PopContextWidth instead. + + + + + Unity EditorGUIUtility.labelWidth only works reliablly in Repaint events. + BetterLabelWidth does a better job at giving you the correct LabelWidth in non-repaint events. + + + + + Odin will set this for you whenever an Odin property tree is drawn. + But if you're using BetterLabelWidth and BetterContextWidth without Odin, then + you need to set BetterContextWidth in the beginning of each GUIEvent. + + + + + Gets the current indent amount. + + + The current indent amount. + + + + + Gets the mouse screen position. + + + The mouse screen position. + + + + + Gets the current editor window. + + + The current editor window. + + + + + Gets a value indicating whether the current editor window is focused. + + + true if the current window has focus. Otherwise, false. + + + + + Gets the ID of the current editor window. + + + The ID of the current editor window. + + + + + Gets a value indicating whether a repaint has been requested. + + + true if repaint has been requested. Otherwise false. + + + + + Gets or sets the actual EditorGUIUtility.LabelWidth, regardless of the current hierarchy mode or context width. + + + + + Requests a repaint. + + + + + Calls , if the is not NULL. + + + + + Requests a repaint. + + + + + Begins the layout measuring. Remember to end with . + + + + + Begins the layout measuring. Remember to end with . + + + + + Ends the layout measuring started by + + The measured rect. + + + + Ends the layout measuring started by + + The measured rect. + + + + Gets the current layout rect. + + The current layout rect. + + + + Gets the current layout rect. + + The current layout rect. + + + + Gets the playmode color tint. + + The playmode color tint. + + + + Pushes a context width to the context width stack. + Remember to pop the value again with . + + The width to push. + + + + Pops a value pushed by . + + + + + Pushes a color to the GUI color stack. Remember to pop the color with . + + The color to push the GUI color.. + if set to true blend with alpha. + + + + Takes a screenshot of the GUI within the specified rect. + + The rect. + The screenshot as a render texture. + + + + Pops the GUI color pushed by . + + + + + Pushes a state to the GUI enabled stack. Remember to pop the state with . + + If set to true GUI will be enabled. Otherwise GUI will be disabled. + + + + Pops the GUI enabled pushed by + + + + + Pushes a state to the IsDrawingDictionaryKey stack. Remember to pop the state with . + + + + + Pops the state pushed by + + + + + Pushes the hierarchy mode to the stack. Remember to pop the state with . + + The hierachy mode state to push. + Changing hierachy mode also changes how label-widths are calcualted. By default, we try to keep the current label width. + + + + Pops the hierarchy mode pushed by . + + + + + Pushes bold label state to the stack. Remember to pop with . + + Value indicating if labels should be bold or not. + + + + Pops the bold label state pushed by . + + + + + Pushes the indent level to the stack. Remember to pop with . + + The indent level to push. + + + + Pops the indent level pushed by . + + + + + Pushes the content color to the stack. Remember to pop with . + + The content color to push.. + If set to true blend with alpha. + + + + Pops the content color pushed by . + + + + + Pushes the label color to the stack. Remember to pop with . + + The label color to push. + + + + Pops the label color pushed by . + + + + + Pushes the GUI position offset to the stack. Remember to pop with . + + The GUI offset. + + + + Pops the GUI position offset pushed by . + + + + + Pushes a GUI matrix to the stack. Remember to pop with . + + The GUI matrix to push. + + + + Pops the GUI matrix pushed by . + + + + + Ignores input on following GUI calls. Remember to end with . + + + + + Ends the ignore input started by . + + + + + Pushes the event type to the stack. Remember to pop with . + + The type of event to push. + + + + Pops the event type pushed by . + + + + + Pushes the width to the editor GUI label width to the stack. Remmeber to Pop with . + + The editor GUI label width to push. + + + + Pops editor gui label widths pushed by . + + + + + Pushes the value to the responsive vector component fields stack. Remeber to pop with . + + + + + Pops responsive vector component fields value pushed by . + + + + + Pushes the value to the fade group duration stack. Remeber to pop with . + + + + + Pops fade group duration value pushed by . + + + + + Pushes the value to the tab page slide animation duration stack. Remember to pop with . + + + + + + Pops tab page slide animation duration value pushed by . + + + + + Clears the repaint request. + + + + + Gets a temporary value context. + + The type of the config value. + The key for the config. + The name of the config. + GUIConfig for the specified key and name. + + + + Gets a temporary value context. + + The type of the value. + The key for the config. + The ID for the config. + GUIConfig for the specified key and ID. + + + + Gets a temporary value context. + + The type of the value. + The primary key. + The secondary key. + GUIConfig for the specified primary and secondary key. + + + + Gets a temporary value context. + + The type of the value. + The key for the context. + GUIConfig for the specified key. + + + + Gets a temporary nullable value context. + + Key for context. + Name for the context. + + + + Gets a temporary nullable value context. + + Key for context. + Id of the context. + + + + Gets a temporary nullable value context. + + Primary key for the context. + Secondary key for the context. + + + + Gets a temporary nullable value context. + + Key for the context. + + + + Gets a temporary context. + + Key for the context. + Name for the context. + Default value of the context. + + + + Gets a temporary context. + + Key for the context. + Id for the context. + Default value of the context. + + + + Gets a temporary context. + + Primary key for the context. + Secondary key for the context. + Default value of the context. + + + + Gets a temporary context. + + Key for the context. + Default value of the context. + + + + Gets a temporary GUIContent with the specified text. + + The text for the GUIContent. + Temporary GUIContent instance. + + + + Gets a temporary GUIContent with the specified text and tooltip. + + The text for the GUIContent. + The tooltip for the GUIContent. + Temporary GUIContent instance. + + + + Gets a temporary GUIContent with the specified image and tooltip. + + The image for the GUIContent. + The tooltip for the GUIContent. + Temporary GUIContent instance. + + + + Gets a temporary GUIContent with the specified text, image and tooltip. + + The text for the GUIContent. + The image for the GUIContent. + The tooltip for the GUIContent. + Temporary GUIContent instance. + + + + Indents the rect by the current indent amount. + + The rect to indent. + Indented rect. + + + + Indents the rect by the current indent amount. + + The rect to indent. + + + + Repaints the EditorWindow if a repaint has been requested. + + The window to repaint. + + + + Repaints the editor if a repaint has been requested. If the currently rendering window is not an InspectorWindow, Repaint() will be called on the current window as well. + + The editor to repaint. + + + + Gets the best thumbnail icon given the provided arguments provided. + + + + + + + + + Gets a preview texture for the provided object. + + + + + + + Measures the size of a given , if it would be presented with this . + + The to present the as. + The to measure. + A consisting of the width () & height (), as the size of the in GUI-space. + + + + Measures the height of a given , if it would be presented with this . + + The to present the as. + The to measure. + The width of the area the is being presented in. + The height of the . + + + + Measures the width of a given , if it would be presented with this . + + The to present the as. + The to measure. + The width of the . + + + + Measures the width of a given , if it would be presented with this . + + The to present the as. + The to measure. + The width of the . + + + + Measures the min- & max width of a given , if it would be presented with this . + + The to present the as. + The to measure. + The minimum width of the . + The maximum width of the . + The min- & max width of the , as out parameters. + + + + A helper class to control paging of n number of elements in various situations. + + + + + Disables the paging, and show all elements. + + + + + Initializes a new instance of the class. + + + + + Updates all values based on and . + + + Call update right before using and in your for loop. + + The total number of elements to apply paging for. + + + + Gets or sets a value indicating whether this instance is enabled. + + + true if this instance is enabled; otherwise, false. + + + + + Gets a value indicating whether this instance is on the frist page. + + + true if this instance is on frist page; otherwise, false. + + + + + Gets a value indicating whether this instance is on the last page. + + + true if this instance is on last page; otherwise, false. + + + + + Gets or sets the number of items per page. + + + The number of items pr page. + + + + + Gets or sets the current page. + + + The current page. + + + + + Gets the start index. + + + The start index. + + + + + Gets the end index. + + + The end index. + + + + + Gets or sets the page count. + + + The page count. + + + + + Gets the total number of elements. + Use to change the value. + + + + + Draws right-aligned toolbar paging buttons. + + + + + The GUITabGroup is a utility class to draw animated tab groups. + + + + var tabGroup = SirenixEditorGUI.CreateAnimatedTabGroup(someKey); + // Register your tabs before starting BeginGroup. + var tab1 = tabGroup.RegisterTab("tab 1"); + var tab2 = tabGroup.RegisterTab("tab 2"); + + tabGroup.BeginGroup(drawToolbar: true); + { + if (tab1.BeginPage()) + { + // Draw GUI for the first tab page; + } + tab1.EndPage(); + + if (tab2.BeginPage()) + { + // Draw GUI for the second tab page; + } + tab2.EndPage(); + } + tabGroup.EndGroup(); + + // Control the animation speed. + tabGroup.AnimationSpeed = 0.2f; + + // If true, the tab group will have the height equal to the biggest page. Otherwise the tab group will animate in height as well when changing page. + tabGroup.FixedHeight = true; + + // You can change page by calling: + tabGroup.GoToNextPage(); + tabGroup.GoToPreviousPage(); + + + + + + + The animation speed + + + + + Gets the outer rect of the entire tab group. + + + + + The inner rect of the current tab page. + + + + + If true, the tab group will have the height equal to the biggest page. Otherwise the tab group will animate in height as well when changing page. + + + Sets the current page. + + The page to switch to. + + + + Gets the current page. + + + + + Gets the t. + + + + + The height of the tab buttons. + + + + + Registers the tab. + + + + + Begins the group. + + if set to true a tool-bar for changing pages is drawn. + The style. + + + + Ends the group. + + + + + Goes to page. + + + + + Goes to next page. + + + + + Goes to previous page. + + + + + A Utility class for creating tables in Unity's editor GUI. + A table can either be created from scratch using new GUITable(xCount,yCount), or created using one of the static GUITable.Create overloads. + See the online documentation, for examples and more information. + + + Creating a matrix table for a two-dimentional array. + + private GUITable table; + + private void Init() + { + bool[,] boolArr = new bool[20,20]; + + this.table = GUITable.Create( + twoDimArray: boolArr, + drawElement: (rect, x, y) => boolArr[x, y] = EditorGUI.Toggle(rect, boolArr[x, y]), + horizontalLabel: "Optional Horizontal Label", // horizontalLabel is optional and can be null. + columnLabels: (rect, x) => GUI.Label(rect, x.ToString()), // columnLabels is optional and can be null. + verticalLabel: "Optional Vertical Label", // verticalLabel is optional and can be null. + rowLabels: (rect, x) => GUI.Label(rect, x.ToString()) // rowLabels is optional and can be null. + ); + } + + private void OnGUI() + { + this.table.DrawTable(); + } + + + + Creating a table for a list. + + private GUITable table; + + private void Init() + { + Listt<SomeClasst> someList = new List<SomeClass>() { new SomeClass(), new SomeClass(), new SomeClass() }; + + this.table = GUITable.Create(someList, "Optional Title", + new GUITableColumn() + { + ColumnTitle = "A", + OnGUI = (rect, i) => someList[i].A = EditorGUI.TextField(rect, someList[i].A), + Width = 200, + MinWidth = 100, + }, + new GUITableColumn() + { + ColumnTitle = "B", + OnGUI = (rect, i) => someList[i].B = EditorGUI.IntField(rect, someList[i].B), + Resizable = false, + }, + new GUITableColumn() + { + ColumnTitle = "C", + OnGUI = (rect, i) => someList[i].C = EditorGUI.IntField(rect, someList[i].C), + SpanColumnTitle = true, + } + ); + } + + private void OnGUI() + { + this.table.DrawTable(); + } + + private class SomeClass + { + public string A; + public int B; + public int C; + public int D; + } + + + + Styling a cell. + Each has two events, OnGUI and OnGUIStyle. OnGUIStyle is called right before OnGUI, but only in repaint events. + + guiTable[x,y].GUIStyle += rect => EditorGUI.DrawRect(rect, Color.red); + + + + Row and column span. + A cell will span and cover all neighbour cells that are null. + + // Span horizontally: + guiTable[x - 2,y] = null; + guiTable[x - 1,y] = null; + guiTable[x,y].SpanX = true; + guiTable[x + 1,y] = null; + + // Span vertically: + guiTable[x,y - 2] = null; + guiTable[x,y - 1] = null; + guiTable[x,y].SpanY = true; + guiTable[x,y + 1] = null; + + + + + + + + The row count. + + + + + The column count. + + + + + The Table Rect. + + + + + Whether to respect the current GUI indent level. + + + + + Gets or sets a from the . + + + + + Initializes a new instance of the class. + + + + + Draws the table. + + + + + Recaluclates cell and column sizes in the next frame. + + + + + Recalculates the layout for the entire table. + This method gets called whenever the table is initialized, resized or adjusted. If you are manipulating + the width or height of individual table cells, remember to call this method when you're done. + + + + + Creates a table. + + + + + Creates a table. + + + + + Creates a table. + + + + + Creates a table. + + + + + A cell of a + + + + + The minimum width. + + + + + The width of the cell. Default is width is 0. + The width the column is determained by the widest cell in the column. + Width = 0 = auto. + + + + + The height of the cell. Default is height is 22. + The height the column is determained by the tallest cell in the row. + + + + + If true, the cell will expand vertically, covering all neighbour null cells. + + + + + If true, the cell will expand horizontally, covering all neighbour null cells. + + + + + The table column index. + + + + + The table row index. + + + + + The GUI style + + + + + Gets the rect. + + + + + GUITableColumns used creating a table list using GUITable.Create(). + + + + + + + Draws a cell at the given row index for this column. + + + + + The column title text. If there are is columns with a title, there we not be rendered an additional table row for column titles. + + + + + The minimum with of the column. + + + + + The width of the Column. + 0 = auto, and is also the default. + + + + + If true, the column becomes resiziable. + Default is true. + + + + + If true, the column title cell, will span horizontally to neighbour columns, which column titles are null. + Default is false. + + + + + Whether to draw a draw scroll view. + + + + + The number of pixels before a scroll view appears. + + + + + The maximum scroll view height. + + + + + The scroll position + + + + + The cell style + + + + + Gets the rect containing all rows. + + + + + Gets the first visible row index. + + + + + Gets the last visible row index. + + + + + Gets the outer rect. The height of this <= .height. + + + + + Gets the row rect. + + + + + Begins the table. + + + + + Begins the column. + + + + + Begins the cell. + + + + + Ends the cell. + + + + + Ends the column. + + + + + Ends the table. + + + + + A tab page created by . + + + + + + Begins the page. + + + + + Ends the page. + + + + Temporary. + This implementation will get refactored. + + + + How the square object field should be aligned. + + + + + + Left aligned. + + + + + Centered. + + + + + Right aligned. + + + + + Configuration for progress bar fields. + + + + + The height of the progress bar field. Default 12 pixel. + + + + + The foreground color of the progress bar field. + + + + + The background color of the progress bar field. + + + + + If true the progress bar field will draw a label ontop to show the current value. + + + + + Alignment of the progress bar field overlay. + + + + + Default configuration. + + + + + Creates a copy of the configuration. + + The configuration to copy. + + + + Creates a progress bar configuration. + + The height of the progress bar. + The foreground color of the progress bar. + The background color of the progress bar. + If true there will be drawn a overlay on top of the field. + The alignment of the text overlay. + + + + Draw mode of quaternion fields. + + + + + + + Draw the quaterion as euler angles. + + + + + Draw the quaterion in as an angle and an axis. + + + + + Draw the quaternion as raw x, y, z and w values. + + + + Initializes the and creates a permanent ID for the Control. + If you create this on a such as , + make sure to initialize this during OnEnable to ensure it gets initialized correctly. + + + + Field drawing functions for various types. + + + + + The width of the X, Y and Z labels in structs. + + + + + When true the component labels, for vector fields, will be hidden when the field is too narrow. + + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + Position and size of the field. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + How the square object field should be aligned. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Texture to be used as the preview. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + How the square object field should be aligned. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + How the square object field should be aligned. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + Position and size of the field. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + How the square object field should be aligned. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + The height or size of the square object field. + How the square object field should be aligned. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + The label to use, or null if no label should be used. + The Unity object. + The texture to be used as the preview. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + The height or size of the square object field. + How the square object field should be aligned. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + The height or size of the square object field. + How the square object field should be aligned. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + The height or size of the square object field. + How the square object field should be aligned. + + + + Draws a polymorphic ObjectField. + + The label to use, or null if no label should be used. + The value. + The object type. This supports inheritance. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a polymorphic ObjectField. + + The label to use, or null if no label should be used. + The value. + The object type. This supports inheritance. + The title to be shown in the object picker. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a polymorphic ObjectField. + + + + + Draws a polymorphic ObjectField. + + + + + Draws a polymorphic ObjectField. + + The label to use, or null if no label should be used. + The value. + The object type. This supports inheritance. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a polymorphic ObjectField. + + The value. + The object type. This supports inheritance. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a polymorphic ObjectField. + + The value. + The object type. This supports inheritance. + The title to be shown in the object picker. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a field for a layer mask. + + Position and size of the field. + The label to use, or null if no label should be used. + The layer mask to draw. + + + + Draws a field for a layer mask. + + Position and size of the field. + The label to use, or null if no label should be used. + The layer mask to draw. + + + + Draws a field for a layer mask. + + Position and size of the field. + The layer mask to draw. + + + + Draws a field for a layer mask. + + The label to use, or null if no label should be used. + The layer mask to draw. + Layout options. + + + + Draws a field for a layer mask. + + The label to use, or null if no label should be used. + The layer mask to draw. + Layout options. + + + + Draws a field for a layer mask. + + The layer mask to draw. + Layout options. + + + + Draws a Guid field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Guid field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a Guid field. + + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Guid field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Guid field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a Guid field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws an int field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws an int field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an int field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an int field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws an int field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws an int field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an int field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an int field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed int field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a delayed int field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed int field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed int field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a delayed int field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a delayed int field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed int field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed int field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a range field for ints. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a range field for ints. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Value assigned to the field. + + + + Draws a range field for ints. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Value assigned to the field. + + + + Draws a range field for ints. + + Position and size of the field. + Current value. + Minimum value. + Maximum value. + Value assigned to the field. + + + + Drwas a range field for ints. + + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a range field for ints. + + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Layout options. + Value assigned to the field. + + + + Draws a range field for ints. + + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Layout options. + Value assigned to the field. + + + + Draws a range field for ints. + + Current value. + Minimum value. + Maximum value. + Layout options. + Value assigned to the field. + + + + Draws a colored progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Optional text for label to be drawn ontop of the progress bar. This value is only used if the DrawValueLabel option is enabled in the ProgressBarConfig. + + + + Draws a colored progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + + + + Draws a colored progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + + + + Draws a colored progress bar field. + + Position and size of the field. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + + + + Draws a colored progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + + + + Draws a colored progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + + + + Draws a colored progress bar field. + + Position and size of the field. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + + + + Draws a colored progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Layout options. + + + + Draws a colored progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Layout options. + + + + Draws a colored progress bar field. + + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Layout options. + + + + Draws a colored progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + Layout options. + + + + Draws a colored progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + Layout options. + + + + Draws a colored progress bar field. + + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + Layout options. + + + + Draws a colored segmented progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Optional text for label to be drawn ontop of the progress bar. This value is only used if the DrawValueLabel option is enabled in the ProgressBarConfig. + + + + Draws a colored segmented progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + + + + Draws a colored segmented progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + + + + Draws a colored segmented progress bar field. + + Position and size of the field. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + + + + Draws a colored segmented progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + + + + Draws a colored segmented progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + + + + Draws a colored segmented progress bar field. + + Position and size of the field. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + + + + Draws a colored segmented progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Layout options. + + + + Draws a colored segmented progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Layout options. + + + + Draws a colored segmented progress bar field. + + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Layout options. + + + + Draws a colored segmented progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + Layout options. + + + + Draws a colored segmented progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + Layout options. + + + + Draws a colored segmented progress bar field. + + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + Layout options. + + + + Draws an overlay on top of a progress bar field. + + The rect used to draw the progress bar field with. (Minus the Rect for the prefix label, if any.) + The label to draw ontop of the progress bar field. + The relative value of the progress bar, from 0 to 1. + The configuration used to draw the progress bar field. + + + + Draws an overlay on top of a progress bar field. + + The rect used to draw the progress bar field with. (Minus the Rect for the prefix label, if any.) + The label to draw ontop of the progress bar field. + The relative value of the progress bar, from 0 to 1. + The configuration used to draw the progress bar field. + + + + Draws an long field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws an long field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an long field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an long field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws an long field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws an long field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an long field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an long field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed long field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a delayed long field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed long field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed long field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a delayed long field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a delayed long field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed long field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed long field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a float field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a float field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a float field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a float field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a float field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a float field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a float field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a float field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed float field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a delayed float field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed float field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed float field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a delayed float field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a delayed float field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed float field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed float field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a range field for floats. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a range field for floats. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Value assigned to the field. + + + + Draws a range field for floats. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Value assigned to the field. + + + + Draws a range field for floats. + + Position and size of the field. + Current value. + Minimum value. + Maximum value. + Value assigned to the field. + + + + Draws a range field for floats. + + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a range field for floats. + + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Layout options. + Value assigned to the field. + + + + Draws a range field for floats. + + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Layout options. + Value assigned to the field. + + + + Draws a range field for floats. + + Current value. + Minimum value. + Maximum value. + Layout options. + Value assigned to the field. + + + + Draws a double field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a double field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a double field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a double field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a double field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a double field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a double field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a double field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed double field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a delayed double field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed double field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed double field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a delayed double field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a delayed double field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed double field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed double field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a decimal field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a decimal field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a decimal field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a decimal field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a decimal field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a decimal field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a decimal field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a decimal field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a text field for strings. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a text field for strings. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a text field for strings. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a text field for strings. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a text field for strings. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a text field for strings. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a text field for strings. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a text field for strings. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed text field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a delayed text field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed text field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed text field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a delayed text field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a delayed text field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed text field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed text field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a field that lets the user select a path to a file. + + Position and size of the field. + Label of field. Set to null for no label. + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + Comma separated list of allowed file extensions. Use null to allow any file extension. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + If true the file path will include the file's extension. + A path to a file. + + + + Draws a field that lets the user select a path to a file. + + Position and size of the field. + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + Comma separated list of allowed file extensions. Use null to allow any file extension. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + If true the file path will include the file's extension. + A path to a file. + + + + Draws a field that lets the user select a path to a file. + + Label of field. Set to null for no label. + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + Comma separated list of allowed file extensions. Use null to allow any file extension. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + Layout options. + A path to a file. + + + + Draws a field that lets the user select a path to a file. + + Label of field. Set to null for no label. + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + Comma separated list of allowed file extensions. Use null to allow any file extension. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + Layout options. + If true the file path will include the file's extension. + A path to a file. + + + + Draws a field that lets the user select a path to a file. + + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + Comma separated list of allowed file extensions. Use null to allow any file extension. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + Layout options. + If true the file path will include the file's extension. + A path to a file. + + + + Draws a field that lets the user select a path to a file. + + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + Comma separated list of allowed file extensions. Use null to allow any file extension. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + Layout options. + A path to a file. + + + + Draws a field that lets the user select a path to a folder. + + Position and size of the field. + Label of field. Set to null for no label. + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + A path to a folder. + + + + Draws a field that lets the user select a path to a folder. + + Position and size of the field. + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + A path to a folder. + + + + Draws a field that lets the user select a path to a folder. + + Label of field. Set to null for no label. + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + Layout options. + A path to a folder. + + + + Draws a field that lets the user select a path to a folder. + + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + Layout options. + A path to a folder. + + + + Draws a prefix label for a vector field, that implements label dragging. + + + + + Draws a prefix label for a vector field, that implements label dragging. + + The position and total size of the field. + The label content. If null this function does nothing. + The value for the vector field. + The vector scaled by label dragging. + + + + Draws a prefix label for a vector field, that implements label dragging. + + The position and total size of the field. + The label content. If null this function does nothing. + The value for the vector field. + The vector scaled by label dragging. + + + + Draws a prefix label for a vector field, that implements label dragging. + + The label content. If null this function does nothing. + The value for the vector field. + The vector scaled by label dragging. + + + + Draws a prefix label for a vector field, that implements label dragging. + + The label content. If null this function does nothing. + The value for the vector field. + The vector scaled by label dragging. + + + + Draws a Vector2 field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Vector2 field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Vector2 field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a Vector2 field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector2 field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector2 field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector3 field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Vector3 field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Vector3 field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a Vector3 field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector3 field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector3 field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector4 field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Vector4 field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Vector4 field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a Vector4 field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector4 field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector4 field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Color field. + + Position and size of the field. + Label of field. Set to null for no label. + + Value assigned to the field. + + + + Draws a Color field. + + Position and size of the field. + Label of field. Set to null for no label. + + Value assigned to the field. + + + + Draws a Color field. + + Position and size of the field. + + Value assigned to the field. + + + + Draws a Color field. + + Label of field. Set to null for no label. + + Layout options. + Value assigned to the field. + + + + Draws a Color field. + + Label of field. Set to null for no label. + + Layout options. + Value assigned to the field. + + + + Draws a Color field. + + + Layout options. + Value assigned to the field. + + + + Draws a slider for setting two values between a min and a max limit. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + The min and max limit for the value. + Show fields for min and max value. + A Vector2 with X set as min value, and Y to set as max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + The min and max limit for the value. + Show fields for min and max value. + A Vector2 with X set as min value, and Y to set as max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Position and size of the field. + Current value. + The min and max limit for the value. + Show fields for min and max value. + A Vector2 with X set as min value, and Y to set as max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Label of field. Set to null for no label. + Current value. + The min and max limit for the value. + Show fields for min and max value. + Layout options. + A Vector2 with X set as min value, and Y to set as max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Label of field. Set to null for no label. + Current value. + The min and max limit for the value. + Show fields for min and max value. + Layout options. + A Vector2 with X set as min value, and Y to set as max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Current value. + The min and max limit for the value. + Show fields for min and max value. + Layout options. + A Vector2 with X set as min value, and Y to set as max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Position and size of the field. + Label of field. Set to null for no label. + Current min value. + Current max value. + The min limit for the value. + The max limit for the value. + Show fields for min and max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Position and size of the field. + Label of field. Set to null for no label. + Current min value. + Current max value. + The min limit for the value. + The max limit for the value. + Show fields for min and max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Position and size of the field. + Current min value. + Current max value. + The min limit for the value. + The max limit for the value. + Show fields for min and max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Label of field. Set to null for no label. + Current min value. + Current max value. + The min limit for the value. + The max limit for the value. + Show fields for min and max value. + Layout options. + + + + Draws a slider for setting two values between a min and a max limit. + + Label of field. Set to null for no label. + Current min value. + Current max value. + The min limit for the value. + The max limit for the value. + Show fields for min and max value. + Layout options. + + + + Draws a slider for setting two values between a min and a max limit. + + Current min value. + Current max value. + The min limit for the value. + The max limit for the value. + Show fields for min and max value. + Layout options. + + + + Draws a rotation field for a quaternion. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Draw mode for rotation field. + Value assigned to the field. + + + + Draws a rotation field for a quaternion. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Draw mode for rotation field. + Value assigned to the field. + + + + Draws a rotation field for a quaternion. + + Position and size of the field. + Current value. + Draw mode for rotation field. + Value assigned to the field. + + + + Draws a rotation field for a quaternion. + + Label of field. Set to null for no label. + Current value. + Draw mode for rotation field. + Layout options. + Value assigned to the field. + + + + Draws a rotation field for a quaternion. + + Label of field. Set to null for no label. + Current value. + Draw mode for rotation field. + Layout options. + Value assigned to the field. + + + + Draws a rotation field for a quaternion. + + Current value. + Draw mode for rotation field. + Layout options. + Value assigned to the field. + + + + Draws an euler field for a quaternion. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an euler field for a quaternion. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an euler field for a quaternion. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws an euler field for a quaternion. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an euler field for a quaternion. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an euler field for a quaternion. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws an angle axis field for a quaternion. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an angle axis field for a quaternion. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an angle axis field for a quaternion. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws an angle axis field for a quaternion. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an angle axis field for a quaternion. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an angle axis field for a quaternion. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a quaternion field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a quaternion field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a quaternion field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a quaternion field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a quaternion field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a quaternion field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a dropdown. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Names of selectable items. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a dropdown. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Names of selectable items. + Value assigned to the field. + + + + Draws a dropdown. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Names of selectable items. + Value assigned to the field. + + + + Draws a dropdown. + + Position and size of the field. + Current value. + Names of selectable items. + Value assigned to the field. + + + + Draws a dropdown. + + Label of field. Set to null for no label. + Current value. + Names of selectable items. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a dropdown. + + Label of field. Set to null for no label. + Current value. + Names of selectable items. + Layout options. + Value assigned to the field. + + + + Draws a dropdown. + + Label of field. Set to null for no label. + Current value. + Names of selectable items. + Layout options. + Value assigned to the field. + + + + Draws a dropdown. + + Current value. + Names of selectable items. + Layout options. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Selectable items. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Label of field. Set to null for no label. + Current value. + Selectable items. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Selectable items. + Names of selectable items. If null ToString() will be used instead. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + + Names of selectable items. If null ToString() will be used instead. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + + Names of selectable items. If null ToString() will be used instead. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Position and size of the field. + Current value. + + Names of selectable items. If null ToString() will be used instead. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Label of field. Set to null for no label. + Current value. + + Names of selectable items. If null ToString() will be used instead. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Label of field. Set to null for no label. + Current value. + + Names of selectable items. If null ToString() will be used instead. + Layout options. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Label of field. Set to null for no label. + Current value. + + Names of selectable items. If null ToString() will be used instead. + Layout options. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Current value. + + Names of selectable items. If null ToString() will be used instead. + Layout options. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a dropdown. + + + Position and size of the field. + Label of field. Set to null for no label. + Current selection. + Avaible items in the dropdown. + If true then the user can select multiple items. Otherwise the user can only select one item. + true when the user has changed the selection. Otherwise false. + + + + Draws a dropdown. + + + Position and size of the field. + Label of field. Set to null for no label. + Current selection. + Avaible items in the dropdown. + If true then the user can select multiple items. Otherwise the user can only select one item. + true when the user has changed the selection. Otherwise false. + + + + Draws a dropdown. + + + Position and size of the field. + Current selection. + Avaible items in the dropdown. + If true then the user can select multiple items. Otherwise the user can only select one item. + true when the user has changed the selection. Otherwise false. + + + + Draws a dropdown. + + + Label of field. Set to null for no label. + Current selection. + Avaible items in the dropdown. + If true then the user can select multiple items. Otherwise the user can only select one item. + Layout options. + true when the user has changed the selection. Otherwise false. + + + + Draws a dropdown. + + + Label of field. Set to null for no label. + Current selection. + Avaible items in the dropdown. + If true then the user can select multiple items. Otherwise the user can only select one item. + Layout options. + true when the user has changed the selection. Otherwise false. + + + + Draws a dropdown. + + + Current selection. + Avaible items in the dropdown. + If true then the user can select multiple items. Otherwise the user can only select one item. + Layout options. + true when the user has changed the selection. Otherwise false. + + + + Draws a decimal field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a decimal field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a decimal field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a decimal field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports Odin expressions. + + Context for expression support. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a double field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a double field that supports Odin expressions. + + Context for expression support. + Current value. + Value assigned to the field. + + + + Draws a double field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports Odin expressions. + + Context for expression support. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a float field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a float field that supports Odin expressions. + + Context for expression support. + Current value. + Value assigned to the field. + + + + Draws a float field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports Odin expressions. + + Context for expression support. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a long field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a long field that supports Odin expressions. + + Context for expression support. + Current value. + Value assigned to the field. + + + + Draws a long field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports Odin expressions. + + Context for expression support. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a int field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a int field that supports Odin expressions. + + Context for expression support. + Current value. + Value assigned to the field. + + + + Draws a int field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports Odin expressions. + + Context for expression support. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a long field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a long field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a long field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a long field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + + Draws a long field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a long field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a long field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a long field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a long field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a int field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a int field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a int field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a int field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + + Draws a int field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a int field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a int field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a int field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a int field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Position and size of the field. + Label of field. Set to null for no label. + Current selection. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Position and size of the field. + Label of field. Set to null for no label. + Current selection. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Position and size of the field. + Label of field. Set to null for no label. + Current selection. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Position and size of the field. + Current selection. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Label of field. Set to null for no label. + Current selection. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Label of field. Set to null for no label. + Current selection. + Layout options. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Label of field. Set to null for no label. + Current selection. + Layout options. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Current selection. + Layout options. + Value assigned to the field. + + + + Wrapper for Unity's ExpressionEvaluator. It was moved from UnityEditor to UnityEngine in version 2023 and + that *should* have been automatically fixed by the AssemblyUpdater, but that broke for one reason or another. + + + + + Type containing the necessary components to use C# expressions in fields. + + + // Creating and using a context with for a static type. + FieldExpressionContext context = FieldExpressionContext.StaticExpression(typeof(MyStaticType)); + + SirenixEditorFields.SmartIntField(context, ...); + + + // Creating and using a context with an instanced type. + FieldExpressionContext context = FieldExpressionContext.InstanceContext(myInstance); + + SirenixEditorFields.SmartIntField(context, ...); + + + // Creating and using context with an InspectorProperty, for example, in a custom Odin drawer. + FieldExpressionContext context = property.ToFieldExpressionContext(); + + SirenixEditorFields.SmartIntField(context, ...); + + + + + Target instance for field expressions. + + + + + Target type for expressions. + + + + + Indicates if the expressions targets a static type or not. + + + + + Creates an expression context that targets nothing. Expressions are still possible, but no members can be accessed, and only static method can be called. + + FieldExpresionContext target targets nothing. + + + + Creates an expression context that targets the provided instance. Expression can access members of the instance. + + The instance for the context to target. + FieldExpressionContext that targets an instance. + Throws if instance is null. + + + + Creates an expression context that targets the provided type. Only static members can be accessed. + + The type to target. + FieldExpressionContext that targets a static type. + Throws if type is null. + + + + Collection of various editor GUI functions. + + + + + The mixed value dash character, to show when something has mixed values; + + + + + Default fade group animation duration. + + + + + Tab page slide animation duration. + + + + + Shaking animation duration. + + + + + Expand foldouts by default. + + + + + Show buttons results by default. + + + + + Draws a GUI field for objects. + + The rect to draw the field in. + The label of the field. + The value of the field. + The object type for the field. + If set to true then allow scene objects to be assigned to the field. + If set to true the field is readonly. + The object assigned to the field. + + + + Draws an GUI field for objects. + + The label for the field. + The value of the field. + The object type for the field. + If set to true then allow scene objects to be assigned to the field. + If set to true the field is readonly. + The object assigned to the field. + + + + Draws a GUI field for objects. + + The key for the field. + The type. + The label for the field. + The current value for the field. + If set to true then allow scene objects to be assigned to the field. + + The object assigned to the field. + + + + + Draws a nicely formatted title with an optinal sub-title and horizontal ruler. + + + + + Draws a GUI color field. + + The rect to draw the field in. + The color of the field. + If set to true then use alpha in the preview. + If set to true then show alpha bar in the preview. + The color assigned to the field. + + + + Draws a warning message box. + + + Also triggers a warning during validation checks done by + + The message. + If set to true the message box will be wide. + + + + Draws a thick horizontal seperator. + + + + + Draws a thick horizontal seperator. + + + + + Draws a thick horizontal seperator. + + + + + Draws a thick horizontal seperator. + + + + + Draws a horizontal line seperator. + + + + + Draws a vertical line seperator. + + + + + Draws an error message box. + + + Also triggers an error during validation checks done by + + The message. + If set to true the message box will be wide. + + + + Draws a info message box. + + The message. + If set to true the message box will be wide. + + + + Draws a message box. + + The message. + If set to true the message box will be wide. + + + + Draws a message box. + + The message. + Type of the message. + If set to true the message box will be wide. + + + + Draws a message box. + + The message. + Type of the message. + The style. + If set to true the message box will be wide. + + + + Draws a message box. + + The message. + Type of the message. + The style. + If set to true the message box will be wide. + + + + Draws a message box. + + The message. + Type of the message. + The style of the message box. + If set to true the message box will be wide. + + + + Draws a message box that can be expanded to show more details. + + The message of the message box. + The detailed message of the message box. + Type of the message box. + If set to true the detailed message is hidden. + If set to true the message box will be wide. + State of isFolded. + + + + Draws a message box with the specified icon. + + The message to be displayed. + The icon to be displayed. + The color of the icon. + The style of the message box. + The action to be invoked if the message box is right-clicked. + + + + Draws a horizontal line separator. + + Width of the line. + + + + Draws a horizontal line separator. + + The color of the line. + The size of the line. + + + + Draws a vertical line separator. + + Width of the line. + + + + Draws a vertical line separator. + + The color of the line. + Width of the line. + + + + Draws a GUI button with an icon. + + The editor icon for the button. + The width of the button. + The height of the button. + The tooltip of the button. + true if the button was pressed. Otherwise false. + + + + Draws a GUI button with an icon. + + The editor icon for the button. + The GUI style for the button. + The width of the button. + The height of the button. + The tooltip of the button. + true if the button was pressed. Otherwise false. + + + + Draws a GUI button with an icon. + + The rect to draw the button in. + The editor icon for the button. + true if the button was pressed. Otherwise false. + + + + Draws a GUI button with an icon. + + The rect to draw the button in. + The editor icon for the button. + The tooltip of the button. + true if the button was pressed. Otherwise false. + + + + Draws a GUI button with an icon. + + The rect to draw the button in. + The editor icon for the button. + The GUI style for the button. + The tooltip of the button. + true if the button was pressed. Otherwise false. + + + + Draws a GUI button with an icon. + + The rect to draw the button in. + The icon texture. + The tooltip for the button. + true when the button is pressed. + + + + Draws a GUI button with an icon. + + The rect to draw the button in. + The icon texture. + Style for the button. + The tooltip for the button. + true when the button is pressed. + + + + Draws a GUI button with an icon. + + The icon texture. + Width of the button in pixels. + Height of the button in pixels. + The tooltip for the button. + true when the button is pressed. + + + + Draws a GUI button with an icon. + + The icon texture. + Style for the button. + Width of the button in pixels. + Height of the button in pixels. + The tooltip for the button. + true when the button is pressed. + + + + Draws a repeating icon button. + + The icon for the button. + true while the button is active. Otherwise false. + + + + Draws a repeating icon button. + + The icon for the button. + The size. + true while the button is active. Otherwise false. + + + + Draws a repeating icon button. + + The icon for the button. + The width of the button. + The height of the button. + true while the button is active. Otherwise false. + + + + Draws a SDF icon button. + + The button's label. + The button's height. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's label. + The button's height. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's label. + The button's height. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's label. + The button's height. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's rect. + The button's label. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's rect. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's rect. + The button's icon. + The button's style. + + + + + Draws a SDF icon button. + + The button's rect. + The button's label. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's rect. + The button's label. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's rect. + The button's label. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Calculates the minimum needed space for a SDF icon button where the label is still visible. + + The label of the SDF icon button. + The height of the SDF icon button. + The minimum width of the SDF icon button. + + + + Draws a toolbar icon button. + + The icon for the button. + If true, the button clickable while GUI.enabled == false. + + true if the button was pressed. Otherwise false. + + + + + Draws a toolbar icon button. + + The icon for the button. + If true, the button clickable while GUI.enabled == false. + + true if the button was pressed. Otherwise false. + + + + + Draws a toolbar icon button. + + The GUI content for the button. + Whether the button state is selected or not + true if the button was pressed. Otherwise false. + + + + Draws a toolbar icon button. + + The label for the button. + Whether the button state is selected or not + true if the button was pressed. Otherwise false. + + + + Draws a toolbar toggle. + + Current state of the toggle. + The icon for the toggle. + The state of the toggle. + + + + Draws a toolbar toggle. + + Current state of the toggle. + The icon for the toggle. + The state of the toggle. + + + + Draws a toolbar toggle. + + Current state of the toggle. + The GUI content for the button. + The state of the toggle. + + + + Draws a toolbar toggle. + + Current state of the toggle. + The text for the toggle. + The state of the toggle. + + + + Draws a toolbar tab. + + If true the tab will be the active tab. + Name for the tab. + State of isActive. + + + + Draws a toolbar tab. + + If true the tab will be the active tab. + Label for the tab. + State of isActive. + + + + Draws a solid color rectangle. + + The rect. + The color. + If true applies the user's playmdoe tint to the rect in playmode. + + + + Draws a solid color rectangle. + + The width. + The height. + The color. + If true applies the user's playmdoe tint to the rect in playmode. + The rect created. + + + + Draws borders around a rect. + + The rect. + The width of the border on all sides. + If true applies the user's playmdoe tint to the rect in playmode. + + + + Draws borders around a rect. + + The rect. + The width of the border on all sides. + The color of the border. + If true applies the user's playmdoe tint to the rect in playmode. + + + + Draws borders around a rect. + + The rect. + The left size. + The right size. + The top size. + The bottom size. + If true applies the user's playmdoe tint to the rect in playmode. + + + + Draws borders around a rect. + + The rect. + The left size. + The right size. + The top size. + The bottom size. + The color of the borders. + If true applies the user's playmdoe tint to the rect in playmode. + + + + Draws a toolbar search field. + + The current search text. + If set to true the force focus on the field. + The left and right margin. + The current search text. + + + + Draws a search field. + + + + + Begins a horizontal toolbar. Remember to end with . + + The height of the toolbar. + Padding for the top of the toolbar. + The rect of the horizontal toolbar. + + + + Begins a horizontal toolbar. Remember to end with . + + The style for the toolbar. + The height of the toolbar. + The top padding. + + The rect of the horizontal toolbar. + + + + + Ends a horizontal toolbar started by . + + + + + Begins a horizontal indentation. Remember to end with . + + The GUI layout options. + + + + Begins a horizontal indentation. Remember to end with . + + The style of the indentation. + The GUI layout options. + + + + Ends a identation horizontal layout group started by . + + + + + Begins a vertical indentation. Remember to end with . + + The GUI layout options. + + + + Begins a vertical indentation. Remember to end with . + + The style of the indentation. + The GUI layout options. + + + + Ends a identation vertical layout group started by . + + + + + Indents by the current indent value, . + + + + + Draws a menu button. + + The indent of the button. + The text of the button. + The current state of the button. + The texture icon for the button. + The current state of the button. + + + + Begins a fade group. Remember to end with . + + The key for the fade group. + Current state of the fade group. + + + + Begins a fade group. Remember to end with . + + The key for the fade group. + Current state of the fade group. + A value between 0 and 1 indicating how expanded the fade group is. + + + + Begins a fade group. Remember to end with . + + The primary key for the fade group. + The secondly key for the fade group. + Current state of the fade group. + + + + Begins a fade group. Remember to end with . + + The key for the fade group. + The name of the fade group. + Current state of the fade group. + + + + Begins a fade group. Remember to end with . + + The key for the fade group. + Current state of the fade group. + The duration of fade in and out. + + + + Begins a fade group. Remember to end with . + + The key for the fade group. + Current state of the fade group. + A value between 0 and 1 indicating how expanded the fade group is. + The duration of fade in and out. + + + + Begins a fade group. Remember to end with . + + The primary key for the fade group. + The secondly key for the fade group. + Current state of the fade group. + The duration of fade in and out. + + + + Begins a fade group. Remember to end with . + + The key for the fade group. + The name of the fade group. + Current state of the fade group. + The duration of fade in and out. + + + + Begins a fade group. Remember to end with . + + The current fading value between 0 and 1. + + + + Ends a fade group started by any BeginFadeGroup. + + + + + Draws a foldout field where clicking on the label toggles to the foldout too. + + The current state of the foldout. + The label of the foldout. + The GUI style. + + The current state of the foldout. + + + + + Draws a foldout field where clicking on the label toggles to the foldout too. + + The current state of the foldout. + The label of the foldout. + The GUI style. + + + + Draws a foldout field where clicking on the label toggles to the foldout too. + + The current state of the foldout. + The label of the foldout. + The value rect. + The GUI style. + + + + Draws a foldout field where clicking on the label toggles to the foldout too. + + The rect to draw the foldout field in. + The current state of the foldout. + The label of the foldout. + The style. + + + + Draws a foldout field where clicking on the label toggles to the foldout too. + + The rect to draw the foldout field in. + The current state of the foldout. + The label of the foldout. + The style. + + + + Begins drawing a box. Remember to end with . + + The label of the box. + If set to true then center label. + The GUI layout options. + + + + Begins drawing a box. Remember to end with . + + The label of the box. + If set to true then center label. + The GUI layout options. + The rect of the box. + + + + Begins drawing a box. Remember to end with . + + The GUI layout options. + + + + Ends drawing a box started by any BeginBox. + + + + + Begins drawing a box header. Remember to end with . + + + + + Ends drawing a box header started by , + + + + + Begins drawing a box with toolbar style header. Remember to end with . + + Label for box header. + If true the label will be drawn in the center of the box header. + GUILayout options. + The rect of the box. + + + + Begins drawing a box with toolbar style header. Remember to end with . + + Label for box header. + If true the label will be drawn in the center of the box header. + GUILayout options. + The rect of the box. + + + + Begins drawing a box with toolbar style header. Remember to end with . + + GUILayout options. + The rect of the box. + + + + Ends the drawing a box with a toolbar style header started by . + + + + + Begins drawing a toolbar style box header. Remember to end with . + + The rect of the box. + + + + Ends the drawing of a toolbar style box header started by . + + + + + Begins drawing a legend style box. Remember to end with . + + The label for the legend style box. + If true the label will be drawn in the center of the box. + GUILayout options. + The rect of the box. + + + + Begins drawing a legend style box. Remember to end with . + + The label for the legend style box. + If true the label will be drawn in the center of the box. + GUILayout options. + The rect of the box. + + + + Begins drawing a legend style box. Remember to end with . + + GUILayout options. + The rect of the box. + + + + Ends the drawing of a legend style box started by + + + + + Begins drawing an inline box. Remember to end with . + + The GUI layout options. + The rect of the box. + + + + Ends drawing an inline box started by any BeginInlineBox. + + + + + Starts the shaking animation of a shaking group. + + + + + Starts the shaking animation of a shaking group. + + + + + Begins a shakeable group. + + + + + Ends the shakeable group. + + + + + Begins a shakeable group. + + + + + Begins a shakeable group. + + + + + Starts the shaking animation of a shaking group. + + + + + Ends the shakeable group. + + + + + Begins drawing a vertical menu list. + + The key for the menu list. + The rect created. + + + + Begins drawing a menu list item. Remember to end with + + Value indicating whether the item is selected. + Value indicating if the mouse is pressed on the item. + If set to true the item is set as selected.. + The rect used for the item. + + + + Ends drawing a menu list item started by + + + + + Ends drawing a vertical menu list started by + + + + + Begins drawing a vertical list. + + If set to true borders will be drawn around the vertical list. + If set to true a dark background will be drawn. + The GUI layout options. + The rect used for the list. + + + + Ends drawing a vertical list started by . + + + + + Begins drawing a list item. + + If set to true the item can be hovered with the mouse. + The style for the vertical list item. + The GUI layout options. + The rect used for the item. + + + + Begins drawing a list item. + + If set to true the item can be hovered with the mouse. + The style for the vertical list item. + The GUI layout options. + The color for even elements. + The color for odd elements. + The color for even elements when hovered. + The color for odd elements when hovered. + The rect used for the item. + + + + Ends drawing a list item started by . + + + + + Creates a animated tab group. + + The key for the tab group.. + An animated tab group. + + + + Begins drawing a toggle group. Remember to end with . + + The key of the group. + Value indicating if the group is enabled. + Value indicating if the group is visible. + The title of the group. + Value indicating if the group is toggled. + + + + Begins drawing a toggle group. Remember to end with . + + The key of the group. + Value indicating if the group is enabled. + Value indicating if the group is visible. + The title of the group. + Duration of the animation. + Value indicating if the group is toggled. + + + + Ends drawing a toggle group started by . + + + + + Begins drawing a horizontal auto scroll box. Remember to end with . + + The for the field. + The GUILayout options. + The rect used for the field. + + + + Ends drawing a horizontal auto scroll box started by . + + + + + Creates a rect that can be grabbed and pulled to change a value up or down. + + The grabbable rect. + The control ID for the sliding. + The current value. + + The current value. + + + + + Creates a rect that can be grabbed and pulled to change a value up or down. + + The grabbable rect. + The control ID for the sliding. + The current value. + + The current value. + + + + + Creates a rect that can be grabbed and pulled to change a value up or down. + + The grabbable rect. + The control ID for the sliding. + The current value. + + The current value. + + + + + Creates a rect that can be grabbed and pulled to change a value up or down. + + The grabbable rect. + The control ID for the sliding. + The current value. + + The current value. + + + + + Creates a rect that can be grabbed and pulled + + The grabbable rect. + The cursor. + + The the mouse delta position. + + + + + Creates a rect that can be grabbed and pulled + + The position. + The grabbable rect. + + The the mouse delta position. + + + + + Draws a field for a value of type T - dynamically choosing an appropriate drawer for the type. + Currently supported are: char, string, sbyte, byte, short, ushort, int, uint, long, ulong, float, double, decimal, Guid and all enums. + + The type of the value to draw. + The label of the fields. + The value to draw. + The layout options. + The possibly changed value. + + + + Checks whether a given type can be drawn as a dynamic field by + + The type to check. + True if the type can be drawn, otherwise false. + + + + Gets the feature rich control rect. + + + + + Gets the feature rich control rect. + + + + + Creates a control ID that handles keyboard control, focused editor window, indentation and prefix label correctly. + + The rect to make a feature rich control for. + The label for the control. Leave null for no label. + The created control ID. + A value indicating whether or not the control has keyboard focus. + + + + Creates a control ID that handles keyboard control, focused editor window, indentation and prefix label correctly. + + The rect to make a feature rich control for. + The created control ID. + A value indicating whether or not the control has keyboard focus. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The amount of slicing applied to the texture on all sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The amount of slicing applied to the left and right sides. + The amount of slicing applied to the top and bottom sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The amount of slicing applied to the left side. + The amount of slicing applied to the right side. + The amount of slicing applied to the top side. + The amount of slicing applied to the bottom side. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The UV-coordinates to use. + The amount of slicing applied to the texture on all sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The UV-coordinates to use. + The amount of slicing applied to the left and right sides. + The amount of slicing applied to the top and bottom sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The UV-coordinates to use. + The amount of slicing applied to the left side. + The amount of slicing applied to the right side. + The amount of slicing applied to the top side. + The amount of slicing applied to the bottom side. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The that modulates the output. + The amount of slicing applied to the texture on all sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The that modulates the output. + The amount of slicing applied to the left and right sides. + The amount of slicing applied to the top and bottom sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The that modulates the output. + The amount of slicing applied to the left side. + The amount of slicing applied to the right side. + The amount of slicing applied to the top side. + The amount of slicing applied to the bottom side. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The that modulates the output. + The UV-coordinates to use. + The amount of slicing applied to the texture on all sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The that modulates the output. + The UV-coordinates to use. + The amount of slicing applied to the left and right sides. + The amount of slicing applied to the top and bottom sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The that modulates the output. + The UV-coordinates to use. + The amount of slicing applied to the left side. + The amount of slicing applied to the right side. + The amount of slicing applied to the top side. + The amount of slicing applied to the bottom side. + + + + Draws a repeating in a given . + + The to draw the in. + The to draw. + Amount of scaling applied to the output. + + + + Draws a repeating in a given . + + The to draw the in. + The to draw. + The that modulates the output. + Amount of scaling applied to the output. + + + + Draws a button with a given Size. + + Text to display on the button. + The size of the button. + true when the button is pressed; otherwise false. + + + + Collection of GUIStyles used by Sirenix. + + + + + Validator Green + + + + + Inspector Orange + + + + + Serializer Yellow + + + + + Green valid color + + + + + Red error color + + + + + Yellow warning color + + + + + Border color. + + + + + Box background color. + + + + + Dark editor background color. + + + + + Editor window background color. + + + + + Menu background color. + + + + + Header box background color. + + + + + Highlighted Button Color. + + + + + Highlight text color. + + + + + Highlight property color. + + + + + List item hover color for every other item. + + + + + List item hover color for every other item. + + + + + List item drag background color. + + + + + List item drag background color. + + + + + Column title background colors. + + + + + The default background color for when a menu item is selected. + + + + + The default background color for when a menu item is selected. + + + + + The default background color for when a menu item is selected. + + + + + The default background color for when a menu item is selected. + + + + + A mouse over background overlay color. + + + + + The default background color for when a menu item is selected. + + + + + The default background color for when a menu item is selected. + + + + + List item background color for every other item. OBSOLETE: Use ListItemColorEven instead. + + + + + List item background color for every other item. OBSOLETE: Use ListItemColorOdd instead. + + + + + List item color for every other item. + + + + + List item color for every other item. + + + + + Menu button active background color. + + + + + Menu button border color. + + + + + Menu button color. + + + + + Menu button hover color. + + + + + A light border color. + + + + + Bold label style. + + + + + Tag Button style. + + + + + Bold label style. + + + + + Centered bold label style. + + + + + Box container style. + + + + + Popup style. + + + + + Box header style. + + + + + Button style. + + + + + Button selected style. + + + + + Left button style. + + + + + Left button selected style. + + + + + Mid button style. + + + + + Mid button selected style. + + + + + Right button style. + + + + + Right button selected style. + + + + + Pane Options Button + + + + + Left button style. + + + + + Left button selected style. + + + + + Left button style. + + + + + Left button selected style. + + + + + Mid button style. + + + + + Mid button selected style. + + + + + Right button style. + + + + + Right button selected style. + + + + + Color field background style. + + + + + Foldout style. + + + + + Icon button style. + + + + + Label style. + + + + + Highlighted label style. + + + + + White label style. + + + + + Black label style. + + + + + Centered label style. + + + + + Centered label style. + + + + + White centered label style. + + + + + Black centered label style. + + + + + Centered mini label style. + + + + + Left Aligned Centered Label + + + + + Left aligned grey mini label style. + + + + + Left aligned grey label style. + + + + + Centered grey mini label + + + + + Left right aligned white mini label style. + + + + + Centered white mini label style. + + + + + Centered black mini label style. + + + + + List item style. + + + + + Menu button background style. + + + + + No style. + + + + + Odin Editor Wrapper. + + + + + Padding less box style. + + + + + Content Padding + + + + + Property padding. + + + + + Property margin. + + + + + Rich text label style. + + + + + Right aligned grey mini label style. + + + + + Right aligned white mini label style. + + + + + Section header style. + + + + + Section header style. + + + + + Toggle group background style. + + + + + Toggle group checkbox style. + + + + + Toggle group padding style. + + + + + Toggle group title background style. + + + + + Toolbar background style. + + + + + Toolbar button style. + + + + + Toolbar button selected style. + + + + + Toolbar search cancel button style. + + + + + Toolbar search field style. + + + + + Toolbar tab style. + + + + + Title style. + + + + + Bold title style. + + + + + Centered bold title style. + + + + + Right aligned bold title style. + + + + + Centered title style. + + + + + Right aligned title style. + + + + + Subtitle style. + + + + + Centered sub-title style. + + + + + Right aligned sub-title style. + + + + + Message box style. + + + + + Detailed Message box style. + + + + + Multiline white label style. + + + + + Multiline Label + + + + + Centered Multiline Label + + + + + Centered Text Field + + + + + Gets the bottom box padding. + + + + + Unitys PaneOptions GUIStyle. + + + + + Unitys ProjectBrowserTextureIconDropShadow GUIStyle. + + + + + Unitys TL SelectionButton PreDropGlow GUIStyle. + + + + + Unitys ShurikenModuleTitle GUIStyle. + + + + + Draw this one manually with: new Color(1, 1, 1, EditorGUIUtility.isProSkin ? 0.25f : 0.45f) + + + + + SDFIconButton Label. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Utility functions for Unity assets. + + + + + Gets all assets of the specified type. + + + + + Gets all assets of the specified type. + + The type of assets to find. + The asset folder path. + + + + Gets all assets of the specified type. + + The type of assets to find. + The asset folder path. + + + + Asset search helper. + + + + + The asset object. + + + + + Current index. + + + + + Search result count. + + + + + Tests if an asset can be created from a type. + + The type to test. + true if an asset can be created. Otherwise false. + + + + Tests if an asset can be created from a type. + + The type to test. + The base asset type. + true if an asset can be created. Otherwise false. + + + + Gets project path to the specified asset. + + The asset object. + The path to the asset. + + + + Creates a new asset of the specified type. + + The type of the asset. + Project path to the new asset. + The name of the asset. + + + + Functions for accessing the clipboard. + + + + + Gets the current copy mode. + + + + + Copies the specified object. + + + The object. + The copy mode. + + + + Copies the specified object. + + + + + Clears this instance. + + + + + Determines whether this instance can paste the specified type. + + + + + Determines whether this instance can paste the specified type. + + + + + Determines whether or not the Clipboard contains any instance. + + + + + Tries the paste. + + + + + Copies or gets the current object in the clipboard. + + + + + Copies or gets the current object in the clipboard. + + + + + The various modes of copying an object to the clipboard. + + + + + Deep copy. + + + + + Shallow Copy. + + + + + Reference Copy. + + + + + A utility class for getting delta time for the GUI editor. + + + + + A utility class for getting delta time for the GUI editor. + + + + + Compare strings and produce a distance score between them. + + + + + Determines whether if the source is within the search. + + The source string. + The target string. + Should the algorithm ignore letter case?. + Should the algorithm attempt to search on an abbreviation of the source?. + Threshold for what is considered to be within the search. 0 will return everything and 1 will only return exact matches. + True if the source is within the search. Otherwise false. + + + + Compares the target to the source and returns a distance score. + + The source string. + The target string. + + + Distance score. 0 is no match, and 1 is exact match. + + + + A utility class for properly counting frames and helps determine when a frame has started in an editor window. + + + + + Gets the frame count. + + + + + Gets a value indicating whether this instance is new frame. + + + + + Updates the frame counter and returns itself. + + + + + Hides the ObjectMembers in Visual Studio IntelliSense + + + + + Determines whether the specified , is equal to this instance. + + + + + Returns a hash code for this instance. + + + + + Gets the type. + + + + + Returns a that represents this instance. + + + + + Collection of texture functions. + + + + + Creates a new texture with no mimapping, linier colors, and calls texture.LoadImage(bytes), DontDestroyOnLoad(tex) and sets hideFlags = DontUnloadUnusedAsset | DontSaveInEditor. + + Old description no longer relevant as we've moved past version 2017. + Loads an image from bytes with the specified width and height. Use this instead of someTexture.LoadImage() if you're compiling to an assembly. Unity has moved the method in 2017, + and Unity's assembly updater is not able to fix it for you. This searches for a proper LoadImage method in multiple locations, and also handles type name conflicts. + + + + + Crops a Texture2D into a new Texture2D. + + + + + Resizes a texture by blitting, this allows you to resize unreadable textures. + + + + + Converts a Sprite to a Texture2D. + + + + + + + Categories of units. A unit value can only be converted to another of the same category. + + + + + Tools for converting between units, for example, converting from inches to meters. + + + + + + + Gets all UnitInfo registered, both built-in and custom. + + Enumerable of both built-in and custom units. + + + + Gets the UnitInfo for the given Units enum value. + + Units enum value. + UnitInfo for the unit. + Throws for invalid unit input. + + + + Gets the UnitInfo with the corrosponding name. + + The name of the unit. + UnitInfo for the name. + Throws when no unit with the given name is found. + + + + Finds the UnitInfo that best fits the given symbol within the given category. + + The symbol to find a unit for. + The category to look for units within. + The UnitInfo that best matches the given symbol. + Throws when no match was found. + + + + Gets the UnitInfo for the given Units enum value. + + Units enum value. + The UnitInfo matching the given unit value. + true when a UnitInfo was found. Otherwise false. + + + + Gets the UnitInfo with the given name. + + The name of the unit. + The UnitInfo matching the given name. + true when a UnitInfo was found. Otherwise false. + + + + Finds the UnitInfo that best fits the given symbol within the given category. + + The symbol to find a unit for. + The category to look for units within. + The UnitInfo that best matches the given symbol. + true when a UnitInfo was found. Otherwise false. + + + + Converts between two units. The units must be of the same category. + + The value to convert. Should be in the from units. + The unit to convert the value from. value should be in this unit. + To unit to convert the value to. Must be the same category as from. + The value converted to to units. + Throws when either 'from' or 'to' units are invalid, or when the units are of different categories. + + + decimal meters = 5m; + decimal centimeters = ConvertUnitsFromTo(meters, Units.Meter, Units.Centimeter); + // centimeters = 500 + + + + + + Converts between two units. The units must be of the same category. + + The value to convert. Should be in the fromUnitInfo units. + The unit to convert the value from. value should be in this unit. + To unit to convert the value to. Must be the same category as fromUnitInfo. + The value converted to toUnitInfo units. + Throws when either 'fromUnitInfo' or 'toUnitInfo' units are invalid, or when the units are of different categories. + + + decimal meters = 5m; + decimal centimeters = ConvertUnitsFromTo(meters, meterUnitInfo, centimeterUnitInfo); + // centimeters = 500 + + + + + + Converts between two units. The units must be of the same category. + + The value to convert. Should be in the from units. + The unit to convert the value from. value should be in this unit. + To unit to convert the value to. Must be the same category as from. + The value converted to to units. + true when the unit was successfully converted. Otherwise false. + + + decimal meters = 5m; + if (TryConvertUnitsFromTo(meters, Units.Meter, Units.Centimeter, out decimal centimeters) + { + // centimeters = 500 + } + + + + + + Converts between two units. The units must be of the same category. + + The value to convert. Should be in the fromUnitInfo units. + The unit to convert the value from. value should be in this unit. + To unit to convert the value to. Must be the same category as fromUnitInfo. + The value converted to toUnitInfo units. + true when the unit was successfully converted. Otherwise false. + + + decimal meters = 5m; + if (TryConvertUnitsFromTo(meters, meterUnitInfo, centimeterUnitInfo, out decimal centimeters)) + { + // centimeters = 500 + } + + + Throws if either fromUnitInfo or toUnitInfo is null. + + + + Indicates whether or not a value can be converted between the given a and b units. + + Unit a. + Unit b. + true if both units have the same category. Otherwise false. + + + + Indicates whether or not a value can be converted between the given a and b units. + + Unit a. + Unit b. + true if both units have the same category. Otherwise false. + + + + Adds a custom unit to the UnitNumberUtility, that can also be used with the . + Call this using InitializeOnLoad or InitializeOnLoadMethod. + + The name of the unit. Duplicate names are not allowed. + Symbols used for the unit. First value in the array will be used as the primary symbol. Atleast 1 value required. Duplicate symbols are not allowed within the same category. + The category of the unit. Units can only be converted to another of the same category. Custom categories are allowed. + The multiplier to convert the unit from the base value. For example, meters are the base unit of the distance category, therefore centimeters have a multipler of 100. + + Example of adding centimeters as a custom unit. + + UnitNumberUtility.AddCustomUnit("Centimeter", new string[]{ "cm" }, "Distance", 100m); + + + + + + Adds a custom unit to the UnitNumberUtility, that can also be used with the . + Call this using InitializeOnLoad or InitializeOnLoadMethod. + + The name of the unit. Duplicate names are not allowed. + Symbols used for the unit. First value in the array will be used as the primary symbol. Atleast 1 value required. Duplicate symbols are not allowed within the same category. + The category of the unit. Units can only be converted to another of the same category. Custom categories are allowed. + The multiplier to convert the unit from the base value. For example, meters are the base unit of the distance category, therefore centimeters have a multipler of 100. + + Example of adding centimeters as a custom unit. + + UnitNumberUtility.AddCustomUnit("Centimeter", new string[]{ "cm" }, UnitCategory.Distance, 100m); + + + + + + Adds a custom unit to the UnitNumberUtility, that can also be used with the . + This overload allows for custom conversion methods but, if possible, the multiplier overloads should be prefered. + Call this using InitializeOnLoad or InitializeOnLoadMethod. + + The name of the unit. Duplicate names are not allowed. + Symbols used for the unit. First value in the array will be used as the primary symbol. Atleast 1 value required. Duplicate symbols are not allowed within the same category. + The category of the unit. Units can only be converted to another of the same category. Custom categories are allowed. + Method for converting a given value of the custom unit to the base unit. For example, for centimeter, use: x => x / 100m;. + Method for converting a given value of the base unit to the custom unit. For example, for centimeter, use: x => x * 100m;. + + Example of adding centimeters as a custom unit. + + UnitNumberUtility.AddCustomUnit("Centimeter", new string[]{ "cm" }, "Distance", x => x / 100m, x = > x * 100m); + + + + + + Adds a custom unit to the UnitNumberUtility, that can also be used with the . + This overload allows for custom conversion methods but, if possible, the multiplier overloads should be prefered. + Call this using InitializeOnLoad or InitializeOnLoadMethod. + + The name of the unit. Duplicate names are not allowed. + Symbols used for the unit. First value in the array will be used as the primary symbol. Atleast 1 value required. Duplicate symbols are not allowed within the same category. + The category of the unit. Units can only be converted to another of the same category. Custom categories are allowed. + Method for converting a given value of the custom unit to the base unit. For example, for centimeter, use: x => x / 100m;. + Method for converting a given value of the base unit to the custom unit. For example, for centimeter, use: x => x * 100m;. + /// + Example of adding centimeters as a custom unit. + + UnitNumberUtility.AddCustomUnit("Centimeter", new string[]{ "cm" }, UnitCategory.Distance, x => x / 100m, x = > x * 100m); + + + + + + Object describing units, including name, symbols and how to convert it to other units. + + + + + Name of the unit. + + + + + Symbols of the unit. First symbol is considered the primary symbol. + + + + + The category of the unit. Units can only be converted within the same category. + + + + + Multiplier for converting from the base unit. + + + + + Custom method for converting from the base unit. + + + + + Custom method for converting to the base unit. + + + + + Indicates whether the UnitInfo should use the multiplier or the ConvertFromBase and ConvertToBase methods. + + + + + AssemblyTypeFlags is a bitmask used to filter types and assemblies related to Unity. + + + + + + Excludes all types. + + + + + UserTypes includes all custom user scripts that are not located in an editor or plugin folder. + + + + + PluginTypes includes all types located in the plugins folder and are not located in an editor folder. + + + + + UnityTypes includes all types depended on UnityEngine and from UnityEngine, except editor, plugin and user types. + + + + + UserEditorTypes includes all custom user scripts that are located in an editor folder but not in a plugins folder. + + + + + PluginEditorTypes includes all editor types located in the plugins folder. + + + + + UnityEditorTypes includes all editor types that are not user editor types nor plugin editor types. + + + + + OtherTypes includes all other types that are not depended on UnityEngine or UnityEditor. + + + + + CustomTypes includes includes all types manually added to the Unity project. + This includes UserTypes, UserEditorTypes, PluginTypes and PluginEditorTypes. + + + + + GameTypes includes all assemblies that are likely to be included in builds. + This includes UserTypes, PluginTypes, UnityTypes and OtherTypes. + + + + + EditorTypes includes UserEditorTypes, PluginEditorTypes and UnityEditorTypes. + + + + + All includes UserTypes, PluginTypes, UnityTypes, UserEditorTypes, PluginEditorTypes, UnityEditorTypes and OtherTypes. + + + + + A utility class for finding types in various asssembly. + + + + + Gets an of all assemblies in the current . + + An of all assemblies in the current . + + + + Gets the for a given assembly. + + The assembly. + The for a given assembly. + is null. + + + + Determines whether an assembly is depended on another assembly. + + The assembly. + The other assembly. + + true if has a reference in or is the same as . + + is null. + is null. + + + + Determines whether the assembly module is a of type . + + The assembly. + + true if the specified assembly of type ; otherwise, false. + + assembly + + + + Gets the full file path to a given assembly's containing directory. + + The assembly. + The full file path to a given assembly's containing directory, or Null if no file path was found. + is Null. + + + + Gets the full directory path to a given assembly. + + The assembly. + The full directory path in which a given assembly is located, or Null if no file path was found. + + + + Gets the type. + + The full name of the type, with or without any assembly information. + + + + Get types from the current AppDomain with a specified filter. + + The filters. + Types from the current AppDomain with the specified filters. + + + + Get types from the current AppDomain with a specified filter. + + The filters. + Types from the current AppDomain with the specified filters. + + + + Find members of the given type, while providing good error messages based on the following search filters provided. + See for more information. + + + + + MemberFinder is obsolete, and has been replacted by and . + Use cases that do not fit those utlities should use manual reflection that is hand-optimized for the best performance in the given case. + + MemberFinder was a utility class often used by Odin drawers to find fields, methods, and + properties while providing good user-friendly error messages based on the search criteria. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Find members of the given type, while providing good error messages based on the following search filters provided. + + + + + Find members of the given type, while providing good error messages based on the following search filters provided. + + + + + Can be true for both fields, properties and methods. + + + + + + Exclude members found in base-types. + + + + + Only include methods with the following parameter. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Only include methods with the following parameters. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Only include methods with the following parameters. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Only include methods with the following parameters. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Only include methods with the following parameters. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Only include methods with the following parameters. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Only include methods with the following parameters. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Only include methods with the following parameters. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Determines whether [has return type] [the specified return type]. + + + + + Can be true for both fields, properties and methods. + + + + + Calls IsField() and IsProperty(). + + + + + Only include static members. By default, both static and non-static members are included. + + + + + Only include non-static members. By default, both static and non-static members are included. + + + + + Specify the name of the member. + + + + + Excludes fields and methods if nether IsField() or IsMethod() is called. Otherwise includes properties. + By default, all member types are included. + + + + + Excludes fields and properties if nether IsField() or IsProperty() is called. Otherwise includes methods. + By default, all member types are included. + + + + + Excludes properties and methods if nether IsProperty() or IsMethod() is called. Otherwise includes fields. + By default, all member types are included. + + + + + Excludes non-public members if IsNonPublic() has not yet been called. Otherwise includes public members. + By default, both public and non-public members are included. + + + + + Excludes public members if IsPublic() has not yet been called. Otherwise includes non-public members. + By default, both public and non-public members are included. + + + + + Excludes fields and properties, and only includes methods with a return type of void. + + + + + Gets the member based on the search filters provided + Returns null if no member was found. + + + + + Gets the member based on the search filters provided, and provides a proper error message if no members was found. + + + + + Gets the member based on the search filters provided, and provides a proper error message if no members was found. + + + + + Try gets the member based on the search filters provided, and provides a proper error message if no members was found. + + + + + Try gets the member based on the search filters provided, and provides a proper error message if no members was found. + + + + + Try gets all members based on the search filters provided, and provides a proper error message if no members was found. + + + + + Gets or sets the width of the col. + + + + + Gets or sets the minimum width. + + + + + Gets a value indicating whether the width should be preserved when the table itself gets resiszed. + + + + + Gets a value indicating whether this is resizable. + + + + + This class contains utility methods for subscribing to various UnityEditor events reliably and safely across all Odin-supported versions of Unity. + + + + + Sometimes, someone accidentally overrides a delay action subscription to + by setting the value instead of using the += operator as should be done, + which can be done because in many versions of Unity it is a field, and not an event. + (In some versions of Unity it is an event, though, and in this case, this method acts as a wrapper + to subscribe reliably, no matter the nature of the backing event.) + This method subscribes to a lot of different callbacks, in the hopes of catching at least one. + + As opposed to , this method is safe to call from any thread, and will + delay the actual subscription to a safe time. + + + + + Sometimes, an idiot overrides a delay action subscription to , + which can be done because the people at Unity didn't know what events were once upon a time. + This method subscribes to a lot of different callbacks, in the hopes of catching at least one. + + + + + Sometimes, an idiot overrides a delay action subscription to , + which can be done because the people at Unity didn't know what events were once upon a time. + This method subscribes to a lot of different callbacks, in the hopes of catching at least one. + + + + + In 2019.1+, this event subscribes to SceneView.duringSceneGui. In 2018.4 and lower, it subscribes to SceneView.onSceneGUIDelegate. + + + + + In 2020.1, Unity changed EditorApplication.delayCall from a field to an event, meaning + we now have to use reflection to access it consistently across all versions of Unity. + + + + diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml.meta new file mode 100644 index 0000000..03f29c1 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5c65184932ff4fd48a343e236025096f +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll new file mode 100644 index 0000000..e76c1df Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll.meta new file mode 100644 index 0000000..44c2d22 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 4873f2a8bdae42baa0406e8a61366ca1 +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml new file mode 100644 index 0000000..84cb6c5 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml @@ -0,0 +1,3713 @@ + + + + Sirenix.Utilities + + + + + Extension methods for the UnityEngine.Color type. + + + + + Lerps between multiple colors. + + The colors. + The t. + + + + + Moves the towards implementation for Color. + + From color. + To color. + The maximum delta. + + + + Tries to parse a string to a Color. The following formats are supported: + "new Color(0.4, 0, 0, 1)", "#FFEEBBFF", "#FFEECC", "FFEEBBFF", "FFEECC" + + The color string. + The color. + Returns true if the parse was a success. + + + + Converts a color to a string formatted to c# + + The color. + new Color(r, g, b, a) + + + + Pows the color with the specified factor. + + The color. + The factor. + + + + Normalizes the RGB values of the color ignoring the alpha value. + + The color. + + + + Gets the perceived luminosity of a given . + + The current . + Determines if the Color.a value should impact the result. + The float value representing the luminosity. + + + + Delegate method extensions. + + + + + Memoizes the specified func - returns the memoized version + + + + + Memoizes the specified func - returns the memoized version + + + + + FieldInfo method extensions. + + + + + Determines whether the specified field is an alias. + + The field to check. + + true if the specified field is an alias; otherwise, false. + + + + + Returns the original, backing field of an alias field if the field is an alias. + + The field to check. + /// if set to true an exception will be thrown if the field is not aliased. + + The field was not aliased; this only occurs if throwOnNotAliased is true. + + + + Garbage free enumerator methods. + + + + + Garbage free enumerator for lists. + + + + + Garbage free enumerator for dictionaries. + + + + + Garbage free enumator for dictionary values. + + + + + Garbage free enumerator for hashsets. + + + + + List iterator. + + + + + Creates a list iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Hashset iterator. + + + + + Creates a hashset iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Dictionary iterator. + + + + + Creates a dictionary iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Dictionary value iterator. + + + + + Creates a dictionary value iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Various LinQ extensions. + + + + + Calls an action on each item before yielding them. + + The collection. + The action to call for each item. + + + + Perform an action on each item. + + The source. + The action to perform. + + + + Perform an action on each item. + + The source. + The action to perform. + + + + Convert each item in the collection. + + The collection. + Func to convert the items. + + + + Convert a collection to an immutable list. + + The collection. + + + + Add an item to the beginning of a collection. + + The collection. + Func to create the item to prepend. + + + + Add an item to the beginning of a collection. + + The collection. + The item to prepend. + + + + Add a collection to the beginning of another collection. + + The collection. + The collection to prepend. + + + + Add an item to the beginning of another collection, if a condition is met. + + The collection. + The condition. + Func to create the item to prepend. + + + + Add an item to the beginning of another collection, if a condition is met. + + The collection. + The condition. + The item to prepend. + + + + Add a collection to the beginning of another collection, if a condition is met. + + The collection. + The condition. + The collection to prepend. + + + + Add an item to the beginning of another collection, if a condition is met. + + The collection. + The condition. + Func to create the item to prepend. + + + + Add an item to the beginning of another collection, if a condition is met. + + The collection. + The condition. + The item to prepend. + + + + Add a collection to the beginning of another collection, if a condition is met. + + The collection. + The condition. + The collection to prepend. + + + + Add an item to the beginning of another collection, if a condition is met. + + The collection. + The condition. + Func to create the item to prepend. + + + + Add an item to the beginning of another collection, if a condition is met. + + The collection. + The condition. + The item to prepend. + + + + Add a collection to the beginning of another collection, if a condition is met. + + The collection. + The condition. + The collection to prepend. + + + + Add an item to the end of a collection. + + The collection. + Func to create the item to append. + + + + Add an item to the end of a collection. + + The collection. + The item to append. + + + + Add a collection to the end of another collection. + + The collection. + The collection to append. + + + + Add an item to the end of a collection if a condition is met. + + The collection. + The condition. + Func to create the item to append. + + + + Add an item to the end of a collection if a condition is met. + + The collection. + The condition. + The item to append. + + + + Add a collection to the end of another collection if a condition is met. + + The collection. + The condition. + The collection to append. + + + + Add an item to the end of a collection if a condition is met. + + The collection. + The condition. + Func to create the item to append. + + + + Add an item to the end of a collection if a condition is met. + + The collection. + The condition. + The item to append. + + + + Add a collection to the end of another collection if a condition is met. + + The collection. + The condition. + The collection to append. + + + + Returns and casts only the items of type . + + The collection. + + + + Adds a collection to a hashset. + + The hashset. + The collection. + + + + Returns true if the list is either null or empty. Otherwise false. + + The list. + + + + Sets all items in the list to the given value. + + The list. + The value. + + + + Adds the elements of the specified collection to the end of the IList<T>. + + + + + Sorts an IList + + + + + Sorts an IList + + + + + Various list extension methods. + + + + + Increases or decrease the number of items in the list to the specified count. + + The list. + The new length. + + + + Increases or decrease the number of items in the list to the specified count. + + The list. + The new length. + Value of new elements. + + + + Increases or decrease the number of items in the list to the specified count. + + The list. + The new length. + + + + Increases or decrease the number of items in the list to the specified count. + + The list. + The new length. + Value of new elements. + + + + MemberInfo method extensions. + + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this member + + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this member + + + + + Returns the first found custom attribute of type T on this member + Returns null if none was found + + + + + Returns the first found non-inherited custom attribute of type T on this member + Returns null if none was found + + + + + Gets all attributes of the specified generic type. + + The member. + + + + Gets all attributes of the specified generic type. + + The member. + If true, specifies to also search the ancestors of element for custom attributes. + + + + Gets all attribute instances defined on a MemeberInfo. + + The member. + + + + Gets all attribute instances on a MemberInfo. + + The member. + If true, specifies to also search the ancestors of element for custom attributes. + + + + If this member is a method, returns the full method name (name + params) otherwise the member name paskal splitted + + + + + Determines whether a FieldInfo, PropertyInfo or MethodInfo is static. + + The member. + + true if the specified member is static; otherwise, false. + + + + + + Determines whether the specified member is an alias. + + The member to check. + + true if the specified member is an alias; otherwise, false. + + + + + Returns the original, backing member of an alias member if the member is an alias. + + The member to check. + /// if set to true an exception will be thrown if the member is not aliased. + + The member was not aliased; this only occurs if throwOnNotAliased is true. + + + + Various extensions for MethodInfo. + + + + + Returns the specified method's full name "methodName(argType1 arg1, argType2 arg2, etc)" + Uses the specified gauntlet to replaces type names, ex: "int" instead of "Int32" + + + + + Returns a string representing the passed method parameters names. Ex "int num, float damage, Transform target" + + + + + Returns the specified method's full name. + + + + + Tests if a method is an extension method. + + + + + Determines whether the specified method is an alias. + + The method to check. + + true if the specified method is an alias; otherwise, false. + + + + + Returns the original, backing method of an alias method if the method is an alias. + + The method to check. + /// if set to true an exception will be thrown if the method is not aliased. + + The method was not aliased; this only occurs if throwOnNotAliased is true. + + + + Determines the type of operator. + + + + + + The == operator. + + + + + The != operator. + + + + + The + operator. + + + + + The - operator. + + + + + The * operator. + + + + + The / operator. + + + + + The < operator. + + + + + The > operator. + + + + + The <= operator. + + + + + The >= operator. + + + + + The % operator. + + + + + The >> operator. + + + + + The << operator. + + + + + The & operator. + + + + + The | operator. + + + + + The ^ operator. + + + + + The ~ operator. + + + + + The && operator. + + + + + The || operator. + + + + + The ! operator. + + + + + DirectoryInfo method extensions. + + + + + Gets the name of the directory. Always returns forward slash seperators as opposed to Path.GetDirectoryName(). + + + + + Determines whether the directory has a given directory in its hierarchy of children. + + The parent directory. + The sub directory. + + + + Finds a parent directory with a given name, or null if no such parent directory exists. + + + + + Returns a value indicating whether or not a path can be made relative to another. + + The parent path. + The path to make relative to the parent path. + A value indicating if the path can be made relative to the parent path. + + + + Returns a path string to path that is relative to the parent path. + + The parent path. + The path to make relative to the parent path. + A relative path from parent path to path. + + + + Tries to make a path that is relative from parent path to path. + + The parent path. + The path to make relative to the parent path. + A relative path from parent path to path. null if no relative path could be made. + A value indicating if the method succeeded in making a relative path. + + + + Combines two paths, and replaces all backslases with forward slash. + + + + + PropertyInfo method extensions. + + + + + Determines whether a property is an auto property. + + + + + Determines whether the specified property is an alias. + + The property to check. + + true if the specified property is an alias; otherwise, false. + + + + + Returns the original, backing property of an alias property if the property is an alias. + + The property to check. + /// if set to true an exception will be thrown if the property is not aliased. + + The property was not aliased; this only occurs if throwOnNotAliased is true. + + + + Defines a collection of handy Rect transformation methods, that can chained together for complex behaviour. + Note that only the TakeX method defined here actually change the original Rect; the rest instead return a new transformed Rect. + + + + + Returns a Rect with the specified width. + + The original Rect. + The desired width of the new Rect. + + + + Returns a Rect with the specified height. + + The original Rect. + The desired height of the new Rect. + + + + Returns a Rect with the specified size. + + The original Rect. + The desired width of the new Rect. + The desired height of the new Rect. + + + + Returns a Rect with the specified size. + + The original Rect. + The desired width and height of the new Rect. + + + + Returns a Rect with the specified size. + + The original Rect. + The desired size of the new Rect. + + + + Returns a Rect that has been inserted by the specified amount on the X-axis. + + The original Rect. + The desired padding. + + + + Returns a Rect that has been inserted by the specified amount on the X-axis. + + The original Rect. + Desired padding on the left side. + Desired padding on the right side. + + + + Returns a Rect that has been inserted by the specified amount on the Y-axis. + + The original Rect. + The desired padding. + + + + Returns a Rect that has been inserted by the specified amount on the Y-axis. + + The original Rect. + The desired padding on the top. + The desired padding on the bottom. + + + + Returns a Rect that has been inserted by the specified amount. + + The original Rect. + The desired padding. + + + + Returns a Rect that has been inserted by the specified amount. + + The original Rect. + The desired horizontal padding. + The desired vertical padding. + + + + Returns a Rect that has been inserted by the specified amount. + + The original Rect. + The desired padding on the left. + The desired padding on the right. + The desired padding on the top. + The desired padding on the bottom. + + + + Returns a Rect, with the specified width, that has been aligned to the left of the original Rect. + + The original Rect. + The desired width of the new Rect. + + + + Returns a Rect, with the specified width, that has been aligned to horizontal center of the original Rect. + + The original Rect. + The desired width of the new Rect. + + + + Returns a Rect, with the specified width and height in the center of the provided rect. + + The original Rect. + The desired width of the new Rect. + The desired height of the new Rect. + + + + Returns a Rect, with the specified width, that has been aligned to the right of the original Rect. + + The original Rect. + The desired width of the new Rect. + + + + Returns a Rect, with the specified width, that has been aligned to the right of the original Rect. + + + + + Returns a Rect, with the specified height, that has been aligned to the top of the original Rect. + + The original Rect. + The desired height of the new Rect. + + + + Returns a Rect, with the specified height, that has been aligned to the vertical middle of the original Rect. + + The original Rect. + The desired height of the new Rect. + + + + Returns a Rect, with the specified height, that has been aligned to the bottom of the original Rect. + + The original Rect. + The desired height of the new Rect. + + + + Returns a Rect, with the specified width, that has been aligned horizontally to the center of the original rect. + + The original Rect. + The desired width of the new Rect. + + + + Returns a Rect, with the specified height, that has been aligned vertically to the center of the original rect. + + The original Rect. + The desired height of the new Rect. + + + + Returns a Rect, with the specified width and height, that has been aligned horizontally and vertically to the center of the original rect. + + The original Rect. + The desired width and height of the new Rect. + + + + Returns a Rect, with the specified width and height, that has been aligned horizontally and vertically to the center of the original rect. + + The original Rect. + The desired width of the new Rect. + The desired height of the new Rect. + + + + Returns a Rect that has been expanded by the specified amount. + + The original Rect. + The desired expansion. + + + + Returns a Rect that has been expanded by the specified amount. + + The original Rect. + The desired expansion on the X-axis. + The desired expansion on the Y-axis. + + + + Returns a Rect that has been expanded by the specified amount. + + The original Rect. + The desired expansion on the left. + The desired expansion on the right. + The desired expansion on the top. + The desired expansion on the bottom. + + + + Splits a Rect horizontally into the specified number of sub-rects, and returns a sub-rect for the specified index. + + The original Rect. + The index for the subrect. Includes 0, and excludes count. + The amount of subrects the Rect should be split into. + + + + Splits a Rect vertically into the specified number of sub-rects, and returns a sub-rect for the specified index. + + The original Rect. + The index for the subrect. Includes 0, and excludes count. + The amount of subrects the Rect should be split into. + + + + Splits a Rect into a grid from left to right and then down. + + The original rect. + The width of a grid cell. + The height of a grid cell. + The index of the grid cell. + + + + + Splits a Rect into a grid from left to right and then down. + + + + + Moves a Rect to the specified center X position. + + The original Rect. + The desired center x position. + + + + Moves a Rect to the specified center Y position. + + The desired original Rect. + The desired desired center y position. + + + + Moves a Rect to the specified center position. + + The original Rect. + The desired center X position. + The desired center Y position. + + + + Moves a Rect to the specified center position. + + The original Rect. + The desired center position. + + + + Moves a Rect to the specified position. + + The orignal Rect. + The desired position. + + + + Resets a Rect's position to zero. + + The original Rect. + + + + Moves a Rect's position by the specified amount. + + The original Rect. + The change in position. + + + + Moves a Rect's position by the specified amount. + + The original Rect. + The x. + The y. + + + + Sets a Rect's X position. + + The original Rect. + The desired X position. + + + + Adds to a Rect's X position. + + The original Rect. + The value to add. + + + + Subtracts from a Rect's X position. + + The original Rect. + The value to subtract. + + + + Sets a Rect's Y position. + + The original Rect. + The desired Y position. + + + + Adds to a Rect's Y position. + + The original Rect. + The value to add. + + + + Subtracts a Rect's Y position. + + The original Rect. + The value to subtract. + + + + Sets the min position of a Rect. + + The original Rect. + The desired min position. + + + + Adds to a Rect's min position. + + The original rect. + The value to add. + + + + Subtracts a Rect's min position. + + The original Rect. + The vlaue to subtract. + + + + Sets a Rect's max position. + + The original Rect. + The desired max position. + + + + Adds to a Rect's max position. + + The original Rect. + The value to add. + + + + Subtracts a Rect's max position. + + The original Rect. + The value to add. + + + + Sets a Rect's X min position. + + The original Rect. + The desired min X position. + + + + Adds to a Rect's X min position. + + The original Rect. + The value to add. + + + + Subtracts from a Rect's X min position. + + The original Rect. + The value to subtract. + + + + Sets a Rect's X max position. + + The original Rect. + The desired X max position. + + + + Adds to a Rect's X max position. + + The original Rect. + The value to add. + + + + Subtracts a Rect's X max position. + + The original Rect. + The value to subtract. + + + + Sets a Rect's Y min position. + + The original Rect. + The desired Y min. + + + + Adds to a Rect's Y min position. + + The original Rect. + The value to add. + + + + Subtracts a Rect's Y min position. + + The original Rect. + The value to subtract. + + + + + Sets a Rect's Y max position. + + The original Rect. + The desired Y max position. + + + + Adds to a Rect's Y max position. + + The original Rect. + The value to add. + + + + Subtracts from a Rect's Y max position. + + The original Rect. + The value to subtract. + + + + Sets a Rect's width, if it is less than the specified value. + + The original Rect. + The desired min width. + + + + Sets a Rect's width, if it is greater than the specified value. + + The original Rect. + The desired max width. + + + + Sets a Rect's height, if it is less than the specified value. + + The original Rect. + The desired min height. + + + + Sets a Rect's height, if it is greater than the specified value. + + The original Rect. + The desired max height. + + + + Expands a rect to contain a given position. + + The original Rect. + The position to expand the rect towards. + + + + Determines if an is a placeholder; usually (0, 0, 1, 1) in Layout. + + The original . + true if the is equal to (0, 0, 0, 0) or (0, 0, 1, 1); otherwise false. + + + + String method extensions. + + + + + Eg MY_INT_VALUE => MyIntValue + + + + + Returns whether or not the specified string is contained with this string + + + + + Ex: "thisIsCamelCase" -> "This Is Camel Case" + + + + + Returns true if this string is null, empty, or contains only whitespace. + + The string to check. + true if this string is null, empty, or contains only whitespace; otherwise, false. + + + + O(n*m) - Use with care. + + + + + Type method extensions. + + + + + Type name alias lookup. + + + + + Checks whether a given string is a valid CSharp identifier name. This also checks full type names including namespaces. + + The identifier to check. + + + + Determines whether a type can be casted to another type. + + From. + To. + if set to true an implicit or explicit operator must be defined on the given type. + + + + If a type can be casted to another type, this provides a function to manually convert the type. + + From. + To. + if set to true an implicit or explicit operator must be defined on the given type. + + + + If a type can be casted to another type, this provides a function to manually convert the type. + + if set to true an implicit or explicit operator must be defined on the given type. + + + + If a type can be casted to another type, this provides the method info of the method in charge of converting the type. + + From. + To. + if set to true an implicit or explicit operator must be defined on the given type. + + + + Gets an equality comparer delegate used to compare the equality of values of a given type. In order, this will be: + + 1. The == operator, if one is defined on the type. + 2. A delegate that uses , if the type implements that interface. + 3. .NET's own + + + Note that in the special case of the type , a special equality comparer is returned that only checks whether all the Quaternion components are equal. + This is because, by default, Quaternion's equality operator is broken when operating on invalid quaternions; "default(Quaternion) == default(Quaternion)" evaluates to false, and this causes a multitude of problems. + Special delegates are also returned for float and double, that consider float.NaN to be equal to float.NaN, and double.NaN to be equal to double.NaN. + + + + + Gets the first attribute of type T. Returns null in the no attribute of type T was found. + + The type. + If true, specifies to also search the ancestors of element for custom attributes. + + + + Determines whether a type implements or inherits from another type. + + The type. + To. + + + + Determines whether a type implements an open generic interface or class such as IList<> or List<>. + + Type of the candidate. + Type of the open generic type. + + + + + Determines whether a type implements an open generic interface such as IList<>. + + Type of the candidate. + Type of the open generic interface. + + Type " + openGenericInterfaceType.Name + " is not a generic type definition and an interface. + + + + Determines whether a type implements an open generic class such as List<>. + + Type of the candidate. + Type of the open generic interface. + + + + Gets the generic arguments of an inherited open generic class or interface. + + Type of the candidate. + The open generic type to get the arguments of. + + + + Gets the generic arguments of an inherited open generic class. + + Type of the candidate. + Type of the open generic class. + + + + Gets the generic arguments of an inherited open generic interface. + + Type of the candidate. + Type of the open generic interface. + + + + Gets the MethodInfo of a specific operator kind, with the given left and right operands. This overload is *far* faster than any of the other GetOperatorMethod implementations, and should be used whenever possible. + + + + + Gets the MethodInfo of a specific operator type. + + + + + Gets the MethodInfo of a specific operator type. + + + + + Gets all members from a given type, including members from all base types if the flag isn't set. + + + + + Gets all members from a given type, including members from all base types. + + + + + Gets all members of a specific type from a type, including members from all base types, if the flag isn't set. + + + + + Gets the generic type definition of an open generic base type. + + + + + Gets the generic type definition of an open generic base type. + + + + + Returns a lazy enumerable of all the base types of this type including interfaces and classes + + + + + Returns a lazy enumerable of all the base classes of this type + + + + + Returns a nicely formatted name of a type. + + + + + Returns a nicely formatted full name of a type. + + + + + Gets the name of the compilable nice. + + The type. + + + + Gets the full name of the compilable nice. + + The type. + + + + Returns the first found custom attribute of type T on this type + Returns null if none was found + + + + + Returns the first found non-inherited custom attribute of type T on this type + Returns null if none was found + + + + + Gets all attributes of type T. + + The type. + + + + Gets all attributes of type T. + + The type + If true, specifies to also search the ancestors of element for custom attributes. + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this type + + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this type + + + + + Determines whether a type inherits or implements another type. Also include support for open generic base types such as List<>. + + + + + + Determines whether a type inherits or implements another type. Also include support for open generic base types such as List<>. + + + + + + + Gets the number of base types between given type and baseType. + + + + + Determines whether a method has the specified parameter types. + + + + + FieldInfo will return the fieldType, propertyInfo the PropertyType, MethodInfo the return type and EventInfo will return the EventHandlerType. + + The MemberInfo. + + + + Gets the value contained in a given . Currently only and is supported. + + The to get the value of. + The instance to get the value from. + The value contained in the given . + Can't get the value of the given type. + + + + Sets the value of a given MemberInfo. Currently only and is supported. + + The to set the value of. + The object to set the value on. + The value to set. + + Property has no setter + or + Can't set the value of the given type. + + + + // + Tries to infer a set of valid generic parameters for a generic type definition, given a subset of known parameters. + + The generic type definition to attempt to infer parameters for. + The inferred parameters, if inferral was successful. + The known parameters to infer from. + True if the parameters could be inferred, otherwise, false. + + genericTypeDefinition is null + or + knownParameters is null + + The genericTypeDefinition parameter must be a generic type definition. + + + + Checks whether an array of types satisfy the constraints of a given generic type definition. + If this method returns true, the given parameters can be safely used with with the given generic type definition. + + The generic type definition to check. + The parameters to check validity for. + + genericType is null + or + types is null + + The genericType parameter must be a generic type definition. + + + + Checks whether an array of types satisfy the constraints of a given generic method definition. + If this method returns true, the given parameters can be safely used with with the given generic method definition. + + The generic method definition to check. + The parameters to check validity for. + + genericType is null + or + types is null + + The genericMethod parameter must be a generic method definition. + + + + Before calling this method we must ALWAYS hold a lock on the GenericConstraintsSatisfaction_LOCK object, as that is an implicit assumption it works with. + + + + + Not yet documented. + + + + + Formats a string with the specified generic parameter constraints on any given type. Example output: where T : class + + + + + Determines whether a generic type contains the specified generic argument constraints. + + The type. + The generic argument types. + + + + Determines whether a type is a fully constructed generic type. + + + + + Determines whether a type is nullable by ensuring the type is neither a PrimitiveType, ValueType or an Enum. + + + + + Gets the enum bitmask in a ulong. + + enumType + + + + Gets a value indicating if the string is a reserved C# keyword. + + The identifier to check. + true if the string is a C# keyword. Otherwise false. + + + + Determines if a given has a default constructor. + A type is considered to have a default constructor if: It is a string, if it is an array, if it is a value type or if it has a public parameterless constructor. + + The to investigate. + true if a default constructor has been found; otherwise false. + + + + Attempts to instantiate an object of a given with it's default constructor. If no default constructor is found then it attempts to find the most suitable alternative constructor and instantiate the with default parameters. + + The to instantiate. + Determines if the use of is preferred over a non-default constructor call. + The instantiated object or null if no suitable alternative constructor is found. + + + + Weighs multiple constructors for a given type, and attempts to find the most ideal constructor. This will ignore any unmanaged constructors. + + The to weigh the constructors of. + The to search for the constructors; means only find the public ones. + The most ideal based on the scoring system. + The scoring system prefers value types over reference types (adjusted for default values), + it provides bonuses for empty constructors or constructors solely consisting of default values. + Lastly it considers the amount of parameters present in the constructor in the overall score. + + + + Checks if a given is unmanaged, by checking if it contains any , or parameters. + + The to validate. + true if the is unmanaged; otherwise false. + + + + Extends various Unity classes. + + + + + Determines whether a Unity object is null or "fake null", + without ever calling Unity's own equality operators. + This method is useful for checking if a Unity object is + null, destroyed or missing at times when it is not allowed + to call Unity's own equality operators, for example when + not running on the main thread. + + The Unity object to check. + True if the object is null, missing or destroyed; otherwise false. + + + + Contains utilities for operating on arrays. + + + + + Creates a new array with an added element. + + The element type of the array. + The array. + The value to add. + The new array. + The given array was null. + + + + Creates a new array with an element inserted at a given index. + + The element type of the array. + The array. + The index to insert at. + The value to insert. + The given array was null. + The index to insert at was out of range. + + + + Creates a new array with an element removed. + + The element type of the array. + The array. + The index to remove an element at. + + The given array was null. + The given index to remove an element at was out of range. + + + + Utility class for asset Guid script + + + + + Tries to update the Guid of a specified asset with the Guid from a specified script type. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Provides utilities for using the namespace. + + This class is due for refactoring. Use at your own peril. + + + + + Gets a value indicating whether emitting is supported on the current platform. + + + true if the current platform can emit; otherwise, false. + + + + + Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the field to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the field to set a value to. + The instance describing the field to create a setter for. + A delegate which sets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The instance describing the field to create a setter for. + A delegate which sets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the instance to get a value from. + The type of the field to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the field to get a value from. + The of the instance to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the weakly typed value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The of the instance to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the instance to set a value on. + The type of the field to set a value to. + The instance describing the field to create a setter for. + A delegate which sets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the field to set a value to. + Type of the instance. + The instance describing the field to create a setter for. + + A delegate which sets the value of the given field. + + The fieldInfo parameter is null. + Field cannot be static. + + + + Creates a delegate which sets the weakly typed value of a field on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + Type of the instance. + The instance describing the field to create a setter for. + + A delegate which sets the value of the given field. + + The fieldInfo parameter is null. + Field cannot be static. + + + + Creates a delegate which gets the weakly typed value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The of the instance to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the weakly typed value of a property on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + Type of the instance. + The instance describing the property to create a setter for. + + A delegate which sets the value of the given field. + + The fieldInfo parameter is null. + Property cannot be static. + + + + Creates a delegate which sets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the property to set a value to. + The instance describing the property to create a setter for. + A delegate which sets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a delegate which gets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the property to get a value from. + The instance describing the property to create a getter for. + A delegate which gets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a delegate which sets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the instance to set a value on. + The type of the property to set a value to. + The instance describing the property to create a setter for. + A delegate which sets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a delegate which gets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the instance to get a value from. + The type of the property to get a value from. + The instance describing the property to create a getter for. + A delegate which gets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a fast delegate method which calls a given parameterless instance method and returns the result. + + The type of the class which the method is on. + The type which is returned by the given method info. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given parameterless static method. + + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given parameterless weakly typed instance method. + + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Not yet documented. + + + + + Creates a fast delegate method which calls a given weakly typed instance method with one argument and returns a value. + + The type of the result. + The type of the first argument. + The method info instance which is used. + + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + methodInfo + + Given method ' + methodInfo.Name + ' is static when it has to be an instance method. + or + Given method ' + methodInfo.Name + ' must return type + typeof(TResult) + . + or + Given method ' + methodInfo.Name + ' must have exactly one parameter. + or + The first parameter of the method ' + methodInfo.Name + ' must be of type + typeof(TArg1) + . + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Creates a fast delegate method which calls a given parameterless instance method. + + The type of the class which the method is on. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given instance method with a given argument. + + The type of the class which the method is on. + The type of the argument with which to call the method. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + This class encapsulates common combinations. + + + + + Search criteria encompassing all public and non-public members, including base members. + Note that you also need to specify either the Instance or Static flag. + + + + + Search criteria encompassing all public instance members, including base members. + + + + + Search criteria encompassing all non-public instance members, including base members. + + + + + Search criteria encompassing all public and non-public instance members, including base members. + + + + + Search criteria encompassing all public static members, including base members. + + + + + Search criteria encompassing all non-public static members, including base members. + + + + + Search criteria encompassing all public and non-public static members, including base members. + + + + + Search criteria encompassing all public instance members, excluding base members. + + + + + Search criteria encompassing all non-public instance members, excluding base members. + + + + + Search criteria encompassing all public and non-public instance members, excluding base members. + + + + + Search criteria encompassing all public static members, excluding base members. + + + + + Search criteria encompassing all non-public static members, excluding base members. + + + + + Search criteria encompassing all public and non-public static members, excluding base members. + + + + + Search criteria encompassing all members, including base and static members. + + + + + Search criteria encompassing all members (public and non-public, instance and static), including base members. + + + + + + A GlobalConfig singleton, automatically created and saved as a ScriptableObject in the project at the specified path. + This only happens if the UnityEditor is present. If it's not, a non-persistent ScriptableObject is created at run-time. + + + Remember to locate the path within a resources folder if you want the config file to be loaded at runtime without the Unity editor being present. + + + The asset path is specified by defining a . If no attribute is defined it will be saved in the root assets folder. + + + + + [GlobalConfig("Assets/Resources/MyConfigFiles/")] + public class MyGlobalConfig : GlobalConfig<MyGlobalConfig> + { + public int MyGlobalVariable; + } + + void SomeMethod() + { + int value = MyGlobalConfig.Instance.MyGlobalVariable; + } + + + + + + Gets a value indicating whether this instance has instance loaded. + + + + + Gets the singleton instance. + + + + + Tries to load the singleton instance. + + + + + Opens the config in a editor window. This is currently only used internally by the Sirenix.OdinInspector.Editor assembly. + + + + + Gets a value indicating whether this instance has instance loaded. + + + + + Gets the singleton instance. + + + + + This attribute is used by classes deriving from GlobalConfig and specifies the asset path for the generated config file. + + + + + + + Gets the full asset path including Application.dataPath. Only relevant if IsInResourcesFolder is false. + + + + + Gets the relative asset path. Only relevant if IsInResourcesFolder is false. + + + + + Gets the resources path. Only relevant if IsInResourcesFolder is true. + + + + + Whether the config should be associated with an asset in the project. If false, no config asset will be generated or loaded, and a new "temporary" config instance will be created for every reload. This is true by default. + + + + + Gets a value indicating whether this asset is located within a resource folder. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The relative asset. Remember to locate the path within a resources folder if you want the config file to be loaded at runtime without the Unity Editor. + + + + + GUILayoutOptions is a handy utility that provides cached GUILayoutOpion arrays based on the wanted parameters. + + + + + Most GUILayout and EditorGUILayout methods takes an optional "params GUILayoutOption[]" parameter. + Each time you call this, an array is allocated generating garbage. + + + // Generates garbage: + GUILayout.Label(label, GUILayout.Label(label, GUILayout.Width(20), GUILayout.ExpandHeight(), GUILayout.MaxWidth(300))); + + // Does not generate garbage: + GUILayout.Label(label, GUILayout.Label(label, GUILayoutOptions.Width(20).ExpandHeight().MaxWidth(300))); + + + + + + An EmptyGUIOption[] array with a length of 0. + + + + + A GUILayoutOptions instance with an implicit operator to be converted to a GUILayoutOption[] array. + + + + + + Gets or creates the cached GUILayoutOption array based on the layout options specified. + + + + + Option passed to a control to give it an absolute width. + + + + + Option passed to a control to give it an absolute height. + + + + + Option passed to a control to specify a maximum height. + + + + + Option passed to a control to specify a maximum width. + + + + + Option passed to a control to specify a minimum height. + + + + + Option passed to a control to specify a minimum width. + + + + + Option passed to a control to allow or disallow vertical expansion. + + + + + Option passed to a control to allow or disallow horizontal expansion. + + + + + Determines whether the instance is equals another instance. + + + + + Returns a hash code for this instance. + + + + + Option passed to a control to give it an absolute width. + + + + + Option passed to a control to give it an absolute height. + + + + + Option passed to a control to specify a maximum height. + + + + + Option passed to a control to specify a maximum width. + + + + + Option passed to a control to specify a minimum width. + + + + + Option passed to a control to specify a minimum height. + + + + + Option passed to a control to allow or disallow vertical expansion. + + + + + Option passed to a control to allow or disallow horizontal expansion. + + + + + Immutable hashset wraps another hashset, and allows for reading the inner hashset, without the ability to change it. + + + + + Creates an immutable hashset around another hashset. + + + + + Returns true if the item is contained in the list. + + The item's value. + + + + Gets the enumerator. + + + + + Gets the enumerator. + + + + + Interface for immutable list. + + + + + Interface for generic immutable list. + + + + + Index accessor. + + + + + Immutable list wraps another list, and allows for reading the inner list, without the ability to change it. + + + + + Creates an immutable list around another list. + + + + + Number of items in the list. + + + + + Immutable list cannot be changed directly, so it's size is always fixed. + + + + + Immutable list are always readonly. + + + + + Returns true if the inner list is synchronized. + + + + + Gets the sync root object. + + + + + Index accessor. + + Index. + + + + Returns true if the item is contained in the list. + + The item's value. + + + + Copy the list to an array, + + Target array. + Index. + + + + Copy the list to an array, + + Target array. + Index. + + + + Gets an enumerator. + + + + + Get the index of a value. + + The item's value. + + + + Immutable list cannot be edited. + + Index. + + + + Immutable list cannot be edited. + + Index. + Item. + + + + Immutable list cannot be edited. + + Item. + + + + Immutable list cannot be edited. + + + + + Immutable list cannot be edited. + + Item. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Immutable list wraps another list, and allows for reading the inner list, without the ability to change it. + + + + + Creates an immutable list around another list. + + + + + Number of items in the list. + + + + + Immutable list are always readonly. + + + + + Index accessor. + + Index. + + + + Returns true if the item is contained in the list. + + + + + Copies the list to an array. + + + + + Gets an enumerator. + + + + + Gets the index of an item. + + + + + Collection of math function. + + + + + Distance from a point to a line. + + + + + Returns a smooth value between start and end based on t. + + First point. + Second point. + Position between 0 and 1. + + + + Returns a smooth value between start and end based on t. + + First point. + Second point. + Position between 0 and 1. + Number of interpolations to make. + + + + Returns the fractional of the value. + + The value to get the fractional of. + + + + Returns the fractional of the value. + + The value to get the fractional of. + + + + Returns the fractional of the value. + + The value to get the fractional of. + + + + Returns a value based on t, that bounces faster and faster. + + The value to bounce. + + + + Returns a smooth value between 0 and 1 based on t. + + Position between 0 and 1. + + + + Returns a smooth value between 0 and 1 based on t. + + Position between 0 and 1. + Number of interpolations to make. + + + + Returns an unclamped linear interpolation of two vectors. + + The first vector. + The second vector. + The interpolation factor. + + + + Returns an unclamped linear interpolation of two vectors. + + The first vector. + The second vector. + The interpolation factor. + + + + Returns a value that bounces between 0 and 1 based on value. + + The value to bounce. + + + + Returns a value that eases in elasticly. + + The value to ease in elasticly. + The amplitude. + The length. + + + + Pows each element of the vector. + + The vector. + The power. + + + + Returns a Vector2 with each element set to their respective sign. + + The vector to sign. + + + + Returns a Vector3 with each element set to their respective sign. + + The vector to sign. + + + + Returns a value that eases out elasticly. + + The value to ease out elasticly. + The amplitude. + The length. + + + + Returns a smooth value betweeen that peaks at t=0.5 and then comes back down again. + + A value between 0 and 1. + + + + Clamps the value of a Vector3. + + The vector to clamp. + The min value. + The max value. + + + + Clamps the value of a Vector2. + + The vector to clamp. + The min value. + The max value. + + + + Computes a hash for a byte array. + + The byte array. + + + + Gives a smooth path between a collection of points. + + The collection of point. + The current position in the path. 0 is at the start of the path, 1 is at the end of the path. + + + + Checks if two given lines intersect with one another and returns the intersection point (if + any) in an out parameter. + Source: http://stackoverflow.com/questions/3746274/line-intersection-with-aabb-rectangle. + Edited to implement Cohen-Sutherland type pruning for efficiency. + + Starting point of line a. + Ending point of line a. + Starting point of line b. + Ending point of line b. + + The out parameter which contains the intersection point if there was any. + + True if the two lines intersect, otherwise false. + + + + Returns the collision point between two infinite lines. + + + + + Distance from line to plane. + + Position of the plane. + Surface normal of the plane. + Origin of the line. + Line direction normal. + + + + Distance from ray to plane. + + The ray. + The plane. + + + + Rotates a Vector2 by an angle. + + The point to rotate. + The angle to rotate. + + + + Rotates a Vector2 around a point by an angle.. + + The point to rotate. + The point to rotate around. + The angle to rotate. + + + + Interpolates t between a and b to a value between 0 and 1 using a Hermite polynomial. + + The first value. + The second value. + The position value. + A smoothed value between 0 and 1. + + + + Interpolates t between a and b to a value between 0 and 1. + + The first value. + The second value. + The position value. + Linear value between 0 and 1. + + + + Wraps a value between min and max. + + The value to wrap. + The minimum value. + The maximum value. + + + + Wraps a value between min and max. + + The value to wrap. + The minimum value. + The maximum value. + + + + Wraps a value between min and max. + + The value to wrap. + The minimum value. + The maximum value. + + + + Rounds a number based on a mininum difference. + + The value to round. + The min difference. + The rounded value. + + + + Discards the least significant demicals. + + The value of insignificant decimals. + Value with significant decimals. + + + + Clamps and wraps an angle between two values. + + + + + Provides a methods of representing imaginary fields which are unique to serialization. + + We aggregate the FieldInfo associated with this member and return a mangled form of the name. + + + + + + The default fake name separator string. + + + + + Initializes a new instance of the class. + + The field to alias. + The name prefix to use. + + + + Initializes a new instance of the class. + + The field to alias. + The name prefix to use. + The separator string to use. + + + + Gets the aliased field. + + + The aliased field. + + + + + Gets the module in which the type that declares the member represented by the current is defined. + + + + + Gets a value that identifies a metadata element. + + + + + Gets the name of the current member. + + + + + Gets the class that declares this member. + + + + + Gets the class object that was used to obtain this instance of MemberInfo. + + + + + Gets the type of the field. + + + The type of the field. + + + + + Gets a RuntimeFieldHandle, which is a handle to the internal metadata representation of a field. + + + + + Gets the attributes. + + + The attributes. + + + + + When overridden in a derived class, returns an array of all custom attributes applied to this member. + + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined. + + + + + When overridden in a derived class, returns an array of custom attributes applied to this member and identified by . + + The type of attribute to search for. Only attributes that are assignable to this type are returned. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied. + + + + + When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. + + The type of custom attribute to search for. The search includes derived types. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + True if one or more instances of or any of its derived types is applied to this member; otherwise, false. + + + + + Gets the value of the field. + + The object instance to get the value from. + The value of the field. + + + + When overridden in a derived class, sets the value of the field supported by the given object. + + The object whose field value will be set. + The value to assign to the field. + A field of Binder that specifies the type of binding that is desired (for example, Binder.CreateInstance or Binder.ExactBinding). + A set of properties that enables the binding, coercion of argument types, and invocation of members through reflection. If is null, then Binder.DefaultBinding is used. + The software preferences of a particular culture. + + + + Provides a methods of representing aliased methods. + + In this case, what we're representing is a method on a parent class with the same name. + + We aggregate the MethodInfo associated with this member and return a mangled form of the name. + The name that we return is "parentname+methodName". + + + + + + The default fake name separator string. + + + + + Initializes a new instance of the class. + + The method to alias. + The name prefix to use. + + + + Initializes a new instance of the class. + + The method to alias. + The name prefix to use. + The separator string to use. + + + + Gets the aliased method. + + + The aliased method. + + + + + Gets the custom attributes for the return type. + + + + + Gets a handle to the internal metadata representation of a method. + + + + + Gets the attributes associated with this method. + + + + + Gets the class that declares this member. + + + + + Gets the name of the current member. + + + + + Gets the class object that was used to obtain this instance of MemberInfo. + + + + + When overridden in a derived class, returns the MethodInfo object for the method on the direct or indirect base class in which the method represented by this instance was first declared. + + + A MethodInfo object for the first implementation of this method. + + + + + When overridden in a derived class, returns an array of all custom attributes applied to this member. + + true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined. + + + + + When overridden in a derived class, returns an array of custom attributes applied to this member and identified by . + + The type of attribute to search for. Only attributes that are assignable to this type are returned. + true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied. + + + + + When overridden in a derived class, returns the flags. + + + The MethodImplAttributes flags. + + + + + When overridden in a derived class, gets the parameters of the specified method or constructor. + + + An array of type ParameterInfo containing information that matches the signature of the method (or constructor) reflected by this MethodBase instance. + + + + + When overridden in a derived class, invokes the reflected method or constructor with the given parameters. + + The object on which to invoke the method or constructor. If a method is static, this argument is ignored. If a constructor is static, this argument must be null or an instance of the class that defines the constructor. + A bitmask that is a combination of 0 or more bit flags from . If is null, this parameter is assigned the value ; thus, whatever you pass in is ignored. + An object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects via reflection. If is null, the default binder is used. + An argument list for the invoked method or constructor. This is an array of objects with the same number, order, and type as the parameters of the method or constructor to be invoked. If there are no parameters, this should be null.If the method or constructor represented by this instance takes a ByRef parameter, there is no special attribute required for that parameter in order to invoke the method or constructor using this function. Any object in this array that is not explicitly initialized with a value will contain the default value for that object type. For reference-type elements, this value is null. For value-type elements, this value is 0, 0.0, or false, depending on the specific element type. + An instance of CultureInfo used to govern the coercion of types. If this is null, the CultureInfo for the current thread is used. (This is necessary to convert a String that represents 1000 to a Double value, for example, since 1000 is represented differently by different cultures.) + + An Object containing the return value of the invoked method, or null in the case of a constructor, or null if the method's return type is void. Before calling the method or constructor, Invoke checks to see if the user has access permission and verifies that the parameters are valid.CautionElements of the array that represent parameters declared with the ref or out keyword may also be modified. + + + + + When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. + + The type of custom attribute to search for. The search includes derived types. + true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + true if one or more instances of or any of its derived types is applied to this member; otherwise, false. + + + + + Provides a methods of representing imaginary properties which are unique to serialization. + + We aggregate the PropertyInfo associated with this member and return a mangled form of the name. + + + + + + The default fake name separator string. + + + + + Initializes a new instance of the class. + + The property to alias. + The name prefix to use. + + + + Initializes a new instance of the class. + + The property to alias. + The name prefix to use. + The separator string to use. + + + + Not yet documented. + + + + + Gets the module in which the type that declares the member represented by the current is defined. + + + + + Gets a value that identifies a metadata element. + + + + + Gets the name of the current member. + + + + + Gets the class that declares this member. + + + + + Gets the class object that was used to obtain this instance of MemberInfo. + + + + + Gets the type of the property. + + + The type of the property. + + + + + Gets the attributes. + + + The attributes. + + + + + Gets a value indicating whether this instance can read. + + + true if this instance can read; otherwise, false. + + + + + Gets a value indicating whether this instance can write. + + + true if this instance can write; otherwise, false. + + + + + When overridden in a derived class, returns an array of all custom attributes applied to this member. + + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined. + + + + + When overridden in a derived class, returns an array of custom attributes applied to this member and identified by . + + The type of attribute to search for. Only attributes that are assignable to this type are returned. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied. + + + + + When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. + + The type of custom attribute to search for. The search includes derived types. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + True if one or more instances of or any of its derived types is applied to this member; otherwise, false. + + + + + Returns an array whose elements reflect the public and, if specified, non-public get, set, and other accessors of the property reflected by the current instance. + + Indicates whether non-public methods should be returned in the MethodInfo array. true if non-public methods are to be included; otherwise, false. + + An array of objects whose elements reflect the get, set, and other accessors of the property reflected by the current instance. If is true, this array contains public and non-public get, set, and other accessors. If is false, this array contains only public get, set, and other accessors. If no accessors with the specified visibility are found, this method returns an array with zero (0) elements. + + + + + When overridden in a derived class, returns the public or non-public get accessor for this property. + + Indicates whether a non-public get accessor should be returned. true if a non-public accessor is to be returned; otherwise, false. + + A MethodInfo object representing the get accessor for this property, if is true. Returns null if is false and the get accessor is non-public, or if is true but no get accessors exist. + + + + + Gets the index parameters of the property. + + The index parameters of the property. + + + + When overridden in a derived class, returns the set accessor for this property. + + Indicates whether the accessor should be returned if it is non-public. true if a non-public accessor is to be returned; otherwise, false. + + Value Condition A object representing the Set method for this property. The set accessor is public.-or- is true and the set accessor is non-public. null is true, but the property is read-only.-or- is false and the set accessor is non-public.-or- There is no set accessor. + + + + + Gets the value of the property on the given instance. + + The object to invoke the getter on. + The to invoke with. + The binder to use. + The indices to use. + The culture to use. + The value of the property on the given instance. + + + + Sets the value of the property on the given instance. + + The object to set the value on. + The value to set. + The to invoke with. + The binder to use. + The indices to use. + The culture to use. + + + + Contains utilities for operating on arrays multi-dimentional arrays. + + + + + Inserts one column left of the specified column index. + + The type of the element. + Index of the column. + The array. + + + + Inserts one column right of the specified column index. + + The type of the element. + Index of the column. + The arr. + + + + Inserts one row above the specified row index. + + The type of the element. + The array. + The row index. + + + + Inserts one row below the specified row index. + + The type of the element. + The array. + Index of the row. + + + + Duplicates the column. + + The type of the element. + Index of the column. + The array. + + + + Duplicates the row. + + The type of the element. + The array. + Index of the row. + + + + Moves a column. + + The type of the element. + The array. + From column. + To column. + + + + Moves a row. + + The type of the element. + The array. + From row. + To row. + + + + Deletes a column. + + The type of the element. + The array. + Index of the column. + + + + Deletes the row. + + The type of the element. + The array. + Index of the row. + + + + Indicates a persistent assembly. + + + + + Compares objects by reference only, ignoring equality operators completely. This is used by the property tree reference dictionaries to keep track of references. + + + + + A default, cached instance of this generic variant of the reference equality comparer. + + + + + Returns true if the object references are equal. + + + + + Returns the result of the object's own GetHashCode method. + + + + + Paths to Sirenix assets. + + + + + Path to Odin Inspector folder. + + + + + Path to Sirenix assets folder. + + + + + Path to Sirenix folder. + + + + + Path to Sirenix assemblies. + + + + + Path to Odin Inspector resources folder. + + + + + Path to Odin Inspector configuration folder. + + + + + Path to Odin Inspector resources configuration folder. + + + + + Path to Odin Inspector temporary folder. + + + + + This attribute is used by classes deriving from GlobalConfig and specifies the menu item path for the preference window and the asset path for the generated config file. + The scriptable object created will be located at the OdinEditorConfigs path unless other is specified. + Classes implementing this attribute will be part of the Odin Preferences window. + + + + + + Initializes a new instance of the class. + + + + + This attribute is used by classes deriving from GlobalConfig and specifies the menu item path for the preference window and the asset path for the generated config file. + The scriptable object created will be located at the OdinResourcesConigs path unless other is specified. + Classes implementing this attribute will be part of the Odin Preferences window. + + + + + + Initializes a new instance of the class. + + + + + Not yet documented. + + + + + Not yet documented. + + Not yet documented. + Not yet documented. + Not yet documented. + + + + Compares two strings in a number-aware manner, IE, "[2] Foo" is considered to come before "[10] Bar". + + + + + Utility class indicating current Unity version. + + + + + Tests current Unity version is equal or greater. + + Minimum major version. + Minimum minor version. + true if the current Unity version is greater. Otherwise false. + + + + The current Unity version major. + + + + + The current Unity version minor. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml.meta new file mode 100644 index 0000000..cc14132 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4873f2a8bdae42baa0406e8a6136096f +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/link.xml b/Assets/Plugins/Sirenix/Assemblies/link.xml new file mode 100644 index 0000000..1df8f84 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/link.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Assemblies/link.xml.meta b/Assets/Plugins/Sirenix/Assemblies/link.xml.meta new file mode 100644 index 0000000..27e066d --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/link.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1bec01331befdea4d9ed9033eabd68f8 +timeCreated: 1613046886 +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector.meta b/Assets/Plugins/Sirenix/Odin Inspector.meta new file mode 100644 index 0000000..afb70e8 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fe4970195facd664dbd38d1cbf2100c3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets.meta b/Assets/Plugins/Sirenix/Odin Inspector/Assets.meta new file mode 100644 index 0000000..fcb0c3e --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 52c0fd243c6c01e4d9efa03616b655d5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor.meta b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor.meta new file mode 100644 index 0000000..f482d7b --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 85e532eecf67ab545b2a5a28f1a22894 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt new file mode 100644 index 0000000..2b637b2 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt @@ -0,0 +1,30 @@ +Odin Inspector makes use of the Bootstrap icon library. +The library has been packed into the SdfIconAtlas.png +file as SDF data. + +Bootstrap is released under the following license: + +--- + +The MIT License (MIT) + +Copyright (c) 2011-2018 Twitter, Inc. +Copyright (c) 2011-2018 The Bootstrap Authors + +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. \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt.meta b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt.meta new file mode 100644 index 0000000..e3864a0 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3fdc67fad3e362e47b5dd365a0bbdd7f +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes new file mode 100644 index 0000000..1a63707 Binary files /dev/null and b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes differ diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes.meta b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes.meta new file mode 100644 index 0000000..6ad740b --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 90eaa0dc28c1934408dc1c02e13a507f +timeCreated: 1628274352 +licenseType: Store +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset new file mode 100644 index 0000000..3a82383 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -262940062, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} + m_Name: OdinPathLookup + m_EditorClassIdentifier: \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset.meta new file mode 100644 index 0000000..4d528eb --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 08379ccefc05200459f90a1c0711a340 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png new file mode 100644 index 0000000..6d255d5 Binary files /dev/null and b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png differ diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png.meta b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png.meta new file mode 100644 index 0000000..0c03933 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png.meta @@ -0,0 +1,128 @@ +fileFormatVersion: 2 +guid: 2a0112a98875dfd488b5d10bdb8a4903 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + 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: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 0 + spriteTessellationDetail: -1 + textureType: 10 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 16384 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 16384 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 16384 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config.meta new file mode 100644 index 0000000..332d9c5 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d9d0676c3aa541c488f4500961f7225c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor.meta new file mode 100644 index 0000000..4db530f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e9ebb649a8cc23f408a5f06fc523d3b6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset new file mode 100644 index 0000000..b36513a --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset @@ -0,0 +1,25 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -645759843, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} + m_Name: GeneralDrawerConfig + m_EditorClassIdentifier: + enableUIToolkitSupport: 1 + useOldUnityObjectField: 0 + useOldUnityPreviewField: 0 + useOldTypeSelector: 0 + useNewObjectSelector: 1 + showNoneItem: 1 + showCategoriesByDefault: 0 + preferNamespacesOverAssemblyCategories: 1 + useOldPolymorphicField: 0 + showBaseType: 1 + nonDefaultConstructorPreference: 0 diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset.meta new file mode 100644 index 0000000..6ee5f6b --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8673c9c5e20a0da4ab064d365abf4ae1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset new file mode 100644 index 0000000..5b65043 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset @@ -0,0 +1,19 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1137305049, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} + m_Name: InspectorConfig + m_EditorClassIdentifier: + enableOdinInInspector: 1 + defaultEditorBehaviour: 11 + processMouseMoveInInspector: 1 + drawingConfig: + configs: [] diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset.meta new file mode 100644 index 0000000..6f07b2c --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8f22a79e1cea18142860119772724531 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset new file mode 100644 index 0000000..34d5c6f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset @@ -0,0 +1,19 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -228747253, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} + m_Name: OdinModuleConfig + m_EditorClassIdentifier: + configurations: + - ID: Unity.Mathematics + ActivationSettings: 0 + ModuleTogglingSettings: 1 + ModuleUpdateSettings: 1 diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset.meta new file mode 100644 index 0000000..326937b --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c407d1f6349047f489dcd0ceb6228371 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/TypeRegistryUserConfig.asset b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/TypeRegistryUserConfig.asset new file mode 100644 index 0000000..18bf021 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/TypeRegistryUserConfig.asset @@ -0,0 +1,24 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 2050440665, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} + m_Name: TypeRegistryUserConfig + m_EditorClassIdentifier: + shownTypes: + serializedCollection: [] + hiddenTypes: + serializedCollection: [] + addedIllegalTypes: + serializedCollection: [] + typeSettings: + serializedDictionary: [] + typePriorities: + serializedDictionary: [] diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/TypeRegistryUserConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/TypeRegistryUserConfig.asset.meta new file mode 100644 index 0000000..74667a0 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/TypeRegistryUserConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 66f8a0854511ac748901cda78dbb2e85 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources.meta new file mode 100644 index 0000000..ad3fa14 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 530c2748011639141b4d56bb6c011955 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix.meta new file mode 100644 index 0000000..6d0c839 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0baed55578106e04b97fb45f9b167c53 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset b/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset new file mode 100644 index 0000000..0e48b68 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset @@ -0,0 +1,22 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1549551891, guid: 74721b9f0af448f5ae2e91102a1a5edd, type: 3} + m_Name: GlobalSerializationConfig + m_EditorClassIdentifier: + HideSerializationCautionaryMessage: 0 + HidePrefabCautionaryMessage: 0 + HideOdinSerializeAttributeWarningMessages: 0 + HideNonSerializedShowInInspectorWarningMessages: 0 + buildSerializationFormat: 0 + editorSerializationFormat: 2 + loggingPolicy: 0 + errorHandlingPolicy: 0 diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset.meta new file mode 100644 index 0000000..8060adb --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6087aa365d52be4468b4878ee05cc100 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules.meta new file mode 100644 index 0000000..40fd921 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 356a67db9bc6244428bcd2aad1eefbda +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data new file mode 100644 index 0000000..900af52 Binary files /dev/null and b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data differ diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data.meta new file mode 100644 index 0000000..60a75a3 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +<<<<<<<< HEAD:Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data.meta +guid: b7efdabd500378f4a861d221bd9cdda6 +======== +guid: 825efef6ba8a5744aa342459759569a0 +>>>>>>>> 8f2b841f2cdbb028247b83d3caed38a79a85739f:Assets/Scenes/05_office.unity.meta +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data new file mode 100644 index 0000000..d86c063 Binary files /dev/null and b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data differ diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data.meta new file mode 100644 index 0000000..965c525 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 728df0e3465c1a148b83053a3f31d489 +timeCreated: 1573836981 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data new file mode 100644 index 0000000..cb97d6d Binary files /dev/null and b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data differ diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data.meta new file mode 100644 index 0000000..8b4ef82 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 5a1693d73a4f6e34d955789129c71e11 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data new file mode 100644 index 0000000..f3de456 Binary files /dev/null and b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data differ diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data.meta new file mode 100644 index 0000000..ee5dc74 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4866e740a22eb1e49b1603b051e4d92c +timeCreated: 1573836980 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.meta new file mode 100644 index 0000000..df8cd53 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a66fb0c686ccec6479409c90791aa87e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/MathematicsDrawers.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/MathematicsDrawers.cs new file mode 100644 index 0000000..a8a70e7 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/MathematicsDrawers.cs @@ -0,0 +1,883 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +namespace Sirenix.OdinInspector.Modules.UnityMathematics.Editor +{ +#if UNITY_EDITOR + using System; + using System.Collections.Generic; + using System.Reflection; + using Sirenix.OdinInspector.Editor; + using Sirenix.Utilities; + using Sirenix.Utilities.Editor; + using Unity.Mathematics; + using UnityEditor; + using UnityEngine; + + public sealed class MatrixFloat2x2Processor : MatrixProcessor { } + public sealed class MatrixFloat3x2Processor : MatrixProcessor { } + public sealed class MatrixFloat4x2Processor : MatrixProcessor { } + public sealed class MatrixFloat2x3Processor : MatrixProcessor { } + public sealed class MatrixFloat3x3Processor : MatrixProcessor { } + public sealed class MatrixFloat4x3Processor : MatrixProcessor { } + public sealed class MatrixFloat2x4Processor : MatrixProcessor { } + public sealed class MatrixFloat3x4Processor : MatrixProcessor { } + public sealed class MatrixFloat4x4Processor : MatrixProcessor { } + + public sealed class MatrixDouble2x2Processor : MatrixProcessor { } + public sealed class MatrixDouble3x2Processor : MatrixProcessor { } + public sealed class MatrixDouble4x2Processor : MatrixProcessor { } + public sealed class MatrixDouble2x3Processor : MatrixProcessor { } + public sealed class MatrixDouble3x3Processor : MatrixProcessor { } + public sealed class MatrixDouble4x3Processor : MatrixProcessor { } + public sealed class MatrixDouble2x4Processor : MatrixProcessor { } + public sealed class MatrixDouble3x4Processor : MatrixProcessor { } + public sealed class MatrixDouble4x4Processor : MatrixProcessor { } + + public sealed class MatrixBool2x2Processor : MatrixProcessor { } + public sealed class MatrixBool3x2Processor : MatrixProcessor { } + public sealed class MatrixBool4x2Processor : MatrixProcessor { } + public sealed class MatrixBool2x3Processor : MatrixProcessor { } + public sealed class MatrixBool3x3Processor : MatrixProcessor { } + public sealed class MatrixBool4x3Processor : MatrixProcessor { } + public sealed class MatrixBool2x4Processor : MatrixProcessor { } + public sealed class MatrixBool3x4Processor : MatrixProcessor { } + public sealed class MatrixBool4x4Processor : MatrixProcessor { } + + public sealed class MatrixInt2x2Processor : MatrixProcessor { } + public sealed class MatrixInt3x2Processor : MatrixProcessor { } + public sealed class MatrixInt4x2Processor : MatrixProcessor { } + public sealed class MatrixInt2x3Processor : MatrixProcessor { } + public sealed class MatrixInt3x3Processor : MatrixProcessor { } + public sealed class MatrixInt4x3Processor : MatrixProcessor { } + public sealed class MatrixInt2x4Processor : MatrixProcessor { } + public sealed class MatrixInt3x4Processor : MatrixProcessor { } + public sealed class MatrixInt4x4Processor : MatrixProcessor { } + + public sealed class MatrixUInt2x2Processor : MatrixProcessor { } + public sealed class MatrixUInt3x2Processor : MatrixProcessor { } + public sealed class MatrixUInt4x2Processor : MatrixProcessor { } + public sealed class MatrixUInt2x3Processor : MatrixProcessor { } + public sealed class MatrixUInt3x3Processor : MatrixProcessor { } + public sealed class MatrixUInt4x3Processor : MatrixProcessor { } + public sealed class MatrixUInt2x4Processor : MatrixProcessor { } + public sealed class MatrixUInt3x4Processor : MatrixProcessor { } + public sealed class MatrixUInt4x4Processor : MatrixProcessor { } + + public sealed class DisableUnityMatrixDrawerAttribute : Attribute { } + + public abstract class MatrixProcessor : OdinAttributeProcessor + { + public override void ProcessSelfAttributes(InspectorProperty property, List attributes) + { + attributes.GetOrAddAttribute(); + attributes.GetOrAddAttribute(); + } + + public override void ProcessChildMemberAttributes(InspectorProperty parentProperty, MemberInfo member, List attributes) + { + attributes.Add(new HideLabelAttribute()); + attributes.Add(new MatrixChildAttribute()); + } + } + + public class DisableUnityMatrixDrawerAttributeDrawer : OdinAttributeDrawer + { + protected override void Initialize() + { + this.SkipWhenDrawing = true; + var chain = this.Property.GetActiveDrawerChain().BakedDrawerArray; + + for (int i = 0; i < chain.Length; i++) + { + var type = chain[i].GetType(); + + if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(UnityPropertyDrawer<,>) && type.GetGenericArguments()[0].Name == "MatrixDrawer") + { + chain[i].SkipWhenDrawing = true; + break; + } + } + } + } + + public class MatrixChildAttribute : Attribute { } + + public class Bool2Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 100; + + if (label != null) + { + GUILayout.Space(3); // Ugh, better than nothing + } + + var options = GUILayoutOptions.Height(EditorGUIUtility.singleLineHeight); + + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + EditorGUILayout.EndVertical(); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + EditorGUILayout.EndVertical(); + GUIHelper.PopLabelWidth(); + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class Bool3Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 100; + + if (label != null) + { + GUILayout.Space(3); // Ugh, better than nothing + } + + var options = GUILayoutOptions.Height(EditorGUIUtility.singleLineHeight); + + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + EditorGUILayout.EndVertical(); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + EditorGUILayout.EndVertical(); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + EditorGUILayout.EndVertical(); + GUIHelper.PopLabelWidth(); + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class Bool4Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 100; + + if (label != null) + { + GUILayout.Space(3); // Ugh, better than nothing + } + + var options = GUILayoutOptions.Height(EditorGUIUtility.singleLineHeight); + + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + EditorGUILayout.EndVertical(); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + EditorGUILayout.EndVertical(); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + EditorGUILayout.EndVertical(); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[3].Draw(showLabels ? GUIHelper.TempContent("W") : null); + EditorGUILayout.EndVertical(); + GUIHelper.PopLabelWidth(); + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class Float2Drawer : OdinValueDrawer, IDefinesGenericMenuItems + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + // Slide rect + { + var val = this.ValueEntry.SmartValue; + EditorGUI.BeginChangeCheck(); + var vec = SirenixEditorFields.VectorPrefixSlideRect(labelRect, new Vector2(val.x, val.y)); + val = new float2(vec.x, vec.y); + if (EditorGUI.EndChangeCheck()) + { + this.ValueEntry.SmartValue = val; + } + } + + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + + /// + /// Populates the generic menu for the property. + /// + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + float2 value = (float2)property.ValueEntry.WeakSmartValue; + var vec = new Vector2(value.x, value.y); + + if (genericMenu.GetItemCount() > 0) + { + genericMenu.AddSeparator(""); + } + genericMenu.AddItem(new GUIContent("Normalize"), Mathf.Approximately(vec.magnitude, 1f), () => NormalizeEntries(property)); + genericMenu.AddItem(new GUIContent("Zero", "Set the vector to (0, 0)"), vec == Vector2.zero, () => SetVector(property, Vector2.zero)); + genericMenu.AddItem(new GUIContent("One", "Set the vector to (1, 1)"), vec == Vector2.one, () => SetVector(property, Vector2.one)); + genericMenu.AddSeparator(""); + genericMenu.AddItem(new GUIContent("Right", "Set the vector to (1, 0)"), vec == Vector2.right, () => SetVector(property, Vector2.right)); + genericMenu.AddItem(new GUIContent("Left", "Set the vector to (-1, 0)"), vec == Vector2.left, () => SetVector(property, Vector2.left)); + genericMenu.AddItem(new GUIContent("Up", "Set the vector to (0, 1)"), vec == Vector2.up, () => SetVector(property, Vector2.up)); + genericMenu.AddItem(new GUIContent("Down", "Set the vector to (0, -1)"), vec == Vector2.down, () => SetVector(property, Vector2.down)); + } + + private void SetVector(InspectorProperty property, Vector2 value) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = new float2(value.x, value.y); + } + }); + } + + private void NormalizeEntries(InspectorProperty property) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = math.normalizesafe((float2)property.ValueEntry.WeakValues[i]); + } + }); + } + } + + public class Float3Drawer : OdinValueDrawer, IDefinesGenericMenuItems + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + // Slide rect + { + var val = this.ValueEntry.SmartValue; + EditorGUI.BeginChangeCheck(); + var vec = SirenixEditorFields.VectorPrefixSlideRect(labelRect, new Vector3(val.x, val.y, val.z)); + val = new float3(vec.x, vec.y, vec.z); + if (EditorGUI.EndChangeCheck()) + { + this.ValueEntry.SmartValue = val; + } + } + + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + + /// + /// Populates the generic menu for the property. + /// + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + float3 value = (float3)property.ValueEntry.WeakSmartValue; + var vec = new Vector3(value.x, value.y, value.z); + + if (genericMenu.GetItemCount() > 0) + { + genericMenu.AddSeparator(""); + } + genericMenu.AddItem(new GUIContent("Normalize"), Mathf.Approximately(vec.magnitude, 1f), () => NormalizeEntries(property)); + genericMenu.AddItem(new GUIContent("Zero", "Set the vector to (0, 0, 0)"), vec == Vector3.zero, () => SetVector(property, Vector3.zero)); + genericMenu.AddItem(new GUIContent("One", "Set the vector to (1, 1, 1)"), vec == Vector3.one, () => SetVector(property, Vector3.one)); + genericMenu.AddSeparator(""); + genericMenu.AddItem(new GUIContent("Right", "Set the vector to (1, 0, 0)"), vec == Vector3.right, () => SetVector(property, Vector3.right)); + genericMenu.AddItem(new GUIContent("Left", "Set the vector to (-1, 0, 0)"), vec == Vector3.left, () => SetVector(property, Vector3.left)); + genericMenu.AddItem(new GUIContent("Up", "Set the vector to (0, 1, 0)"), vec == Vector3.up, () => SetVector(property, Vector3.up)); + genericMenu.AddItem(new GUIContent("Down", "Set the vector to (0, -1, 0)"), vec == Vector3.down, () => SetVector(property, Vector3.down)); + genericMenu.AddItem(new GUIContent("Forward", "Set the vector property to (0, 0, 1)"), vec == Vector3.forward, () => SetVector(property, Vector3.forward)); + genericMenu.AddItem(new GUIContent("Back", "Set the vector property to (0, 0, -1)"), vec == Vector3.back, () => SetVector(property, Vector3.back)); + } + + private void SetVector(InspectorProperty property, Vector3 value) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = new float3(value.x, value.y, value.z); + } + }); + } + + private void NormalizeEntries(InspectorProperty property) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = math.normalizesafe((float3)property.ValueEntry.WeakValues[i]); + } + }); + } + } + + public class Float4Drawer : OdinValueDrawer, IDefinesGenericMenuItems + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + // Slide rect + { + var val = this.ValueEntry.SmartValue; + EditorGUI.BeginChangeCheck(); + var vec = SirenixEditorFields.VectorPrefixSlideRect(labelRect, new Vector4(val.x, val.y, val.z, val.w)); + val = new float4(vec.x, vec.y, vec.z, vec.w); + if (EditorGUI.EndChangeCheck()) + { + this.ValueEntry.SmartValue = val; + } + } + + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + this.ValueEntry.Property.Children[3].Draw(showLabels ? GUIHelper.TempContent("W") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + + /// + /// Populates the generic menu for the property. + /// + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + float4 value = (float4)property.ValueEntry.WeakSmartValue; + var vec = new Vector4(value.x, value.y, value.z, value.w); + + if (genericMenu.GetItemCount() > 0) + { + genericMenu.AddSeparator(""); + } + genericMenu.AddItem(new GUIContent("Normalize"), Mathf.Approximately(vec.magnitude, 1f), () => NormalizeEntries(property)); + genericMenu.AddItem(new GUIContent("Zero", "Set the vector to (0, 0, 0, 0)"), vec == Vector4.zero, () => SetVector(property, Vector3.zero)); + genericMenu.AddItem(new GUIContent("One", "Set the vector to (1, 1, 1, 1)"), vec == Vector4.one, () => SetVector(property, Vector4.one)); + genericMenu.AddSeparator(""); + genericMenu.AddItem(new GUIContent("Right", "Set the vector to (1, 0, 0, 0)"), (Vector3)vec == Vector3.right, () => SetVector(property, Vector3.right)); + genericMenu.AddItem(new GUIContent("Left", "Set the vector to (-1, 0, 0, 0)"), (Vector3)vec == Vector3.left, () => SetVector(property, Vector3.left)); + genericMenu.AddItem(new GUIContent("Up", "Set the vector to (0, 1, 0, 0)"), (Vector3)vec == Vector3.up, () => SetVector(property, Vector3.up)); + genericMenu.AddItem(new GUIContent("Down", "Set the vector to (0, -1, 0, 0)"), (Vector3)vec == Vector3.down, () => SetVector(property, Vector3.down)); + genericMenu.AddItem(new GUIContent("Forward", "Set the vector property to (0, 0, 1, 0)"), (Vector3)vec == Vector3.forward, () => SetVector(property, Vector3.forward)); + genericMenu.AddItem(new GUIContent("Back", "Set the vector property to (0, 0, -1, 0)"), (Vector3)vec == Vector3.back, () => SetVector(property, Vector3.back)); + } + + private void SetVector(InspectorProperty property, Vector4 value) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = new float4(value.x, value.y, value.z, value.w); + } + }); + } + + private void NormalizeEntries(InspectorProperty property) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = math.normalizesafe((float4)property.ValueEntry.WeakValues[i]); + } + }); + } + } + + + public class Double2Drawer : OdinValueDrawer, IDefinesGenericMenuItems + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + // Slide rect + { + var val = this.ValueEntry.SmartValue; + EditorGUI.BeginChangeCheck(); + var vec = SirenixEditorFields.VectorPrefixSlideRect(labelRect, new Vector2((float)val.x, (float)val.y)); + val = new double2(vec.x, vec.y); + if (EditorGUI.EndChangeCheck()) + { + this.ValueEntry.SmartValue = val; + } + } + + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + + /// + /// Populates the generic menu for the property. + /// + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + double2 value = (double2)property.ValueEntry.WeakSmartValue; + var vec = new Vector2((float)value.x, (float)value.y); + + if (genericMenu.GetItemCount() > 0) + { + genericMenu.AddSeparator(""); + } + genericMenu.AddItem(new GUIContent("Normalize"), Mathf.Approximately(vec.magnitude, 1f), () => NormalizeEntries(property)); + genericMenu.AddItem(new GUIContent("Zero", "Set the vector to (0, 0)"), vec == Vector2.zero, () => SetVector(property, Vector2.zero)); + genericMenu.AddItem(new GUIContent("One", "Set the vector to (1, 1)"), vec == Vector2.one, () => SetVector(property, Vector2.one)); + genericMenu.AddSeparator(""); + genericMenu.AddItem(new GUIContent("Right", "Set the vector to (1, 0)"), vec == Vector2.right, () => SetVector(property, Vector2.right)); + genericMenu.AddItem(new GUIContent("Left", "Set the vector to (-1, 0)"), vec == Vector2.left, () => SetVector(property, Vector2.left)); + genericMenu.AddItem(new GUIContent("Up", "Set the vector to (0, 1)"), vec == Vector2.up, () => SetVector(property, Vector2.up)); + genericMenu.AddItem(new GUIContent("Down", "Set the vector to (0, -1)"), vec == Vector2.down, () => SetVector(property, Vector2.down)); + } + + private void SetVector(InspectorProperty property, Vector2 value) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = new double2(value.x, value.y); + } + }); + } + + private void NormalizeEntries(InspectorProperty property) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = math.normalizesafe((double2)property.ValueEntry.WeakValues[i]); + } + }); + } + } + + public class Double3Drawer : OdinValueDrawer, IDefinesGenericMenuItems + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + // Slide rect + { + var val = this.ValueEntry.SmartValue; + EditorGUI.BeginChangeCheck(); + var vec = SirenixEditorFields.VectorPrefixSlideRect(labelRect, new Vector3((float)val.x, (float)val.y, (float)val.z)); + val = new double3(vec.x, vec.y, vec.z); + if (EditorGUI.EndChangeCheck()) + { + this.ValueEntry.SmartValue = val; + } + } + + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + + /// + /// Populates the generic menu for the property. + /// + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + double3 value = (double3)property.ValueEntry.WeakSmartValue; + var vec = new Vector3((float)value.x, (float)value.y, (float)value.z); + + if (genericMenu.GetItemCount() > 0) + { + genericMenu.AddSeparator(""); + } + genericMenu.AddItem(new GUIContent("Normalize"), Mathf.Approximately(vec.magnitude, 1f), () => NormalizeEntries(property)); + genericMenu.AddItem(new GUIContent("Zero", "Set the vector to (0, 0, 0)"), vec == Vector3.zero, () => SetVector(property, Vector3.zero)); + genericMenu.AddItem(new GUIContent("One", "Set the vector to (1, 1, 1)"), vec == Vector3.one, () => SetVector(property, Vector3.one)); + genericMenu.AddSeparator(""); + genericMenu.AddItem(new GUIContent("Right", "Set the vector to (1, 0, 0)"), vec == Vector3.right, () => SetVector(property, Vector3.right)); + genericMenu.AddItem(new GUIContent("Left", "Set the vector to (-1, 0, 0)"), vec == Vector3.left, () => SetVector(property, Vector3.left)); + genericMenu.AddItem(new GUIContent("Up", "Set the vector to (0, 1, 0)"), vec == Vector3.up, () => SetVector(property, Vector3.up)); + genericMenu.AddItem(new GUIContent("Down", "Set the vector to (0, -1, 0)"), vec == Vector3.down, () => SetVector(property, Vector3.down)); + genericMenu.AddItem(new GUIContent("Forward", "Set the vector property to (0, 0, 1)"), vec == Vector3.forward, () => SetVector(property, Vector3.forward)); + genericMenu.AddItem(new GUIContent("Back", "Set the vector property to (0, 0, -1)"), vec == Vector3.back, () => SetVector(property, Vector3.back)); + } + + private void SetVector(InspectorProperty property, Vector3 value) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = new double3(value.x, value.y, value.z); + } + }); + } + + private void NormalizeEntries(InspectorProperty property) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = math.normalizesafe((double3)property.ValueEntry.WeakValues[i]); + } + }); + } + } + + public class Double4Drawer : OdinValueDrawer, IDefinesGenericMenuItems + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + // Slide rect + { + var val = this.ValueEntry.SmartValue; + EditorGUI.BeginChangeCheck(); + var vec = SirenixEditorFields.VectorPrefixSlideRect(labelRect, new Vector4((float)val.x, (float)val.y, (float)val.z, (float)val.w)); + val = new double4(vec.x, vec.y, vec.z, vec.w); + if (EditorGUI.EndChangeCheck()) + { + this.ValueEntry.SmartValue = val; + } + } + + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + this.ValueEntry.Property.Children[3].Draw(showLabels ? GUIHelper.TempContent("W") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + + /// + /// Populates the generic menu for the property. + /// + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + double4 value = (double4)property.ValueEntry.WeakSmartValue; + var vec = new Vector4((float)value.x, (float)value.y, (float)value.z, (float)value.w); + + if (genericMenu.GetItemCount() > 0) + { + genericMenu.AddSeparator(""); + } + genericMenu.AddItem(new GUIContent("Normalize"), Mathf.Approximately(vec.magnitude, 1f), () => NormalizeEntries(property)); + genericMenu.AddItem(new GUIContent("Zero", "Set the vector to (0, 0, 0, 0)"), vec == Vector4.zero, () => SetVector(property, Vector3.zero)); + genericMenu.AddItem(new GUIContent("One", "Set the vector to (1, 1, 1, 1)"), vec == Vector4.one, () => SetVector(property, Vector4.one)); + genericMenu.AddSeparator(""); + genericMenu.AddItem(new GUIContent("Right", "Set the vector to (1, 0, 0, 0)"), (Vector3)vec == Vector3.right, () => SetVector(property, Vector3.right)); + genericMenu.AddItem(new GUIContent("Left", "Set the vector to (-1, 0, 0, 0)"), (Vector3)vec == Vector3.left, () => SetVector(property, Vector3.left)); + genericMenu.AddItem(new GUIContent("Up", "Set the vector to (0, 1, 0, 0)"), (Vector3)vec == Vector3.up, () => SetVector(property, Vector3.up)); + genericMenu.AddItem(new GUIContent("Down", "Set the vector to (0, -1, 0, 0)"), (Vector3)vec == Vector3.down, () => SetVector(property, Vector3.down)); + genericMenu.AddItem(new GUIContent("Forward", "Set the vector property to (0, 0, 1, 0)"), (Vector3)vec == Vector3.forward, () => SetVector(property, Vector3.forward)); + genericMenu.AddItem(new GUIContent("Back", "Set the vector property to (0, 0, -1, 0)"), (Vector3)vec == Vector3.back, () => SetVector(property, Vector3.back)); + } + + private void SetVector(InspectorProperty property, Vector4 value) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = new double4(value.x, value.y, value.z, value.w); + } + }); + } + + private void NormalizeEntries(InspectorProperty property) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = math.normalizesafe((double4)property.ValueEntry.WeakValues[i]); + } + }); + } + } + + public class Int2Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class Int3Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class Int4Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + this.ValueEntry.Property.Children[3].Draw(showLabels ? GUIHelper.TempContent("W") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class UInt2Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class UInt3Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class UInt4Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + this.ValueEntry.Property.Children[3].Draw(showLabels ? GUIHelper.TempContent("W") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } +#endif +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/MathematicsDrawers.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/MathematicsDrawers.cs.meta new file mode 100644 index 0000000..95a3319 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/MathematicsDrawers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 74718b273a32d874a9dc3c58269c36b3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/Sirenix.OdinInspector.Modules.UnityMathematics.asmdef b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/Sirenix.OdinInspector.Modules.UnityMathematics.asmdef new file mode 100644 index 0000000..613c7ac --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/Sirenix.OdinInspector.Modules.UnityMathematics.asmdef @@ -0,0 +1,11 @@ +{ + "name": "Sirenix.OdinInspector.Modules.UnityMathematics", + "references": [ "Unity.Mathematics", "Sirenix.OdinInspector.Attributes", "Sirenix.OdinInspector.Editor", "Sirenix.Utilities", "Sirenix.Utilities.Editor" ], + "includePlatforms": [ "Editor" ], + "excludePlatforms": [], + "allowUnsafeCode": true, + "autoReferenced": true, + "overrideReferences": false, + "precompiledReferences": [ "Sirenix.Utilities.dll", "Sirenix.Utilities.Editor.dll", "Sirenix.OdinInspector.Attributes.dll", "Sirenix.OdinInspector.Editor.dll", "Sirenix.Serialization.dll" ], + "defineConstraints": [] +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/Sirenix.OdinInspector.Modules.UnityMathematics.asmdef.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/Sirenix.OdinInspector.Modules.UnityMathematics.asmdef.meta new file mode 100644 index 0000000..791fd52 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/Sirenix.OdinInspector.Modules.UnityMathematics.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ad968d605628d06499b62cdc30f11cf8 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/manifest.txt b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/manifest.txt new file mode 100644 index 0000000..bc4189a --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/manifest.txt @@ -0,0 +1,8 @@ +ManifestVersion: 1 +ModuleID: Unity.Mathematics +ModuleVersion: 1.0.1.0 +ModuleFiles: + MathematicsDrawers.cs + MathematicsDrawers.cs.meta + Sirenix.OdinInspector.Modules.UnityMathematics.asmdef + Sirenix.OdinInspector.Modules.UnityMathematics.asmdef.meta diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/manifest.txt.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/manifest.txt.meta new file mode 100644 index 0000000..aa28a4e --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/manifest.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d75998bf1510bf547a891fdf294fc1de +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Readme.txt b/Assets/Plugins/Sirenix/Readme.txt new file mode 100644 index 0000000..bd8b1f8 --- /dev/null +++ b/Assets/Plugins/Sirenix/Readme.txt @@ -0,0 +1,35 @@ +------------------------------------ Getting Started ------------------------------------ + +Open up the Getting Started guide from "Tools > Odin Inspector > Getting Started." + + +------------------------------------- Helpful Links ------------------------------------- + +Tutorials: https://odininspector.com/tutorials +API Documentation: https://odininspector.com/documentation +Roadmap: https://odininspector.com/roadmap +Release Notes: https://odininspector.com/patch-notes +Issue Tracker: https://bitbucket.org/sirenix/odin-inspector + + +--------------------------------- Community and Support --------------------------------- + +If you have any issues, suggestions or want advice, then you're more than welcome +to join us on Discord, or reach out to us by any other means. + +Support: https://odininspector.com/support +Community Addons: https://odininspector.com/community-tools +Discord: https://discord.gg/AgDmStu + + +-------------------------------------- Thank you! --------------------------------------- + +We really hope you like using Odin. Be sure to leave a review on the Asset Store, +that helps us out a lot! + +Leave a review: https://assetstore.unity.com/packages/tools/utilities/odin-inspector-and-serializer-89041 + + +Odin Inspector is published and developed by Sirenix. + +Sirenix: Https://sirenix.net \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Readme.txt.meta b/Assets/Plugins/Sirenix/Readme.txt.meta new file mode 100644 index 0000000..71cef77 --- /dev/null +++ b/Assets/Plugins/Sirenix/Readme.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e957a9e8b4f4bce4b8a34e504a8c39d7 +timeCreated: 1533815770 +licenseType: Store +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx.meta b/Assets/Plugins/UniRx.meta new file mode 100644 index 0000000..af96f03 --- /dev/null +++ b/Assets/Plugins/UniRx.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 93888e21026cd284ba1b8c01eee54213 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts.meta b/Assets/Plugins/UniRx/Scripts.meta new file mode 100644 index 0000000..60e85af --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1ff3a4a224e9fbf44b002da202c55191 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Asynchronous.meta b/Assets/Plugins/UniRx/Scripts/Asynchronous.meta new file mode 100644 index 0000000..0b4da4a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Asynchronous.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ed804b5e414d1ed4597e893b7e4c2b9e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Asynchronous/WebRequestExtensions.cs b/Assets/Plugins/UniRx/Scripts/Asynchronous/WebRequestExtensions.cs new file mode 100644 index 0000000..b493bc3 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Asynchronous/WebRequestExtensions.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading; + +namespace UniRx +{ + public static class WebRequestExtensions + { + static IObservable AbortableDeferredAsyncRequest(Func begin, Func end, WebRequest request) + { + var result = Observable.Create(observer => + { + var isCompleted = -1; + var subscription = Observable.FromAsyncPattern(begin, + ar => + { + try + { + Interlocked.Increment(ref isCompleted); + return end(ar); + } + catch (WebException ex) + { + if (ex.Status == WebExceptionStatus.RequestCanceled) return default(TResult); + throw; + } + })() + .Subscribe(observer); + return Disposable.Create(() => + { + if (Interlocked.Increment(ref isCompleted) == 0) + { + subscription.Dispose(); + request.Abort(); + } + }); + }); + + return result; + } + + public static IObservable GetResponseAsObservable(this WebRequest request) + { + return AbortableDeferredAsyncRequest(request.BeginGetResponse, request.EndGetResponse, request); + } + + public static IObservable GetResponseAsObservable(this HttpWebRequest request) + { + return AbortableDeferredAsyncRequest(request.BeginGetResponse, ar => (HttpWebResponse)request.EndGetResponse(ar), request); + } + + public static IObservable GetRequestStreamAsObservable(this WebRequest request) + { + return AbortableDeferredAsyncRequest(request.BeginGetRequestStream, request.EndGetRequestStream, request); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Asynchronous/WebRequestExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Asynchronous/WebRequestExtensions.cs.meta new file mode 100644 index 0000000..5be850f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Asynchronous/WebRequestExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 457f0007b2c70e34e9929ec8f0e2c4e6 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables.meta b/Assets/Plugins/UniRx/Scripts/Disposables.meta new file mode 100644 index 0000000..578008e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fe886f6e4204cf64982e3910466be84b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/BooleanDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/BooleanDisposable.cs new file mode 100644 index 0000000..4069a84 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/BooleanDisposable.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections; + +namespace UniRx +{ + public sealed class BooleanDisposable : IDisposable, ICancelable + { + public bool IsDisposed { get; private set; } + + public BooleanDisposable() + { + + } + + internal BooleanDisposable(bool isDisposed) + { + IsDisposed = isDisposed; + } + + public void Dispose() + { + if (!IsDisposed) IsDisposed = true; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/BooleanDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/BooleanDisposable.cs.meta new file mode 100644 index 0000000..4fe8917 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/BooleanDisposable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4ff95c6eb380ca248984d8c27c1244d0 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/CancellationDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/CancellationDisposable.cs new file mode 100644 index 0000000..abf2189 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/CancellationDisposable.cs @@ -0,0 +1,67 @@ +// original code from GitHub Reactive-Extensions/Rx.NET +// some modified. + +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. + +#if (NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) + +using System; +using System.Threading; + +namespace UniRx +{ + /// + /// Represents a disposable resource that has an associated that will be set to the cancellation requested state upon disposal. + /// + public sealed class CancellationDisposable : ICancelable + { + private readonly CancellationTokenSource _cts; + + /// + /// Initializes a new instance of the class that uses an existing . + /// + /// used for cancellation. + /// is null. + public CancellationDisposable(CancellationTokenSource cts) + { + if (cts == null) + throw new ArgumentNullException("cts"); + + _cts = cts; + } + + /// + /// Initializes a new instance of the class that uses a new . + /// + public CancellationDisposable() + : this(new CancellationTokenSource()) + { + } + + /// + /// Gets the used by this CancellationDisposable. + /// + public CancellationToken Token + { + get { return _cts.Token; } + } + + /// + /// Cancels the underlying . + /// + public void Dispose() + { + _cts.Cancel(); + } + + /// + /// Gets a value that indicates whether the object is disposed. + /// + public bool IsDisposed + { + get { return _cts.IsCancellationRequested; } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/CancellationDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/CancellationDisposable.cs.meta new file mode 100644 index 0000000..9a05768 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/CancellationDisposable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6c675907554bfa24d8bd411f386e410d +timeCreated: 1475137543 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/CompositeDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/CompositeDisposable.cs new file mode 100644 index 0000000..8b0841e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/CompositeDisposable.cs @@ -0,0 +1,283 @@ +using System; +using System.Collections.Generic; +// using System.Linq; do not use LINQ +using System.Text; + +namespace UniRx +{ + // copy, modified from Rx Official + + public sealed class CompositeDisposable : ICollection, IDisposable, ICancelable + { + private readonly object _gate = new object(); + + private bool _disposed; + private List _disposables; + private int _count; + private const int SHRINK_THRESHOLD = 64; + + /// + /// Initializes a new instance of the class with no disposables contained by it initially. + /// + public CompositeDisposable() + { + _disposables = new List(); + } + + /// + /// Initializes a new instance of the class with the specified number of disposables. + /// + /// The number of disposables that the new CompositeDisposable can initially store. + /// is less than zero. + public CompositeDisposable(int capacity) + { + if (capacity < 0) + throw new ArgumentOutOfRangeException("capacity"); + + _disposables = new List(capacity); + } + + /// + /// Initializes a new instance of the class from a group of disposables. + /// + /// Disposables that will be disposed together. + /// is null. + public CompositeDisposable(params IDisposable[] disposables) + { + if (disposables == null) + throw new ArgumentNullException("disposables"); + + _disposables = new List(disposables); + _count = _disposables.Count; + } + + /// + /// Initializes a new instance of the class from a group of disposables. + /// + /// Disposables that will be disposed together. + /// is null. + public CompositeDisposable(IEnumerable disposables) + { + if (disposables == null) + throw new ArgumentNullException("disposables"); + + _disposables = new List(disposables); + _count = _disposables.Count; + } + + /// + /// Gets the number of disposables contained in the CompositeDisposable. + /// + public int Count + { + get + { + return _count; + } + } + + /// + /// Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. + /// + /// Disposable to add. + /// is null. + public void Add(IDisposable item) + { + if (item == null) + throw new ArgumentNullException("item"); + + var shouldDispose = false; + lock (_gate) + { + shouldDispose = _disposed; + if (!_disposed) + { + _disposables.Add(item); + _count++; + } + } + if (shouldDispose) + item.Dispose(); + } + + /// + /// Removes and disposes the first occurrence of a disposable from the CompositeDisposable. + /// + /// Disposable to remove. + /// true if found; false otherwise. + /// is null. + public bool Remove(IDisposable item) + { + if (item == null) + throw new ArgumentNullException("item"); + + var shouldDispose = false; + + lock (_gate) + { + if (!_disposed) + { + // + // List doesn't shrink the size of the underlying array but does collapse the array + // by copying the tail one position to the left of the removal index. We don't need + // index-based lookup but only ordering for sequential disposal. So, instead of spending + // cycles on the Array.Copy imposed by Remove, we use a null sentinel value. We also + // do manual Swiss cheese detection to shrink the list if there's a lot of holes in it. + // + var i = _disposables.IndexOf(item); + if (i >= 0) + { + shouldDispose = true; + _disposables[i] = null; + _count--; + + if (_disposables.Capacity > SHRINK_THRESHOLD && _count < _disposables.Capacity / 2) + { + var old = _disposables; + _disposables = new List(_disposables.Capacity / 2); + + foreach (var d in old) + if (d != null) + _disposables.Add(d); + } + } + } + } + + if (shouldDispose) + item.Dispose(); + + return shouldDispose; + } + + /// + /// Disposes all disposables in the group and removes them from the group. + /// + public void Dispose() + { + var currentDisposables = default(IDisposable[]); + lock (_gate) + { + if (!_disposed) + { + _disposed = true; + currentDisposables = _disposables.ToArray(); + _disposables.Clear(); + _count = 0; + } + } + + if (currentDisposables != null) + { + foreach (var d in currentDisposables) + if (d != null) + d.Dispose(); + } + } + + /// + /// Removes and disposes all disposables from the CompositeDisposable, but does not dispose the CompositeDisposable. + /// + public void Clear() + { + var currentDisposables = default(IDisposable[]); + lock (_gate) + { + currentDisposables = _disposables.ToArray(); + _disposables.Clear(); + _count = 0; + } + + foreach (var d in currentDisposables) + if (d != null) + d.Dispose(); + } + + /// + /// Determines whether the CompositeDisposable contains a specific disposable. + /// + /// Disposable to search for. + /// true if the disposable was found; otherwise, false. + /// is null. + public bool Contains(IDisposable item) + { + if (item == null) + throw new ArgumentNullException("item"); + + lock (_gate) + { + return _disposables.Contains(item); + } + } + + /// + /// Copies the disposables contained in the CompositeDisposable to an array, starting at a particular array index. + /// + /// Array to copy the contained disposables to. + /// Target index at which to copy the first disposable of the group. + /// is null. + /// is less than zero. -or - is larger than or equal to the array length. + public void CopyTo(IDisposable[] array, int arrayIndex) + { + if (array == null) + throw new ArgumentNullException("array"); + if (arrayIndex < 0 || arrayIndex >= array.Length) + throw new ArgumentOutOfRangeException("arrayIndex"); + + lock (_gate) + { + var disArray = new List(); + foreach (var item in _disposables) + { + if (item != null) disArray.Add(item); + } + + Array.Copy(disArray.ToArray(), 0, array, arrayIndex, array.Length - arrayIndex); + } + } + + /// + /// Always returns false. + /// + public bool IsReadOnly + { + get { return false; } + } + + /// + /// Returns an enumerator that iterates through the CompositeDisposable. + /// + /// An enumerator to iterate over the disposables. + public IEnumerator GetEnumerator() + { + var res = new List(); + + lock (_gate) + { + foreach (var d in _disposables) + { + if (d != null) res.Add(d); + } + } + + return res.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the CompositeDisposable. + /// + /// An enumerator to iterate over the disposables. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + /// + /// Gets a value that indicates whether the object is disposed. + /// + public bool IsDisposed + { + get { return _disposed; } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/CompositeDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/CompositeDisposable.cs.meta new file mode 100644 index 0000000..33e695a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/CompositeDisposable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a0f9d923bd5f4cd47b39bdd83125de27 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/DictionaryDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/DictionaryDisposable.cs new file mode 100644 index 0000000..48d0d54 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/DictionaryDisposable.cs @@ -0,0 +1,255 @@ +using System; +using System.Collections.Generic; + +namespace UniRx +{ + public sealed class DictionaryDisposable : IDisposable, IDictionary + where TValue : IDisposable + { + bool isDisposed = false; + readonly Dictionary inner; + + public DictionaryDisposable() + { + inner = new Dictionary(); + } + + public DictionaryDisposable(IEqualityComparer comparer) + { + inner = new Dictionary(comparer); + } + + public TValue this[TKey key] + { + get + { + lock (inner) + { + return inner[key]; + } + } + + set + { + lock (inner) + { + if (isDisposed) value.Dispose(); + + TValue oldValue; + if (TryGetValue(key, out oldValue)) + { + oldValue.Dispose(); + inner[key] = value; + } + else + { + inner[key] = value; + } + } + } + } + + public int Count + { + get + { + lock (inner) + { + return inner.Count; + } + } + } + + public Dictionary.KeyCollection Keys + { + get + { + throw new NotSupportedException("please use .Select(x => x.Key).ToArray()"); + } + } + + public Dictionary.ValueCollection Values + { + get + { + throw new NotSupportedException("please use .Select(x => x.Value).ToArray()"); + } + } + + public void Add(TKey key, TValue value) + { + lock (inner) + { + if (isDisposed) + { + value.Dispose(); + return; + } + + inner.Add(key, value); + } + } + + public void Clear() + { + lock (inner) + { + foreach (var item in inner) + { + item.Value.Dispose(); + } + inner.Clear(); + } + } + + public bool Remove(TKey key) + { + lock (inner) + { + TValue oldValue; + if (inner.TryGetValue(key, out oldValue)) + { + var isSuccessRemove = inner.Remove(key); + if (isSuccessRemove) + { + oldValue.Dispose(); + } + return isSuccessRemove; + } + else + { + return false; + } + } + } + + public bool ContainsKey(TKey key) + { + lock (inner) + { + return inner.ContainsKey(key); + } + } + + public bool TryGetValue(TKey key, out TValue value) + { + lock (inner) + { + return inner.TryGetValue(key, out value); + } + } + + public Dictionary.Enumerator GetEnumerator() + { + lock (inner) + { + return new Dictionary(inner).GetEnumerator(); + } + } + + bool ICollection>.IsReadOnly + { + get + { + return ((ICollection>)inner).IsReadOnly; + } + } + + ICollection IDictionary.Keys + { + get + { + lock (inner) + { + return new List(inner.Keys); + } + } + } + + ICollection IDictionary.Values + { + get + { + lock (inner) + { + return new List(inner.Values); + } + } + } + + +#if !UNITY_METRO + + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) + { + lock (inner) + { + ((System.Runtime.Serialization.ISerializable)inner).GetObjectData(info, context); + } + } + + public void OnDeserialization(object sender) + { + lock (inner) + { + ((System.Runtime.Serialization.IDeserializationCallback)inner).OnDeserialization(sender); + } + } + +#endif + + void ICollection>.Add(KeyValuePair item) + { + Add((TKey)item.Key, (TValue)item.Value); + } + + bool ICollection>.Contains(KeyValuePair item) + { + lock (inner) + { + return ((ICollection>)inner).Contains(item); + } + } + + void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) + { + lock (inner) + { + ((ICollection>)inner).CopyTo(array, arrayIndex); + } + } + + IEnumerator> IEnumerable>.GetEnumerator() + { + lock (inner) + { + return new List>((ICollection>)inner).GetEnumerator(); + } + } + + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + bool ICollection>.Remove(KeyValuePair item) + { + throw new NotSupportedException(); + } + + public void Dispose() + { + lock (inner) + { + if (isDisposed) return; + isDisposed = true; + + foreach (var item in inner) + { + item.Value.Dispose(); + } + inner.Clear(); + } + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/DictionaryDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/DictionaryDisposable.cs.meta new file mode 100644 index 0000000..67adf14 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/DictionaryDisposable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 702939929fc84d544b12076b76aa73b5 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/Disposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/Disposable.cs new file mode 100644 index 0000000..7999ca2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/Disposable.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections; + +namespace UniRx +{ + public static class Disposable + { + public static readonly IDisposable Empty = EmptyDisposable.Singleton; + + public static IDisposable Create(Action disposeAction) + { + return new AnonymousDisposable(disposeAction); + } + + public static IDisposable CreateWithState(TState state, Action disposeAction) + { + return new AnonymousDisposable(state, disposeAction); + } + + class EmptyDisposable : IDisposable + { + public static EmptyDisposable Singleton = new EmptyDisposable(); + + private EmptyDisposable() + { + + } + + public void Dispose() + { + } + } + + class AnonymousDisposable : IDisposable + { + bool isDisposed = false; + readonly Action dispose; + + public AnonymousDisposable(Action dispose) + { + this.dispose = dispose; + } + + public void Dispose() + { + if (!isDisposed) + { + isDisposed = true; + dispose(); + } + } + } + + class AnonymousDisposable : IDisposable + { + bool isDisposed = false; + readonly T state; + readonly Action dispose; + + public AnonymousDisposable(T state, Action dispose) + { + this.state = state; + this.dispose = dispose; + } + + public void Dispose() + { + if (!isDisposed) + { + isDisposed = true; + dispose(state); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/Disposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/Disposable.cs.meta new file mode 100644 index 0000000..219760e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/Disposable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 958f291bb8f434740a6d2c08ad5182a0 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/DisposableExtensions.cs b/Assets/Plugins/UniRx/Scripts/Disposables/DisposableExtensions.cs new file mode 100644 index 0000000..24b9691 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/DisposableExtensions.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; + +namespace UniRx +{ + public static partial class DisposableExtensions + { + /// Add disposable(self) to CompositeDisposable(or other ICollection). Return value is self disposable. + public static T AddTo(this T disposable, ICollection container) + where T : IDisposable + { + if (disposable == null) throw new ArgumentNullException("disposable"); + if (container == null) throw new ArgumentNullException("container"); + + container.Add(disposable); + + return disposable; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/DisposableExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/DisposableExtensions.cs.meta new file mode 100644 index 0000000..b584f6b --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/DisposableExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9c4757265ae105441bae71007cbd0184 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/ICancelable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/ICancelable.cs new file mode 100644 index 0000000..fd7fce5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/ICancelable.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace UniRx +{ + public interface ICancelable : IDisposable + { + bool IsDisposed { get; } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/ICancelable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/ICancelable.cs.meta new file mode 100644 index 0000000..6af4cb2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/ICancelable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b5cd5b0b304c78345a49757b1f6f8ba8 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/MultipleAssignmentDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/MultipleAssignmentDisposable.cs new file mode 100644 index 0000000..499805f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/MultipleAssignmentDisposable.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections; + +namespace UniRx +{ + public sealed class MultipleAssignmentDisposable : IDisposable, ICancelable + { + static readonly BooleanDisposable True = new BooleanDisposable(true); + + object gate = new object(); + IDisposable current; + + public bool IsDisposed + { + get + { + lock (gate) + { + return current == True; + } + } + } + + public IDisposable Disposable + { + get + { + lock (gate) + { + return (current == True) + ? UniRx.Disposable.Empty + : current; + } + } + set + { + var shouldDispose = false; + lock (gate) + { + shouldDispose = (current == True); + if (!shouldDispose) + { + current = value; + } + } + if (shouldDispose && value != null) + { + value.Dispose(); + } + } + } + + public void Dispose() + { + IDisposable old = null; + + lock (gate) + { + if (current != True) + { + old = current; + current = True; + } + } + + if (old != null) old.Dispose(); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/MultipleAssignmentDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/MultipleAssignmentDisposable.cs.meta new file mode 100644 index 0000000..40947a9 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/MultipleAssignmentDisposable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bb959083576ace749afd55c1e54b02d9 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/RefCountDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/RefCountDisposable.cs new file mode 100644 index 0000000..354627a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/RefCountDisposable.cs @@ -0,0 +1,152 @@ +// This code is borrwed from Rx Official and some modified. + +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; + +namespace UniRx +{ + /// + /// Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed. + /// + public sealed class RefCountDisposable : ICancelable + { + private readonly object _gate = new object(); + private IDisposable _disposable; + private bool _isPrimaryDisposed; + private int _count; + + /// + /// Initializes a new instance of the class with the specified disposable. + /// + /// Underlying disposable. + /// is null. + public RefCountDisposable(IDisposable disposable) + { + if (disposable == null) + throw new ArgumentNullException("disposable"); + + _disposable = disposable; + _isPrimaryDisposed = false; + _count = 0; + } + + /// + /// Gets a value that indicates whether the object is disposed. + /// + public bool IsDisposed + { + get { return _disposable == null; } + } + + /// + /// Returns a dependent disposable that when disposed decreases the refcount on the underlying disposable. + /// + /// A dependent disposable contributing to the reference count that manages the underlying disposable's lifetime. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "Backward compat + non-trivial work for a property getter.")] + public IDisposable GetDisposable() + { + lock (_gate) + { + if (_disposable == null) + { + return Disposable.Empty; + } + else + { + _count++; + return new InnerDisposable(this); + } + } + } + + /// + /// Disposes the underlying disposable only when all dependent disposables have been disposed. + /// + public void Dispose() + { + var disposable = default(IDisposable); + lock (_gate) + { + if (_disposable != null) + { + if (!_isPrimaryDisposed) + { + _isPrimaryDisposed = true; + + if (_count == 0) + { + disposable = _disposable; + _disposable = null; + } + } + } + } + + if (disposable != null) + disposable.Dispose(); + } + + private void Release() + { + var disposable = default(IDisposable); + lock (_gate) + { + if (_disposable != null) + { + _count--; + + if (_isPrimaryDisposed) + { + if (_count == 0) + { + disposable = _disposable; + _disposable = null; + } + } + } + } + + if (disposable != null) + disposable.Dispose(); + } + + sealed class InnerDisposable : IDisposable + { + private RefCountDisposable _parent; + object parentLock = new object(); + + public InnerDisposable(RefCountDisposable parent) + { + _parent = parent; + } + + public void Dispose() + { + RefCountDisposable parent; + lock (parentLock) + { + parent = _parent; + _parent = null; + } + if (parent != null) + parent.Release(); + } + } + } + + public partial class Observable + { + static IObservable AddRef(IObservable xs, RefCountDisposable r) + { + return Observable.Create((IObserver observer) => new CompositeDisposable(new IDisposable[] + { + r.GetDisposable(), + xs.Subscribe(observer) + })); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/RefCountDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/RefCountDisposable.cs.meta new file mode 100644 index 0000000..1dd30f6 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/RefCountDisposable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2fb5a2cdb138579498eb20d8b7818ad8 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/ScheduledDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/ScheduledDisposable.cs new file mode 100644 index 0000000..1232493 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/ScheduledDisposable.cs @@ -0,0 +1,46 @@ +using System; +using System.Threading; + +namespace UniRx +{ + public sealed class ScheduledDisposable : ICancelable + { + private readonly IScheduler scheduler; + private volatile IDisposable disposable; + private int isDisposed = 0; + + public ScheduledDisposable(IScheduler scheduler, IDisposable disposable) + { + this.scheduler = scheduler; + this.disposable = disposable; + } + + public IScheduler Scheduler + { + get { return scheduler; } + } + + public IDisposable Disposable + { + get { return disposable; } + } + + public bool IsDisposed + { + get { return isDisposed != 0; } + } + + public void Dispose() + { + Scheduler.Schedule(DisposeInner); + } + + private void DisposeInner() + { + if (Interlocked.Increment(ref isDisposed) == 1) + { + disposable.Dispose(); + } + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/ScheduledDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/ScheduledDisposable.cs.meta new file mode 100644 index 0000000..6e70e61 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/ScheduledDisposable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: db98ce742e859bd4e81db434c3ca3663 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/SerialDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/SerialDisposable.cs new file mode 100644 index 0000000..cb19e6e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/SerialDisposable.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections; + +namespace UniRx +{ + public sealed class SerialDisposable : IDisposable, ICancelable + { + readonly object gate = new object(); + IDisposable current; + bool disposed; + + public bool IsDisposed { get { lock (gate) { return disposed; } } } + + public IDisposable Disposable + { + get + { + return current; + } + set + { + var shouldDispose = false; + var old = default(IDisposable); + lock (gate) + { + shouldDispose = disposed; + if (!shouldDispose) + { + old = current; + current = value; + } + } + if (old != null) + { + old.Dispose(); + } + if (shouldDispose && value != null) + { + value.Dispose(); + } + } + } + + public void Dispose() + { + var old = default(IDisposable); + + lock (gate) + { + if (!disposed) + { + disposed = true; + old = current; + current = null; + } + } + + if (old != null) + { + old.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/SerialDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/SerialDisposable.cs.meta new file mode 100644 index 0000000..e9a07a8 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/SerialDisposable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 06fb064ad9e4d354ab15ff89f6343243 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/SingleAssignmentDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/SingleAssignmentDisposable.cs new file mode 100644 index 0000000..53c9216 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/SingleAssignmentDisposable.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections; + +namespace UniRx +{ + // should be use Interlocked.CompareExchange for Threadsafe? + // but CompareExchange cause ExecutionEngineException on iOS. + // AOT... + // use lock instead + + public sealed class SingleAssignmentDisposable : IDisposable, ICancelable + { + readonly object gate = new object(); + IDisposable current; + bool disposed; + + public bool IsDisposed { get { lock (gate) { return disposed; } } } + + public IDisposable Disposable + { + get + { + return current; + } + set + { + var old = default(IDisposable); + bool alreadyDisposed; + lock (gate) + { + alreadyDisposed = disposed; + old = current; + if (!alreadyDisposed) + { + if (value == null) return; + current = value; + } + } + + if (alreadyDisposed && value != null) + { + value.Dispose(); + return; + } + + if (old != null) throw new InvalidOperationException("Disposable is already set"); + } + } + + + public void Dispose() + { + IDisposable old = null; + + lock (gate) + { + if (!disposed) + { + disposed = true; + old = current; + current = null; + } + } + + if (old != null) old.Dispose(); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/SingleAssignmentDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/SingleAssignmentDisposable.cs.meta new file mode 100644 index 0000000..6fddafa --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/SingleAssignmentDisposable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7ec869f7548c62748ad57a5c86b2f6ba +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/StableCompositeDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/StableCompositeDisposable.cs new file mode 100644 index 0000000..58633b1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/StableCompositeDisposable.cs @@ -0,0 +1,277 @@ +using System; +using System.Collections.Generic; +using System.Threading; + +namespace UniRx +{ + /// + /// Represents a group of disposable resources that are disposed together. + /// + public abstract class StableCompositeDisposable : ICancelable + { + /// + /// Creates a new group containing two disposable resources that are disposed together. + /// + /// The first disposable resoruce to add to the group. + /// The second disposable resoruce to add to the group. + /// Group of disposable resources that are disposed together. + public static ICancelable Create(IDisposable disposable1, IDisposable disposable2) + { + if (disposable1 == null) throw new ArgumentNullException("disposable1"); + if (disposable2 == null) throw new ArgumentNullException("disposable2"); + + return new Binary(disposable1, disposable2); + } + + /// + /// Creates a new group containing three disposable resources that are disposed together. + /// + /// The first disposable resoruce to add to the group. + /// The second disposable resoruce to add to the group. + /// The third disposable resoruce to add to the group. + /// Group of disposable resources that are disposed together. + public static ICancelable Create(IDisposable disposable1, IDisposable disposable2, IDisposable disposable3) + { + if (disposable1 == null) throw new ArgumentNullException("disposable1"); + if (disposable2 == null) throw new ArgumentNullException("disposable2"); + if (disposable3 == null) throw new ArgumentNullException("disposable3"); + + return new Trinary(disposable1, disposable2, disposable3); + } + + /// + /// Creates a new group containing four disposable resources that are disposed together. + /// + /// The first disposable resoruce to add to the group. + /// The second disposable resoruce to add to the group. + /// The three disposable resoruce to add to the group. + /// The four disposable resoruce to add to the group. + /// Group of disposable resources that are disposed together. + public static ICancelable Create(IDisposable disposable1, IDisposable disposable2, IDisposable disposable3, IDisposable disposable4) + { + if (disposable1 == null) throw new ArgumentNullException("disposable1"); + if (disposable2 == null) throw new ArgumentNullException("disposable2"); + if (disposable3 == null) throw new ArgumentNullException("disposable3"); + if (disposable4 == null) throw new ArgumentNullException("disposable4"); + + return new Quaternary(disposable1, disposable2, disposable3, disposable4); + } + + /// + /// Creates a new group of disposable resources that are disposed together. + /// + /// Disposable resources to add to the group. + /// Group of disposable resources that are disposed together. + public static ICancelable Create(params IDisposable[] disposables) + { + if (disposables == null) throw new ArgumentNullException("disposables"); + + return new NAry(disposables); + } + + /// + /// Creates a new group of disposable resources that are disposed together. Array is not copied, it's unsafe but optimized. + /// + /// Disposable resources to add to the group. + /// Group of disposable resources that are disposed together. + public static ICancelable CreateUnsafe(IDisposable[] disposables) + { + return new NAryUnsafe(disposables); + } + + /// + /// Creates a new group of disposable resources that are disposed together. + /// + /// Disposable resources to add to the group. + /// Group of disposable resources that are disposed together. + public static ICancelable Create(IEnumerable disposables) + { + if (disposables == null) throw new ArgumentNullException("disposables"); + + return new NAry(disposables); + } + + /// + /// Disposes all disposables in the group. + /// + public abstract void Dispose(); + + /// + /// Gets a value that indicates whether the object is disposed. + /// + public abstract bool IsDisposed + { + get; + } + + class Binary : StableCompositeDisposable + { + int disposedCallCount = -1; + private volatile IDisposable _disposable1; + private volatile IDisposable _disposable2; + + public Binary(IDisposable disposable1, IDisposable disposable2) + { + _disposable1 = disposable1; + _disposable2 = disposable2; + } + + public override bool IsDisposed + { + get + { + return disposedCallCount != -1; + } + } + + public override void Dispose() + { + if (Interlocked.Increment(ref disposedCallCount) == 0) + { + _disposable1.Dispose(); + _disposable2.Dispose(); + } + } + } + + class Trinary : StableCompositeDisposable + { + int disposedCallCount = -1; + private volatile IDisposable _disposable1; + private volatile IDisposable _disposable2; + private volatile IDisposable _disposable3; + + public Trinary(IDisposable disposable1, IDisposable disposable2, IDisposable disposable3) + { + _disposable1 = disposable1; + _disposable2 = disposable2; + _disposable3 = disposable3; + } + + public override bool IsDisposed + { + get + { + return disposedCallCount != -1; + } + } + + public override void Dispose() + { + if (Interlocked.Increment(ref disposedCallCount) == 0) + { + _disposable1.Dispose(); + _disposable2.Dispose(); + _disposable3.Dispose(); + } + } + } + + class Quaternary : StableCompositeDisposable + { + int disposedCallCount = -1; + private volatile IDisposable _disposable1; + private volatile IDisposable _disposable2; + private volatile IDisposable _disposable3; + private volatile IDisposable _disposable4; + + public Quaternary(IDisposable disposable1, IDisposable disposable2, IDisposable disposable3, IDisposable disposable4) + { + _disposable1 = disposable1; + _disposable2 = disposable2; + _disposable3 = disposable3; + _disposable4 = disposable4; + } + + public override bool IsDisposed + { + get + { + return disposedCallCount != -1; + } + } + + public override void Dispose() + { + if (Interlocked.Increment(ref disposedCallCount) == 0) + { + _disposable1.Dispose(); + _disposable2.Dispose(); + _disposable3.Dispose(); + _disposable4.Dispose(); + } + } + } + + class NAry : StableCompositeDisposable + { + int disposedCallCount = -1; + private volatile List _disposables; + + public NAry(IDisposable[] disposables) + : this((IEnumerable)disposables) + { + } + + public NAry(IEnumerable disposables) + { + _disposables = new List(disposables); + + // + // Doing this on the list to avoid duplicate enumeration of disposables. + // + if (_disposables.Contains(null)) throw new ArgumentException("Disposables can't contains null", "disposables"); + } + + public override bool IsDisposed + { + get + { + return disposedCallCount != -1; + } + } + + public override void Dispose() + { + if (Interlocked.Increment(ref disposedCallCount) == 0) + { + foreach (var d in _disposables) + { + d.Dispose(); + } + } + } + } + + class NAryUnsafe : StableCompositeDisposable + { + int disposedCallCount = -1; + private volatile IDisposable[] _disposables; + + public NAryUnsafe(IDisposable[] disposables) + { + _disposables = disposables; + } + + public override bool IsDisposed + { + get + { + return disposedCallCount != -1; + } + } + + public override void Dispose() + { + if (Interlocked.Increment(ref disposedCallCount) == 0) + { + var len = _disposables.Length; + for (int i = 0; i < len; i++) + { + _disposables[i].Dispose(); + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/StableCompositeDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/StableCompositeDisposable.cs.meta new file mode 100644 index 0000000..85c914f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Disposables/StableCompositeDisposable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3a9cd9fa22bc6a5439484581f5049cf8 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/EventPattern.cs b/Assets/Plugins/UniRx/Scripts/EventPattern.cs new file mode 100644 index 0000000..b5eeadd --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/EventPattern.cs @@ -0,0 +1,140 @@ +// original code from rx.codeplex.com +// some modified. + +/* ------------------ */ + +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; + +namespace UniRx +{ + /// + /// Represents a .NET event invocation consisting of the strongly typed object that raised the event and the data that was generated by the event. + /// + /// + /// The type of the sender that raised the event. + /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. + /// + /// + /// The type of the event data generated by the event. + /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. + /// + public interface IEventPattern + { + /// + /// Gets the sender object that raised the event. + /// + TSender Sender { get; } + + /// + /// Gets the event data that was generated by the event. + /// + TEventArgs EventArgs { get; } + } + + /// + /// Represents a .NET event invocation consisting of the weakly typed object that raised the event and the data that was generated by the event. + /// + /// The type of the event data generated by the event. + public class EventPattern : EventPattern + { + /// + /// Creates a new data representation instance of a .NET event invocation with the given sender and event data. + /// + /// The sender object that raised the event. + /// The event data that was generated by the event. + public EventPattern(object sender, TEventArgs e) + : base(sender, e) + { + } + } + + /// + /// Represents a .NET event invocation consisting of the strongly typed object that raised the event and the data that was generated by the event. + /// + /// The type of the sender that raised the event. + /// The type of the event data generated by the event. + public class EventPattern : IEquatable>, IEventPattern + { + /// + /// Creates a new data representation instance of a .NET event invocation with the given sender and event data. + /// + /// The sender object that raised the event. + /// The event data that was generated by the event. + public EventPattern(TSender sender, TEventArgs e) + { + Sender = sender; + EventArgs = e; + } + + /// + /// Gets the sender object that raised the event. + /// + public TSender Sender { get; private set; } + + /// + /// Gets the event data that was generated by the event. + /// + public TEventArgs EventArgs { get; private set; } + + /// + /// Determines whether the current EventPattern<TSender, TEventArgs> object represents the same event as a specified EventPattern<TSender, TEventArgs> object. + /// + /// An object to compare to the current EventPattern<TSender, TEventArgs> object. + /// true if both EventPattern<TSender, TEventArgs> objects represent the same event; otherwise, false. + public bool Equals(EventPattern other) + { + if (object.ReferenceEquals(null, other)) + return false; + if (object.ReferenceEquals(this, other)) + return true; + + return EqualityComparer.Default.Equals(Sender, other.Sender) && EqualityComparer.Default.Equals(EventArgs, other.EventArgs); + } + + /// + /// Determines whether the specified System.Object is equal to the current EventPattern<TSender, TEventArgs>. + /// + /// The System.Object to compare with the current EventPattern<TSender, TEventArgs>. + /// true if the specified System.Object is equal to the current EventPattern<TSender, TEventArgs>; otherwise, false. + public override bool Equals(object obj) + { + return Equals(obj as EventPattern); + } + + /// + /// Returns the hash code for the current EventPattern<TSender, TEventArgs> instance. + /// + /// A hash code for the current EventPattern<TSender, TEventArgs> instance. + public override int GetHashCode() + { + var x = EqualityComparer.Default.GetHashCode(Sender); + var y = EqualityComparer.Default.GetHashCode(EventArgs); + return (x << 5) + (x ^ y); + } + + /// + /// Determines whether two specified EventPattern<TSender, TEventArgs> objects represent the same event. + /// + /// The first EventPattern<TSender, TEventArgs> to compare, or null. + /// The second EventPattern<TSender, TEventArgs> to compare, or null. + /// true if both EventPattern<TSender, TEventArgs> objects represent the same event; otherwise, false. + public static bool operator ==(EventPattern first, EventPattern second) + { + return object.Equals(first, second); + } + + /// + /// Determines whether two specified EventPattern<TSender, TEventArgs> objects represent a different event. + /// + /// The first EventPattern<TSender, TEventArgs> to compare, or null. + /// The second EventPattern<TSender, TEventArgs> to compare, or null. + /// true if both EventPattern<TSender, TEventArgs> objects don't represent the same event; otherwise, false. + public static bool operator !=(EventPattern first, EventPattern second) + { + return !object.Equals(first, second); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/EventPattern.cs.meta b/Assets/Plugins/UniRx/Scripts/EventPattern.cs.meta new file mode 100644 index 0000000..ad6fa9a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/EventPattern.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e4b797bfea1999a499309068b7d7a97e +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil.meta new file mode 100644 index 0000000..0a48c06 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9701602494b9c474680dea36ff9153df +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/AscynLock.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/AscynLock.cs new file mode 100644 index 0000000..31564fb --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/AscynLock.cs @@ -0,0 +1,85 @@ +// this code is borrowed from RxOfficial(rx.codeplex.com) and modified + +using System; +using System.Collections.Generic; + +namespace UniRx.InternalUtil +{ + /// + /// Asynchronous lock. + /// + internal sealed class AsyncLock : IDisposable + { + private readonly Queue queue = new Queue(); + private bool isAcquired = false; + private bool hasFaulted = false; + + /// + /// Queues the action for execution. If the caller acquires the lock and becomes the owner, + /// the queue is processed. If the lock is already owned, the action is queued and will get + /// processed by the owner. + /// + /// Action to queue for execution. + /// is null. + public void Wait(Action action) + { + if (action == null) + throw new ArgumentNullException("action"); + + var isOwner = false; + lock (queue) + { + if (!hasFaulted) + { + queue.Enqueue(action); + isOwner = !isAcquired; + isAcquired = true; + } + } + + if (isOwner) + { + while (true) + { + var work = default(Action); + lock (queue) + { + if (queue.Count > 0) + work = queue.Dequeue(); + else + { + isAcquired = false; + break; + } + } + + try + { + work(); + } + catch + { + lock (queue) + { + queue.Clear(); + hasFaulted = true; + } + throw; + } + } + } + } + + /// + /// Clears the work items in the queue and drops further work being queued. + /// + public void Dispose() + { + lock (queue) + { + queue.Clear(); + hasFaulted = true; + } + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/AscynLock.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/AscynLock.cs.meta new file mode 100644 index 0000000..11fcee4 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/AscynLock.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 23dbd656cfe9c5e47b02c3c263e476aa +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/CancellableTaskCompletionSource.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/CancellableTaskCompletionSource.cs new file mode 100644 index 0000000..7e1e686 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/CancellableTaskCompletionSource.cs @@ -0,0 +1,23 @@ +#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace UniRx.InternalUtil +{ + internal interface ICancellableTaskCompletionSource + { + bool TrySetException(Exception exception); + bool TrySetCanceled(); + } + + internal class CancellableTaskCompletionSource : TaskCompletionSource, ICancellableTaskCompletionSource + { + + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/CancellableTaskCompletionSource.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/CancellableTaskCompletionSource.cs.meta new file mode 100644 index 0000000..a856963 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/CancellableTaskCompletionSource.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 622c7ba8630c25b4c911cd1612ee0887 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ExceptionExtensions.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/ExceptionExtensions.cs new file mode 100644 index 0000000..39a7a4c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/ExceptionExtensions.cs @@ -0,0 +1,15 @@ +namespace UniRx.InternalUtil +{ + using System; + + internal static class ExceptionExtensions + { + public static void Throw(this Exception exception) + { +#if (NET_4_6 || NET_STANDARD_2_0) + System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(exception).Throw(); +#endif + throw exception; + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ExceptionExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/ExceptionExtensions.cs.meta new file mode 100644 index 0000000..aa5a411 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/ExceptionExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 94d5d10805124b34c8b488ebf3f893eb +timeCreated: 1509016318 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ImmutableList.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/ImmutableList.cs new file mode 100644 index 0000000..ef6998f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/ImmutableList.cs @@ -0,0 +1,61 @@ +using System; + +namespace UniRx.InternalUtil +{ + // ImmutableList is sometimes useful, use for public. + public class ImmutableList + { + public static readonly ImmutableList Empty = new ImmutableList(); + + T[] data; + + public T[] Data + { + get { return data; } + } + + ImmutableList() + { + data = new T[0]; + } + + public ImmutableList(T[] data) + { + this.data = data; + } + + public ImmutableList Add(T value) + { + var newData = new T[data.Length + 1]; + Array.Copy(data, newData, data.Length); + newData[data.Length] = value; + return new ImmutableList(newData); + } + + public ImmutableList Remove(T value) + { + var i = IndexOf(value); + if (i < 0) return this; + + var length = data.Length; + if (length == 1) return Empty; + + var newData = new T[length - 1]; + + Array.Copy(data, 0, newData, 0, i); + Array.Copy(data, i + 1, newData, i, length - i - 1); + + return new ImmutableList(newData); + } + + public int IndexOf(T value) + { + for (var i = 0; i < data.Length; ++i) + { + // ImmutableList only use for IObserver(no worry for boxed) + if (object.Equals(data[i], value)) return i; + } + return -1; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ImmutableList.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/ImmutableList.cs.meta new file mode 100644 index 0000000..bb4d1e9 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/ImmutableList.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dbafd8a41f556ec40b4bbd46fca2e85c +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ListObserver.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/ListObserver.cs new file mode 100644 index 0000000..5ad1afc --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/ListObserver.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace UniRx.InternalUtil +{ + public class ListObserver : IObserver + { + private readonly ImmutableList> _observers; + + public ListObserver(ImmutableList> observers) + { + _observers = observers; + } + + public void OnCompleted() + { + var targetObservers = _observers.Data; + for (int i = 0; i < targetObservers.Length; i++) + { + targetObservers[i].OnCompleted(); + } + } + + public void OnError(Exception error) + { + var targetObservers = _observers.Data; + for (int i = 0; i < targetObservers.Length; i++) + { + targetObservers[i].OnError(error); + } + } + + public void OnNext(T value) + { + var targetObservers = _observers.Data; + for (int i = 0; i < targetObservers.Length; i++) + { + targetObservers[i].OnNext(value); + } + } + + internal IObserver Add(IObserver observer) + { + return new ListObserver(_observers.Add(observer)); + } + + internal IObserver Remove(IObserver observer) + { + var i = Array.IndexOf(_observers.Data, observer); + if (i < 0) + return this; + + if (_observers.Data.Length == 2) + { + return _observers.Data[1 - i]; + } + else + { + return new ListObserver(_observers.Remove(observer)); + } + } + } + + public class EmptyObserver : IObserver + { + public static readonly EmptyObserver Instance = new EmptyObserver(); + + EmptyObserver() + { + + } + + public void OnCompleted() + { + } + + public void OnError(Exception error) + { + } + + public void OnNext(T value) + { + } + } + + public class ThrowObserver : IObserver + { + public static readonly ThrowObserver Instance = new ThrowObserver(); + + ThrowObserver() + { + + } + + public void OnCompleted() + { + } + + public void OnError(Exception error) + { + error.Throw(); + } + + public void OnNext(T value) + { + } + } + + public class DisposedObserver : IObserver + { + public static readonly DisposedObserver Instance = new DisposedObserver(); + + DisposedObserver() + { + + } + + public void OnCompleted() + { + throw new ObjectDisposedException(""); + } + + public void OnError(Exception error) + { + throw new ObjectDisposedException(""); + } + + public void OnNext(T value) + { + throw new ObjectDisposedException(""); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ListObserver.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/ListObserver.cs.meta new file mode 100644 index 0000000..f73a979 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/ListObserver.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 889dc2f3c5f44d24a98a2c25510b4346 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/MicroCoroutine.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/MicroCoroutine.cs new file mode 100644 index 0000000..8b78097 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/MicroCoroutine.cs @@ -0,0 +1,170 @@ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace UniRx.InternalUtil +{ + /// + /// Simple supports(only yield return null) lightweight, threadsafe coroutine dispatcher. + /// + public class MicroCoroutine + { + const int InitialSize = 16; + + readonly object runningAndQueueLock = new object(); + readonly object arrayLock = new object(); + readonly Action unhandledExceptionCallback; + + int tail = 0; + bool running = false; + IEnumerator[] coroutines = new IEnumerator[InitialSize]; + Queue waitQueue = new Queue(); + + public MicroCoroutine(Action unhandledExceptionCallback) + { + this.unhandledExceptionCallback = unhandledExceptionCallback; + } + + public void AddCoroutine(IEnumerator enumerator) + { + lock (runningAndQueueLock) + { + if (running) + { + waitQueue.Enqueue(enumerator); + return; + } + } + + // worst case at multi threading, wait lock until finish Run() but it is super rarely. + lock (arrayLock) + { + // Ensure Capacity + if (coroutines.Length == tail) + { + Array.Resize(ref coroutines, checked(tail * 2)); + } + coroutines[tail++] = enumerator; + } + } + + public void Run() + { + lock (runningAndQueueLock) + { + running = true; + } + + lock (arrayLock) + { + var j = tail - 1; + + // eliminate array-bound check for i + for (int i = 0; i < coroutines.Length; i++) + { + var coroutine = coroutines[i]; + if (coroutine != null) + { + try + { + if (!coroutine.MoveNext()) + { + coroutines[i] = null; + } + else + { +#if UNITY_EDITOR + // validation only on Editor. + if (coroutine.Current != null) + { + UnityEngine.Debug.LogWarning("MicroCoroutine supports only yield return null. return value = " + coroutine.Current); + } +#endif + + continue; // next i + } + } + catch (Exception ex) + { + coroutines[i] = null; + try + { + unhandledExceptionCallback(ex); + } + catch { } + } + } + + // find null, loop from tail + while (i < j) + { + var fromTail = coroutines[j]; + if (fromTail != null) + { + try + { + if (!fromTail.MoveNext()) + { + coroutines[j] = null; + j--; + continue; // next j + } + else + { +#if UNITY_EDITOR + // validation only on Editor. + if (fromTail.Current != null) + { + UnityEngine.Debug.LogWarning("MicroCoroutine supports only yield return null. return value = " + coroutine.Current); + } +#endif + + // swap + coroutines[i] = fromTail; + coroutines[j] = null; + j--; + goto NEXT_LOOP; // next i + } + } + catch (Exception ex) + { + coroutines[j] = null; + j--; + try + { + unhandledExceptionCallback(ex); + } + catch { } + continue; // next j + } + } + else + { + j--; + } + } + + tail = i; // loop end + break; // LOOP END + + NEXT_LOOP: + continue; + } + + + lock (runningAndQueueLock) + { + running = false; + while (waitQueue.Count != 0) + { + if (coroutines.Length == tail) + { + Array.Resize(ref coroutines, checked(tail * 2)); + } + coroutines[tail++] = waitQueue.Dequeue(); + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/MicroCoroutine.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/MicroCoroutine.cs.meta new file mode 100644 index 0000000..e1f9e44 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/MicroCoroutine.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 108be6d634275c94a95eeb2a39de0792 +timeCreated: 1462599042 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/PriorityQueue.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/PriorityQueue.cs new file mode 100644 index 0000000..0f16eea --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/PriorityQueue.cs @@ -0,0 +1,149 @@ +// this code is borrowed from RxOfficial(rx.codeplex.com) and modified + +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; + +namespace UniRx.InternalUtil +{ + internal class PriorityQueue where T : IComparable + { + private static long _count = long.MinValue; + + private IndexedItem[] _items; + private int _size; + + public PriorityQueue() + : this(16) + { + } + + public PriorityQueue(int capacity) + { + _items = new IndexedItem[capacity]; + _size = 0; + } + + private bool IsHigherPriority(int left, int right) + { + return _items[left].CompareTo(_items[right]) < 0; + } + + private void Percolate(int index) + { + if (index >= _size || index < 0) + return; + var parent = (index - 1) / 2; + if (parent < 0 || parent == index) + return; + + if (IsHigherPriority(index, parent)) + { + var temp = _items[index]; + _items[index] = _items[parent]; + _items[parent] = temp; + Percolate(parent); + } + } + + private void Heapify() + { + Heapify(0); + } + + private void Heapify(int index) + { + if (index >= _size || index < 0) + return; + + var left = 2 * index + 1; + var right = 2 * index + 2; + var first = index; + + if (left < _size && IsHigherPriority(left, first)) + first = left; + if (right < _size && IsHigherPriority(right, first)) + first = right; + if (first != index) + { + var temp = _items[index]; + _items[index] = _items[first]; + _items[first] = temp; + Heapify(first); + } + } + + public int Count { get { return _size; } } + + public T Peek() + { + if (_size == 0) + throw new InvalidOperationException("HEAP is Empty"); + + return _items[0].Value; + } + + private void RemoveAt(int index) + { + _items[index] = _items[--_size]; + _items[_size] = default(IndexedItem); + Heapify(); + if (_size < _items.Length / 4) + { + var temp = _items; + _items = new IndexedItem[_items.Length / 2]; + Array.Copy(temp, 0, _items, 0, _size); + } + } + + public T Dequeue() + { + var result = Peek(); + RemoveAt(0); + return result; + } + + public void Enqueue(T item) + { + if (_size >= _items.Length) + { + var temp = _items; + _items = new IndexedItem[_items.Length * 2]; + Array.Copy(temp, _items, temp.Length); + } + + var index = _size++; + _items[index] = new IndexedItem { Value = item, Id = Interlocked.Increment(ref _count) }; + Percolate(index); + } + + public bool Remove(T item) + { + for (var i = 0; i < _size; ++i) + { + if (EqualityComparer.Default.Equals(_items[i].Value, item)) + { + RemoveAt(i); + return true; + } + } + + return false; + } + + struct IndexedItem : IComparable + { + public T Value; + public long Id; + + public int CompareTo(IndexedItem other) + { + var c = Value.CompareTo(other.Value); + if (c == 0) + c = Id.CompareTo(other.Id); + return c; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/PriorityQueue.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/PriorityQueue.cs.meta new file mode 100644 index 0000000..142c4fb --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/PriorityQueue.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7956b408e24dc5a4884fe4f5a3d7c858 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/PromiseHelper.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/PromiseHelper.cs new file mode 100644 index 0000000..9662f29 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/PromiseHelper.cs @@ -0,0 +1,26 @@ +#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace UniRx.InternalUtil +{ + internal static class PromiseHelper + { + internal static void TrySetResultAll(IEnumerable> source, T value) + { + var rentArray = source.ToArray(); // better to use Arraypool. + var array = rentArray; + var len = rentArray.Length; + for (int i = 0; i < len; i++) + { + array[i].TrySetResult(value); + array[i] = null; + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/PromiseHelper.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/PromiseHelper.cs.meta new file mode 100644 index 0000000..6d7ba4f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/PromiseHelper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: daa7aa90cece0fe40920a35e79f526dd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ScheduledItem.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/ScheduledItem.cs new file mode 100644 index 0000000..1717fff --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/ScheduledItem.cs @@ -0,0 +1,257 @@ +// this code is borrowed from RxOfficial(rx.codeplex.com) and modified + +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; + +namespace UniRx.InternalUtil +{ + /// + /// Abstract base class for scheduled work items. + /// + internal class ScheduledItem : IComparable + { + private readonly BooleanDisposable _disposable = new BooleanDisposable(); + private readonly TimeSpan _dueTime; + private readonly Action _action; + + /// + /// Creates a new scheduled work item to run at the specified time. + /// + /// Absolute time at which the work item has to be executed. + public ScheduledItem(Action action, TimeSpan dueTime) + { + _dueTime = dueTime; + _action = action; + } + + /// + /// Gets the absolute time at which the item is due for invocation. + /// + public TimeSpan DueTime + { + get { return _dueTime; } + } + + /// + /// Invokes the work item. + /// + public void Invoke() + { + if (!_disposable.IsDisposed) + { + _action(); + } + } + + #region Inequality + + /// + /// Compares the work item with another work item based on absolute time values. + /// + /// Work item to compare the current work item to. + /// Relative ordering between this and the specified work item. + /// The inequality operators are overloaded to provide results consistent with the IComparable implementation. Equality operators implement traditional reference equality semantics. + public int CompareTo(ScheduledItem other) + { + // MSDN: By definition, any object compares greater than null, and two null references compare equal to each other. + if (object.ReferenceEquals(other, null)) + return 1; + + return DueTime.CompareTo(other.DueTime); + } + + /// + /// Determines whether one specified ScheduledItem<TAbsolute> object is due before a second specified ScheduledItem<TAbsolute> object. + /// + /// The first object to compare. + /// The second object to compare. + /// true if the DueTime value of left is earlier than the DueTime value of right; otherwise, false. + /// This operator provides results consistent with the IComparable implementation. + public static bool operator <(ScheduledItem left, ScheduledItem right) + { + return left.CompareTo(right) < 0; + } + + /// + /// Determines whether one specified ScheduledItem<TAbsolute> object is due before or at the same of a second specified ScheduledItem<TAbsolute> object. + /// + /// The first object to compare. + /// The second object to compare. + /// true if the DueTime value of left is earlier than or simultaneous with the DueTime value of right; otherwise, false. + /// This operator provides results consistent with the IComparable implementation. + public static bool operator <=(ScheduledItem left, ScheduledItem right) + { + return left.CompareTo(right) <= 0; + } + + /// + /// Determines whether one specified ScheduledItem<TAbsolute> object is due after a second specified ScheduledItem<TAbsolute> object. + /// + /// The first object to compare. + /// The second object to compare. + /// true if the DueTime value of left is later than the DueTime value of right; otherwise, false. + /// This operator provides results consistent with the IComparable implementation. + public static bool operator >(ScheduledItem left, ScheduledItem right) + { + return left.CompareTo(right) > 0; + } + + /// + /// Determines whether one specified ScheduledItem<TAbsolute> object is due after or at the same time of a second specified ScheduledItem<TAbsolute> object. + /// + /// The first object to compare. + /// The second object to compare. + /// true if the DueTime value of left is later than or simultaneous with the DueTime value of right; otherwise, false. + /// This operator provides results consistent with the IComparable implementation. + public static bool operator >=(ScheduledItem left, ScheduledItem right) + { + return left.CompareTo(right) >= 0; + } + + #endregion + + #region Equality + + /// + /// Determines whether two specified ScheduledItem<TAbsolute, TValue> objects are equal. + /// + /// The first object to compare. + /// The second object to compare. + /// true if both ScheduledItem<TAbsolute, TValue> are equal; otherwise, false. + /// This operator does not provide results consistent with the IComparable implementation. Instead, it implements reference equality. + public static bool operator ==(ScheduledItem left, ScheduledItem right) + { + return object.ReferenceEquals(left, right); + } + + /// + /// Determines whether two specified ScheduledItem<TAbsolute, TValue> objects are inequal. + /// + /// The first object to compare. + /// The second object to compare. + /// true if both ScheduledItem<TAbsolute, TValue> are inequal; otherwise, false. + /// This operator does not provide results consistent with the IComparable implementation. Instead, it implements reference equality. + public static bool operator !=(ScheduledItem left, ScheduledItem right) + { + return !(left == right); + } + + /// + /// Determines whether a ScheduledItem<TAbsolute> object is equal to the specified object. + /// + /// The object to compare to the current ScheduledItem<TAbsolute> object. + /// true if the obj parameter is a ScheduledItem<TAbsolute> object and is equal to the current ScheduledItem<TAbsolute> object; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + /// + /// Returns the hash code for the current ScheduledItem<TAbsolute> object. + /// + /// A 32-bit signed integer hash code. + public override int GetHashCode() + { + return base.GetHashCode(); + } + + #endregion + + public IDisposable Cancellation + { + get + { + return _disposable; + } + } + + /// + /// Gets whether the work item has received a cancellation request. + /// + public bool IsCanceled + { + get { return _disposable.IsDisposed; } + } + } + + /// + /// Efficient scheduler queue that maintains scheduled items sorted by absolute time. + /// + /// This type is not thread safe; users should ensure proper synchronization. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Justification = "But it *is* a queue!")] + internal class SchedulerQueue + { + private readonly PriorityQueue _queue; + + /// + /// Creates a new scheduler queue with a default initial capacity. + /// + public SchedulerQueue() + : this(1024) + { + } + + /// + /// Creats a new scheduler queue with the specified initial capacity. + /// + /// Initial capacity of the scheduler queue. + /// is less than zero. + public SchedulerQueue(int capacity) + { + if (capacity < 0) + throw new ArgumentOutOfRangeException("capacity"); + + _queue = new PriorityQueue(capacity); + } + + /// + /// Gets the number of scheduled items in the scheduler queue. + /// + public int Count + { + get + { + return _queue.Count; + } + } + + /// + /// Enqueues the specified work item to be scheduled. + /// + /// Work item to be scheduled. + public void Enqueue(ScheduledItem scheduledItem) + { + _queue.Enqueue(scheduledItem); + } + + /// + /// Removes the specified work item from the scheduler queue. + /// + /// Work item to be removed from the scheduler queue. + /// true if the item was found; false otherwise. + public bool Remove(ScheduledItem scheduledItem) + { + return _queue.Remove(scheduledItem); + } + + /// + /// Dequeues the next work item from the scheduler queue. + /// + /// Next work item in the scheduler queue (removed). + public ScheduledItem Dequeue() + { + return _queue.Dequeue(); + } + + /// + /// Peeks the next work item in the scheduler queue. + /// + /// Next work item in the scheduler queue (not removed). + public ScheduledItem Peek() + { + return _queue.Peek(); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ScheduledItem.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/ScheduledItem.cs.meta new file mode 100644 index 0000000..91514e6 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/ScheduledItem.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 45457ee4a77967347828238b7a52b851 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ThreadSafeQueueWorker.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/ThreadSafeQueueWorker.cs new file mode 100644 index 0000000..3d1243b --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/ThreadSafeQueueWorker.cs @@ -0,0 +1,112 @@ +using System; + +namespace UniRx.InternalUtil +{ + public class ThreadSafeQueueWorker + { + const int MaxArrayLength = 0X7FEFFFFF; + const int InitialSize = 16; + + object gate = new object(); + bool dequing = false; + + int actionListCount = 0; + Action[] actionList = new Action[InitialSize]; + object[] actionStates = new object[InitialSize]; + + int waitingListCount = 0; + Action[] waitingList = new Action[InitialSize]; + object[] waitingStates = new object[InitialSize]; + + public void Enqueue(Action action, object state) + { + lock (gate) + { + if (dequing) + { + // Ensure Capacity + if (waitingList.Length == waitingListCount) + { + var newLength = waitingListCount * 2; + if ((uint)newLength > MaxArrayLength) newLength = MaxArrayLength; + + var newArray = new Action[newLength]; + var newArrayState = new object[newLength]; + Array.Copy(waitingList, newArray, waitingListCount); + Array.Copy(waitingStates, newArrayState, waitingListCount); + waitingList = newArray; + waitingStates = newArrayState; + } + waitingList[waitingListCount] = action; + waitingStates[waitingListCount] = state; + waitingListCount++; + } + else + { + // Ensure Capacity + if (actionList.Length == actionListCount) + { + var newLength = actionListCount * 2; + if ((uint)newLength > MaxArrayLength) newLength = MaxArrayLength; + + var newArray = new Action[newLength]; + var newArrayState = new object[newLength]; + Array.Copy(actionList, newArray, actionListCount); + Array.Copy(actionStates, newArrayState, actionListCount); + actionList = newArray; + actionStates = newArrayState; + } + actionList[actionListCount] = action; + actionStates[actionListCount] = state; + actionListCount++; + } + } + } + + public void ExecuteAll(Action unhandledExceptionCallback) + { + lock (gate) + { + if (actionListCount == 0) return; + + dequing = true; + } + + for (int i = 0; i < actionListCount; i++) + { + var action = actionList[i]; + var state = actionStates[i]; + try + { + action(state); + } + catch (Exception ex) + { + unhandledExceptionCallback(ex); + } + finally + { + // Clear + actionList[i] = null; + actionStates[i] = null; + } + } + + lock (gate) + { + dequing = false; + + var swapTempActionList = actionList; + var swapTempActionStates = actionStates; + + actionListCount = waitingListCount; + actionList = waitingList; + actionStates = waitingStates; + + waitingListCount = 0; + waitingList = swapTempActionList; + waitingStates = swapTempActionStates; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ThreadSafeQueueWorker.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/ThreadSafeQueueWorker.cs.meta new file mode 100644 index 0000000..a1b4b1e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/ThreadSafeQueueWorker.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 768cbfcbe2a8e704a8953eea28cd33df +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/UnityEqualityComparer.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/UnityEqualityComparer.cs new file mode 100644 index 0000000..98abdf1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/UnityEqualityComparer.cs @@ -0,0 +1,271 @@ +#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member +#endif + +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UniRx.InternalUtil +{ + internal static class UnityEqualityComparer + { + public static readonly IEqualityComparer Vector2 = new Vector2EqualityComparer(); + public static readonly IEqualityComparer Vector3 = new Vector3EqualityComparer(); + public static readonly IEqualityComparer Vector4 = new Vector4EqualityComparer(); + public static readonly IEqualityComparer Color = new ColorEqualityComparer(); + public static readonly IEqualityComparer Color32 = new Color32EqualityComparer(); + public static readonly IEqualityComparer Rect = new RectEqualityComparer(); + public static readonly IEqualityComparer Bounds = new BoundsEqualityComparer(); + public static readonly IEqualityComparer Quaternion = new QuaternionEqualityComparer(); + + static readonly RuntimeTypeHandle vector2Type = typeof(Vector2).TypeHandle; + static readonly RuntimeTypeHandle vector3Type = typeof(Vector3).TypeHandle; + static readonly RuntimeTypeHandle vector4Type = typeof(Vector4).TypeHandle; + static readonly RuntimeTypeHandle colorType = typeof(Color).TypeHandle; + static readonly RuntimeTypeHandle color32Type = typeof(Color32).TypeHandle; + static readonly RuntimeTypeHandle rectType = typeof(Rect).TypeHandle; + static readonly RuntimeTypeHandle boundsType = typeof(Bounds).TypeHandle; + static readonly RuntimeTypeHandle quaternionType = typeof(Quaternion).TypeHandle; + +#if UNITY_2017_2_OR_NEWER + + public static readonly IEqualityComparer Vector2Int = new Vector2IntEqualityComparer(); + public static readonly IEqualityComparer Vector3Int = new Vector3IntEqualityComparer(); + public static readonly IEqualityComparer RangeInt = new RangeIntEqualityComparer(); + public static readonly IEqualityComparer RectInt = new RectIntEqualityComparer(); + public static readonly IEqualityComparer BoundsInt = new BoundsIntEqualityComparer(); + + static readonly RuntimeTypeHandle vector2IntType = typeof(Vector2Int).TypeHandle; + static readonly RuntimeTypeHandle vector3IntType = typeof(Vector3Int).TypeHandle; + static readonly RuntimeTypeHandle rangeIntType = typeof(RangeInt).TypeHandle; + static readonly RuntimeTypeHandle rectIntType = typeof(RectInt).TypeHandle; + static readonly RuntimeTypeHandle boundsIntType = typeof(BoundsInt).TypeHandle; + +#endif + + static class Cache + { + public static readonly IEqualityComparer Comparer; + + static Cache() + { + var comparer = GetDefaultHelper(typeof(T)); + if (comparer == null) + { + Comparer = EqualityComparer.Default; + } + else + { + Comparer = (IEqualityComparer)comparer; + } + } + } + + public static IEqualityComparer GetDefault() + { + return Cache.Comparer; + } + + static object GetDefaultHelper(Type type) + { + var t = type.TypeHandle; + + if (t.Equals(vector2Type)) return (object)UnityEqualityComparer.Vector2; + if (t.Equals(vector3Type)) return (object)UnityEqualityComparer.Vector3; + if (t.Equals(vector4Type)) return (object)UnityEqualityComparer.Vector4; + if (t.Equals(colorType)) return (object)UnityEqualityComparer.Color; + if (t.Equals(color32Type)) return (object)UnityEqualityComparer.Color32; + if (t.Equals(rectType)) return (object)UnityEqualityComparer.Rect; + if (t.Equals(boundsType)) return (object)UnityEqualityComparer.Bounds; + if (t.Equals(quaternionType)) return (object)UnityEqualityComparer.Quaternion; + +#if UNITY_2017_2_OR_NEWER + + if (t.Equals(vector2IntType)) return (object)UnityEqualityComparer.Vector2Int; + if (t.Equals(vector3IntType)) return (object)UnityEqualityComparer.Vector3Int; + if (t.Equals(rangeIntType)) return (object)UnityEqualityComparer.RangeInt; + if (t.Equals(rectIntType)) return (object)UnityEqualityComparer.RectInt; + if (t.Equals(boundsIntType)) return (object)UnityEqualityComparer.BoundsInt; +#endif + + return null; + } + + sealed class Vector2EqualityComparer : IEqualityComparer + { + public bool Equals(Vector2 self, Vector2 vector) + { + return self.x.Equals(vector.x) && self.y.Equals(vector.y); + } + + public int GetHashCode(Vector2 obj) + { + return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2; + } + } + + sealed class Vector3EqualityComparer : IEqualityComparer + { + public bool Equals(Vector3 self, Vector3 vector) + { + return self.x.Equals(vector.x) && self.y.Equals(vector.y) && self.z.Equals(vector.z); + } + + public int GetHashCode(Vector3 obj) + { + return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2 ^ obj.z.GetHashCode() >> 2; + } + } + + sealed class Vector4EqualityComparer : IEqualityComparer + { + public bool Equals(Vector4 self, Vector4 vector) + { + return self.x.Equals(vector.x) && self.y.Equals(vector.y) && self.z.Equals(vector.z) && self.w.Equals(vector.w); + } + + public int GetHashCode(Vector4 obj) + { + return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2 ^ obj.z.GetHashCode() >> 2 ^ obj.w.GetHashCode() >> 1; + } + } + + sealed class ColorEqualityComparer : IEqualityComparer + { + public bool Equals(Color self, Color other) + { + return self.r.Equals(other.r) && self.g.Equals(other.g) && self.b.Equals(other.b) && self.a.Equals(other.a); + } + + public int GetHashCode(Color obj) + { + return obj.r.GetHashCode() ^ obj.g.GetHashCode() << 2 ^ obj.b.GetHashCode() >> 2 ^ obj.a.GetHashCode() >> 1; + } + } + + sealed class RectEqualityComparer : IEqualityComparer + { + public bool Equals(Rect self, Rect other) + { + return self.x.Equals(other.x) && self.width.Equals(other.width) && self.y.Equals(other.y) && self.height.Equals(other.height); + } + + public int GetHashCode(Rect obj) + { + return obj.x.GetHashCode() ^ obj.width.GetHashCode() << 2 ^ obj.y.GetHashCode() >> 2 ^ obj.height.GetHashCode() >> 1; + } + } + + sealed class BoundsEqualityComparer : IEqualityComparer + { + public bool Equals(Bounds self, Bounds vector) + { + return self.center.Equals(vector.center) && self.extents.Equals(vector.extents); + } + + public int GetHashCode(Bounds obj) + { + return obj.center.GetHashCode() ^ obj.extents.GetHashCode() << 2; + } + } + + sealed class QuaternionEqualityComparer : IEqualityComparer + { + public bool Equals(Quaternion self, Quaternion vector) + { + return self.x.Equals(vector.x) && self.y.Equals(vector.y) && self.z.Equals(vector.z) && self.w.Equals(vector.w); + } + + public int GetHashCode(Quaternion obj) + { + return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2 ^ obj.z.GetHashCode() >> 2 ^ obj.w.GetHashCode() >> 1; + } + } + + sealed class Color32EqualityComparer : IEqualityComparer + { + public bool Equals(Color32 self, Color32 vector) + { + return self.a.Equals(vector.a) && self.r.Equals(vector.r) && self.g.Equals(vector.g) && self.b.Equals(vector.b); + } + + public int GetHashCode(Color32 obj) + { + return obj.a.GetHashCode() ^ obj.r.GetHashCode() << 2 ^ obj.g.GetHashCode() >> 2 ^ obj.b.GetHashCode() >> 1; + } + } + +#if UNITY_2017_2_OR_NEWER + + sealed class Vector2IntEqualityComparer : IEqualityComparer + { + public bool Equals(Vector2Int self, Vector2Int vector) + { + return self.x.Equals(vector.x) && self.y.Equals(vector.y); + } + + public int GetHashCode(Vector2Int obj) + { + return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2; + } + } + + sealed class Vector3IntEqualityComparer : IEqualityComparer + { + public static readonly Vector3IntEqualityComparer Default = new Vector3IntEqualityComparer(); + + public bool Equals(Vector3Int self, Vector3Int vector) + { + return self.x.Equals(vector.x) && self.y.Equals(vector.y) && self.z.Equals(vector.z); + } + + public int GetHashCode(Vector3Int obj) + { + return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2 ^ obj.z.GetHashCode() >> 2; + } + } + + sealed class RangeIntEqualityComparer : IEqualityComparer + { + public bool Equals(RangeInt self, RangeInt vector) + { + return self.start.Equals(vector.start) && self.length.Equals(vector.length); + } + + public int GetHashCode(RangeInt obj) + { + return obj.start.GetHashCode() ^ obj.length.GetHashCode() << 2; + } + } + + sealed class RectIntEqualityComparer : IEqualityComparer + { + public bool Equals(RectInt self, RectInt other) + { + return self.x.Equals(other.x) && self.width.Equals(other.width) && self.y.Equals(other.y) && self.height.Equals(other.height); + } + + public int GetHashCode(RectInt obj) + { + return obj.x.GetHashCode() ^ obj.width.GetHashCode() << 2 ^ obj.y.GetHashCode() >> 2 ^ obj.height.GetHashCode() >> 1; + } + } + + sealed class BoundsIntEqualityComparer : IEqualityComparer + { + public bool Equals(BoundsInt self, BoundsInt vector) + { + return Vector3IntEqualityComparer.Default.Equals(self.position, vector.position) + && Vector3IntEqualityComparer.Default.Equals(self.size, vector.size); + } + + public int GetHashCode(BoundsInt obj) + { + return Vector3IntEqualityComparer.Default.GetHashCode(obj.position) ^ Vector3IntEqualityComparer.Default.GetHashCode(obj.size) << 2; + } + } + +#endif + } +} diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/UnityEqualityComparer.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/UnityEqualityComparer.cs.meta new file mode 100644 index 0000000..3550ec5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/InternalUtil/UnityEqualityComparer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 626a410137515ac45bb59d1ca91d8f3f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Notification.cs b/Assets/Plugins/UniRx/Scripts/Notification.cs new file mode 100644 index 0000000..25f8f1a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Notification.cs @@ -0,0 +1,678 @@ +// original code from rx.codeplex.com +// some modified. + +/* ------------------ */ + +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. + +using System.Diagnostics; +using System.Globalization; +using System.Collections.Generic; +using System; +using UniRx.InternalUtil; + +#pragma warning disable 0659 +#pragma warning disable 0661 + +namespace UniRx +{ + /// + /// Provides a mechanism for receiving push-based notifications and returning a response. + /// + /// + /// The type of the elements received by the observer. + /// This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. + /// + /// + /// The type of the result returned from the observer's notification handlers. + /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. + /// + public interface IObserver + { + /// + /// Notifies the observer of a new element in the sequence. + /// + /// The new element in the sequence. + /// Result returned upon observation of a new element. + TResult OnNext(TValue value); + + /// + /// Notifies the observer that an exception has occurred. + /// + /// The exception that occurred. + /// Result returned upon observation of an error. + TResult OnError(Exception exception); + + /// + /// Notifies the observer of the end of the sequence. + /// + /// Result returned upon observation of the sequence completion. + TResult OnCompleted(); + } + + /// + /// Indicates the type of a notification. + /// + public enum NotificationKind + { + /// + /// Represents an OnNext notification. + /// + OnNext, + + /// + /// Represents an OnError notification. + /// + OnError, + + /// + /// Represents an OnCompleted notification. + /// + OnCompleted + } + + /// + /// Represents a notification to an observer. + /// + /// The type of the elements received by the observer. + [Serializable] + public abstract class Notification : IEquatable> + { + /// + /// Default constructor used by derived types. + /// + protected internal Notification() + { + } + + /// + /// Returns the value of an OnNext notification or throws an exception. + /// + public abstract T Value + { + get; + } + + /// + /// Returns a value that indicates whether the notification has a value. + /// + public abstract bool HasValue + { + get; + } + + /// + /// Returns the exception of an OnError notification or returns null. + /// + public abstract Exception Exception + { + get; + } + + /// + /// Gets the kind of notification that is represented. + /// + public abstract NotificationKind Kind + { + get; + } + + /// + /// Represents an OnNext notification to an observer. + /// + [DebuggerDisplay("OnNext({Value})")] + [Serializable] + internal sealed class OnNextNotification : Notification + { + T value; + + /// + /// Constructs a notification of a new value. + /// + public OnNextNotification(T value) + { + this.value = value; + } + + /// + /// Returns the value of an OnNext notification. + /// + public override T Value { get { return value; } } + + /// + /// Returns null. + /// + public override Exception Exception { get { return null; } } + + /// + /// Returns true. + /// + public override bool HasValue { get { return true; } } + + /// + /// Returns NotificationKind.OnNext. + /// + public override NotificationKind Kind { get { return NotificationKind.OnNext; } } + + /// + /// Returns the hash code for this instance. + /// + public override int GetHashCode() + { + return EqualityComparer.Default.GetHashCode(Value); + } + + /// + /// Indicates whether this instance and a specified object are equal. + /// + public override bool Equals(Notification other) + { + if (Object.ReferenceEquals(this, other)) + return true; + if (Object.ReferenceEquals(other, null)) + return false; + if (other.Kind != NotificationKind.OnNext) + return false; + return EqualityComparer.Default.Equals(Value, other.Value); + } + + /// + /// Returns a string representation of this instance. + /// + public override string ToString() + { + return String.Format(CultureInfo.CurrentCulture, "OnNext({0})", Value); + } + + /// + /// Invokes the observer's method corresponding to the notification. + /// + /// Observer to invoke the notification on. + public override void Accept(IObserver observer) + { + if (observer == null) + throw new ArgumentNullException("observer"); + + observer.OnNext(Value); + } + + /// + /// Invokes the observer's method corresponding to the notification and returns the produced result. + /// + /// Observer to invoke the notification on. + /// Result produced by the observation. + public override TResult Accept(IObserver observer) + { + if (observer == null) + throw new ArgumentNullException("observer"); + + return observer.OnNext(Value); + } + + /// + /// Invokes the delegate corresponding to the notification. + /// + /// Delegate to invoke for an OnNext notification. + /// Delegate to invoke for an OnError notification. + /// Delegate to invoke for an OnCompleted notification. + public override void Accept(Action onNext, Action onError, Action onCompleted) + { + if (onNext == null) + throw new ArgumentNullException("onNext"); + if (onError == null) + throw new ArgumentNullException("onError"); + if (onCompleted == null) + throw new ArgumentNullException("onCompleted"); + + onNext(Value); + } + + /// + /// Invokes the delegate corresponding to the notification and returns the produced result. + /// + /// Delegate to invoke for an OnNext notification. + /// Delegate to invoke for an OnError notification. + /// Delegate to invoke for an OnCompleted notification. + /// Result produced by the observation. + public override TResult Accept(Func onNext, Func onError, Func onCompleted) + { + if (onNext == null) + throw new ArgumentNullException("onNext"); + if (onError == null) + throw new ArgumentNullException("onError"); + if (onCompleted == null) + throw new ArgumentNullException("onCompleted"); + + return onNext(Value); + } + } + + /// + /// Represents an OnError notification to an observer. + /// +#if !NO_DEBUGGER_ATTRIBUTES + [DebuggerDisplay("OnError({Exception})")] +#endif +#if !NO_SERIALIZABLE + [Serializable] +#endif + internal sealed class OnErrorNotification : Notification + { + Exception exception; + + /// + /// Constructs a notification of an exception. + /// + public OnErrorNotification(Exception exception) + { + this.exception = exception; + } + + /// + /// Throws the exception. + /// + public override T Value { get { exception.Throw(); throw exception; } } + + /// + /// Returns the exception. + /// + public override Exception Exception { get { return exception; } } + + /// + /// Returns false. + /// + public override bool HasValue { get { return false; } } + + /// + /// Returns NotificationKind.OnError. + /// + public override NotificationKind Kind { get { return NotificationKind.OnError; } } + + /// + /// Returns the hash code for this instance. + /// + public override int GetHashCode() + { + return Exception.GetHashCode(); + } + + /// + /// Indicates whether this instance and other are equal. + /// + public override bool Equals(Notification other) + { + if (Object.ReferenceEquals(this, other)) + return true; + if (Object.ReferenceEquals(other, null)) + return false; + if (other.Kind != NotificationKind.OnError) + return false; + return Object.Equals(Exception, other.Exception); + } + + /// + /// Returns a string representation of this instance. + /// + public override string ToString() + { + return String.Format(CultureInfo.CurrentCulture, "OnError({0})", Exception.GetType().FullName); + } + + /// + /// Invokes the observer's method corresponding to the notification. + /// + /// Observer to invoke the notification on. + public override void Accept(IObserver observer) + { + if (observer == null) + throw new ArgumentNullException("observer"); + + observer.OnError(Exception); + } + + /// + /// Invokes the observer's method corresponding to the notification and returns the produced result. + /// + /// Observer to invoke the notification on. + /// Result produced by the observation. + public override TResult Accept(IObserver observer) + { + if (observer == null) + throw new ArgumentNullException("observer"); + + return observer.OnError(Exception); + } + + /// + /// Invokes the delegate corresponding to the notification. + /// + /// Delegate to invoke for an OnNext notification. + /// Delegate to invoke for an OnError notification. + /// Delegate to invoke for an OnCompleted notification. + public override void Accept(Action onNext, Action onError, Action onCompleted) + { + if (onNext == null) + throw new ArgumentNullException("onNext"); + if (onError == null) + throw new ArgumentNullException("onError"); + if (onCompleted == null) + throw new ArgumentNullException("onCompleted"); + + onError(Exception); + } + + /// + /// Invokes the delegate corresponding to the notification and returns the produced result. + /// + /// Delegate to invoke for an OnNext notification. + /// Delegate to invoke for an OnError notification. + /// Delegate to invoke for an OnCompleted notification. + /// Result produced by the observation. + public override TResult Accept(Func onNext, Func onError, Func onCompleted) + { + if (onNext == null) + throw new ArgumentNullException("onNext"); + if (onError == null) + throw new ArgumentNullException("onError"); + if (onCompleted == null) + throw new ArgumentNullException("onCompleted"); + + return onError(Exception); + } + } + + /// + /// Represents an OnCompleted notification to an observer. + /// + [DebuggerDisplay("OnCompleted()")] + [Serializable] + internal sealed class OnCompletedNotification : Notification + { + /// + /// Constructs a notification of the end of a sequence. + /// + public OnCompletedNotification() + { + } + + /// + /// Throws an InvalidOperationException. + /// + public override T Value { get { throw new InvalidOperationException("No Value"); } } + + /// + /// Returns null. + /// + public override Exception Exception { get { return null; } } + + /// + /// Returns false. + /// + public override bool HasValue { get { return false; } } + + /// + /// Returns NotificationKind.OnCompleted. + /// + public override NotificationKind Kind { get { return NotificationKind.OnCompleted; } } + + /// + /// Returns the hash code for this instance. + /// + public override int GetHashCode() + { + return typeof(T).GetHashCode() ^ 8510; + } + + /// + /// Indicates whether this instance and other are equal. + /// + public override bool Equals(Notification other) + { + if (Object.ReferenceEquals(this, other)) + return true; + if (Object.ReferenceEquals(other, null)) + return false; + return other.Kind == NotificationKind.OnCompleted; + } + + /// + /// Returns a string representation of this instance. + /// + public override string ToString() + { + return "OnCompleted()"; + } + + /// + /// Invokes the observer's method corresponding to the notification. + /// + /// Observer to invoke the notification on. + public override void Accept(IObserver observer) + { + if (observer == null) + throw new ArgumentNullException("observer"); + + observer.OnCompleted(); + } + + /// + /// Invokes the observer's method corresponding to the notification and returns the produced result. + /// + /// Observer to invoke the notification on. + /// Result produced by the observation. + public override TResult Accept(IObserver observer) + { + if (observer == null) + throw new ArgumentNullException("observer"); + + return observer.OnCompleted(); + } + + /// + /// Invokes the delegate corresponding to the notification. + /// + /// Delegate to invoke for an OnNext notification. + /// Delegate to invoke for an OnError notification. + /// Delegate to invoke for an OnCompleted notification. + public override void Accept(Action onNext, Action onError, Action onCompleted) + { + if (onNext == null) + throw new ArgumentNullException("onNext"); + if (onError == null) + throw new ArgumentNullException("onError"); + if (onCompleted == null) + throw new ArgumentNullException("onCompleted"); + + onCompleted(); + } + + /// + /// Invokes the delegate corresponding to the notification and returns the produced result. + /// + /// Delegate to invoke for an OnNext notification. + /// Delegate to invoke for an OnError notification. + /// Delegate to invoke for an OnCompleted notification. + /// Result produced by the observation. + public override TResult Accept(Func onNext, Func onError, Func onCompleted) + { + if (onNext == null) + throw new ArgumentNullException("onNext"); + if (onError == null) + throw new ArgumentNullException("onError"); + if (onCompleted == null) + throw new ArgumentNullException("onCompleted"); + + return onCompleted(); + } + } + + /// + /// Determines whether the current Notification<T> object has the same observer message payload as a specified Notification<T> value. + /// + /// An object to compare to the current Notification<T> object. + /// true if both Notification<T> objects have the same observer message payload; otherwise, false. + /// + /// Equality of Notification<T> objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). + /// This means two Notification<T> objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. + /// In case one wants to determine whether two Notification<T> objects represent the same observer method call, use Object.ReferenceEquals identity equality instead. + /// + public abstract bool Equals(Notification other); + + /// + /// Determines whether the two specified Notification<T> objects have the same observer message payload. + /// + /// The first Notification<T> to compare, or null. + /// The second Notification<T> to compare, or null. + /// true if the first Notification<T> value has the same observer message payload as the second Notification<T> value; otherwise, false. + /// + /// Equality of Notification<T> objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). + /// This means two Notification<T> objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. + /// In case one wants to determine whether two Notification<T> objects represent the same observer method call, use Object.ReferenceEquals identity equality instead. + /// + public static bool operator ==(Notification left, Notification right) + { + if (object.ReferenceEquals(left, right)) + return true; + + if ((object)left == null || (object)right == null) + return false; + + return left.Equals(right); + } + + /// + /// Determines whether the two specified Notification<T> objects have a different observer message payload. + /// + /// The first Notification<T> to compare, or null. + /// The second Notification<T> to compare, or null. + /// true if the first Notification<T> value has a different observer message payload as the second Notification<T> value; otherwise, false. + /// + /// Equality of Notification<T> objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). + /// This means two Notification<T> objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. + /// In case one wants to determine whether two Notification<T> objects represent a different observer method call, use Object.ReferenceEquals identity equality instead. + /// + public static bool operator !=(Notification left, Notification right) + { + return !(left == right); + } + + /// + /// Determines whether the specified System.Object is equal to the current Notification<T>. + /// + /// The System.Object to compare with the current Notification<T>. + /// true if the specified System.Object is equal to the current Notification<T>; otherwise, false. + /// + /// Equality of Notification<T> objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). + /// This means two Notification<T> objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. + /// In case one wants to determine whether two Notification<T> objects represent the same observer method call, use Object.ReferenceEquals identity equality instead. + /// + public override bool Equals(object obj) + { + return Equals(obj as Notification); + } + + /// + /// Invokes the observer's method corresponding to the notification. + /// + /// Observer to invoke the notification on. + public abstract void Accept(IObserver observer); + + /// + /// Invokes the observer's method corresponding to the notification and returns the produced result. + /// + /// The type of the result returned from the observer's notification handlers. + /// Observer to invoke the notification on. + /// Result produced by the observation. + public abstract TResult Accept(IObserver observer); + + /// + /// Invokes the delegate corresponding to the notification. + /// + /// Delegate to invoke for an OnNext notification. + /// Delegate to invoke for an OnError notification. + /// Delegate to invoke for an OnCompleted notification. + public abstract void Accept(Action onNext, Action onError, Action onCompleted); + + /// + /// Invokes the delegate corresponding to the notification and returns the produced result. + /// + /// The type of the result returned from the notification handler delegates. + /// Delegate to invoke for an OnNext notification. + /// Delegate to invoke for an OnError notification. + /// Delegate to invoke for an OnCompleted notification. + /// Result produced by the observation. + public abstract TResult Accept(Func onNext, Func onError, Func onCompleted); + + /// + /// Returns an observable sequence with a single notification, using the immediate scheduler. + /// + /// The observable sequence that surfaces the behavior of the notification upon subscription. + public IObservable ToObservable() + { + return this.ToObservable(Scheduler.Immediate); + } + + /// + /// Returns an observable sequence with a single notification. + /// + /// Scheduler to send out the notification calls on. + /// The observable sequence that surfaces the behavior of the notification upon subscription. + public IObservable ToObservable(IScheduler scheduler) + { + if (scheduler == null) + throw new ArgumentNullException("scheduler"); + + return Observable.Create(observer => scheduler.Schedule(() => + { + this.Accept(observer); + if (this.Kind == NotificationKind.OnNext) + observer.OnCompleted(); + })); + } + } + + /// + /// Provides a set of static methods for constructing notifications. + /// + public static class Notification + { + /// + /// Creates an object that represents an OnNext notification to an observer. + /// + /// The type of the elements received by the observer. Upon dematerialization of the notifications into an observable sequence, this type is used as the element type for the sequence. + /// The value contained in the notification. + /// The OnNext notification containing the value. + public static Notification CreateOnNext(T value) + { + return new Notification.OnNextNotification(value); + } + + /// + /// Creates an object that represents an OnError notification to an observer. + /// + /// The type of the elements received by the observer. Upon dematerialization of the notifications into an observable sequence, this type is used as the element type for the sequence. + /// The exception contained in the notification. + /// The OnError notification containing the exception. + /// is null. + public static Notification CreateOnError(Exception error) + { + if (error == null) + throw new ArgumentNullException("error"); + + return new Notification.OnErrorNotification(error); + } + + /// + /// Creates an object that represents an OnCompleted notification to an observer. + /// + /// The type of the elements received by the observer. Upon dematerialization of the notifications into an observable sequence, this type is used as the element type for the sequence. + /// The OnCompleted notification. + public static Notification CreateOnCompleted() + { + return new Notification.OnCompletedNotification(); + } + } +} + +#pragma warning restore 0659 +#pragma warning restore 0661 \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Notification.cs.meta b/Assets/Plugins/UniRx/Scripts/Notification.cs.meta new file mode 100644 index 0000000..75ed5fa --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Notification.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 169d02559aa6b3e459fbae10f2acecd8 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers.meta b/Assets/Plugins/UniRx/Scripts/Notifiers.meta new file mode 100644 index 0000000..f5ceee7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Notifiers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7c4c0b009d4f74543b3a334abc45323a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/BooleanNotifier.cs b/Assets/Plugins/UniRx/Scripts/Notifiers/BooleanNotifier.cs new file mode 100644 index 0000000..bc23897 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Notifiers/BooleanNotifier.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace UniRx +{ + /// + /// Notify boolean flag. + /// + public class BooleanNotifier : IObservable + { + readonly Subject boolTrigger = new Subject(); + + bool boolValue; + /// Current flag value + public bool Value + { + get { return boolValue; } + set + { + boolValue = value; + boolTrigger.OnNext(value); + } + } + + /// + /// Setup initial flag. + /// + public BooleanNotifier(bool initialValue = false) + { + this.Value = initialValue; + } + + /// + /// Set and raise true if current value isn't true. + /// + public void TurnOn() + { + if (Value != true) + { + Value = true; + } + } + + /// + /// Set and raise false if current value isn't false. + /// + public void TurnOff() + { + if (Value != false) + { + Value = false; + } + } + + /// + /// Set and raise reverse value. + /// + public void SwitchValue() + { + Value = !Value; + } + + + /// + /// Subscribe observer. + /// + public IDisposable Subscribe(IObserver observer) + { + return boolTrigger.Subscribe(observer); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/BooleanNotifier.cs.meta b/Assets/Plugins/UniRx/Scripts/Notifiers/BooleanNotifier.cs.meta new file mode 100644 index 0000000..b2064e0 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Notifiers/BooleanNotifier.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5ee30c0abdddd7241acbe24df0637678 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/CountNotifier.cs b/Assets/Plugins/UniRx/Scripts/Notifiers/CountNotifier.cs new file mode 100644 index 0000000..8b4a006 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Notifiers/CountNotifier.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace UniRx +{ + /// Event kind of CountNotifier. + public enum CountChangedStatus + { + /// Count incremented. + Increment, + /// Count decremented. + Decrement, + /// Count is zero. + Empty, + /// Count arrived max. + Max + } + + /// + /// Notify event of count flag. + /// + public class CountNotifier : IObservable + { + readonly object lockObject = new object(); + readonly Subject statusChanged = new Subject(); + readonly int max; + + public int Max { get { return max; } } + public int Count { get; private set; } + + /// + /// Setup max count of signal. + /// + public CountNotifier(int max = int.MaxValue) + { + if (max <= 0) + { + throw new ArgumentException("max"); + } + + this.max = max; + } + + /// + /// Increment count and notify status. + /// + public IDisposable Increment(int incrementCount = 1) + { + if (incrementCount < 0) + { + throw new ArgumentException("incrementCount"); + } + + lock (lockObject) + { + if (Count == Max) return Disposable.Empty; + else if (incrementCount + Count > Max) Count = Max; + else Count += incrementCount; + + statusChanged.OnNext(CountChangedStatus.Increment); + if (Count == Max) statusChanged.OnNext(CountChangedStatus.Max); + + return Disposable.Create(() => this.Decrement(incrementCount)); + } + } + + /// + /// Decrement count and notify status. + /// + public void Decrement(int decrementCount = 1) + { + if (decrementCount < 0) + { + throw new ArgumentException("decrementCount"); + } + + lock (lockObject) + { + if (Count == 0) return; + else if (Count - decrementCount < 0) Count = 0; + else Count -= decrementCount; + + statusChanged.OnNext(CountChangedStatus.Decrement); + if (Count == 0) statusChanged.OnNext(CountChangedStatus.Empty); + } + } + + /// + /// Subscribe observer. + /// + public IDisposable Subscribe(IObserver observer) + { + return statusChanged.Subscribe(observer); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/CountNotifier.cs.meta b/Assets/Plugins/UniRx/Scripts/Notifiers/CountNotifier.cs.meta new file mode 100644 index 0000000..706bb83 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Notifiers/CountNotifier.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 503af1c1dc279164e83011be5110633e +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/MessageBroker.cs b/Assets/Plugins/UniRx/Scripts/Notifiers/MessageBroker.cs new file mode 100644 index 0000000..a951831 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Notifiers/MessageBroker.cs @@ -0,0 +1,209 @@ +using System; +using System.Collections.Generic; +using UniRx.InternalUtil; + +namespace UniRx +{ + public interface IMessagePublisher + { + /// + /// Send Message to all receiver. + /// + void Publish(T message); + } + + public interface IMessageReceiver + { + /// + /// Subscribe typed message. + /// + IObservable Receive(); + } + + public interface IMessageBroker : IMessagePublisher, IMessageReceiver + { + } + + public interface IAsyncMessagePublisher + { + /// + /// Send Message to all receiver and await complete. + /// + IObservable PublishAsync(T message); + } + + public interface IAsyncMessageReceiver + { + /// + /// Subscribe typed message. + /// + IDisposable Subscribe(Func> asyncMessageReceiver); + } + + public interface IAsyncMessageBroker : IAsyncMessagePublisher, IAsyncMessageReceiver + { + } + + /// + /// In-Memory PubSub filtered by Type. + /// + public class MessageBroker : IMessageBroker, IDisposable + { + /// + /// MessageBroker in Global scope. + /// + public static readonly IMessageBroker Default = new MessageBroker(); + + bool isDisposed = false; + readonly Dictionary notifiers = new Dictionary(); + + public void Publish(T message) + { + object notifier; + lock (notifiers) + { + if (isDisposed) return; + + if (!notifiers.TryGetValue(typeof(T), out notifier)) + { + return; + } + } + ((ISubject)notifier).OnNext(message); + } + + public IObservable Receive() + { + object notifier; + lock (notifiers) + { + if (isDisposed) throw new ObjectDisposedException("MessageBroker"); + + if (!notifiers.TryGetValue(typeof(T), out notifier)) + { + ISubject n = new Subject().Synchronize(); + notifier = n; + notifiers.Add(typeof(T), notifier); + } + } + + return ((IObservable)notifier).AsObservable(); + } + + public void Dispose() + { + lock (notifiers) + { + if (!isDisposed) + { + isDisposed = true; + notifiers.Clear(); + } + } + } + } + + /// + /// In-Memory PubSub filtered by Type. + /// + public class AsyncMessageBroker : IAsyncMessageBroker, IDisposable + { + /// + /// AsyncMessageBroker in Global scope. + /// + public static readonly IAsyncMessageBroker Default = new AsyncMessageBroker(); + + bool isDisposed = false; + readonly Dictionary notifiers = new Dictionary(); + + public IObservable PublishAsync(T message) + { + UniRx.InternalUtil.ImmutableList>> notifier; + lock (notifiers) + { + if (isDisposed) throw new ObjectDisposedException("AsyncMessageBroker"); + + object _notifier; + if (notifiers.TryGetValue(typeof(T), out _notifier)) + { + notifier = (UniRx.InternalUtil.ImmutableList>>)_notifier; + } + else + { + return Observable.ReturnUnit(); + } + } + + var data = notifier.Data; + var awaiter = new IObservable[data.Length]; + for (int i = 0; i < data.Length; i++) + { + awaiter[i] = data[i].Invoke(message); + } + return Observable.WhenAll(awaiter); + } + + public IDisposable Subscribe(Func> asyncMessageReceiver) + { + lock (notifiers) + { + if (isDisposed) throw new ObjectDisposedException("AsyncMessageBroker"); + + object _notifier; + if (!notifiers.TryGetValue(typeof(T), out _notifier)) + { + var notifier = UniRx.InternalUtil.ImmutableList>>.Empty; + notifier = notifier.Add(asyncMessageReceiver); + notifiers.Add(typeof(T), notifier); + } + else + { + var notifier = (ImmutableList>>)_notifier; + notifier = notifier.Add(asyncMessageReceiver); + notifiers[typeof(T)] = notifier; + } + } + + return new Subscription(this, asyncMessageReceiver); + } + + public void Dispose() + { + lock (notifiers) + { + if (!isDisposed) + { + isDisposed = true; + notifiers.Clear(); + } + } + } + + class Subscription : IDisposable + { + readonly AsyncMessageBroker parent; + readonly Func> asyncMessageReceiver; + + public Subscription(AsyncMessageBroker parent, Func> asyncMessageReceiver) + { + this.parent = parent; + this.asyncMessageReceiver = asyncMessageReceiver; + } + + public void Dispose() + { + lock (parent.notifiers) + { + object _notifier; + if (parent.notifiers.TryGetValue(typeof(T), out _notifier)) + { + var notifier = (ImmutableList>>)_notifier; + notifier = notifier.Remove(asyncMessageReceiver); + + parent.notifiers[typeof(T)] = notifier; + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/MessageBroker.cs.meta b/Assets/Plugins/UniRx/Scripts/Notifiers/MessageBroker.cs.meta new file mode 100644 index 0000000..a678ef5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Notifiers/MessageBroker.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9dc5e3c48d083d4418ab67287f050267 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/ScheduledNotifier.cs b/Assets/Plugins/UniRx/Scripts/Notifiers/ScheduledNotifier.cs new file mode 100644 index 0000000..649dcbc --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Notifiers/ScheduledNotifier.cs @@ -0,0 +1,72 @@ +using System; + +namespace UniRx +{ + /// + /// Notify value on setuped scheduler. + /// + public class ScheduledNotifier : IObservable, IProgress + { + readonly IScheduler scheduler; + readonly Subject trigger = new Subject(); + + /// + /// Use scheduler is Scheduler.DefaultSchedulers.ConstantTimeOperations. + /// + public ScheduledNotifier() + { + this.scheduler = Scheduler.DefaultSchedulers.ConstantTimeOperations; + } + /// + /// Use scheduler is argument's scheduler. + /// + public ScheduledNotifier(IScheduler scheduler) + { + if (scheduler == null) + { + throw new ArgumentNullException("scheduler"); + } + + this.scheduler = scheduler; + } + + /// + /// Push value to subscribers on setuped scheduler. + /// + public void Report(T value) + { + scheduler.Schedule(() => trigger.OnNext(value)); + } + + /// + /// Push value to subscribers on setuped scheduler. + /// + public IDisposable Report(T value, TimeSpan dueTime) + { + var cancel = scheduler.Schedule(dueTime, () => trigger.OnNext(value)); + return cancel; + } + + /// + /// Push value to subscribers on setuped scheduler. + /// + public IDisposable Report(T value, DateTimeOffset dueTime) + { + var cancel = scheduler.Schedule(dueTime, () => trigger.OnNext(value)); + return cancel; + } + + /// + /// Subscribe observer. + /// + public IDisposable Subscribe(IObserver observer) + { + if (observer == null) + { + throw new ArgumentNullException("observer"); + } + + return trigger.Subscribe(observer); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/ScheduledNotifier.cs.meta b/Assets/Plugins/UniRx/Scripts/Notifiers/ScheduledNotifier.cs.meta new file mode 100644 index 0000000..00a3217 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Notifiers/ScheduledNotifier.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e6f53242e655cbe4e889538216dc9e17 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Aggregate.cs b/Assets/Plugins/UniRx/Scripts/Observable.Aggregate.cs new file mode 100644 index 0000000..da0dff2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Aggregate.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Text; +using UniRx.Operators; + +namespace UniRx +{ + public static partial class Observable + { + public static IObservable Scan(this IObservable source, Func accumulator) + { + return new ScanObservable(source, accumulator); + } + + public static IObservable Scan(this IObservable source, TAccumulate seed, Func accumulator) + { + return new ScanObservable(source, seed, accumulator); + } + + public static IObservable Aggregate(this IObservable source, Func accumulator) + { + return new AggregateObservable(source, accumulator); + } + + public static IObservable Aggregate(this IObservable source, TAccumulate seed, Func accumulator) + { + return new AggregateObservable(source, seed, accumulator); + } + + public static IObservable Aggregate(this IObservable source, TAccumulate seed, Func accumulator, Func resultSelector) + { + return new AggregateObservable(source, seed, accumulator, resultSelector); + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Aggregate.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Aggregate.cs.meta new file mode 100644 index 0000000..a314e4a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Aggregate.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 82339dddb2a9f944785f1555b83d667c +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Awaiter.cs b/Assets/Plugins/UniRx/Scripts/Observable.Awaiter.cs new file mode 100644 index 0000000..1040e0a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Awaiter.cs @@ -0,0 +1,133 @@ +#if (NET_4_6 || NET_STANDARD_2_0) + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace UniRx +{ + public static partial class Observable + { + /// + /// Gets an awaiter that returns the last value of the observable sequence or throws an exception if the sequence is empty. + /// This operation subscribes to the observable sequence, making it hot. + /// + /// Source sequence to await. + public static AsyncSubject GetAwaiter(this IObservable source) + { + if (source == null) throw new ArgumentNullException("source"); + + return RunAsync(source, CancellationToken.None); + } + + /// + /// Gets an awaiter that returns the last value of the observable sequence or throws an exception if the sequence is empty. + /// This operation subscribes to the observable sequence, making it hot. + /// + /// Source sequence to await. + public static AsyncSubject GetAwaiter(this IConnectableObservable source) + { + if (source == null) throw new ArgumentNullException("source"); + + return RunAsync(source, CancellationToken.None); + } + + /// + /// Gets an awaiter that returns the last value of the observable sequence or throws an exception if the sequence is empty. + /// This operation subscribes to the observable sequence, making it hot. + /// + /// Source sequence to await. + /// Cancellation token. + public static AsyncSubject GetAwaiter(this IObservable source, CancellationToken cancellationToken) + { + if (source == null) throw new ArgumentNullException("source"); + + return RunAsync(source, cancellationToken); + } + + /// + /// Gets an awaiter that returns the last value of the observable sequence or throws an exception if the sequence is empty. + /// This operation subscribes to the observable sequence, making it hot. + /// + /// Source sequence to await. + /// Cancellation token. + public static AsyncSubject GetAwaiter(this IConnectableObservable source, CancellationToken cancellationToken) + { + if (source == null) throw new ArgumentNullException("source"); + + return RunAsync(source, cancellationToken); + } + + static AsyncSubject RunAsync(IObservable source, CancellationToken cancellationToken) + { + var s = new AsyncSubject(); + + if (cancellationToken.IsCancellationRequested) + { + return Cancel(s, cancellationToken); + } + + var d = source.Subscribe(s); + + if (cancellationToken.CanBeCanceled) + { + RegisterCancelation(s, d, cancellationToken); + } + + return s; + } + + static AsyncSubject RunAsync(IConnectableObservable source, CancellationToken cancellationToken) + { + var s = new AsyncSubject(); + + if (cancellationToken.IsCancellationRequested) + { + return Cancel(s, cancellationToken); + } + + var d = source.Subscribe(s); + var c = source.Connect(); + + if (cancellationToken.CanBeCanceled) + { + RegisterCancelation(s, StableCompositeDisposable.Create(d, c), cancellationToken); + } + + return s; + } + + static AsyncSubject Cancel(AsyncSubject subject, CancellationToken cancellationToken) + { + subject.OnError(new OperationCanceledException(cancellationToken)); + return subject; + } + + static void RegisterCancelation(AsyncSubject subject, IDisposable subscription, CancellationToken token) + { + // + // Separate method used to avoid heap allocation of closure when no cancellation is needed, + // e.g. when CancellationToken.None is provided to the RunAsync overloads. + // + + var ctr = token.Register(() => + { + subscription.Dispose(); + Cancel(subject, token); + }); + + // + // No null-check for ctr is needed: + // + // - CancellationTokenRegistration is a struct + // - Registration will succeed 99% of the time, no warranting an attempt to avoid spurious Subscribe calls + // + subject.Subscribe(Stubs.Ignore, _ => ctr.Dispose(), ctr.Dispose); + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Awaiter.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Awaiter.cs.meta new file mode 100644 index 0000000..50e9759 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Awaiter.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ec3ea3f22d061964c8f06eb9ea78ec42 +timeCreated: 1475137543 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Binding.cs b/Assets/Plugins/UniRx/Scripts/Observable.Binding.cs new file mode 100644 index 0000000..7b75ed8 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Binding.cs @@ -0,0 +1,76 @@ +using System; +using UniRx.Operators; + +namespace UniRx +{ + public static partial class Observable + { + public static IConnectableObservable Multicast(this IObservable source, ISubject subject) + { + return new ConnectableObservable(source, subject); + } + + public static IConnectableObservable Publish(this IObservable source) + { + return source.Multicast(new Subject()); + } + + public static IConnectableObservable Publish(this IObservable source, T initialValue) + { + return source.Multicast(new BehaviorSubject(initialValue)); + } + + public static IConnectableObservable PublishLast(this IObservable source) + { + return source.Multicast(new AsyncSubject()); + } + + public static IConnectableObservable Replay(this IObservable source) + { + return source.Multicast(new ReplaySubject()); + } + + public static IConnectableObservable Replay(this IObservable source, IScheduler scheduler) + { + return source.Multicast(new ReplaySubject(scheduler)); + } + + public static IConnectableObservable Replay(this IObservable source, int bufferSize) + { + return source.Multicast(new ReplaySubject(bufferSize)); + } + + public static IConnectableObservable Replay(this IObservable source, int bufferSize, IScheduler scheduler) + { + return source.Multicast(new ReplaySubject(bufferSize, scheduler)); + } + + public static IConnectableObservable Replay(this IObservable source, TimeSpan window) + { + return source.Multicast(new ReplaySubject(window)); + } + + public static IConnectableObservable Replay(this IObservable source, TimeSpan window, IScheduler scheduler) + { + return source.Multicast(new ReplaySubject(window, scheduler)); + } + + public static IConnectableObservable Replay(this IObservable source, int bufferSize, TimeSpan window, IScheduler scheduler) + { + return source.Multicast(new ReplaySubject(bufferSize, window, scheduler)); + } + + public static IObservable RefCount(this IConnectableObservable source) + { + return new RefCountObservable(source); + } + + /// + /// same as Publish().RefCount() + /// + public static IObservable Share(this IObservable source) + { + return source.Publish().RefCount(); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Binding.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Binding.cs.meta new file mode 100644 index 0000000..b1e96a3 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Binding.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bb11a562e64264645b76ad3a8d15d966 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Blocking.cs b/Assets/Plugins/UniRx/Scripts/Observable.Blocking.cs new file mode 100644 index 0000000..ebaa402 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Blocking.cs @@ -0,0 +1,17 @@ +using System; + +namespace UniRx +{ + public static partial class Observable + { + public static T Wait(this IObservable source) + { + return new UniRx.Operators.Wait(source, InfiniteTimeSpan).Run(); + } + + public static T Wait(this IObservable source, TimeSpan timeout) + { + return new UniRx.Operators.Wait(source, timeout).Run(); + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Blocking.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Blocking.cs.meta new file mode 100644 index 0000000..7851640 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Blocking.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4a05ec8aabbdba24388b7b2ae6c4a474 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Concatenate.cs b/Assets/Plugins/UniRx/Scripts/Observable.Concatenate.cs new file mode 100644 index 0000000..cdf5f6d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Concatenate.cs @@ -0,0 +1,320 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using UniRx.Operators; + +namespace UniRx +{ + // concatenate multiple observable + // merge, concat, zip... + public static partial class Observable + { + static IEnumerable> CombineSources(IObservable first, IObservable[] seconds) + { + yield return first; + for (int i = 0; i < seconds.Length; i++) + { + yield return seconds[i]; + } + } + + public static IObservable Concat(params IObservable[] sources) + { + if (sources == null) throw new ArgumentNullException("sources"); + + return new ConcatObservable(sources); + } + + public static IObservable Concat(this IEnumerable> sources) + { + if (sources == null) throw new ArgumentNullException("sources"); + + return new ConcatObservable(sources); + } + + public static IObservable Concat(this IObservable> sources) + { + return sources.Merge(maxConcurrent: 1); + } + + public static IObservable Concat(this IObservable first, params IObservable[] seconds) + { + if (first == null) throw new ArgumentNullException("first"); + if (seconds == null) throw new ArgumentNullException("seconds"); + + var concat = first as ConcatObservable; + if (concat != null) + { + return concat.Combine(seconds); + } + + return Concat(CombineSources(first, seconds)); + } + + public static IObservable Merge(this IEnumerable> sources) + { + return Merge(sources, Scheduler.DefaultSchedulers.ConstantTimeOperations); + } + + public static IObservable Merge(this IEnumerable> sources, IScheduler scheduler) + { + return new MergeObservable(sources.ToObservable(scheduler), scheduler == Scheduler.CurrentThread); + } + + public static IObservable Merge(this IEnumerable> sources, int maxConcurrent) + { + return Merge(sources, maxConcurrent, Scheduler.DefaultSchedulers.ConstantTimeOperations); + } + + public static IObservable Merge(this IEnumerable> sources, int maxConcurrent, IScheduler scheduler) + { + return new MergeObservable(sources.ToObservable(scheduler), maxConcurrent, scheduler == Scheduler.CurrentThread); + } + + public static IObservable Merge(params IObservable[] sources) + { + return Merge(Scheduler.DefaultSchedulers.ConstantTimeOperations, sources); + } + + public static IObservable Merge(IScheduler scheduler, params IObservable[] sources) + { + return new MergeObservable(sources.ToObservable(scheduler), scheduler == Scheduler.CurrentThread); + } + + public static IObservable Merge(this IObservable first, params IObservable[] seconds) + { + return Merge(CombineSources(first, seconds)); + } + + public static IObservable Merge(this IObservable first, IObservable second, IScheduler scheduler) + { + return Merge(scheduler, new[] { first, second }); + } + + public static IObservable Merge(this IObservable> sources) + { + return new MergeObservable(sources, false); + } + + public static IObservable Merge(this IObservable> sources, int maxConcurrent) + { + return new MergeObservable(sources, maxConcurrent, false); + } + + public static IObservable Zip(this IObservable left, IObservable right, Func selector) + { + return new ZipObservable(left, right, selector); + } + + public static IObservable> Zip(this IEnumerable> sources) + { + return Zip(sources.ToArray()); + } + + public static IObservable> Zip(params IObservable[] sources) + { + return new ZipObservable(sources); + } + + public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, ZipFunc resultSelector) + { + return new ZipObservable(source1, source2, source3, resultSelector); + } + + public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, ZipFunc resultSelector) + { + return new ZipObservable(source1, source2, source3, source4, resultSelector); + } + + public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, ZipFunc resultSelector) + { + return new ZipObservable(source1, source2, source3, source4, source5, resultSelector); + } + + public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, ZipFunc resultSelector) + { + return new ZipObservable(source1, source2, source3, source4, source5, source6, resultSelector); + } + + public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, ZipFunc resultSelector) + { + return new ZipObservable(source1, source2, source3, source4, source5, source6, source7, resultSelector); + } + + public static IObservable CombineLatest(this IObservable left, IObservable right, Func selector) + { + return new CombineLatestObservable(left, right, selector); + } + + public static IObservable> CombineLatest(this IEnumerable> sources) + { + return CombineLatest(sources.ToArray()); + } + + public static IObservable> CombineLatest(params IObservable[] sources) + { + return new CombineLatestObservable(sources); + } + + public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, CombineLatestFunc resultSelector) + { + return new CombineLatestObservable(source1, source2, source3, resultSelector); + } + + public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, CombineLatestFunc resultSelector) + { + return new CombineLatestObservable(source1, source2, source3, source4, resultSelector); + } + + public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, CombineLatestFunc resultSelector) + { + return new CombineLatestObservable(source1, source2, source3, source4, source5, resultSelector); + } + + public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, CombineLatestFunc resultSelector) + { + return new CombineLatestObservable(source1, source2, source3, source4, source5, source6, resultSelector); + } + + public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, CombineLatestFunc resultSelector) + { + return new CombineLatestObservable(source1, source2, source3, source4, source5, source6, source7, resultSelector); + } + + public static IObservable ZipLatest(this IObservable left, IObservable right, Func selector) + { + return new ZipLatestObservable(left, right, selector); + } + + public static IObservable> ZipLatest(this IEnumerable> sources) + { + return ZipLatest(sources.ToArray()); + } + + public static IObservable> ZipLatest(params IObservable[] sources) + { + return new ZipLatestObservable(sources); + } + + public static IObservable ZipLatest(this IObservable source1, IObservable source2, IObservable source3, ZipLatestFunc resultSelector) + { + return new ZipLatestObservable(source1, source2, source3, resultSelector); + } + + public static IObservable ZipLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, ZipLatestFunc resultSelector) + { + return new ZipLatestObservable(source1, source2, source3, source4, resultSelector); + } + + public static IObservable ZipLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, ZipLatestFunc resultSelector) + { + return new ZipLatestObservable(source1, source2, source3, source4, source5, resultSelector); + } + + public static IObservable ZipLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, ZipLatestFunc resultSelector) + { + return new ZipLatestObservable(source1, source2, source3, source4, source5, source6, resultSelector); + } + + public static IObservable ZipLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, ZipLatestFunc resultSelector) + { + return new ZipLatestObservable(source1, source2, source3, source4, source5, source6, source7, resultSelector); + } + + public static IObservable Switch(this IObservable> sources) + { + return new SwitchObservable(sources); + } + + public static IObservable WithLatestFrom(this IObservable left, IObservable right, Func selector) + { + return new WithLatestFromObservable(left, right, selector); + } + + /// + /// Specialized for single async operations like Task.WhenAll, Zip.Take(1). + /// If sequence is empty, return T[0] array. + /// + public static IObservable WhenAll(params IObservable[] sources) + { + if (sources.Length == 0) return Observable.Return(new T[0]); + + return new WhenAllObservable(sources); + } + + /// + /// Specialized for single async operations like Task.WhenAll, Zip.Take(1). + /// + public static IObservable WhenAll(params IObservable[] sources) + { + if (sources.Length == 0) return Observable.ReturnUnit(); + + return new WhenAllObservable(sources); + } + + /// + /// Specialized for single async operations like Task.WhenAll, Zip.Take(1). + /// If sequence is empty, return T[0] array. + /// + public static IObservable WhenAll(this IEnumerable> sources) + { + var array = sources as IObservable[]; + if (array != null) return WhenAll(array); + + return new WhenAllObservable(sources); + } + + /// + /// Specialized for single async operations like Task.WhenAll, Zip.Take(1). + /// + public static IObservable WhenAll(this IEnumerable> sources) + { + var array = sources as IObservable[]; + if (array != null) return WhenAll(array); + + return new WhenAllObservable(sources); + } + + public static IObservable StartWith(this IObservable source, T value) + { + return new StartWithObservable(source, value); + } + + public static IObservable StartWith(this IObservable source, Func valueFactory) + { + return new StartWithObservable(source, valueFactory); + } + + public static IObservable StartWith(this IObservable source, params T[] values) + { + return StartWith(source, Scheduler.DefaultSchedulers.ConstantTimeOperations, values); + } + + public static IObservable StartWith(this IObservable source, IEnumerable values) + { + return StartWith(source, Scheduler.DefaultSchedulers.ConstantTimeOperations, values); + } + + public static IObservable StartWith(this IObservable source, IScheduler scheduler, T value) + { + return Observable.Return(value, scheduler).Concat(source); + } + + public static IObservable StartWith(this IObservable source, IScheduler scheduler, IEnumerable values) + { + var array = values as T[]; + if (array == null) + { + array = values.ToArray(); + } + + return StartWith(source, scheduler, array); + } + + public static IObservable StartWith(this IObservable source, IScheduler scheduler, params T[] values) + { + return values.ToObservable(scheduler).Concat(source); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Concatenate.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Concatenate.cs.meta new file mode 100644 index 0000000..bc8b9d2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Concatenate.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 18c56bbfaaeedf445874f4246d42b509 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Concurrency.cs b/Assets/Plugins/UniRx/Scripts/Observable.Concurrency.cs new file mode 100644 index 0000000..89bd971 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Concurrency.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Text; +using UniRx.Operators; + +namespace UniRx +{ + public static partial class Observable + { + public static IObservable Synchronize(this IObservable source) + { + return new SynchronizeObservable(source, new object()); + } + + public static IObservable Synchronize(this IObservable source, object gate) + { + return new SynchronizeObservable(source, gate); + } + + public static IObservable ObserveOn(this IObservable source, IScheduler scheduler) + { + return new ObserveOnObservable(source, scheduler); + } + + public static IObservable SubscribeOn(this IObservable source, IScheduler scheduler) + { + return new SubscribeOnObservable(source, scheduler); + } + + public static IObservable DelaySubscription(this IObservable source, TimeSpan dueTime) + { + return new DelaySubscriptionObservable(source, dueTime, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable DelaySubscription(this IObservable source, TimeSpan dueTime, IScheduler scheduler) + { + return new DelaySubscriptionObservable(source, dueTime, scheduler); + } + + public static IObservable DelaySubscription(this IObservable source, DateTimeOffset dueTime) + { + return new DelaySubscriptionObservable(source, dueTime, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable DelaySubscription(this IObservable source, DateTimeOffset dueTime, IScheduler scheduler) + { + return new DelaySubscriptionObservable(source, dueTime, scheduler); + } + + public static IObservable Amb(params IObservable[] sources) + { + return Amb((IEnumerable>)sources); + } + + public static IObservable Amb(IEnumerable> sources) + { + var result = Observable.Never(); + foreach (var item in sources) + { + var second = item; + result = result.Amb(second); + } + return result; + } + + public static IObservable Amb(this IObservable source, IObservable second) + { + return new AmbObservable(source, second); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Concurrency.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Concurrency.cs.meta new file mode 100644 index 0000000..06cdb26 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Concurrency.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a31d38ad13dc4644180647afc28c6045 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Conversions.cs b/Assets/Plugins/UniRx/Scripts/Observable.Conversions.cs new file mode 100644 index 0000000..461d523 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Conversions.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using UniRx.Operators; + +namespace UniRx +{ + public static partial class Observable + { + public static IObservable AsObservable(this IObservable source) + { + if (source == null) throw new ArgumentNullException("source"); + + // optimize, don't double wrap + if (source is UniRx.Operators.AsObservableObservable) + { + return source; + } + + return new AsObservableObservable(source); + } + + public static IObservable ToObservable(this IEnumerable source) + { + return ToObservable(source, Scheduler.DefaultSchedulers.Iteration); + } + + public static IObservable ToObservable(this IEnumerable source, IScheduler scheduler) + { + return new ToObservableObservable(source, scheduler); + } + + public static IObservable Cast(this IObservable source) + { + return new CastObservable(source); + } + + /// + /// witness is for type inference. + /// + public static IObservable Cast(this IObservable source, TResult witness) + { + return new CastObservable(source); + } + + public static IObservable OfType(this IObservable source) + { + return new OfTypeObservable(source); + } + + /// + /// witness is for type inference. + /// + public static IObservable OfType(this IObservable source, TResult witness) + { + return new OfTypeObservable(source); + } + + /// + /// Converting .Select(_ => Unit.Default) sequence. + /// + public static IObservable AsUnitObservable(this IObservable source) + { + return new AsUnitObservableObservable(source); + } + + /// + /// Same as LastOrDefault().AsUnitObservable(). + /// + public static IObservable AsSingleUnitObservable(this IObservable source) + { + return new AsSingleUnitObservableObservable(source); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Conversions.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Conversions.cs.meta new file mode 100644 index 0000000..e3ef7b7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Conversions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e32bd7bbf28014b4ab2873cc8de3dea9 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Creation.cs b/Assets/Plugins/UniRx/Scripts/Observable.Creation.cs new file mode 100644 index 0000000..a13b51c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Creation.cs @@ -0,0 +1,375 @@ +using System; +using System.Collections.Generic; +using UniRx.Operators; + +namespace UniRx +{ + public static partial class Observable + { + /// + /// Create anonymous observable. Observer has exception durability. This is recommended for make operator and event like generator. + /// + public static IObservable Create(Func, IDisposable> subscribe) + { + if (subscribe == null) throw new ArgumentNullException("subscribe"); + + return new CreateObservable(subscribe); + } + + /// + /// Create anonymous observable. Observer has exception durability. This is recommended for make operator and event like generator(HotObservable). + /// + public static IObservable Create(Func, IDisposable> subscribe, bool isRequiredSubscribeOnCurrentThread) + { + if (subscribe == null) throw new ArgumentNullException("subscribe"); + + return new CreateObservable(subscribe, isRequiredSubscribeOnCurrentThread); + } + + /// + /// Create anonymous observable. Observer has exception durability. This is recommended for make operator and event like generator. + /// + public static IObservable CreateWithState(TState state, Func, IDisposable> subscribe) + { + if (subscribe == null) throw new ArgumentNullException("subscribe"); + + return new CreateObservable(state, subscribe); + } + + /// + /// Create anonymous observable. Observer has exception durability. This is recommended for make operator and event like generator(HotObservable). + /// + public static IObservable CreateWithState(TState state, Func, IDisposable> subscribe, bool isRequiredSubscribeOnCurrentThread) + { + if (subscribe == null) throw new ArgumentNullException("subscribe"); + + return new CreateObservable(state, subscribe, isRequiredSubscribeOnCurrentThread); + } + + /// + /// Create anonymous observable. Safe means auto detach when error raised in onNext pipeline. This is recommended for make generator (ColdObservable). + /// + public static IObservable CreateSafe(Func, IDisposable> subscribe) + { + if (subscribe == null) throw new ArgumentNullException("subscribe"); + + return new CreateSafeObservable(subscribe); + } + + /// + /// Create anonymous observable. Safe means auto detach when error raised in onNext pipeline. This is recommended for make generator (ColdObservable). + /// + public static IObservable CreateSafe(Func, IDisposable> subscribe, bool isRequiredSubscribeOnCurrentThread) + { + if (subscribe == null) throw new ArgumentNullException("subscribe"); + + return new CreateSafeObservable(subscribe, isRequiredSubscribeOnCurrentThread); + } + + /// + /// Empty Observable. Returns only OnCompleted. + /// + public static IObservable Empty() + { + return Empty(Scheduler.DefaultSchedulers.ConstantTimeOperations); + } + + /// + /// Empty Observable. Returns only OnCompleted on specified scheduler. + /// + public static IObservable Empty(IScheduler scheduler) + { + if (scheduler == Scheduler.Immediate) + { + return ImmutableEmptyObservable.Instance; + } + else + { + return new EmptyObservable(scheduler); + } + } + + /// + /// Empty Observable. Returns only OnCompleted. witness is for type inference. + /// + public static IObservable Empty(T witness) + { + return Empty(Scheduler.DefaultSchedulers.ConstantTimeOperations); + } + + /// + /// Empty Observable. Returns only OnCompleted on specified scheduler. witness is for type inference. + /// + public static IObservable Empty(IScheduler scheduler, T witness) + { + return Empty(scheduler); + } + + /// + /// Non-Terminating Observable. It's no returns, never finish. + /// + public static IObservable Never() + { + return ImmutableNeverObservable.Instance; + } + + /// + /// Non-Terminating Observable. It's no returns, never finish. witness is for type inference. + /// + public static IObservable Never(T witness) + { + return ImmutableNeverObservable.Instance; + } + + /// + /// Return single sequence Immediately. + /// + public static IObservable Return(T value) + { + return Return(value, Scheduler.DefaultSchedulers.ConstantTimeOperations); + } + + /// + /// Return single sequence on specified scheduler. + /// + public static IObservable Return(T value, IScheduler scheduler) + { + if (scheduler == Scheduler.Immediate) + { + return new ImmediateReturnObservable(value); + } + else + { + return new ReturnObservable(value, scheduler); + } + } + + /// + /// Return single sequence Immediately, optimized for Unit(no allocate memory). + /// + public static IObservable Return(Unit value) + { + return ImmutableReturnUnitObservable.Instance; + } + + /// + /// Return single sequence Immediately, optimized for Boolean(no allocate memory). + /// + public static IObservable Return(bool value) + { + return (value == true) + ? (IObservable)ImmutableReturnTrueObservable.Instance + : (IObservable)ImmutableReturnFalseObservable.Instance; + } + + /// + /// Return single sequence Immediately, optimized for Int32. + /// + public static IObservable Return(int value) + { + return ImmutableReturnInt32Observable.GetInt32Observable(value); + } + + /// + /// Same as Observable.Return(Unit.Default); but no allocate memory. + /// + public static IObservable ReturnUnit() + { + return ImmutableReturnUnitObservable.Instance; + } + + /// + /// Empty Observable. Returns only onError. + /// + public static IObservable Throw(Exception error) + { + return Throw(error, Scheduler.DefaultSchedulers.ConstantTimeOperations); + } + + /// + /// Empty Observable. Returns only onError. witness if for Type inference. + /// + public static IObservable Throw(Exception error, T witness) + { + return Throw(error, Scheduler.DefaultSchedulers.ConstantTimeOperations); + } + + /// + /// Empty Observable. Returns only onError on specified scheduler. + /// + public static IObservable Throw(Exception error, IScheduler scheduler) + { + return new ThrowObservable(error, scheduler); + } + + /// + /// Empty Observable. Returns only onError on specified scheduler. witness if for Type inference. + /// + public static IObservable Throw(Exception error, IScheduler scheduler, T witness) + { + return Throw(error, scheduler); + } + + public static IObservable Range(int start, int count) + { + return Range(start, count, Scheduler.DefaultSchedulers.Iteration); + } + + public static IObservable Range(int start, int count, IScheduler scheduler) + { + return new RangeObservable(start, count, scheduler); + } + + public static IObservable Repeat(T value) + { + return Repeat(value, Scheduler.DefaultSchedulers.Iteration); + } + + public static IObservable Repeat(T value, IScheduler scheduler) + { + if (scheduler == null) throw new ArgumentNullException("scheduler"); + + return new RepeatObservable(value, null, scheduler); + } + + public static IObservable Repeat(T value, int repeatCount) + { + return Repeat(value, repeatCount, Scheduler.DefaultSchedulers.Iteration); + } + + public static IObservable Repeat(T value, int repeatCount, IScheduler scheduler) + { + if (repeatCount < 0) throw new ArgumentOutOfRangeException("repeatCount"); + if (scheduler == null) throw new ArgumentNullException("scheduler"); + + return new RepeatObservable(value, repeatCount, scheduler); + } + + public static IObservable Repeat(this IObservable source) + { + return RepeatInfinite(source).Concat(); + } + + static IEnumerable> RepeatInfinite(IObservable source) + { + while (true) + { + yield return source; + } + } + + /// + /// Same as Repeat() but if arriving contiguous "OnComplete" Repeat stops. + /// + public static IObservable RepeatSafe(this IObservable source) + { + return new RepeatSafeObservable(RepeatInfinite(source), source.IsRequiredSubscribeOnCurrentThread()); + } + + public static IObservable Defer(Func> observableFactory) + { + return new DeferObservable(observableFactory); + } + + public static IObservable Start(Func function) + { + return new StartObservable(function, null, Scheduler.DefaultSchedulers.AsyncConversions); + } + + public static IObservable Start(Func function, TimeSpan timeSpan) + { + return new StartObservable(function, timeSpan, Scheduler.DefaultSchedulers.AsyncConversions); + } + + public static IObservable Start(Func function, IScheduler scheduler) + { + return new StartObservable(function, null, scheduler); + } + + public static IObservable Start(Func function, TimeSpan timeSpan, IScheduler scheduler) + { + return new StartObservable(function, timeSpan, scheduler); + } + + public static IObservable Start(Action action) + { + return new StartObservable(action, null, Scheduler.DefaultSchedulers.AsyncConversions); + } + + public static IObservable Start(Action action, TimeSpan timeSpan) + { + return new StartObservable(action, timeSpan, Scheduler.DefaultSchedulers.AsyncConversions); + } + + public static IObservable Start(Action action, IScheduler scheduler) + { + return new StartObservable(action, null, scheduler); + } + + public static IObservable Start(Action action, TimeSpan timeSpan, IScheduler scheduler) + { + return new StartObservable(action, timeSpan, scheduler); + } + + public static Func> ToAsync(Func function) + { + return ToAsync(function, Scheduler.DefaultSchedulers.AsyncConversions); + } + + public static Func> ToAsync(Func function, IScheduler scheduler) + { + return () => + { + var subject = new AsyncSubject(); + + scheduler.Schedule(() => + { + var result = default(T); + try + { + result = function(); + } + catch (Exception exception) + { + subject.OnError(exception); + return; + } + subject.OnNext(result); + subject.OnCompleted(); + }); + + return subject.AsObservable(); + }; + } + + public static Func> ToAsync(Action action) + { + return ToAsync(action, Scheduler.DefaultSchedulers.AsyncConversions); + } + + public static Func> ToAsync(Action action, IScheduler scheduler) + { + return () => + { + var subject = new AsyncSubject(); + + scheduler.Schedule(() => + { + try + { + action(); + } + catch (Exception exception) + { + subject.OnError(exception); + return; + } + subject.OnNext(Unit.Default); + subject.OnCompleted(); + }); + + return subject.AsObservable(); + }; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Creation.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Creation.cs.meta new file mode 100644 index 0000000..d8ffc64 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Creation.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e63036d2dba75f64382beed512fd086c +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.ErrorHandling.cs b/Assets/Plugins/UniRx/Scripts/Observable.ErrorHandling.cs new file mode 100644 index 0000000..8faf6dc --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.ErrorHandling.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UniRx.Operators; + +namespace UniRx +{ + public static partial class Observable + { + public static IObservable Finally(this IObservable source, Action finallyAction) + { + return new FinallyObservable(source, finallyAction); + } + + public static IObservable Catch(this IObservable source, Func> errorHandler) + where TException : Exception + { + return new CatchObservable(source, errorHandler); + } + + public static IObservable Catch(this IEnumerable> sources) + { + return new CatchObservable(sources); + } + + /// Catch exception and return Observable.Empty. + public static IObservable CatchIgnore(this IObservable source) + { + return source.Catch(Stubs.CatchIgnore); + } + + /// Catch exception and return Observable.Empty. + public static IObservable CatchIgnore(this IObservable source, Action errorAction) + where TException : Exception + { + var result = source.Catch((TException ex) => + { + errorAction(ex); + return Observable.Empty(); + }); + return result; + } + + public static IObservable Retry(this IObservable source) + { + return RepeatInfinite(source).Catch(); + } + + public static IObservable Retry(this IObservable source, int retryCount) + { + return System.Linq.Enumerable.Repeat(source, retryCount).Catch(); + } + + /// + /// Repeats the source observable sequence until it successfully terminates. + /// This is same as Retry(). + /// + public static IObservable OnErrorRetry( + this IObservable source) + { + var result = source.Retry(); + return result; + } + + /// + /// When catched exception, do onError action and repeat observable sequence. + /// + public static IObservable OnErrorRetry( + this IObservable source, Action onError) + where TException : Exception + { + return source.OnErrorRetry(onError, TimeSpan.Zero); + } + + /// + /// When catched exception, do onError action and repeat observable sequence after delay time. + /// + public static IObservable OnErrorRetry( + this IObservable source, Action onError, TimeSpan delay) + where TException : Exception + { + return source.OnErrorRetry(onError, int.MaxValue, delay); + } + + /// + /// When catched exception, do onError action and repeat observable sequence during within retryCount. + /// + public static IObservable OnErrorRetry( + this IObservable source, Action onError, int retryCount) + where TException : Exception + { + return source.OnErrorRetry(onError, retryCount, TimeSpan.Zero); + } + + /// + /// When catched exception, do onError action and repeat observable sequence after delay time during within retryCount. + /// + public static IObservable OnErrorRetry( + this IObservable source, Action onError, int retryCount, TimeSpan delay) + where TException : Exception + { + return source.OnErrorRetry(onError, retryCount, delay, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + /// + /// When catched exception, do onError action and repeat observable sequence after delay time(work on delayScheduler) during within retryCount. + /// + public static IObservable OnErrorRetry( + this IObservable source, Action onError, int retryCount, TimeSpan delay, IScheduler delayScheduler) + where TException : Exception + { + var result = Observable.Defer(() => + { + var dueTime = (delay.Ticks < 0) ? TimeSpan.Zero : delay; + var count = 0; + + IObservable self = null; + self = source.Catch((TException ex) => + { + onError(ex); + + return (++count < retryCount) + ? (dueTime == TimeSpan.Zero) + ? self.SubscribeOn(Scheduler.CurrentThread) + : self.DelaySubscription(dueTime, delayScheduler).SubscribeOn(Scheduler.CurrentThread) + : Observable.Throw(ex); + }); + return self; + }); + + return result; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.ErrorHandling.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.ErrorHandling.cs.meta new file mode 100644 index 0000000..f78d001 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.ErrorHandling.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f40cab35efe24e6448ac8455bc7a4eb9 +timeCreated: 1455373902 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Events.cs b/Assets/Plugins/UniRx/Scripts/Observable.Events.cs new file mode 100644 index 0000000..305b13f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Events.cs @@ -0,0 +1,34 @@ +using System; +using UniRx.Operators; + +namespace UniRx +{ + public static partial class Observable + { + public static IObservable> FromEventPattern(Func, TDelegate> conversion, Action addHandler, Action removeHandler) + where TEventArgs : EventArgs + { + return new FromEventPatternObservable(conversion, addHandler, removeHandler); + } + + public static IObservable FromEvent(Func conversion, Action addHandler, Action removeHandler) + { + return new FromEventObservable(conversion, addHandler, removeHandler); + } + + public static IObservable FromEvent(Func, TDelegate> conversion, Action addHandler, Action removeHandler) + { + return new FromEventObservable(conversion, addHandler, removeHandler); + } + + public static IObservable FromEvent(Action addHandler, Action removeHandler) + { + return new FromEventObservable(addHandler, removeHandler); + } + + public static IObservable FromEvent(Action> addHandler, Action> removeHandler) + { + return new FromEventObservable_(addHandler, removeHandler); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Events.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Events.cs.meta new file mode 100644 index 0000000..396fc27 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Events.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e591aafff0492c94590cf9702f6c408f +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.FromAsync.cs b/Assets/Plugins/UniRx/Scripts/Observable.FromAsync.cs new file mode 100644 index 0000000..0a04bfa --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.FromAsync.cs @@ -0,0 +1,127 @@ +using System; + +namespace UniRx +{ + public static partial class Observable + { + public static Func> FromAsyncPattern(Func begin, Func end) + { + return () => + { + var subject = new AsyncSubject(); + try + { + begin(iar => + { + TResult result; + try + { + result = end(iar); + } + catch (Exception exception) + { + subject.OnError(exception); + return; + } + subject.OnNext(result); + subject.OnCompleted(); + }, null); + } + catch (Exception exception) + { + return Observable.Throw(exception, Scheduler.DefaultSchedulers.AsyncConversions); + } + return subject.AsObservable(); + }; + } + + public static Func> FromAsyncPattern(Func begin, Func end) + { + return x => + { + var subject = new AsyncSubject(); + try + { + begin(x, iar => + { + TResult result; + try + { + result = end(iar); + } + catch (Exception exception) + { + subject.OnError(exception); + return; + } + subject.OnNext(result); + subject.OnCompleted(); + }, null); + } + catch (Exception exception) + { + return Observable.Throw(exception, Scheduler.DefaultSchedulers.AsyncConversions); + } + return subject.AsObservable(); + }; + } + + public static Func> FromAsyncPattern(Func begin, Func end) + { + return (x, y) => + { + var subject = new AsyncSubject(); + try + { + begin(x, y, iar => + { + TResult result; + try + { + result = end(iar); + } + catch (Exception exception) + { + subject.OnError(exception); + return; + } + subject.OnNext(result); + subject.OnCompleted(); + }, null); + } + catch (Exception exception) + { + return Observable.Throw(exception, Scheduler.DefaultSchedulers.AsyncConversions); + } + return subject.AsObservable(); + }; + } + + public static Func> FromAsyncPattern(Func begin, Action end) + { + return FromAsyncPattern(begin, iar => + { + end(iar); + return Unit.Default; + }); + } + + public static Func> FromAsyncPattern(Func begin, Action end) + { + return FromAsyncPattern(begin, iar => + { + end(iar); + return Unit.Default; + }); + } + + public static Func> FromAsyncPattern(Func begin, Action end) + { + return FromAsyncPattern(begin, iar => + { + end(iar); + return Unit.Default; + }); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.FromAsync.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.FromAsync.cs.meta new file mode 100644 index 0000000..e40ab88 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.FromAsync.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 601f5bb7bb302a14cb46df717729b8c7 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Joins.cs b/Assets/Plugins/UniRx/Scripts/Observable.Joins.cs new file mode 100644 index 0000000..93588b5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Joins.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace UniRx +{ + public static partial class Observable + { + } +} diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Joins.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Joins.cs.meta new file mode 100644 index 0000000..561c3c0 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Joins.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dd92425c6c6dec24e9e52677cbc36aa0 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Paging.cs b/Assets/Plugins/UniRx/Scripts/Observable.Paging.cs new file mode 100644 index 0000000..36f8e16 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Paging.cs @@ -0,0 +1,327 @@ +using System; +using System.Collections.Generic; +using System.Text; +using UniRx.InternalUtil; +using UniRx.Operators; + +namespace UniRx +{ + // Take, Skip, etc.. + public static partial class Observable + { + public static IObservable Take(this IObservable source, int count) + { + if (source == null) throw new ArgumentNullException("source"); + if (count < 0) throw new ArgumentOutOfRangeException("count"); + + if (count == 0) return Empty(); + + // optimize .Take(count).Take(count) + var take = source as TakeObservable; + if (take != null && take.scheduler == null) + { + return take.Combine(count); + } + + return new TakeObservable(source, count); + } + + public static IObservable Take(this IObservable source, TimeSpan duration) + { + return Take(source, duration, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable Take(this IObservable source, TimeSpan duration, IScheduler scheduler) + { + if (source == null) throw new ArgumentNullException("source"); + if (scheduler == null) throw new ArgumentNullException("scheduler"); + + // optimize .Take(duration).Take(duration) + var take = source as TakeObservable; + if (take != null && take.scheduler == scheduler) + { + return take.Combine(duration); + } + + return new TakeObservable(source, duration, scheduler); + } + + public static IObservable TakeWhile(this IObservable source, Func predicate) + { + return new TakeWhileObservable(source, predicate); + } + + public static IObservable TakeWhile(this IObservable source, Func predicate) + { + if (source == null) throw new ArgumentNullException("source"); + if (predicate == null) throw new ArgumentNullException("predicate"); + + return new TakeWhileObservable(source, predicate); + } + + public static IObservable TakeUntil(this IObservable source, IObservable other) + { + if (source == null) throw new ArgumentNullException("source"); + if (other == null) throw new ArgumentNullException("other"); + + return new TakeUntilObservable(source, other); + } + + public static IObservable TakeLast(this IObservable source, int count) + { + if (source == null) throw new ArgumentNullException("source"); + if (count < 0) throw new ArgumentOutOfRangeException("count"); + + return new TakeLastObservable(source, count); + } + + public static IObservable TakeLast(this IObservable source, TimeSpan duration) + { + return TakeLast(source, duration, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable TakeLast(this IObservable source, TimeSpan duration, IScheduler scheduler) + { + if (source == null) throw new ArgumentNullException("source"); + + return new TakeLastObservable(source, duration, scheduler); + } + + public static IObservable Skip(this IObservable source, int count) + { + if (source == null) throw new ArgumentNullException("source"); + if (count < 0) throw new ArgumentOutOfRangeException("count"); + + // optimize .Skip(count).Skip(count) + var skip = source as SkipObservable; + if (skip != null && skip.scheduler == null) + { + return skip.Combine(count); + } + + return new SkipObservable(source, count); + } + + public static IObservable Skip(this IObservable source, TimeSpan duration) + { + return Skip(source, duration, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable Skip(this IObservable source, TimeSpan duration, IScheduler scheduler) + { + if (source == null) throw new ArgumentNullException("source"); + if (scheduler == null) throw new ArgumentNullException("scheduler"); + + // optimize .Skip(duration).Skip(duration) + var skip = source as SkipObservable; + if (skip != null && skip.scheduler == scheduler) + { + return skip.Combine(duration); + } + + return new SkipObservable(source, duration, scheduler); + } + + public static IObservable SkipWhile(this IObservable source, Func predicate) + { + return new SkipWhileObservable(source, predicate); + } + + public static IObservable SkipWhile(this IObservable source, Func predicate) + { + if (source == null) throw new ArgumentNullException("source"); + if (predicate == null) throw new ArgumentNullException("predicate"); + + return new SkipWhileObservable(source, predicate); + } + + public static IObservable SkipUntil(this IObservable source, IObservable other) + { + return new SkipUntilObservable(source, other); + } + + public static IObservable> Buffer(this IObservable source, int count) + { + if (source == null) throw new ArgumentNullException("source"); + if (count <= 0) throw new ArgumentOutOfRangeException("count <= 0"); + + return new BufferObservable(source, count, 0); + } + + public static IObservable> Buffer(this IObservable source, int count, int skip) + { + if (source == null) throw new ArgumentNullException("source"); + if (count <= 0) throw new ArgumentOutOfRangeException("count <= 0"); + if (skip <= 0) throw new ArgumentOutOfRangeException("skip <= 0"); + + return new BufferObservable(source, count, skip); + } + + public static IObservable> Buffer(this IObservable source, TimeSpan timeSpan) + { + return Buffer(source, timeSpan, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable> Buffer(this IObservable source, TimeSpan timeSpan, IScheduler scheduler) + { + if (source == null) throw new ArgumentNullException("source"); + + return new BufferObservable(source, timeSpan, timeSpan, scheduler); + } + + public static IObservable> Buffer(this IObservable source, TimeSpan timeSpan, int count) + { + return Buffer(source, timeSpan, count, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable> Buffer(this IObservable source, TimeSpan timeSpan, int count, IScheduler scheduler) + { + if (source == null) throw new ArgumentNullException("source"); + if (count <= 0) throw new ArgumentOutOfRangeException("count <= 0"); + + return new BufferObservable(source, timeSpan, count, scheduler); + } + + public static IObservable> Buffer(this IObservable source, TimeSpan timeSpan, TimeSpan timeShift) + { + return new BufferObservable(source, timeSpan, timeShift, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable> Buffer(this IObservable source, TimeSpan timeSpan, TimeSpan timeShift, IScheduler scheduler) + { + if (source == null) throw new ArgumentNullException("source"); + + return new BufferObservable(source, timeSpan, timeShift, scheduler); + } + + public static IObservable> Buffer(this IObservable source, IObservable windowBoundaries) + { + return new BufferObservable(source, windowBoundaries); + } + + /// Projects old and new element of a sequence into a new form. + public static IObservable> Pairwise(this IObservable source) + { + return new PairwiseObservable(source); + } + + /// Projects old and new element of a sequence into a new form. + public static IObservable Pairwise(this IObservable source, Func selector) + { + return new PairwiseObservable(source, selector); + } + + // first, last, single + + public static IObservable Last(this IObservable source) + { + return new LastObservable(source, false); + } + public static IObservable Last(this IObservable source, Func predicate) + { + return new LastObservable(source, predicate, false); + } + + public static IObservable LastOrDefault(this IObservable source) + { + return new LastObservable(source, true); + } + + public static IObservable LastOrDefault(this IObservable source, Func predicate) + { + return new LastObservable(source, predicate, true); + } + + public static IObservable First(this IObservable source) + { + return new FirstObservable(source, false); + } + public static IObservable First(this IObservable source, Func predicate) + { + return new FirstObservable(source, predicate, false); + } + + public static IObservable FirstOrDefault(this IObservable source) + { + return new FirstObservable(source, true); + } + + public static IObservable FirstOrDefault(this IObservable source, Func predicate) + { + return new FirstObservable(source, predicate, true); + } + + public static IObservable Single(this IObservable source) + { + return new SingleObservable(source, false); + } + public static IObservable Single(this IObservable source, Func predicate) + { + return new SingleObservable(source, predicate, false); + } + + public static IObservable SingleOrDefault(this IObservable source) + { + return new SingleObservable(source, true); + } + + public static IObservable SingleOrDefault(this IObservable source, Func predicate) + { + return new SingleObservable(source, predicate, true); + } + + // Grouping + + public static IObservable> GroupBy(this IObservable source, Func keySelector) + { + return GroupBy(source, keySelector, Stubs.Identity); + } + + public static IObservable> GroupBy(this IObservable source, Func keySelector, IEqualityComparer comparer) + { + return GroupBy(source, keySelector, Stubs.Identity, comparer); + } + + public static IObservable> GroupBy(this IObservable source, Func keySelector, Func elementSelector) + { +#if !UniRxLibrary + var comparer = UnityEqualityComparer.GetDefault(); +#else + var comparer = EqualityComparer.Default; +#endif + + return GroupBy(source, keySelector, elementSelector, comparer); + } + + public static IObservable> GroupBy(this IObservable source, Func keySelector, Func elementSelector, IEqualityComparer comparer) + { + return new GroupByObservable(source, keySelector, elementSelector, null, comparer); + } + + public static IObservable> GroupBy(this IObservable source, Func keySelector, int capacity) + { + return GroupBy(source, keySelector, Stubs.Identity, capacity); + } + + public static IObservable> GroupBy(this IObservable source, Func keySelector, int capacity, IEqualityComparer comparer) + { + return GroupBy(source, keySelector, Stubs.Identity, capacity, comparer); + } + + public static IObservable> GroupBy(this IObservable source, Func keySelector, Func elementSelector, int capacity) + { +#if !UniRxLibrary + var comparer = UnityEqualityComparer.GetDefault(); +#else + var comparer = EqualityComparer.Default; +#endif + + return GroupBy(source, keySelector, elementSelector, capacity, comparer); + } + + public static IObservable> GroupBy(this IObservable source, Func keySelector, Func elementSelector, int capacity, IEqualityComparer comparer) + { + return new GroupByObservable(source, keySelector, elementSelector, capacity, comparer); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Paging.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Paging.cs.meta new file mode 100644 index 0000000..6017170 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Paging.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f4c9428bf00006d408fcfe4c514ee798 +timeCreated: 1455373902 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Time.cs b/Assets/Plugins/UniRx/Scripts/Observable.Time.cs new file mode 100644 index 0000000..1477d63 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Time.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using UniRx.Operators; + +namespace UniRx +{ + // Timer, Interval, etc... + public static partial class Observable + { + public static IObservable Interval(TimeSpan period) + { + return new TimerObservable(period, period, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable Interval(TimeSpan period, IScheduler scheduler) + { + return new TimerObservable(period, period, scheduler); + } + + public static IObservable Timer(TimeSpan dueTime) + { + return new TimerObservable(dueTime, null, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable Timer(DateTimeOffset dueTime) + { + return new TimerObservable(dueTime, null, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable Timer(TimeSpan dueTime, TimeSpan period) + { + return new TimerObservable(dueTime, period, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable Timer(DateTimeOffset dueTime, TimeSpan period) + { + return new TimerObservable(dueTime, period, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable Timer(TimeSpan dueTime, IScheduler scheduler) + { + return new TimerObservable(dueTime, null, scheduler); + } + + public static IObservable Timer(DateTimeOffset dueTime, IScheduler scheduler) + { + return new TimerObservable(dueTime, null, scheduler); + } + + public static IObservable Timer(TimeSpan dueTime, TimeSpan period, IScheduler scheduler) + { + return new TimerObservable(dueTime, period, scheduler); + } + + public static IObservable Timer(DateTimeOffset dueTime, TimeSpan period, IScheduler scheduler) + { + return new TimerObservable(dueTime, period, scheduler); + } + + public static IObservable> Timestamp(this IObservable source) + { + return Timestamp(source, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable> Timestamp(this IObservable source, IScheduler scheduler) + { + return new TimestampObservable(source, scheduler); + } + + public static IObservable> TimeInterval(this IObservable source) + { + return TimeInterval(source, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable> TimeInterval(this IObservable source, IScheduler scheduler) + { + return new UniRx.Operators.TimeIntervalObservable(source, scheduler); + } + + public static IObservable Delay(this IObservable source, TimeSpan dueTime) + { + return source.Delay(dueTime, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable Delay(this IObservable source, TimeSpan dueTime, IScheduler scheduler) + { + return new DelayObservable(source, dueTime, scheduler); + } + + public static IObservable Sample(this IObservable source, TimeSpan interval) + { + return source.Sample(interval, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable Sample(this IObservable source, TimeSpan interval, IScheduler scheduler) + { + return new SampleObservable(source, interval, scheduler); + } + + public static IObservable Throttle(this IObservable source, TimeSpan dueTime) + { + return source.Throttle(dueTime, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable Throttle(this IObservable source, TimeSpan dueTime, IScheduler scheduler) + { + return new ThrottleObservable(source, dueTime, scheduler); + } + + public static IObservable ThrottleFirst(this IObservable source, TimeSpan dueTime) + { + return source.ThrottleFirst(dueTime, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable ThrottleFirst(this IObservable source, TimeSpan dueTime, IScheduler scheduler) + { + return new ThrottleFirstObservable(source, dueTime, scheduler); + } + + public static IObservable Timeout(this IObservable source, TimeSpan dueTime) + { + return source.Timeout(dueTime, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable Timeout(this IObservable source, TimeSpan dueTime, IScheduler scheduler) + { + return new TimeoutObservable(source, dueTime, scheduler); + } + + public static IObservable Timeout(this IObservable source, DateTimeOffset dueTime) + { + return source.Timeout(dueTime, Scheduler.DefaultSchedulers.TimeBasedOperations); + } + + public static IObservable Timeout(this IObservable source, DateTimeOffset dueTime, IScheduler scheduler) + { + return new TimeoutObservable(source, dueTime, scheduler); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Time.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Time.cs.meta new file mode 100644 index 0000000..a0484a3 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.Time.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7da89fcf95f5c364ca62bbb874005d32 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.cs b/Assets/Plugins/UniRx/Scripts/Observable.cs new file mode 100644 index 0000000..1f5d10a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.cs @@ -0,0 +1,292 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading; +using UniRx.InternalUtil; +using UniRx.Operators; + +namespace UniRx +{ + // Standard Query Operators + + // onNext implementation guide. enclose otherFunc but onNext is not catch. + // try{ otherFunc(); } catch { onError() } + // onNext(); + + public static partial class Observable + { + static readonly TimeSpan InfiniteTimeSpan = new TimeSpan(0, 0, 0, 0, -1); // from .NET 4.5 + + public static IObservable Select(this IObservable source, Func selector) + { + // sometimes cause "which no ahead of time (AOT) code was generated." on IL2CPP... + + //var select = source as ISelect; + //if (select != null) + //{ + // return select.CombineSelector(selector); + //} + + // optimized path + var whereObservable = source as UniRx.Operators.WhereObservable; + if (whereObservable != null) + { + return whereObservable.CombineSelector(selector); + } + + return new SelectObservable(source, selector); + } + + public static IObservable Select(this IObservable source, Func selector) + { + return new SelectObservable(source, selector); + } + + public static IObservable Where(this IObservable source, Func predicate) + { + // optimized path + var whereObservable = source as UniRx.Operators.WhereObservable; + if (whereObservable != null) + { + return whereObservable.CombinePredicate(predicate); + } + + var selectObservable = source as UniRx.Operators.ISelect; + if (selectObservable != null) + { + return selectObservable.CombinePredicate(predicate); + } + + return new WhereObservable(source, predicate); + } + + public static IObservable Where(this IObservable source, Func predicate) + { + return new WhereObservable(source, predicate); + } + + /// + /// Lightweight SelectMany for Single Async Operation. + /// + public static IObservable ContinueWith(this IObservable source, IObservable other) + { + return ContinueWith(source, _ => other); + } + + /// + /// Lightweight SelectMany for Single Async Operation. + /// + public static IObservable ContinueWith(this IObservable source, Func> selector) + { + return new ContinueWithObservable(source, selector); + } + + public static IObservable SelectMany(this IObservable source, IObservable other) + { + return SelectMany(source, _ => other); + } + + public static IObservable SelectMany(this IObservable source, Func> selector) + { + return new SelectManyObservable(source, selector); + } + + public static IObservable SelectMany(this IObservable source, Func> selector) + { + return new SelectManyObservable(source, selector); + } + + public static IObservable SelectMany(this IObservable source, Func> collectionSelector, Func resultSelector) + { + return new SelectManyObservable(source, collectionSelector, resultSelector); + } + + public static IObservable SelectMany(this IObservable source, Func> collectionSelector, Func resultSelector) + { + return new SelectManyObservable(source, collectionSelector, resultSelector); + } + + public static IObservable SelectMany(this IObservable source, Func> selector) + { + return new SelectManyObservable(source, selector); + } + + public static IObservable SelectMany(this IObservable source, Func> selector) + { + return new SelectManyObservable(source, selector); + } + + public static IObservable SelectMany(this IObservable source, Func> collectionSelector, Func resultSelector) + { + return new SelectManyObservable(source, collectionSelector, resultSelector); + } + + public static IObservable SelectMany(this IObservable source, Func> collectionSelector, Func resultSelector) + { + return new SelectManyObservable(source, collectionSelector, resultSelector); + } + + public static IObservable ToArray(this IObservable source) + { + return new ToArrayObservable(source); + } + + public static IObservable> ToList(this IObservable source) + { + return new ToListObservable(source); + } + + public static IObservable Do(this IObservable source, IObserver observer) + { + return new DoObserverObservable(source, observer); + } + + public static IObservable Do(this IObservable source, Action onNext) + { + return new DoObservable(source, onNext, Stubs.Throw, Stubs.Nop); + } + + public static IObservable Do(this IObservable source, Action onNext, Action onError) + { + return new DoObservable(source, onNext, onError, Stubs.Nop); + } + + public static IObservable Do(this IObservable source, Action onNext, Action onCompleted) + { + return new DoObservable(source, onNext, Stubs.Throw, onCompleted); + } + + public static IObservable Do(this IObservable source, Action onNext, Action onError, Action onCompleted) + { + return new DoObservable(source, onNext, onError, onCompleted); + } + + public static IObservable DoOnError(this IObservable source, Action onError) + { + return new DoOnErrorObservable(source, onError); + } + + public static IObservable DoOnCompleted(this IObservable source, Action onCompleted) + { + return new DoOnCompletedObservable(source, onCompleted); + } + + public static IObservable DoOnTerminate(this IObservable source, Action onTerminate) + { + return new DoOnTerminateObservable(source, onTerminate); + } + + public static IObservable DoOnSubscribe(this IObservable source, Action onSubscribe) + { + return new DoOnSubscribeObservable(source, onSubscribe); + } + + public static IObservable DoOnCancel(this IObservable source, Action onCancel) + { + return new DoOnCancelObservable(source, onCancel); + } + + public static IObservable> Materialize(this IObservable source) + { + return new MaterializeObservable(source); + } + + public static IObservable Dematerialize(this IObservable> source) + { + return new DematerializeObservable(source); + } + + public static IObservable DefaultIfEmpty(this IObservable source) + { + return new DefaultIfEmptyObservable(source, default(T)); + } + + public static IObservable DefaultIfEmpty(this IObservable source, T defaultValue) + { + return new DefaultIfEmptyObservable(source, defaultValue); + } + + public static IObservable Distinct(this IObservable source) + { +#if !UniRxLibrary + var comparer = UnityEqualityComparer.GetDefault(); +#else + var comparer = EqualityComparer.Default; +#endif + + return new DistinctObservable(source, comparer); + } + + public static IObservable Distinct(this IObservable source, IEqualityComparer comparer) + { + return new DistinctObservable(source, comparer); + } + + public static IObservable Distinct(this IObservable source, Func keySelector) + { +#if !UniRxLibrary + var comparer = UnityEqualityComparer.GetDefault(); +#else + var comparer = EqualityComparer.Default; +#endif + + return new DistinctObservable(source, keySelector, comparer); + } + + public static IObservable Distinct(this IObservable source, Func keySelector, IEqualityComparer comparer) + { + return new DistinctObservable(source, keySelector, comparer); + } + + public static IObservable DistinctUntilChanged(this IObservable source) + { +#if !UniRxLibrary + var comparer = UnityEqualityComparer.GetDefault(); +#else + var comparer = EqualityComparer.Default; +#endif + + return new DistinctUntilChangedObservable(source, comparer); + } + + public static IObservable DistinctUntilChanged(this IObservable source, IEqualityComparer comparer) + { + if (source == null) throw new ArgumentNullException("source"); + + return new DistinctUntilChangedObservable(source, comparer); + } + + public static IObservable DistinctUntilChanged(this IObservable source, Func keySelector) + { +#if !UniRxLibrary + var comparer = UnityEqualityComparer.GetDefault(); +#else + var comparer = EqualityComparer.Default; +#endif + + return new DistinctUntilChangedObservable(source, keySelector, comparer); + } + + public static IObservable DistinctUntilChanged(this IObservable source, Func keySelector, IEqualityComparer comparer) + { + if (source == null) throw new ArgumentNullException("source"); + + return new DistinctUntilChangedObservable(source, keySelector, comparer); + } + + public static IObservable IgnoreElements(this IObservable source) + { + return new IgnoreElementsObservable(source); + } + + public static IObservable ForEachAsync(this IObservable source, Action onNext) + { + return new ForEachAsyncObservable(source, onNext); + } + + public static IObservable ForEachAsync(this IObservable source, Action onNext) + { + return new ForEachAsyncObservable(source, onNext); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.cs.meta new file mode 100644 index 0000000..50ff0a6 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a2dd1c80d4559fd4ca9ef62f20d031ab +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observer.cs b/Assets/Plugins/UniRx/Scripts/Observer.cs new file mode 100644 index 0000000..47efd51 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observer.cs @@ -0,0 +1,524 @@ +using System; +using System.Threading; +using UniRx.InternalUtil; + +namespace UniRx +{ + public static class Observer + { + internal static IObserver CreateSubscribeObserver(Action onNext, Action onError, Action onCompleted) + { + // need compare for avoid iOS AOT + if (onNext == Stubs.Ignore) + { + return new Subscribe_(onError, onCompleted); + } + else + { + return new Subscribe(onNext, onError, onCompleted); + } + } + + internal static IObserver CreateSubscribeWithStateObserver(TState state, Action onNext, Action onError, Action onCompleted) + { + return new Subscribe(state, onNext, onError, onCompleted); + } + + internal static IObserver CreateSubscribeWithState2Observer(TState1 state1, TState2 state2, Action onNext, Action onError, Action onCompleted) + { + return new Subscribe(state1, state2, onNext, onError, onCompleted); + } + + internal static IObserver CreateSubscribeWithState3Observer(TState1 state1, TState2 state2, TState3 state3, Action onNext, Action onError, Action onCompleted) + { + return new Subscribe(state1, state2, state3, onNext, onError, onCompleted); + } + + public static IObserver Create(Action onNext) + { + return Create(onNext, UniRx.Stubs.Throw, UniRx.Stubs.Nop); + } + + public static IObserver Create(Action onNext, Action onError) + { + return Create(onNext, onError, UniRx.Stubs.Nop); + } + + public static IObserver Create(Action onNext, Action onCompleted) + { + return Create(onNext, UniRx.Stubs.Throw, onCompleted); + } + + public static IObserver Create(Action onNext, Action onError, Action onCompleted) + { + // need compare for avoid iOS AOT + if (onNext == Stubs.Ignore) + { + return new EmptyOnNextAnonymousObserver(onError, onCompleted); + } + else + { + return new AnonymousObserver(onNext, onError, onCompleted); + } + } + + public static IObserver CreateAutoDetachObserver(IObserver observer, IDisposable disposable) + { + return new AutoDetachObserver(observer, disposable); + } + + class AnonymousObserver : IObserver + { + readonly Action onNext; + readonly Action onError; + readonly Action onCompleted; + + int isStopped = 0; + + public AnonymousObserver(Action onNext, Action onError, Action onCompleted) + { + this.onNext = onNext; + this.onError = onError; + this.onCompleted = onCompleted; + } + + public void OnNext(T value) + { + if (isStopped == 0) + { + onNext(value); + } + } + + public void OnError(Exception error) + { + if (Interlocked.Increment(ref isStopped) == 1) + { + onError(error); + } + } + + + public void OnCompleted() + { + if (Interlocked.Increment(ref isStopped) == 1) + { + onCompleted(); + } + } + } + + class EmptyOnNextAnonymousObserver : IObserver + { + readonly Action onError; + readonly Action onCompleted; + + int isStopped = 0; + + public EmptyOnNextAnonymousObserver(Action onError, Action onCompleted) + { + this.onError = onError; + this.onCompleted = onCompleted; + } + + public void OnNext(T value) + { + } + + public void OnError(Exception error) + { + if (Interlocked.Increment(ref isStopped) == 1) + { + onError(error); + } + } + + public void OnCompleted() + { + if (Interlocked.Increment(ref isStopped) == 1) + { + onCompleted(); + } + } + } + + // same as AnonymousObserver... + class Subscribe : IObserver + { + readonly Action onNext; + readonly Action onError; + readonly Action onCompleted; + + int isStopped = 0; + + public Subscribe(Action onNext, Action onError, Action onCompleted) + { + this.onNext = onNext; + this.onError = onError; + this.onCompleted = onCompleted; + } + + public void OnNext(T value) + { + if (isStopped == 0) + { + onNext(value); + } + } + + public void OnError(Exception error) + { + if (Interlocked.Increment(ref isStopped) == 1) + { + onError(error); + } + } + + + public void OnCompleted() + { + if (Interlocked.Increment(ref isStopped) == 1) + { + onCompleted(); + } + } + } + + // same as EmptyOnNextAnonymousObserver... + class Subscribe_ : IObserver + { + readonly Action onError; + readonly Action onCompleted; + + int isStopped = 0; + + public Subscribe_(Action onError, Action onCompleted) + { + this.onError = onError; + this.onCompleted = onCompleted; + } + + public void OnNext(T value) + { + } + + public void OnError(Exception error) + { + if (Interlocked.Increment(ref isStopped) == 1) + { + onError(error); + } + } + + public void OnCompleted() + { + if (Interlocked.Increment(ref isStopped) == 1) + { + onCompleted(); + } + } + } + + // with state + class Subscribe : IObserver + { + readonly TState state; + readonly Action onNext; + readonly Action onError; + readonly Action onCompleted; + + int isStopped = 0; + + public Subscribe(TState state, Action onNext, Action onError, Action onCompleted) + { + this.state = state; + this.onNext = onNext; + this.onError = onError; + this.onCompleted = onCompleted; + } + + public void OnNext(T value) + { + if (isStopped == 0) + { + onNext(value, state); + } + } + + public void OnError(Exception error) + { + if (Interlocked.Increment(ref isStopped) == 1) + { + onError(error, state); + } + } + + + public void OnCompleted() + { + if (Interlocked.Increment(ref isStopped) == 1) + { + onCompleted(state); + } + } + } + + class Subscribe : IObserver + { + readonly TState1 state1; + readonly TState2 state2; + readonly Action onNext; + readonly Action onError; + readonly Action onCompleted; + + int isStopped = 0; + + public Subscribe(TState1 state1, TState2 state2, Action onNext, Action onError, Action onCompleted) + { + this.state1 = state1; + this.state2 = state2; + this.onNext = onNext; + this.onError = onError; + this.onCompleted = onCompleted; + } + + public void OnNext(T value) + { + if (isStopped == 0) + { + onNext(value, state1, state2); + } + } + + public void OnError(Exception error) + { + if (Interlocked.Increment(ref isStopped) == 1) + { + onError(error, state1, state2); + } + } + + public void OnCompleted() + { + if (Interlocked.Increment(ref isStopped) == 1) + { + onCompleted(state1, state2); + } + } + } + + class Subscribe : IObserver + { + readonly TState1 state1; + readonly TState2 state2; + readonly TState3 state3; + readonly Action onNext; + readonly Action onError; + readonly Action onCompleted; + + int isStopped = 0; + + public Subscribe(TState1 state1, TState2 state2, TState3 state3, Action onNext, Action onError, Action onCompleted) + { + this.state1 = state1; + this.state2 = state2; + this.state3 = state3; + this.onNext = onNext; + this.onError = onError; + this.onCompleted = onCompleted; + } + + public void OnNext(T value) + { + if (isStopped == 0) + { + onNext(value, state1, state2, state3); + } + } + + public void OnError(Exception error) + { + if (Interlocked.Increment(ref isStopped) == 1) + { + onError(error, state1, state2, state3); + } + } + + + public void OnCompleted() + { + if (Interlocked.Increment(ref isStopped) == 1) + { + onCompleted(state1, state2, state3); + } + } + } + + class AutoDetachObserver : UniRx.Operators.OperatorObserverBase + { + public AutoDetachObserver(IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + + } + + public override void OnNext(T value) + { + try + { + base.observer.OnNext(value); + } + catch + { + Dispose(); + throw; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + public static partial class ObserverExtensions + { + public static IObserver Synchronize(this IObserver observer) + { + return new UniRx.Operators.SynchronizedObserver(observer, new object()); + } + + public static IObserver Synchronize(this IObserver observer, object gate) + { + return new UniRx.Operators.SynchronizedObserver(observer, gate); + } + } + + public static partial class ObservableExtensions + { + public static IDisposable Subscribe(this IObservable source) + { + return source.Subscribe(UniRx.InternalUtil.ThrowObserver.Instance); + } + + public static IDisposable Subscribe(this IObservable source, Action onNext) + { + return source.Subscribe(Observer.CreateSubscribeObserver(onNext, Stubs.Throw, Stubs.Nop)); + } + + public static IDisposable Subscribe(this IObservable source, Action onNext, Action onError) + { + return source.Subscribe(Observer.CreateSubscribeObserver(onNext, onError, Stubs.Nop)); + } + + public static IDisposable Subscribe(this IObservable source, Action onNext, Action onCompleted) + { + return source.Subscribe(Observer.CreateSubscribeObserver(onNext, Stubs.Throw, onCompleted)); + } + + public static IDisposable Subscribe(this IObservable source, Action onNext, Action onError, Action onCompleted) + { + return source.Subscribe(Observer.CreateSubscribeObserver(onNext, onError, onCompleted)); + } + + public static IDisposable SubscribeWithState(this IObservable source, TState state, Action onNext) + { + return source.Subscribe(Observer.CreateSubscribeWithStateObserver(state, onNext, Stubs.Throw, Stubs.Ignore)); + } + + public static IDisposable SubscribeWithState(this IObservable source, TState state, Action onNext, Action onError) + { + return source.Subscribe(Observer.CreateSubscribeWithStateObserver(state, onNext, onError, Stubs.Ignore)); + } + + public static IDisposable SubscribeWithState(this IObservable source, TState state, Action onNext, Action onCompleted) + { + return source.Subscribe(Observer.CreateSubscribeWithStateObserver(state, onNext, Stubs.Throw, onCompleted)); + } + + public static IDisposable SubscribeWithState(this IObservable source, TState state, Action onNext, Action onError, Action onCompleted) + { + return source.Subscribe(Observer.CreateSubscribeWithStateObserver(state, onNext, onError, onCompleted)); + } + + public static IDisposable SubscribeWithState2(this IObservable source, TState1 state1, TState2 state2, Action onNext) + { + return source.Subscribe(Observer.CreateSubscribeWithState2Observer(state1, state2, onNext, Stubs.Throw, Stubs.Ignore)); + } + + public static IDisposable SubscribeWithState2(this IObservable source, TState1 state1, TState2 state2, Action onNext, Action onError) + { + return source.Subscribe(Observer.CreateSubscribeWithState2Observer(state1, state2, onNext, onError, Stubs.Ignore)); + } + + public static IDisposable SubscribeWithState2(this IObservable source, TState1 state1, TState2 state2, Action onNext, Action onCompleted) + { + return source.Subscribe(Observer.CreateSubscribeWithState2Observer(state1, state2, onNext, Stubs.Throw, onCompleted)); + } + + public static IDisposable SubscribeWithState2(this IObservable source, TState1 state1, TState2 state2, Action onNext, Action onError, Action onCompleted) + { + return source.Subscribe(Observer.CreateSubscribeWithState2Observer(state1, state2, onNext, onError, onCompleted)); + } + + public static IDisposable SubscribeWithState3(this IObservable source, TState1 state1, TState2 state2, TState3 state3, Action onNext) + { + return source.Subscribe(Observer.CreateSubscribeWithState3Observer(state1, state2, state3, onNext, Stubs.Throw, Stubs.Ignore)); + } + + public static IDisposable SubscribeWithState3(this IObservable source, TState1 state1, TState2 state2, TState3 state3, Action onNext, Action onError) + { + return source.Subscribe(Observer.CreateSubscribeWithState3Observer(state1, state2, state3, onNext, onError, Stubs.Ignore)); + } + + public static IDisposable SubscribeWithState3(this IObservable source, TState1 state1, TState2 state2, TState3 state3, Action onNext, Action onCompleted) + { + return source.Subscribe(Observer.CreateSubscribeWithState3Observer(state1, state2, state3, onNext, Stubs.Throw, onCompleted)); + } + + public static IDisposable SubscribeWithState3(this IObservable source, TState1 state1, TState2 state2, TState3 state3, Action onNext, Action onError, Action onCompleted) + { + return source.Subscribe(Observer.CreateSubscribeWithState3Observer(state1, state2, state3, onNext, onError, onCompleted)); + } + } + + internal static class Stubs + { + public static readonly Action Nop = () => { }; + public static readonly Action Throw = ex => { ex.Throw(); }; + + // marker for CatchIgnore and Catch avoid iOS AOT problem. + public static IObservable CatchIgnore(Exception ex) + { + return Observable.Empty(); + } + } + + internal static class Stubs + { + public static readonly Action Ignore = (T t) => { }; + public static readonly Func Identity = (T t) => t; + public static readonly Action Throw = (ex, _) => { ex.Throw(); }; + } + + internal static class Stubs + { + public static readonly Action Ignore = (x, y) => { }; + public static readonly Action Throw = (ex, _, __) => { ex.Throw(); }; + } + + + internal static class Stubs + { + public static readonly Action Ignore = (x, y, z) => { }; + public static readonly Action Throw = (ex, _, __, ___) => { ex.Throw(); }; + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observer.cs.meta b/Assets/Plugins/UniRx/Scripts/Observer.cs.meta new file mode 100644 index 0000000..efe223b --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Observer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 57d25c3f6fa1d334e89c384393252b8a +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators.meta b/Assets/Plugins/UniRx/Scripts/Operators.meta new file mode 100644 index 0000000..4b5429f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0f7a34a97dcb11b40b9b37fc30658fbf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Aggregate.cs b/Assets/Plugins/UniRx/Scripts/Operators/Aggregate.cs new file mode 100644 index 0000000..3edf634 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Aggregate.cs @@ -0,0 +1,207 @@ +using System; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class AggregateObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Func accumulator; + + public AggregateObservable(IObservable source, Func accumulator) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.accumulator = accumulator; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new Aggregate(this, observer, cancel)); + } + + class Aggregate : OperatorObserverBase + { + readonly AggregateObservable parent; + TSource accumulation; + bool seenValue; + + public Aggregate(AggregateObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.seenValue = false; + } + + public override void OnNext(TSource value) + { + if (!seenValue) + { + seenValue = true; + accumulation = value; + } + else + { + try + { + accumulation = parent.accumulator(accumulation, value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + if (!seenValue) + { + throw new InvalidOperationException("Sequence contains no elements."); + } + + observer.OnNext(accumulation); + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + internal class AggregateObservable : OperatorObservableBase + { + readonly IObservable source; + readonly TAccumulate seed; + readonly Func accumulator; + + public AggregateObservable(IObservable source, TAccumulate seed, Func accumulator) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.seed = seed; + this.accumulator = accumulator; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new Aggregate(this, observer, cancel)); + } + + class Aggregate : OperatorObserverBase + { + readonly AggregateObservable parent; + TAccumulate accumulation; + + public Aggregate(AggregateObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.accumulation = parent.seed; + } + + public override void OnNext(TSource value) + { + try + { + accumulation = parent.accumulator(accumulation, value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + observer.OnNext(accumulation); + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + internal class AggregateObservable : OperatorObservableBase + { + readonly IObservable source; + readonly TAccumulate seed; + readonly Func accumulator; + readonly Func resultSelector; + + public AggregateObservable(IObservable source, TAccumulate seed, Func accumulator, Func resultSelector) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.seed = seed; + this.accumulator = accumulator; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new Aggregate(this, observer, cancel)); + } + + class Aggregate : OperatorObserverBase + { + readonly AggregateObservable parent; + TAccumulate accumulation; + + public Aggregate(AggregateObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.accumulation = parent.seed; + } + + public override void OnNext(TSource value) + { + try + { + accumulation = parent.accumulator(accumulation, value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + TResult result; + try + { + result = parent.resultSelector(accumulation); + } + catch (Exception ex) + { + OnError(ex); + return; + } + + observer.OnNext(result); + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Aggregate.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Aggregate.cs.meta new file mode 100644 index 0000000..1f2cf37 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Aggregate.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f777fc54ecf275349a3f007e760705b3 +timeCreated: 1455373902 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Amb.cs b/Assets/Plugins/UniRx/Scripts/Operators/Amb.cs new file mode 100644 index 0000000..6f48a9d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Amb.cs @@ -0,0 +1,182 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class AmbObservable : OperatorObservableBase + { + readonly IObservable source; + readonly IObservable second; + + public AmbObservable(IObservable source, IObservable second) + : base(source.IsRequiredSubscribeOnCurrentThread() || second.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.second = second; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new AmbOuterObserver(this, observer, cancel).Run(); + } + + class AmbOuterObserver : OperatorObserverBase + { + enum AmbState + { + Left, Right, Neither + } + + readonly AmbObservable parent; + readonly object gate = new object(); + SingleAssignmentDisposable leftSubscription; + SingleAssignmentDisposable rightSubscription; + AmbState choice = AmbState.Neither; + + public AmbOuterObserver(AmbObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + leftSubscription = new SingleAssignmentDisposable(); + rightSubscription = new SingleAssignmentDisposable(); + var d = StableCompositeDisposable.Create(leftSubscription, rightSubscription); + + var left = new Amb(); + left.targetDisposable = d; + left.targetObserver = new AmbDecisionObserver(this, AmbState.Left, rightSubscription, left); + + var right = new Amb(); + right.targetDisposable = d; + right.targetObserver = new AmbDecisionObserver(this, AmbState.Right, leftSubscription, right); + + leftSubscription.Disposable = parent.source.Subscribe(left); + rightSubscription.Disposable = parent.second.Subscribe(right); + + return d; + } + + public override void OnNext(T value) + { + // no use + } + + public override void OnError(Exception error) + { + // no use + } + + public override void OnCompleted() + { + // no use + } + + class Amb : IObserver + { + public IObserver targetObserver; + public IDisposable targetDisposable; + + public void OnNext(T value) + { + targetObserver.OnNext(value); + } + + public void OnError(Exception error) + { + try + { + targetObserver.OnError(error); + } + finally + { + targetObserver = UniRx.InternalUtil.EmptyObserver.Instance; + targetDisposable.Dispose(); + } + } + + public void OnCompleted() + { + try + { + targetObserver.OnCompleted(); + } + finally + { + targetObserver = UniRx.InternalUtil.EmptyObserver.Instance; + targetDisposable.Dispose(); + } + } + } + + class AmbDecisionObserver : IObserver + { + readonly AmbOuterObserver parent; + readonly AmbState me; + readonly IDisposable otherSubscription; + readonly Amb self; + + public AmbDecisionObserver(AmbOuterObserver parent, AmbState me, IDisposable otherSubscription, Amb self) + { + this.parent = parent; + this.me = me; + this.otherSubscription = otherSubscription; + this.self = self; + } + + public void OnNext(T value) + { + lock (parent.gate) + { + if (parent.choice == AmbState.Neither) + { + parent.choice = me; + otherSubscription.Dispose(); + self.targetObserver = parent.observer; + } + + if (parent.choice == me) self.targetObserver.OnNext(value); + } + } + + public void OnError(Exception error) + { + lock (parent.gate) + { + if (parent.choice == AmbState.Neither) + { + parent.choice = me; + otherSubscription.Dispose(); + self.targetObserver = parent.observer; + } + + if (parent.choice == me) + { + self.targetObserver.OnError(error); + } + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + if (parent.choice == AmbState.Neither) + { + parent.choice = me; + otherSubscription.Dispose(); + self.targetObserver = parent.observer; + } + + if (parent.choice == me) + { + self.targetObserver.OnCompleted(); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Amb.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Amb.cs.meta new file mode 100644 index 0000000..62e2c86 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Amb.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ad1a22922a735ee479baf0e179648532 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/AsObservable.cs b/Assets/Plugins/UniRx/Scripts/Operators/AsObservable.cs new file mode 100644 index 0000000..9b3fa5a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/AsObservable.cs @@ -0,0 +1,45 @@ +using System; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class AsObservableObservable : OperatorObservableBase + { + readonly IObservable source; + + public AsObservableObservable(IObservable source) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new AsObservable(observer, cancel)); + } + + class AsObservable : OperatorObserverBase + { + public AsObservable(IObserver observer, IDisposable cancel) : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/AsObservable.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/AsObservable.cs.meta new file mode 100644 index 0000000..409ea15 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/AsObservable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9e4851fd48b2b42469d71b311254877b +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/AsSingleUnitObservable.cs b/Assets/Plugins/UniRx/Scripts/Operators/AsSingleUnitObservable.cs new file mode 100644 index 0000000..1672e81 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/AsSingleUnitObservable.cs @@ -0,0 +1,46 @@ +using System; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class AsSingleUnitObservableObservable : OperatorObservableBase + { + readonly IObservable source; + + public AsSingleUnitObservableObservable(IObservable source) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new AsSingleUnitObservable(observer, cancel)); + } + + class AsSingleUnitObservable : OperatorObserverBase + { + public AsSingleUnitObservable(IObserver observer, IDisposable cancel) : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + observer.OnNext(Unit.Default); + + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/AsSingleUnitObservable.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/AsSingleUnitObservable.cs.meta new file mode 100644 index 0000000..5d981eb --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/AsSingleUnitObservable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3b5e05dba2d3aca4e9c3a6312bef8690 +timeCreated: 1462636004 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/AsUnitObservable.cs b/Assets/Plugins/UniRx/Scripts/Operators/AsUnitObservable.cs new file mode 100644 index 0000000..ffc8cde --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/AsUnitObservable.cs @@ -0,0 +1,45 @@ +using System; + +namespace UniRx.Operators +{ + internal class AsUnitObservableObservable : OperatorObservableBase + { + readonly IObservable source; + + public AsUnitObservableObservable(IObservable source) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new AsUnitObservable(observer, cancel)); + } + + class AsUnitObservable : OperatorObserverBase + { + public AsUnitObservable(IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + base.observer.OnNext(Unit.Default); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/AsUnitObservable.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/AsUnitObservable.cs.meta new file mode 100644 index 0000000..14ea875 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/AsUnitObservable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 236f5f407bf92c949844fcaf450af450 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Buffer.cs b/Assets/Plugins/UniRx/Scripts/Operators/Buffer.cs new file mode 100644 index 0000000..ddc6354 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Buffer.cs @@ -0,0 +1,624 @@ +using System; +using System.Collections.Generic; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class BufferObservable : OperatorObservableBase> + { + readonly IObservable source; + readonly int count; + readonly int skip; + + readonly TimeSpan timeSpan; + readonly TimeSpan timeShift; + readonly IScheduler scheduler; + + public BufferObservable(IObservable source, int count, int skip) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.count = count; + this.skip = skip; + } + + public BufferObservable(IObservable source, TimeSpan timeSpan, TimeSpan timeShift, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.timeSpan = timeSpan; + this.timeShift = timeShift; + this.scheduler = scheduler; + } + + public BufferObservable(IObservable source, TimeSpan timeSpan, int count, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.timeSpan = timeSpan; + this.count = count; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + // count,skip + if (scheduler == null) + { + if (skip == 0) + { + return new Buffer(this, observer, cancel).Run(); + } + else + { + return new Buffer_(this, observer, cancel).Run(); + } + } + else + { + // time + count + if (count > 0) + { + return new BufferTC(this, observer, cancel).Run(); + } + else + { + if (timeSpan == timeShift) + { + return new BufferT(this, observer, cancel).Run(); + } + else + { + return new BufferTS(this, observer, cancel).Run(); + } + } + } + } + + // count only + class Buffer : OperatorObserverBase> + { + readonly BufferObservable parent; + List list; + + public Buffer(BufferObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + list = new List(parent.count); + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + list.Add(value); + if (list.Count == parent.count) + { + observer.OnNext(list); + list = new List(parent.count); + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + if (list.Count > 0) + { + observer.OnNext(list); + } + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + // count and skip + class Buffer_ : OperatorObserverBase> + { + readonly BufferObservable parent; + Queue> q; + int index; + + public Buffer_(BufferObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + q = new Queue>(); + index = -1; + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + index++; + + if (index % parent.skip == 0) + { + q.Enqueue(new List(parent.count)); + } + + var len = q.Count; + for (int i = 0; i < len; i++) + { + var list = q.Dequeue(); + list.Add(value); + if (list.Count == parent.count) + { + observer.OnNext(list); + } + else + { + q.Enqueue(list); + } + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + foreach (var list in q) + { + observer.OnNext(list); + } + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + // timespan = timeshift + class BufferT : OperatorObserverBase> + { + static readonly T[] EmptyArray = new T[0]; + + readonly BufferObservable parent; + readonly object gate = new object(); + + List list; + + public BufferT(BufferObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + list = new List(); + + var timerSubscription = Observable.Interval(parent.timeSpan, parent.scheduler) + .Subscribe(new Buffer(this)); + + var sourceSubscription = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(timerSubscription, sourceSubscription); + } + + public override void OnNext(T value) + { + lock (gate) + { + list.Add(value); + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + List currentList; + lock (gate) + { + currentList = list; + } + observer.OnNext(currentList); + try { observer.OnCompleted(); } finally { Dispose(); } + } + + class Buffer : IObserver + { + BufferT parent; + + public Buffer(BufferT parent) + { + this.parent = parent; + } + + public void OnNext(long value) + { + var isZero = false; + List currentList; + lock (parent.gate) + { + currentList = parent.list; + if (currentList.Count != 0) + { + parent.list = new List(); + } + else + { + isZero = true; + } + } + + parent.observer.OnNext((isZero) ? (IList)EmptyArray : currentList); + } + + public void OnError(Exception error) + { + } + + public void OnCompleted() + { + } + } + } + + // timespan + timeshift + class BufferTS : OperatorObserverBase> + { + readonly BufferObservable parent; + readonly object gate = new object(); + + Queue> q; + TimeSpan totalTime; + TimeSpan nextShift; + TimeSpan nextSpan; + SerialDisposable timerD; + + public BufferTS(BufferObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + totalTime = TimeSpan.Zero; + nextShift = parent.timeShift; + nextSpan = parent.timeSpan; + + q = new Queue>(); + + timerD = new SerialDisposable(); + q.Enqueue(new List()); + CreateTimer(); + + var subscription = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(subscription, timerD); + } + + void CreateTimer() + { + var m = new SingleAssignmentDisposable(); + timerD.Disposable = m; + + var isSpan = false; + var isShift = false; + if (nextSpan == nextShift) + { + isSpan = true; + isShift = true; + } + else if (nextSpan < nextShift) + isSpan = true; + else + isShift = true; + + var newTotalTime = isSpan ? nextSpan : nextShift; + var ts = newTotalTime - totalTime; + totalTime = newTotalTime; + + if (isSpan) + nextSpan += parent.timeShift; + if (isShift) + nextShift += parent.timeShift; + + m.Disposable = parent.scheduler.Schedule(ts, () => + { + lock (gate) + { + if (isShift) + { + var s = new List(); + q.Enqueue(s); + } + if (isSpan) + { + var s = q.Dequeue(); + observer.OnNext(s); + } + } + + CreateTimer(); + }); + } + + public override void OnNext(T value) + { + lock (gate) + { + foreach (var s in q) + { + s.Add(value); + } + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + lock (gate) + { + foreach (var list in q) + { + observer.OnNext(list); + } + + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } + + // timespan + count + class BufferTC : OperatorObserverBase> + { + static readonly T[] EmptyArray = new T[0]; // cache + + readonly BufferObservable parent; + readonly object gate = new object(); + + List list; + long timerId; + SerialDisposable timerD; + + public BufferTC(BufferObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + list = new List(); + timerId = 0L; + timerD = new SerialDisposable(); + + CreateTimer(); + var subscription = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(subscription, timerD); + } + + void CreateTimer() + { + var currentTimerId = timerId; + var timerS = new SingleAssignmentDisposable(); + timerD.Disposable = timerS; // restart timer(dispose before) + + + var periodicScheduler = parent.scheduler as ISchedulerPeriodic; + if (periodicScheduler != null) + { + timerS.Disposable = periodicScheduler.SchedulePeriodic(parent.timeSpan, () => OnNextTick(currentTimerId)); + } + else + { + timerS.Disposable = parent.scheduler.Schedule(parent.timeSpan, self => OnNextRecursive(currentTimerId, self)); + } + } + + void OnNextTick(long currentTimerId) + { + var isZero = false; + List currentList; + lock (gate) + { + if (currentTimerId != timerId) return; + + currentList = list; + if (currentList.Count != 0) + { + list = new List(); + } + else + { + isZero = true; + } + } + + observer.OnNext((isZero) ? (IList)EmptyArray : currentList); + } + + void OnNextRecursive(long currentTimerId, Action self) + { + var isZero = false; + List currentList; + lock (gate) + { + if (currentTimerId != timerId) return; + + currentList = list; + if (currentList.Count != 0) + { + list = new List(); + } + else + { + isZero = true; + } + } + + observer.OnNext((isZero) ? (IList)EmptyArray : currentList); + self(parent.timeSpan); + } + + public override void OnNext(T value) + { + List currentList = null; + lock (gate) + { + list.Add(value); + if (list.Count == parent.count) + { + currentList = list; + list = new List(); + timerId++; + CreateTimer(); + } + } + if (currentList != null) + { + observer.OnNext(currentList); + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + List currentList; + lock (gate) + { + timerId++; + currentList = list; + } + observer.OnNext(currentList); + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } + + internal class BufferObservable : OperatorObservableBase> + { + readonly IObservable source; + readonly IObservable windowBoundaries; + + public BufferObservable(IObservable source, IObservable windowBoundaries) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.windowBoundaries = windowBoundaries; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + return new Buffer(this, observer, cancel).Run(); + } + + class Buffer : OperatorObserverBase> + { + static readonly TSource[] EmptyArray = new TSource[0]; // cache + + readonly BufferObservable parent; + object gate = new object(); + List list; + + public Buffer(BufferObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + list = new List(); + + var sourceSubscription = parent.source.Subscribe(this); + var windowSubscription = parent.windowBoundaries.Subscribe(new Buffer_(this)); + + return StableCompositeDisposable.Create(sourceSubscription, windowSubscription); + } + + public override void OnNext(TSource value) + { + lock (gate) + { + list.Add(value); + } + } + + public override void OnError(Exception error) + { + lock (gate) + { + try { observer.OnError(error); } finally { Dispose(); } + } + } + + public override void OnCompleted() + { + lock (gate) + { + var currentList = list; + list = new List(); // safe + observer.OnNext(currentList); + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + class Buffer_ : IObserver + { + readonly Buffer parent; + + public Buffer_(Buffer parent) + { + this.parent = parent; + } + + public void OnNext(TWindowBoundary value) + { + var isZero = false; + List currentList; + lock (parent.gate) + { + currentList = parent.list; + if (currentList.Count != 0) + { + parent.list = new List(); + } + else + { + isZero = true; + } + } + if (isZero) + { + parent.observer.OnNext(EmptyArray); + } + else + { + parent.observer.OnNext(currentList); + } + } + + public void OnError(Exception error) + { + parent.OnError(error); + } + + public void OnCompleted() + { + parent.OnCompleted(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Buffer.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Buffer.cs.meta new file mode 100644 index 0000000..b30149a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Buffer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4137aec9640d3ea41a740d677026aa8c +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Cast.cs b/Assets/Plugins/UniRx/Scripts/Operators/Cast.cs new file mode 100644 index 0000000..92f1e4c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Cast.cs @@ -0,0 +1,57 @@ +using System; + +namespace UniRx.Operators +{ + internal class CastObservable : OperatorObservableBase + { + readonly IObservable source; + + public CastObservable(IObservable source) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new Cast(observer, cancel)); + } + + class Cast : OperatorObserverBase + { + public Cast(IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + } + + public override void OnNext(TSource value) + { + var castValue = default(TResult); + try + { + castValue = (TResult)(object)value; + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + observer.OnNext(castValue); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Cast.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Cast.cs.meta new file mode 100644 index 0000000..87b7a43 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Cast.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e70ae559c9b927742acbff91d50b3b22 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Catch.cs b/Assets/Plugins/UniRx/Scripts/Operators/Catch.cs new file mode 100644 index 0000000..9790969 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Catch.cs @@ -0,0 +1,217 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class CatchObservable : OperatorObservableBase + where TException : Exception + { + readonly IObservable source; + readonly Func> errorHandler; + + public CatchObservable(IObservable source, Func> errorHandler) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.errorHandler = errorHandler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Catch(this, observer, cancel).Run(); + } + + class Catch : OperatorObserverBase + { + readonly CatchObservable parent; + SingleAssignmentDisposable sourceSubscription; + SingleAssignmentDisposable exceptionSubscription; + + public Catch(CatchObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + this.sourceSubscription = new SingleAssignmentDisposable(); + this.exceptionSubscription = new SingleAssignmentDisposable(); + + this.sourceSubscription.Disposable = parent.source.Subscribe(this); + return StableCompositeDisposable.Create(sourceSubscription, exceptionSubscription); + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + var e = error as TException; + if (e != null) + { + IObservable next; + try + { + if (parent.errorHandler == Stubs.CatchIgnore) + { + next = Observable.Empty(); // for avoid iOS AOT + } + else + { + next = parent.errorHandler(e); + } + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); }; + return; + } + + exceptionSubscription.Disposable = next.Subscribe(observer); + } + else + { + try { observer.OnError(error); } finally { Dispose(); }; + return; + } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } + + + internal class CatchObservable : OperatorObservableBase + { + readonly IEnumerable> sources; + + public CatchObservable(IEnumerable> sources) + : base(true) + { + this.sources = sources; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Catch(this, observer, cancel).Run(); + } + + class Catch : OperatorObserverBase + { + readonly CatchObservable parent; + readonly object gate = new object(); + bool isDisposed; + IEnumerator> e; + SerialDisposable subscription; + Exception lastException; + Action nextSelf; + + public Catch(CatchObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + isDisposed = false; + e = parent.sources.GetEnumerator(); + subscription = new SerialDisposable(); + + var schedule = Scheduler.DefaultSchedulers.TailRecursion.Schedule(RecursiveRun); + + return StableCompositeDisposable.Create(schedule, subscription, Disposable.Create(() => + { + lock (gate) + { + this.isDisposed = true; + this.e.Dispose(); + } + })); + } + + void RecursiveRun(Action self) + { + lock (gate) + { + nextSelf = self; + if (isDisposed) return; + + var current = default(IObservable); + var hasNext = false; + var ex = default(Exception); + + try + { + hasNext = e.MoveNext(); + if (hasNext) + { + current = e.Current; + if (current == null) throw new InvalidOperationException("sequence is null."); + } + else + { + e.Dispose(); + } + } + catch (Exception exception) + { + ex = exception; + e.Dispose(); + } + + if (ex != null) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + if (!hasNext) + { + if (lastException != null) + { + try { observer.OnError(lastException); } + finally { Dispose(); } + } + else + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + return; + } + + var source = current; + var d = new SingleAssignmentDisposable(); + subscription.Disposable = d; + d.Disposable = source.Subscribe(this); + } + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + lastException = error; + nextSelf(); + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Catch.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Catch.cs.meta new file mode 100644 index 0000000..c3259ae --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Catch.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 404a684db151ca34f8258c6fb373db8d +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/CombineLatest.cs b/Assets/Plugins/UniRx/Scripts/Operators/CombineLatest.cs new file mode 100644 index 0000000..ac253ad --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/CombineLatest.cs @@ -0,0 +1,1010 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniRx.Operators +{ + public delegate TR CombineLatestFunc(T1 arg1, T2 arg2, T3 arg3); + public delegate TR CombineLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4); + public delegate TR CombineLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); + public delegate TR CombineLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6); + public delegate TR CombineLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7); + + + // binary + internal class CombineLatestObservable : OperatorObservableBase + { + readonly IObservable left; + readonly IObservable right; + readonly Func selector; + + public CombineLatestObservable(IObservable left, IObservable right, Func selector) + : base(left.IsRequiredSubscribeOnCurrentThread() || right.IsRequiredSubscribeOnCurrentThread()) + { + this.left = left; + this.right = right; + this.selector = selector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new CombineLatest(this, observer, cancel).Run(); + } + + class CombineLatest : OperatorObserverBase + { + readonly CombineLatestObservable parent; + readonly object gate = new object(); + + TLeft leftValue = default(TLeft); + bool leftStarted = false; + bool leftCompleted = false; + + TRight rightValue = default(TRight); + bool rightStarted = false; + bool rightCompleted = false; + + public CombineLatest(CombineLatestObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + var l = parent.left.Subscribe(new LeftObserver(this)); + var r = parent.right.Subscribe(new RightObserver(this)); + + return StableCompositeDisposable.Create(l, r); + } + + // publish in lock + public void Publish() + { + if ((leftCompleted && !leftStarted) || (rightCompleted && !rightStarted)) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + else if (!(leftStarted && rightStarted)) + { + return; + } + + TResult v; + try + { + v = parent.selector(leftValue, rightValue); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + OnNext(v); + } + + public override void OnNext(TResult value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + + class LeftObserver : IObserver + { + readonly CombineLatest parent; + + public LeftObserver(CombineLatest parent) + { + this.parent = parent; + } + + public void OnNext(TLeft value) + { + lock (parent.gate) + { + parent.leftStarted = true; + parent.leftValue = value; + parent.Publish(); + } + } + + public void OnError(Exception error) + { + lock (parent.gate) + { + parent.OnError(error); + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + parent.leftCompleted = true; + if (parent.rightCompleted) parent.OnCompleted(); + } + } + } + + class RightObserver : IObserver + { + readonly CombineLatest parent; + + public RightObserver(CombineLatest parent) + { + this.parent = parent; + } + + + public void OnNext(TRight value) + { + lock (parent.gate) + { + parent.rightStarted = true; + parent.rightValue = value; + parent.Publish(); + } + } + + public void OnError(Exception error) + { + lock (parent.gate) + { + parent.OnError(error); + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + parent.rightCompleted = true; + if (parent.leftCompleted) parent.OnCompleted(); + } + } + } + } + } + + // array + internal class CombineLatestObservable : OperatorObservableBase> + { + readonly IObservable[] sources; + + public CombineLatestObservable(IObservable[] sources) + : base(true) + { + this.sources = sources; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + return new CombineLatest(this, observer, cancel).Run(); + } + + class CombineLatest : OperatorObserverBase, IList> + { + readonly CombineLatestObservable parent; + readonly object gate = new object(); + + int length; + T[] values; + bool[] isStarted; + bool[] isCompleted; + bool isAllValueStarted; + + public CombineLatest(CombineLatestObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + length = parent.sources.Length; + values = new T[length]; + isStarted = new bool[length]; + isCompleted = new bool[length]; + isAllValueStarted = false; + + var disposables = new IDisposable[length]; + for (int i = 0; i < length; i++) + { + var source = parent.sources[i]; + disposables[i] = source.Subscribe(new CombineLatestObserver(this, i)); + } + + return StableCompositeDisposable.CreateUnsafe(disposables); + } + + // publish is in the lock + void Publish(int index) + { + isStarted[index] = true; + + if (isAllValueStarted) + { + OnNext(new List(values)); + return; + } + + var allValueStarted = true; + for (int i = 0; i < length; i++) + { + if (!isStarted[i]) + { + allValueStarted = false; + break; + } + } + + isAllValueStarted = allValueStarted; + + if (isAllValueStarted) + { + OnNext(new List(values)); + return; + } + else + { + var allCompletedWithoutSelf = true; + for (int i = 0; i < length; i++) + { + if (i == index) continue; + if (!isCompleted[i]) + { + allCompletedWithoutSelf = false; + break; + } + } + + if (allCompletedWithoutSelf) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + else + { + return; + } + } + } + + public override void OnNext(IList value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + + class CombineLatestObserver : IObserver + { + readonly CombineLatest parent; + readonly int index; + + public CombineLatestObserver(CombineLatest parent, int index) + { + this.parent = parent; + this.index = index; + } + + public void OnNext(T value) + { + lock (parent.gate) + { + parent.values[index] = value; + parent.Publish(index); + } + } + + public void OnError(Exception ex) + { + lock (parent.gate) + { + parent.OnError(ex); + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + parent.isCompleted[index] = true; + + var allTrue = true; + for (int i = 0; i < parent.length; i++) + { + if (!parent.isCompleted[i]) + { + allTrue = false; + break; + } + } + + if (allTrue) + { + parent.OnCompleted(); + } + } + } + } + } + } + + // generated from UniRx.Console.CombineLatestGenerator.tt + #region NTH + + internal class CombineLatestObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + CombineLatestFunc resultSelector; + + public CombineLatestObservable( + IObservable source1, + IObservable source2, + IObservable source3, + CombineLatestFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new CombineLatest(3, this, observer, cancel).Run(); + } + + class CombineLatest : NthCombineLatestObserverBase + { + readonly CombineLatestObservable parent; + readonly object gate = new object(); + CombineLatestObserver c1; + CombineLatestObserver c2; + CombineLatestObserver c3; + + public CombineLatest(int length, CombineLatestObservable parent, IObserver observer, IDisposable cancel) + : base(length, observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + c1 = new CombineLatestObserver(gate, this, 0); + c2 = new CombineLatestObserver(gate, this, 1); + c3 = new CombineLatestObserver(gate, this, 2); + + var s1 = parent.source1.Subscribe(c1); + var s2 = parent.source2.Subscribe(c2); + var s3 = parent.source3.Subscribe(c3); + + return StableCompositeDisposable.Create(s1, s2, s3); + } + + public override TR GetResult() + { + return parent.resultSelector(c1.Value, c2.Value, c3.Value); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + + internal class CombineLatestObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + IObservable source4; + CombineLatestFunc resultSelector; + + public CombineLatestObservable( + IObservable source1, + IObservable source2, + IObservable source3, + IObservable source4, + CombineLatestFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + source4.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new CombineLatest(4, this, observer, cancel).Run(); + } + + class CombineLatest : NthCombineLatestObserverBase + { + readonly CombineLatestObservable parent; + readonly object gate = new object(); + CombineLatestObserver c1; + CombineLatestObserver c2; + CombineLatestObserver c3; + CombineLatestObserver c4; + + public CombineLatest(int length, CombineLatestObservable parent, IObserver observer, IDisposable cancel) + : base(length, observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + c1 = new CombineLatestObserver(gate, this, 0); + c2 = new CombineLatestObserver(gate, this, 1); + c3 = new CombineLatestObserver(gate, this, 2); + c4 = new CombineLatestObserver(gate, this, 3); + + var s1 = parent.source1.Subscribe(c1); + var s2 = parent.source2.Subscribe(c2); + var s3 = parent.source3.Subscribe(c3); + var s4 = parent.source4.Subscribe(c4); + + return StableCompositeDisposable.Create(s1, s2, s3, s4); + } + + public override TR GetResult() + { + return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + + internal class CombineLatestObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + IObservable source4; + IObservable source5; + CombineLatestFunc resultSelector; + + public CombineLatestObservable( + IObservable source1, + IObservable source2, + IObservable source3, + IObservable source4, + IObservable source5, + CombineLatestFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + source4.IsRequiredSubscribeOnCurrentThread() || + source5.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new CombineLatest(5, this, observer, cancel).Run(); + } + + class CombineLatest : NthCombineLatestObserverBase + { + readonly CombineLatestObservable parent; + readonly object gate = new object(); + CombineLatestObserver c1; + CombineLatestObserver c2; + CombineLatestObserver c3; + CombineLatestObserver c4; + CombineLatestObserver c5; + + public CombineLatest(int length, CombineLatestObservable parent, IObserver observer, IDisposable cancel) + : base(length, observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + c1 = new CombineLatestObserver(gate, this, 0); + c2 = new CombineLatestObserver(gate, this, 1); + c3 = new CombineLatestObserver(gate, this, 2); + c4 = new CombineLatestObserver(gate, this, 3); + c5 = new CombineLatestObserver(gate, this, 4); + + var s1 = parent.source1.Subscribe(c1); + var s2 = parent.source2.Subscribe(c2); + var s3 = parent.source3.Subscribe(c3); + var s4 = parent.source4.Subscribe(c4); + var s5 = parent.source5.Subscribe(c5); + + return StableCompositeDisposable.Create(s1, s2, s3, s4, s5); + } + + public override TR GetResult() + { + return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value, c5.Value); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + + internal class CombineLatestObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + IObservable source4; + IObservable source5; + IObservable source6; + CombineLatestFunc resultSelector; + + public CombineLatestObservable( + IObservable source1, + IObservable source2, + IObservable source3, + IObservable source4, + IObservable source5, + IObservable source6, + CombineLatestFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + source4.IsRequiredSubscribeOnCurrentThread() || + source5.IsRequiredSubscribeOnCurrentThread() || + source6.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new CombineLatest(6, this, observer, cancel).Run(); + } + + class CombineLatest : NthCombineLatestObserverBase + { + readonly CombineLatestObservable parent; + readonly object gate = new object(); + CombineLatestObserver c1; + CombineLatestObserver c2; + CombineLatestObserver c3; + CombineLatestObserver c4; + CombineLatestObserver c5; + CombineLatestObserver c6; + + public CombineLatest(int length, CombineLatestObservable parent, IObserver observer, IDisposable cancel) + : base(length, observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + c1 = new CombineLatestObserver(gate, this, 0); + c2 = new CombineLatestObserver(gate, this, 1); + c3 = new CombineLatestObserver(gate, this, 2); + c4 = new CombineLatestObserver(gate, this, 3); + c5 = new CombineLatestObserver(gate, this, 4); + c6 = new CombineLatestObserver(gate, this, 5); + + var s1 = parent.source1.Subscribe(c1); + var s2 = parent.source2.Subscribe(c2); + var s3 = parent.source3.Subscribe(c3); + var s4 = parent.source4.Subscribe(c4); + var s5 = parent.source5.Subscribe(c5); + var s6 = parent.source6.Subscribe(c6); + + return StableCompositeDisposable.Create(s1, s2, s3, s4, s5, s6); + } + + public override TR GetResult() + { + return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value, c5.Value, c6.Value); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + + internal class CombineLatestObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + IObservable source4; + IObservable source5; + IObservable source6; + IObservable source7; + CombineLatestFunc resultSelector; + + public CombineLatestObservable( + IObservable source1, + IObservable source2, + IObservable source3, + IObservable source4, + IObservable source5, + IObservable source6, + IObservable source7, + CombineLatestFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + source4.IsRequiredSubscribeOnCurrentThread() || + source5.IsRequiredSubscribeOnCurrentThread() || + source6.IsRequiredSubscribeOnCurrentThread() || + source7.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new CombineLatest(7, this, observer, cancel).Run(); + } + + class CombineLatest : NthCombineLatestObserverBase + { + readonly CombineLatestObservable parent; + readonly object gate = new object(); + CombineLatestObserver c1; + CombineLatestObserver c2; + CombineLatestObserver c3; + CombineLatestObserver c4; + CombineLatestObserver c5; + CombineLatestObserver c6; + CombineLatestObserver c7; + + public CombineLatest(int length, CombineLatestObservable parent, IObserver observer, IDisposable cancel) + : base(length, observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + c1 = new CombineLatestObserver(gate, this, 0); + c2 = new CombineLatestObserver(gate, this, 1); + c3 = new CombineLatestObserver(gate, this, 2); + c4 = new CombineLatestObserver(gate, this, 3); + c5 = new CombineLatestObserver(gate, this, 4); + c6 = new CombineLatestObserver(gate, this, 5); + c7 = new CombineLatestObserver(gate, this, 6); + + var s1 = parent.source1.Subscribe(c1); + var s2 = parent.source2.Subscribe(c2); + var s3 = parent.source3.Subscribe(c3); + var s4 = parent.source4.Subscribe(c4); + var s5 = parent.source5.Subscribe(c5); + var s6 = parent.source6.Subscribe(c6); + var s7 = parent.source7.Subscribe(c7); + + return StableCompositeDisposable.Create(s1, s2, s3, s4, s5, s6, s7); + } + + public override TR GetResult() + { + return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value, c5.Value, c6.Value, c7.Value); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + #endregion + + // Nth infrastructure + + internal interface ICombineLatestObservable + { + void Publish(int index); + void Fail(Exception error); + void Done(int index); + } + + internal abstract class NthCombineLatestObserverBase : OperatorObserverBase, ICombineLatestObservable + { + readonly int length; + bool isAllValueStarted; + readonly bool[] isStarted; + readonly bool[] isCompleted; + + public NthCombineLatestObserverBase(int length, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.length = length; + this.isAllValueStarted = false; + this.isStarted = new bool[length]; + this.isCompleted = new bool[length]; + } + + public abstract T GetResult(); + + // operators in lock + public void Publish(int index) + { + isStarted[index] = true; + + if (isAllValueStarted) + { + var result = default(T); + try + { + result = GetResult(); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + OnNext(result); + return; + } + + var allValueStarted = true; + for (int i = 0; i < length; i++) + { + if (!isStarted[i]) + { + allValueStarted = false; + break; + } + } + + isAllValueStarted = allValueStarted; + + if (isAllValueStarted) + { + var result = default(T); + try + { + result = GetResult(); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + OnNext(result); + return; + } + else + { + var allCompletedWithoutSelf = true; + for (int i = 0; i < length; i++) + { + if (i == index) continue; + if (!isCompleted[i]) + { + allCompletedWithoutSelf = false; + break; + } + } + + if (allCompletedWithoutSelf) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + else + { + return; + } + } + } + + public void Done(int index) + { + isCompleted[index] = true; + + var allTrue = true; + for (int i = 0; i < length; i++) + { + if (!isCompleted[i]) + { + allTrue = false; + break; + } + } + + if (allTrue) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + + public void Fail(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + } + + // Nth + internal class CombineLatestObserver : IObserver + { + readonly object gate; + readonly ICombineLatestObservable parent; + readonly int index; + T value; + + public T Value { get { return value; } } + + public CombineLatestObserver(object gate, ICombineLatestObservable parent, int index) + { + this.gate = gate; + this.parent = parent; + this.index = index; + } + + public void OnNext(T value) + { + lock (gate) + { + this.value = value; + parent.Publish(index); + } + } + + public void OnError(Exception error) + { + lock (gate) + { + parent.Fail(error); + } + } + + public void OnCompleted() + { + lock (gate) + { + parent.Done(index); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/CombineLatest.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/CombineLatest.cs.meta new file mode 100644 index 0000000..be62b73 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/CombineLatest.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 64910ffa78510ee48b3a395ee5b2cfe1 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Concat.cs b/Assets/Plugins/UniRx/Scripts/Operators/Concat.cs new file mode 100644 index 0000000..6b6bf57 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Concat.cs @@ -0,0 +1,142 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + // needs to more improvement + + internal class ConcatObservable : OperatorObservableBase + { + readonly IEnumerable> sources; + + public ConcatObservable(IEnumerable> sources) + : base(true) + { + this.sources = sources; + } + + public IObservable Combine(IEnumerable> combineSources) + { + return new ConcatObservable(CombineSources(this.sources, combineSources)); + } + + static IEnumerable> CombineSources(IEnumerable> first, IEnumerable> second) + { + foreach (var item in first) + { + yield return item; + } + foreach (var item in second) + { + yield return item; + } + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Concat(this, observer, cancel).Run(); + } + + class Concat : OperatorObserverBase + { + readonly ConcatObservable parent; + readonly object gate = new object(); + + bool isDisposed; + IEnumerator> e; + SerialDisposable subscription; + Action nextSelf; + + public Concat(ConcatObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + isDisposed = false; + e = parent.sources.GetEnumerator(); + subscription = new SerialDisposable(); + + var schedule = Scheduler.DefaultSchedulers.TailRecursion.Schedule(RecursiveRun); + + return StableCompositeDisposable.Create(schedule, subscription, Disposable.Create(() => + { + lock (gate) + { + this.isDisposed = true; + this.e.Dispose(); + } + })); + } + + void RecursiveRun(Action self) + { + lock (gate) + { + this.nextSelf = self; + if (isDisposed) return; + + var current = default(IObservable); + var hasNext = false; + var ex = default(Exception); + + try + { + hasNext = e.MoveNext(); + if (hasNext) + { + current = e.Current; + if (current == null) throw new InvalidOperationException("sequence is null."); + } + else + { + e.Dispose(); + } + } + catch (Exception exception) + { + ex = exception; + e.Dispose(); + } + + if (ex != null) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + if (!hasNext) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + + var source = current; + var d = new SingleAssignmentDisposable(); + subscription.Disposable = d; + d.Disposable = source.Subscribe(this); + } + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + this.nextSelf(); + } + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Concat.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Concat.cs.meta new file mode 100644 index 0000000..ea2836f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Concat.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 740c2691a7e434f439abfdcac75ea809 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ContinueWith.cs b/Assets/Plugins/UniRx/Scripts/Operators/ContinueWith.cs new file mode 100644 index 0000000..ee46b3a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ContinueWith.cs @@ -0,0 +1,77 @@ +using System; + +namespace UniRx.Operators +{ + internal class ContinueWithObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Func> selector; + + public ContinueWithObservable(IObservable source, Func> selector) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.selector = selector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new ContinueWith(this, observer, cancel).Run(); + } + + class ContinueWith : OperatorObserverBase + { + readonly ContinueWithObservable parent; + readonly SerialDisposable serialDisposable = new SerialDisposable(); + + bool seenValue; + TSource lastValue; + + public ContinueWith(ContinueWithObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + var sourceDisposable = new SingleAssignmentDisposable(); + serialDisposable.Disposable = sourceDisposable; + + sourceDisposable.Disposable = parent.source.Subscribe(this); + return serialDisposable; + } + + public override void OnNext(TSource value) + { + this.seenValue = true; + this.lastValue = value; + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + + public override void OnCompleted() + { + if (seenValue) + { + try + { + var v = parent.selector(lastValue); + // dispose source subscription + serialDisposable.Disposable = v.Subscribe(observer); + } + catch (Exception error) + { + OnError(error); + } + } + else + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ContinueWith.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ContinueWith.cs.meta new file mode 100644 index 0000000..0b7c80f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ContinueWith.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bea59b3eb246d244a99183eeb7f3bad4 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Create.cs b/Assets/Plugins/UniRx/Scripts/Operators/Create.cs new file mode 100644 index 0000000..f3e46a5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Create.cs @@ -0,0 +1,156 @@ +using System; + +namespace UniRx.Operators +{ + internal class CreateObservable : OperatorObservableBase + { + readonly Func, IDisposable> subscribe; + + public CreateObservable(Func, IDisposable> subscribe) + : base(true) // fail safe + { + this.subscribe = subscribe; + } + + public CreateObservable(Func, IDisposable> subscribe, bool isRequiredSubscribeOnCurrentThread) + : base(isRequiredSubscribeOnCurrentThread) + { + this.subscribe = subscribe; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + observer = new Create(observer, cancel); + return subscribe(observer) ?? Disposable.Empty; + } + + class Create : OperatorObserverBase + { + public Create(IObserver observer, IDisposable cancel) : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + internal class CreateObservable : OperatorObservableBase + { + readonly TState state; + readonly Func, IDisposable> subscribe; + + public CreateObservable(TState state, Func, IDisposable> subscribe) + : base(true) // fail safe + { + this.state = state; + this.subscribe = subscribe; + } + + public CreateObservable(TState state, Func, IDisposable> subscribe, bool isRequiredSubscribeOnCurrentThread) + : base(isRequiredSubscribeOnCurrentThread) + { + this.state = state; + this.subscribe = subscribe; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + observer = new Create(observer, cancel); + return subscribe(state, observer) ?? Disposable.Empty; + } + + class Create : OperatorObserverBase + { + public Create(IObserver observer, IDisposable cancel) : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + internal class CreateSafeObservable : OperatorObservableBase + { + readonly Func, IDisposable> subscribe; + + public CreateSafeObservable(Func, IDisposable> subscribe) + : base(true) // fail safe + { + this.subscribe = subscribe; + } + + public CreateSafeObservable(Func, IDisposable> subscribe, bool isRequiredSubscribeOnCurrentThread) + : base(isRequiredSubscribeOnCurrentThread) + { + this.subscribe = subscribe; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + observer = new CreateSafe(observer, cancel); + return subscribe(observer) ?? Disposable.Empty; + } + + class CreateSafe : OperatorObserverBase + { + public CreateSafe(IObserver observer, IDisposable cancel) : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + try + { + base.observer.OnNext(value); + } + catch + { + Dispose(); // safe + throw; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Create.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Create.cs.meta new file mode 100644 index 0000000..1bf20a9 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Create.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cae9e62bf5eb3dc4e9d93cf6ff606052 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/DefaultIfEmpty.cs b/Assets/Plugins/UniRx/Scripts/Operators/DefaultIfEmpty.cs new file mode 100644 index 0000000..ef3001b --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/DefaultIfEmpty.cs @@ -0,0 +1,58 @@ +using System; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class DefaultIfEmptyObservable : OperatorObservableBase + { + readonly IObservable source; + readonly T defaultValue; + + public DefaultIfEmptyObservable(IObservable source, T defaultValue) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.defaultValue = defaultValue; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new DefaultIfEmpty(this, observer, cancel)); + } + + class DefaultIfEmpty : OperatorObserverBase + { + readonly DefaultIfEmptyObservable parent; + bool hasValue; + + public DefaultIfEmpty(DefaultIfEmptyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.hasValue = false; + } + + public override void OnNext(T value) + { + hasValue = true; + observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + if (!hasValue) + { + observer.OnNext(parent.defaultValue); + } + + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/DefaultIfEmpty.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/DefaultIfEmpty.cs.meta new file mode 100644 index 0000000..736b984 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/DefaultIfEmpty.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 551075cda284fbc489824d153743b1e6 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Defer.cs b/Assets/Plugins/UniRx/Scripts/Operators/Defer.cs new file mode 100644 index 0000000..b2a88f8 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Defer.cs @@ -0,0 +1,64 @@ +using System; + +namespace UniRx.Operators +{ + internal class DeferObservable : OperatorObservableBase + { + readonly Func> observableFactory; + + public DeferObservable(Func> observableFactory) + : base(false) + { + this.observableFactory = observableFactory; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + observer = new Defer(observer, cancel); + + IObservable source; + try + { + source = observableFactory(); + } + catch (Exception ex) + { + source = Observable.Throw(ex); + } + + return source.Subscribe(observer); + } + + class Defer : OperatorObserverBase + { + public Defer(IObserver observer, IDisposable cancel) : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + try + { + base.observer.OnNext(value); + } + catch + { + Dispose(); + throw; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Defer.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Defer.cs.meta new file mode 100644 index 0000000..681f93e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Defer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 15ca418b98836d943864b1e8b82f6658 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Delay.cs b/Assets/Plugins/UniRx/Scripts/Operators/Delay.cs new file mode 100644 index 0000000..f4a6a5b --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Delay.cs @@ -0,0 +1,227 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniRx.Operators +{ + internal class DelayObservable : OperatorObservableBase + { + readonly IObservable source; + readonly TimeSpan dueTime; + readonly IScheduler scheduler; + + public DelayObservable(IObservable source, TimeSpan dueTime, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.dueTime = dueTime; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Delay(this, observer, cancel).Run(); + } + + class Delay : OperatorObserverBase + { + readonly DelayObservable parent; + readonly object gate = new object(); + bool hasFailed; + bool running; + bool active; + Exception exception; + Queue> queue; + bool onCompleted; + DateTimeOffset completeAt; + IDisposable sourceSubscription; + TimeSpan delay; + bool ready; + SerialDisposable cancelable; + + public Delay(DelayObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + cancelable = new SerialDisposable(); + + active = false; + running = false; + queue = new Queue>(); + onCompleted = false; + completeAt = default(DateTimeOffset); + hasFailed = false; + exception = default(Exception); + ready = true; + delay = Scheduler.Normalize(parent.dueTime); + + var _sourceSubscription = new SingleAssignmentDisposable(); + sourceSubscription = _sourceSubscription; // assign to field + _sourceSubscription.Disposable = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(sourceSubscription, cancelable); + } + + public override void OnNext(T value) + { + var next = parent.scheduler.Now.Add(delay); + var shouldRun = false; + + lock (gate) + { + queue.Enqueue(new Timestamped(value, next)); + + shouldRun = ready && !active; + active = true; + } + + if (shouldRun) + { + cancelable.Disposable = parent.scheduler.Schedule(delay, DrainQueue); + } + } + + public override void OnError(Exception error) + { + sourceSubscription.Dispose(); + + var shouldRun = false; + + lock (gate) + { + queue.Clear(); + + exception = error; + hasFailed = true; + + shouldRun = !running; + } + + if (shouldRun) + { + try { base.observer.OnError(error); } finally { Dispose(); } + } + } + + public override void OnCompleted() + { + sourceSubscription.Dispose(); + + var next = parent.scheduler.Now.Add(delay); + var shouldRun = false; + + lock (gate) + { + completeAt = next; + onCompleted = true; + + shouldRun = ready && !active; + active = true; + } + + if (shouldRun) + { + cancelable.Disposable = parent.scheduler.Schedule(delay, DrainQueue); + } + } + + void DrainQueue(Action recurse) + { + lock (gate) + { + if (hasFailed) return; + running = true; + } + + var shouldYield = false; + + while (true) + { + var hasFailed = false; + var error = default(Exception); + + var hasValue = false; + var value = default(T); + var hasCompleted = false; + + var shouldRecurse = false; + var recurseDueTime = default(TimeSpan); + + lock (gate) + { + if (hasFailed) + { + error = exception; + hasFailed = true; + running = false; + } + else + { + if (queue.Count > 0) + { + var nextDue = queue.Peek().Timestamp; + + if (nextDue.CompareTo(parent.scheduler.Now) <= 0 && !shouldYield) + { + value = queue.Dequeue().Value; + hasValue = true; + } + else + { + shouldRecurse = true; + recurseDueTime = Scheduler.Normalize(nextDue.Subtract(parent.scheduler.Now)); + running = false; + } + } + else if (onCompleted) + { + if (completeAt.CompareTo(parent.scheduler.Now) <= 0 && !shouldYield) + { + hasCompleted = true; + } + else + { + shouldRecurse = true; + recurseDueTime = Scheduler.Normalize(completeAt.Subtract(parent.scheduler.Now)); + running = false; + } + } + else + { + running = false; + active = false; + } + } + } + + if (hasValue) + { + base.observer.OnNext(value); + shouldYield = true; + } + else + { + if (hasCompleted) + { + try { base.observer.OnCompleted(); } finally { Dispose(); } + } + else if (hasFailed) + { + try { base.observer.OnError(error); } finally { Dispose(); } + } + else if (shouldRecurse) + { + recurse(recurseDueTime); + } + + return; + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Delay.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Delay.cs.meta new file mode 100644 index 0000000..1563740 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Delay.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2af9c507ce062994a904e4b5565b49c0 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/DelaySubscription.cs b/Assets/Plugins/UniRx/Scripts/Operators/DelaySubscription.cs new file mode 100644 index 0000000..971293c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/DelaySubscription.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class DelaySubscriptionObservable : OperatorObservableBase + { + readonly IObservable source; + readonly IScheduler scheduler; + readonly TimeSpan? dueTimeT; + readonly DateTimeOffset? dueTimeD; + + public DelaySubscriptionObservable(IObservable source,TimeSpan dueTime, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.scheduler = scheduler; + this.dueTimeT = dueTime; + } + + public DelaySubscriptionObservable(IObservable source, DateTimeOffset dueTime, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.scheduler = scheduler; + this.dueTimeD = dueTime; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (dueTimeT != null) + { + var d = new MultipleAssignmentDisposable(); + var dt = Scheduler.Normalize(dueTimeT.Value); + + d.Disposable = scheduler.Schedule(dt, () => + { + d.Disposable = source.Subscribe(observer); + }); + + return d; + } + else + { + var d = new MultipleAssignmentDisposable(); + + d.Disposable = scheduler.Schedule(dueTimeD.Value, () => + { + d.Disposable = source.Subscribe(observer); + }); + + return d; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/DelaySubscription.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/DelaySubscription.cs.meta new file mode 100644 index 0000000..3232eb3 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/DelaySubscription.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4f532fc776d5298439cb8f03d52e1211 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Dematerialize.cs b/Assets/Plugins/UniRx/Scripts/Operators/Dematerialize.cs new file mode 100644 index 0000000..620139c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Dematerialize.cs @@ -0,0 +1,66 @@ +using System; + +namespace UniRx.Operators +{ + internal class DematerializeObservable : OperatorObservableBase + { + readonly IObservable> source; + + public DematerializeObservable(IObservable> source) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Dematerialize(this, observer, cancel).Run(); + } + + class Dematerialize : OperatorObserverBase, T> + { + readonly DematerializeObservable parent; + + public Dematerialize(DematerializeObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(Notification value) + { + switch (value.Kind) + { + case NotificationKind.OnNext: + observer.OnNext(value.Value); + break; + case NotificationKind.OnError: + try { observer.OnError(value.Exception); } + finally { Dispose(); } + break; + case NotificationKind.OnCompleted: + try { observer.OnCompleted(); } + finally { Dispose(); } + break; + default: + break; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Dematerialize.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Dematerialize.cs.meta new file mode 100644 index 0000000..01c30f8 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Dematerialize.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 80682be7e41afb44581208534f226d38 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Distinct.cs b/Assets/Plugins/UniRx/Scripts/Operators/Distinct.cs new file mode 100644 index 0000000..c9151c1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Distinct.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class DistinctObservable : OperatorObservableBase + { + readonly IObservable source; + readonly IEqualityComparer comparer; + + public DistinctObservable(IObservable source, IEqualityComparer comparer) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.comparer = comparer; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new Distinct(this, observer, cancel)); + } + + class Distinct : OperatorObserverBase + { + readonly HashSet hashSet; + + public Distinct(DistinctObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + hashSet = (parent.comparer == null) + ? new HashSet() + : new HashSet(parent.comparer); + } + + public override void OnNext(T value) + { + var key = default(T); + var isAdded = false; + try + { + key = value; + isAdded = hashSet.Add(key); + } + catch (Exception exception) + { + try { observer.OnError(exception); } finally { Dispose(); } + return; + } + + if (isAdded) + { + observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } + + internal class DistinctObservable : OperatorObservableBase + { + readonly IObservable source; + readonly IEqualityComparer comparer; + readonly Func keySelector; + + public DistinctObservable(IObservable source, Func keySelector, IEqualityComparer comparer) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.comparer = comparer; + this.keySelector = keySelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new Distinct(this, observer, cancel)); + } + + class Distinct : OperatorObserverBase + { + readonly DistinctObservable parent; + readonly HashSet hashSet; + + public Distinct(DistinctObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + hashSet = (parent.comparer == null) + ? new HashSet() + : new HashSet(parent.comparer); + } + + public override void OnNext(T value) + { + var key = default(TKey); + var isAdded = false; + try + { + key = parent.keySelector(value); + isAdded = hashSet.Add(key); + } + catch (Exception exception) + { + try { observer.OnError(exception); } finally { Dispose(); } + return; + } + + if (isAdded) + { + observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Distinct.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Distinct.cs.meta new file mode 100644 index 0000000..6bbb0bd --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Distinct.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 376a7ed430bff5c4b860af4d23ab6b79 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/DistinctUntilChanged.cs b/Assets/Plugins/UniRx/Scripts/Operators/DistinctUntilChanged.cs new file mode 100644 index 0000000..f6d9b10 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/DistinctUntilChanged.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class DistinctUntilChangedObservable : OperatorObservableBase + { + readonly IObservable source; + readonly IEqualityComparer comparer; + + public DistinctUntilChangedObservable(IObservable source, IEqualityComparer comparer) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.comparer = comparer; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new DistinctUntilChanged(this, observer, cancel)); + } + + class DistinctUntilChanged : OperatorObserverBase + { + readonly DistinctUntilChangedObservable parent; + bool isFirst = true; + T prevKey = default(T); + + public DistinctUntilChanged(DistinctUntilChangedObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public override void OnNext(T value) + { + T currentKey; + try + { + currentKey = value; + } + catch (Exception exception) + { + try { observer.OnError(exception); } finally { Dispose(); } + return; + } + + var sameKey = false; + if (isFirst) + { + isFirst = false; + } + else + { + try + { + sameKey = parent.comparer.Equals(currentKey, prevKey); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + } + + if (!sameKey) + { + prevKey = currentKey; + observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } + + internal class DistinctUntilChangedObservable : OperatorObservableBase + { + readonly IObservable source; + readonly IEqualityComparer comparer; + readonly Func keySelector; + + public DistinctUntilChangedObservable(IObservable source, Func keySelector, IEqualityComparer comparer) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.comparer = comparer; + this.keySelector = keySelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new DistinctUntilChanged(this, observer, cancel)); + } + + class DistinctUntilChanged : OperatorObserverBase + { + readonly DistinctUntilChangedObservable parent; + bool isFirst = true; + TKey prevKey = default(TKey); + + public DistinctUntilChanged(DistinctUntilChangedObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public override void OnNext(T value) + { + TKey currentKey; + try + { + currentKey = parent.keySelector(value); + } + catch (Exception exception) + { + try { observer.OnError(exception); } finally { Dispose(); } + return; + } + + var sameKey = false; + if (isFirst) + { + isFirst = false; + } + else + { + try + { + sameKey = parent.comparer.Equals(currentKey, prevKey); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + } + + if (!sameKey) + { + prevKey = currentKey; + observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/DistinctUntilChanged.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/DistinctUntilChanged.cs.meta new file mode 100644 index 0000000..f26ca6f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/DistinctUntilChanged.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a09c4b58f60c22342871c30eaf589f6c +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Do.cs b/Assets/Plugins/UniRx/Scripts/Operators/Do.cs new file mode 100644 index 0000000..472bfdb --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Do.cs @@ -0,0 +1,477 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniRx.Operators +{ + // Do, DoOnError, DoOnCompleted, DoOnTerminate, DoOnSubscribe, DoOnCancel + + internal class DoObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Action onNext; + readonly Action onError; + readonly Action onCompleted; + + public DoObservable(IObservable source, Action onNext, Action onError, Action onCompleted) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.onNext = onNext; + this.onError = onError; + this.onCompleted = onCompleted; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Do(this, observer, cancel).Run(); + } + + class Do : OperatorObserverBase + { + readonly DoObservable parent; + + public Do(DoObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + try + { + parent.onNext(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); }; + return; + } + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try + { + parent.onError(error); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); }; + return; + } + try { observer.OnError(error); } finally { Dispose(); }; + } + + public override void OnCompleted() + { + try + { + parent.onCompleted(); + } + catch (Exception ex) + { + base.observer.OnError(ex); + Dispose(); + return; + } + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } + + internal class DoObserverObservable : OperatorObservableBase + { + readonly IObservable source; + readonly IObserver observer; + + public DoObserverObservable(IObservable source, IObserver observer) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.observer = observer; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Do(this, observer, cancel).Run(); + } + + class Do : OperatorObserverBase + { + readonly DoObserverObservable parent; + + public Do(DoObserverObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + try + { + parent.observer.OnNext(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try + { + parent.observer.OnError(error); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try + { + parent.observer.OnCompleted(); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + internal class DoOnErrorObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Action onError; + + public DoOnErrorObservable(IObservable source, Action onError) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.onError = onError; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new DoOnError(this, observer, cancel).Run(); + } + + class DoOnError : OperatorObserverBase + { + readonly DoOnErrorObservable parent; + + public DoOnError(DoOnErrorObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try + { + parent.onError(error); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + internal class DoOnCompletedObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Action onCompleted; + + public DoOnCompletedObservable(IObservable source, Action onCompleted) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.onCompleted = onCompleted; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new DoOnCompleted(this, observer, cancel).Run(); + } + + class DoOnCompleted : OperatorObserverBase + { + readonly DoOnCompletedObservable parent; + + public DoOnCompleted(DoOnCompletedObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try + { + parent.onCompleted(); + } + catch (Exception ex) + { + base.observer.OnError(ex); + Dispose(); + return; + } + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } + + internal class DoOnTerminateObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Action onTerminate; + + public DoOnTerminateObservable(IObservable source, Action onTerminate) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.onTerminate = onTerminate; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new DoOnTerminate(this, observer, cancel).Run(); + } + + class DoOnTerminate : OperatorObserverBase + { + readonly DoOnTerminateObservable parent; + + public DoOnTerminate(DoOnTerminateObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try + { + parent.onTerminate(); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + try { observer.OnError(error); } finally { Dispose(); }; + } + + public override void OnCompleted() + { + try + { + parent.onTerminate(); + } + catch (Exception ex) + { + base.observer.OnError(ex); + Dispose(); + return; + } + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } + + internal class DoOnSubscribeObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Action onSubscribe; + + public DoOnSubscribeObservable(IObservable source, Action onSubscribe) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.onSubscribe = onSubscribe; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new DoOnSubscribe(this, observer, cancel).Run(); + } + + class DoOnSubscribe : OperatorObserverBase + { + readonly DoOnSubscribeObservable parent; + + public DoOnSubscribe(DoOnSubscribeObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + try + { + parent.onSubscribe(); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return Disposable.Empty; + } + + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } + + internal class DoOnCancelObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Action onCancel; + + public DoOnCancelObservable(IObservable source, Action onCancel) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.onCancel = onCancel; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new DoOnCancel(this, observer, cancel).Run(); + } + + class DoOnCancel : OperatorObserverBase + { + readonly DoOnCancelObservable parent; + bool isCompletedCall = false; + + public DoOnCancel(DoOnCancelObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return StableCompositeDisposable.Create(parent.source.Subscribe(this), Disposable.Create(() => + { + if (!isCompletedCall) + { + parent.onCancel(); + } + })); + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + isCompletedCall = true; + try { observer.OnError(error); } finally { Dispose(); }; + } + + public override void OnCompleted() + { + isCompletedCall = true; + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Do.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Do.cs.meta new file mode 100644 index 0000000..e4162a9 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Do.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8f99ae8870195e34b8618451a95818e0 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Empty.cs b/Assets/Plugins/UniRx/Scripts/Operators/Empty.cs new file mode 100644 index 0000000..cefcc0b --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Empty.cs @@ -0,0 +1,83 @@ +using System; + +namespace UniRx.Operators +{ + internal class EmptyObservable : OperatorObservableBase + { + readonly IScheduler scheduler; + + public EmptyObservable(IScheduler scheduler) + : base(false) + { + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + observer = new Empty(observer, cancel); + + if (scheduler == Scheduler.Immediate) + { + observer.OnCompleted(); + return Disposable.Empty; + } + else + { + return scheduler.Schedule(observer.OnCompleted); + } + } + + class Empty : OperatorObserverBase + { + public Empty(IObserver observer, IDisposable cancel) : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + try + { + base.observer.OnNext(value); + } + catch + { + Dispose(); + throw; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + internal class ImmutableEmptyObservable : IObservable, IOptimizedObservable + { + internal static ImmutableEmptyObservable Instance = new ImmutableEmptyObservable(); + + ImmutableEmptyObservable() + { + + } + + public bool IsRequiredSubscribeOnCurrentThread() + { + return false; + } + + public IDisposable Subscribe(IObserver observer) + { + observer.OnCompleted(); + return Disposable.Empty; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Empty.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Empty.cs.meta new file mode 100644 index 0000000..6625cb8 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Empty.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9e9a7050a289d3a4aa17cba89e085135 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Finally.cs b/Assets/Plugins/UniRx/Scripts/Operators/Finally.cs new file mode 100644 index 0000000..fb4ee65 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Finally.cs @@ -0,0 +1,68 @@ +using System; + +namespace UniRx.Operators +{ + internal class FinallyObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Action finallyAction; + + public FinallyObservable(IObservable source, Action finallyAction) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.finallyAction = finallyAction; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Finally(this, observer, cancel).Run(); + } + + class Finally : OperatorObserverBase + { + readonly FinallyObservable parent; + + public Finally(FinallyObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + IDisposable subscription; + try + { + subscription = parent.source.Subscribe(this); + } + catch + { + // This behaviour is not same as .NET Official Rx + parent.finallyAction(); + throw; + } + + return StableCompositeDisposable.Create(subscription, Disposable.Create(() => + { + parent.finallyAction(); + })); + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Finally.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Finally.cs.meta new file mode 100644 index 0000000..772d478 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Finally.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9ce919d8f2acf2b47a932e850e399d3a +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/First.cs b/Assets/Plugins/UniRx/Scripts/Operators/First.cs new file mode 100644 index 0000000..220a986 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/First.cs @@ -0,0 +1,166 @@ +using System; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class FirstObservable : OperatorObservableBase + { + readonly IObservable source; + readonly bool useDefault; + readonly Func predicate; + + public FirstObservable(IObservable source, bool useDefault) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.useDefault = useDefault; + } + + public FirstObservable(IObservable source, Func predicate, bool useDefault) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.predicate = predicate; + this.useDefault = useDefault; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (predicate == null) + { + return source.Subscribe(new First(this, observer, cancel)); + } + else + { + return source.Subscribe(new First_(this, observer, cancel)); + } + } + + class First : OperatorObserverBase + { + readonly FirstObservable parent; + bool notPublished; + + public First(FirstObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.notPublished = true; + } + + public override void OnNext(T value) + { + if (notPublished) + { + notPublished = false; + observer.OnNext(value); + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + if (parent.useDefault) + { + if (notPublished) + { + observer.OnNext(default(T)); + } + try { observer.OnCompleted(); } + finally { Dispose(); } + } + else + { + if (notPublished) + { + try { observer.OnError(new InvalidOperationException("sequence is empty")); } + finally { Dispose(); } + } + else + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + } + + // with predicate + class First_ : OperatorObserverBase + { + readonly FirstObservable parent; + bool notPublished; + + public First_(FirstObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.notPublished = true; + } + + public override void OnNext(T value) + { + if (notPublished) + { + bool isPassed; + try + { + isPassed = parent.predicate(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + if (isPassed) + { + notPublished = false; + observer.OnNext(value); + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + if (parent.useDefault) + { + if (notPublished) + { + observer.OnNext(default(T)); + } + try { observer.OnCompleted(); } + finally { Dispose(); } + } + else + { + if (notPublished) + { + try { observer.OnError(new InvalidOperationException("sequence is empty")); } + finally { Dispose(); } + } + else + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/First.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/First.cs.meta new file mode 100644 index 0000000..a6c3f8e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/First.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8e3093220aeb1d54faa3fca9fe0af6c0 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ForEachAsync.cs b/Assets/Plugins/UniRx/Scripts/Operators/ForEachAsync.cs new file mode 100644 index 0000000..7a8aecf --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ForEachAsync.cs @@ -0,0 +1,116 @@ +using System; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class ForEachAsyncObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Action onNext; + readonly Action onNextWithIndex; + + public ForEachAsyncObservable(IObservable source, Action onNext) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.onNext = onNext; + } + + public ForEachAsyncObservable(IObservable source, Action onNext) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.onNextWithIndex = onNext; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (onNext != null) + { + return source.Subscribe(new ForEachAsync(this, observer, cancel)); + } + else + { + return source.Subscribe(new ForEachAsync_(this, observer, cancel)); + } + } + + class ForEachAsync : OperatorObserverBase + { + readonly ForEachAsyncObservable parent; + + public ForEachAsync(ForEachAsyncObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public override void OnNext(T value) + { + try + { + parent.onNext(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + observer.OnNext(Unit.Default); + + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + + // with index + class ForEachAsync_ : OperatorObserverBase + { + readonly ForEachAsyncObservable parent; + int index = 0; + + public ForEachAsync_(ForEachAsyncObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public override void OnNext(T value) + { + try + { + parent.onNextWithIndex(value, index++); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + observer.OnNext(Unit.Default); + + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ForEachAsync.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ForEachAsync.cs.meta new file mode 100644 index 0000000..3ca9296 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ForEachAsync.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5b66ecd2e5290bc4eb8c78a1ccc2d009 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/FromEvent.cs b/Assets/Plugins/UniRx/Scripts/Operators/FromEvent.cs new file mode 100644 index 0000000..d137725 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/FromEvent.cs @@ -0,0 +1,323 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniRx.Operators +{ + // FromEvent, FromEventPattern + + internal class FromEventPatternObservable : OperatorObservableBase> + where TEventArgs : EventArgs + { + readonly Func, TDelegate> conversion; + readonly Action addHandler; + readonly Action removeHandler; + + public FromEventPatternObservable(Func, TDelegate> conversion, Action addHandler, Action removeHandler) + : base(false) + { + this.conversion = conversion; + this.addHandler = addHandler; + this.removeHandler = removeHandler; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + var fe = new FromEventPattern(this, observer); + return fe.Register() ? fe : Disposable.Empty; + } + + class FromEventPattern : IDisposable + { + readonly FromEventPatternObservable parent; + readonly IObserver> observer; + TDelegate handler; + + public FromEventPattern(FromEventPatternObservable parent, IObserver> observer) + { + this.parent = parent; + this.observer = observer; + } + + public bool Register() + { + handler = parent.conversion(OnNext); + try + { + parent.addHandler(handler); + } + catch (Exception ex) + { + observer.OnError(ex); + return false; + } + return true; + } + + void OnNext(object sender, TEventArgs eventArgs) + { + observer.OnNext(new EventPattern(sender, eventArgs)); + } + + public void Dispose() + { + if (handler != null) + { + parent.removeHandler(handler); + handler = default(TDelegate); + } + } + } + } + + internal class FromEventObservable : OperatorObservableBase + { + readonly Func conversion; + readonly Action addHandler; + readonly Action removeHandler; + + public FromEventObservable(Func conversion, Action addHandler, Action removeHandler) + : base(false) + { + this.conversion = conversion; + this.addHandler = addHandler; + this.removeHandler = removeHandler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + var fe = new FromEvent(this, observer); + return fe.Register() ? fe : Disposable.Empty; + } + + class FromEvent : IDisposable + { + readonly FromEventObservable parent; + readonly IObserver observer; + TDelegate handler; + + public FromEvent(FromEventObservable parent, IObserver observer) + { + this.parent = parent; + this.observer = observer; + } + + public bool Register() + { + handler = parent.conversion(OnNext); + + try + { + parent.addHandler(handler); + } + catch (Exception ex) + { + observer.OnError(ex); + return false; + } + return true; + } + + void OnNext() + { + observer.OnNext(Unit.Default); + } + + public void Dispose() + { + if (handler != null) + { + parent.removeHandler(handler); + handler = default(TDelegate); + } + } + } + } + + internal class FromEventObservable : OperatorObservableBase + { + readonly Func, TDelegate> conversion; + readonly Action addHandler; + readonly Action removeHandler; + + public FromEventObservable(Func, TDelegate> conversion, Action addHandler, Action removeHandler) + : base(false) + { + this.conversion = conversion; + this.addHandler = addHandler; + this.removeHandler = removeHandler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + var fe = new FromEvent(this, observer); + return fe.Register() ? fe : Disposable.Empty; + } + + class FromEvent : IDisposable + { + readonly FromEventObservable parent; + readonly IObserver observer; + TDelegate handler; + + public FromEvent(FromEventObservable parent, IObserver observer) + { + this.parent = parent; + this.observer = observer; + } + + public bool Register() + { + handler = parent.conversion(OnNext); + + try + { + parent.addHandler(handler); + } + catch (Exception ex) + { + observer.OnError(ex); + return false; + } + return true; + } + + void OnNext(TEventArgs args) + { + observer.OnNext(args); + } + + public void Dispose() + { + if (handler != null) + { + parent.removeHandler(handler); + handler = default(TDelegate); + } + } + } + } + + internal class FromEventObservable : OperatorObservableBase + { + readonly Action addHandler; + readonly Action removeHandler; + + public FromEventObservable(Action addHandler, Action removeHandler) + : base(false) + { + this.addHandler = addHandler; + this.removeHandler = removeHandler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + var fe = new FromEvent(this, observer); + return fe.Register() ? fe : Disposable.Empty; + } + + class FromEvent : IDisposable + { + readonly FromEventObservable parent; + readonly IObserver observer; + Action handler; + + public FromEvent(FromEventObservable parent, IObserver observer) + { + this.parent = parent; + this.observer = observer; + this.handler = OnNext; + } + + public bool Register() + { + try + { + parent.addHandler(handler); + } + catch (Exception ex) + { + observer.OnError(ex); + return false; + } + return true; + } + + void OnNext() + { + observer.OnNext(Unit.Default); + } + + public void Dispose() + { + if (handler != null) + { + parent.removeHandler(handler); + handler = null; + } + } + } + } + + internal class FromEventObservable_ : OperatorObservableBase + { + readonly Action> addHandler; + readonly Action> removeHandler; + + public FromEventObservable_(Action> addHandler, Action> removeHandler) + : base(false) + { + this.addHandler = addHandler; + this.removeHandler = removeHandler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + var fe = new FromEvent(this, observer); + return fe.Register() ? fe : Disposable.Empty; + } + + class FromEvent : IDisposable + { + readonly FromEventObservable_ parent; + readonly IObserver observer; + Action handler; + + public FromEvent(FromEventObservable_ parent, IObserver observer) + { + this.parent = parent; + this.observer = observer; + this.handler = OnNext; + } + + public bool Register() + { + try + { + parent.addHandler(handler); + } + catch (Exception ex) + { + observer.OnError(ex); + return false; + } + return true; + } + + void OnNext(T value) + { + observer.OnNext(value); + } + + public void Dispose() + { + if (handler != null) + { + parent.removeHandler(handler); + handler = null; + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/FromEvent.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/FromEvent.cs.meta new file mode 100644 index 0000000..97fdf21 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/FromEvent.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 05fcc5083e94e704ca8f059e4e535ffa +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/GroupBy.cs b/Assets/Plugins/UniRx/Scripts/Operators/GroupBy.cs new file mode 100644 index 0000000..60d6349 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/GroupBy.cs @@ -0,0 +1,196 @@ +using System; +using System.Collections.Generic; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class GroupedObservable : IGroupedObservable + { + readonly TKey key; + readonly IObservable subject; + readonly RefCountDisposable refCount; + + public TKey Key + { + get { return key; } + } + + public GroupedObservable(TKey key, ISubject subject, RefCountDisposable refCount) + { + this.key = key; + this.subject = subject; + this.refCount = refCount; + } + + public IDisposable Subscribe(IObserver observer) + { + var release = refCount.GetDisposable(); + var subscription = subject.Subscribe(observer); + return StableCompositeDisposable.Create(release, subscription); + } + } + + internal class GroupByObservable : OperatorObservableBase> + { + readonly IObservable source; + readonly Func keySelector; + readonly Func elementSelector; + readonly int? capacity; + readonly IEqualityComparer comparer; + + public GroupByObservable(IObservable source, Func keySelector, Func elementSelector, int? capacity, IEqualityComparer comparer) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.capacity = capacity; + this.comparer = comparer; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + return new GroupBy(this, observer, cancel).Run(); + } + + class GroupBy : OperatorObserverBase> + { + readonly GroupByObservable parent; + readonly Dictionary> map; + ISubject nullKeySubject; + + CompositeDisposable groupDisposable; + RefCountDisposable refCountDisposable; + + public GroupBy(GroupByObservable parent, IObserver> observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + if (parent.capacity.HasValue) + { + map = new Dictionary>(parent.capacity.Value, parent.comparer); + } + else + { + map = new Dictionary>(parent.comparer); + } + } + + public IDisposable Run() + { + groupDisposable = new CompositeDisposable(); + refCountDisposable = new RefCountDisposable(groupDisposable); + + groupDisposable.Add(parent.source.Subscribe(this)); + + return refCountDisposable; + } + + public override void OnNext(TSource value) + { + var key = default(TKey); + try + { + key = parent.keySelector(value); + } + catch (Exception exception) + { + Error(exception); + return; + } + + var fireNewMapEntry = false; + var writer = default(ISubject); + try + { + if (key == null) + { + if (nullKeySubject == null) + { + nullKeySubject = new Subject(); + fireNewMapEntry = true; + } + + writer = nullKeySubject; + } + else + { + if (!map.TryGetValue(key, out writer)) + { + writer = new Subject(); + map.Add(key, writer); + fireNewMapEntry = true; + } + } + } + catch (Exception exception) + { + Error(exception); + return; + } + + if (fireNewMapEntry) + { + var group = new GroupedObservable(key, writer, refCountDisposable); + observer.OnNext(group); + } + + var element = default(TElement); + try + { + element = parent.elementSelector(value); + } + catch (Exception exception) + { + Error(exception); + return; + } + + writer.OnNext(element); + } + + public override void OnError(Exception error) + { + Error(error); + } + + public override void OnCompleted() + { + try + { + if (nullKeySubject != null) nullKeySubject.OnCompleted(); + + foreach (var s in map.Values) + { + s.OnCompleted(); + } + + observer.OnCompleted(); + } + finally + { + Dispose(); + } + } + + void Error(Exception exception) + { + try + { + if (nullKeySubject != null) nullKeySubject.OnError(exception); + + foreach (var s in map.Values) + { + s.OnError(exception); + } + + observer.OnError(exception); + } + finally + { + Dispose(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/GroupBy.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/GroupBy.cs.meta new file mode 100644 index 0000000..1d7b46a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/GroupBy.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7345fc4a6df05ca47ab89ec819bccde6 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/IgnoreElements.cs b/Assets/Plugins/UniRx/Scripts/Operators/IgnoreElements.cs new file mode 100644 index 0000000..f8cec0b --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/IgnoreElements.cs @@ -0,0 +1,44 @@ +using System; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class IgnoreElementsObservable : OperatorObservableBase + { + readonly IObservable source; + + public IgnoreElementsObservable(IObservable source) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new IgnoreElements(observer, cancel)); + } + + class IgnoreElements : OperatorObserverBase + { + public IgnoreElements(IObserver observer, IDisposable cancel) : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/IgnoreElements.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/IgnoreElements.cs.meta new file mode 100644 index 0000000..f829b3c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/IgnoreElements.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d6c8ca210619da74b92cbdb3e8c58127 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Last.cs b/Assets/Plugins/UniRx/Scripts/Operators/Last.cs new file mode 100644 index 0000000..7817286 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Last.cs @@ -0,0 +1,165 @@ +using System; + +namespace UniRx.Operators +{ + internal class LastObservable : OperatorObservableBase + { + readonly IObservable source; + readonly bool useDefault; + readonly Func predicate; + + public LastObservable(IObservable source, bool useDefault) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.useDefault = useDefault; + } + + public LastObservable(IObservable source, Func predicate, bool useDefault) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.predicate = predicate; + this.useDefault = useDefault; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (predicate == null) + { + return source.Subscribe(new Last(this, observer, cancel)); + } + else + { + return source.Subscribe(new Last_(this, observer, cancel)); + } + } + + class Last : OperatorObserverBase + { + readonly LastObservable parent; + bool notPublished; + T lastValue; + + public Last(LastObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.notPublished = true; + } + + public override void OnNext(T value) + { + notPublished = false; + lastValue = value; + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + if (parent.useDefault) + { + if (notPublished) + { + observer.OnNext(default(T)); + } + else + { + observer.OnNext(lastValue); + } + try { observer.OnCompleted(); } + finally { Dispose(); } + } + else + { + if (notPublished) + { + try { observer.OnError(new InvalidOperationException("sequence is empty")); } + finally { Dispose(); } + } + else + { + observer.OnNext(lastValue); + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + } + + class Last_ : OperatorObserverBase + { + readonly LastObservable parent; + bool notPublished; + T lastValue; + + public Last_(LastObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.notPublished = true; + } + + public override void OnNext(T value) + { + bool isPassed; + try + { + isPassed = parent.predicate(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + if (isPassed) + { + notPublished = false; + lastValue = value; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + if (parent.useDefault) + { + if (notPublished) + { + observer.OnNext(default(T)); + } + else + { + observer.OnNext(lastValue); + } + try { observer.OnCompleted(); } + finally { Dispose(); } + } + else + { + if (notPublished) + { + try { observer.OnError(new InvalidOperationException("sequence is empty")); } + finally { Dispose(); } + } + else + { + observer.OnNext(lastValue); + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Last.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Last.cs.meta new file mode 100644 index 0000000..1c33d43 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Last.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 696780c8759162d4b996683ec13d7e0b +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Materialize.cs b/Assets/Plugins/UniRx/Scripts/Operators/Materialize.cs new file mode 100644 index 0000000..5c9d108 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Materialize.cs @@ -0,0 +1,53 @@ +using System; + +namespace UniRx.Operators +{ + internal class MaterializeObservable : OperatorObservableBase> + { + readonly IObservable source; + + public MaterializeObservable(IObservable source) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + return new Materialize(this, observer, cancel).Run(); + } + + class Materialize : OperatorObserverBase> + { + readonly MaterializeObservable parent; + + public Materialize(MaterializeObservable parent, IObserver> observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + observer.OnNext(Notification.CreateOnNext(value)); + } + + public override void OnError(Exception error) + { + observer.OnNext(Notification.CreateOnError(error)); + try { observer.OnCompleted(); } finally { Dispose(); } + } + + public override void OnCompleted() + { + observer.OnNext(Notification.CreateOnCompleted()); + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Materialize.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Materialize.cs.meta new file mode 100644 index 0000000..aa04020 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Materialize.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 09d3ba9e6d5fe4643bbf0df943652908 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Merge.cs b/Assets/Plugins/UniRx/Scripts/Operators/Merge.cs new file mode 100644 index 0000000..9221ad6 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Merge.cs @@ -0,0 +1,264 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class MergeObservable : OperatorObservableBase + { + private readonly IObservable> sources; + private readonly int maxConcurrent; + + public MergeObservable(IObservable> sources, bool isRequiredSubscribeOnCurrentThread) + : base(isRequiredSubscribeOnCurrentThread) + { + this.sources = sources; + } + + public MergeObservable(IObservable> sources, int maxConcurrent, bool isRequiredSubscribeOnCurrentThread) + : base(isRequiredSubscribeOnCurrentThread) + { + this.sources = sources; + this.maxConcurrent = maxConcurrent; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (maxConcurrent > 0) + { + return new MergeConcurrentObserver(this, observer, cancel).Run(); + } + else + { + return new MergeOuterObserver(this, observer, cancel).Run(); + } + } + + class MergeOuterObserver : OperatorObserverBase, T> + { + readonly MergeObservable parent; + + CompositeDisposable collectionDisposable; + SingleAssignmentDisposable sourceDisposable; + object gate = new object(); + bool isStopped = false; + + public MergeOuterObserver(MergeObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + collectionDisposable = new CompositeDisposable(); + sourceDisposable = new SingleAssignmentDisposable(); + collectionDisposable.Add(sourceDisposable); + + sourceDisposable.Disposable = parent.sources.Subscribe(this); + return collectionDisposable; + } + + public override void OnNext(IObservable value) + { + var disposable = new SingleAssignmentDisposable(); + collectionDisposable.Add(disposable); + var collectionObserver = new Merge(this, disposable); + disposable.Disposable = value.Subscribe(collectionObserver); + } + + public override void OnError(Exception error) + { + lock (gate) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + } + + public override void OnCompleted() + { + isStopped = true; + if (collectionDisposable.Count == 1) + { + lock (gate) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + else + { + sourceDisposable.Dispose(); + } + } + + class Merge : OperatorObserverBase + { + readonly MergeOuterObserver parent; + readonly IDisposable cancel; + + public Merge(MergeOuterObserver parent, IDisposable cancel) + : base(parent.observer, cancel) + { + this.parent = parent; + this.cancel = cancel; + } + + public override void OnNext(T value) + { + lock (parent.gate) + { + base.observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + lock (parent.gate) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + } + + public override void OnCompleted() + { + parent.collectionDisposable.Remove(cancel); + if (parent.isStopped && parent.collectionDisposable.Count == 1) + { + lock (parent.gate) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } + } + } + + class MergeConcurrentObserver : OperatorObserverBase, T> + { + readonly MergeObservable parent; + + CompositeDisposable collectionDisposable; + SingleAssignmentDisposable sourceDisposable; + object gate = new object(); + bool isStopped = false; + + // concurrency + Queue> q; + int activeCount; + + public MergeConcurrentObserver(MergeObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + q = new Queue>(); + activeCount = 0; + + collectionDisposable = new CompositeDisposable(); + sourceDisposable = new SingleAssignmentDisposable(); + collectionDisposable.Add(sourceDisposable); + + sourceDisposable.Disposable = parent.sources.Subscribe(this); + return collectionDisposable; + } + + public override void OnNext(IObservable value) + { + lock (gate) + { + if (activeCount < parent.maxConcurrent) + { + activeCount++; + Subscribe(value); + } + else + { + q.Enqueue(value); + } + } + } + + public override void OnError(Exception error) + { + lock (gate) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + } + + public override void OnCompleted() + { + lock (gate) + { + isStopped = true; + if (activeCount == 0) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + else + { + sourceDisposable.Dispose(); + } + } + } + + void Subscribe(IObservable innerSource) + { + var disposable = new SingleAssignmentDisposable(); + collectionDisposable.Add(disposable); + var collectionObserver = new Merge(this, disposable); + disposable.Disposable = innerSource.Subscribe(collectionObserver); + } + + class Merge : OperatorObserverBase + { + readonly MergeConcurrentObserver parent; + readonly IDisposable cancel; + + public Merge(MergeConcurrentObserver parent, IDisposable cancel) + : base(parent.observer, cancel) + { + this.parent = parent; + this.cancel = cancel; + } + + public override void OnNext(T value) + { + lock (parent.gate) + { + base.observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + lock (parent.gate) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + } + + public override void OnCompleted() + { + parent.collectionDisposable.Remove(cancel); + lock (parent.gate) + { + if (parent.q.Count > 0) + { + var source = parent.q.Dequeue(); + parent.Subscribe(source); + } + else + { + parent.activeCount--; + if (parent.isStopped && parent.activeCount == 0) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Merge.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Merge.cs.meta new file mode 100644 index 0000000..50d7fca --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Merge.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 94158fab525468d4e896a62f633257e6 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Never.cs b/Assets/Plugins/UniRx/Scripts/Operators/Never.cs new file mode 100644 index 0000000..ad6a778 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Never.cs @@ -0,0 +1,32 @@ +using System; + +namespace UniRx.Operators +{ + internal class NeverObservable : OperatorObservableBase + { + public NeverObservable() + : base(false) + { + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return Disposable.Empty; + } + } + + internal class ImmutableNeverObservable : IObservable, IOptimizedObservable + { + internal static ImmutableNeverObservable Instance = new ImmutableNeverObservable(); + + public bool IsRequiredSubscribeOnCurrentThread() + { + return false; + } + + public IDisposable Subscribe(IObserver observer) + { + return Disposable.Empty; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Never.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Never.cs.meta new file mode 100644 index 0000000..8e92ea5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Never.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b5db8d5c73883214abaf3715002da256 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ObserveOn.cs b/Assets/Plugins/UniRx/Scripts/Operators/ObserveOn.cs new file mode 100644 index 0000000..b8f02f1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ObserveOn.cs @@ -0,0 +1,210 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class ObserveOnObservable : OperatorObservableBase + { + readonly IObservable source; + readonly IScheduler scheduler; + + public ObserveOnObservable(IObservable source, IScheduler scheduler) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + var queueing = scheduler as ISchedulerQueueing; + if (queueing == null) + { + return new ObserveOn(this, observer, cancel).Run(); + } + else + { + return new ObserveOn_(this, queueing, observer, cancel).Run(); + } + } + + class ObserveOn : OperatorObserverBase + { + class SchedulableAction : IDisposable + { + public Notification data; + public LinkedListNode node; + public IDisposable schedule; + + public void Dispose() + { + if (schedule != null) + schedule.Dispose(); + schedule = null; + + if (node.List != null) + { + node.List.Remove(node); + } + } + + public bool IsScheduled { get { return schedule != null; } } + } + + readonly ObserveOnObservable parent; + readonly LinkedList actions = new LinkedList(); + bool isDisposed; + + public ObserveOn(ObserveOnObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + isDisposed = false; + + var sourceDisposable = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(sourceDisposable, Disposable.Create(() => + { + lock (actions) + { + isDisposed = true; + + while (actions.Count > 0) + { + // Dispose will both cancel the action (if not already running) + // and remove it from 'actions' + actions.First.Value.Dispose(); + } + } + })); + } + + public override void OnNext(T value) + { + QueueAction(new Notification.OnNextNotification(value)); + } + + public override void OnError(Exception error) + { + QueueAction(new Notification.OnErrorNotification(error)); + } + + public override void OnCompleted() + { + QueueAction(new Notification.OnCompletedNotification()); + } + + private void QueueAction(Notification data) + { + var action = new SchedulableAction { data = data }; + lock (actions) + { + if (isDisposed) return; + + action.node = actions.AddLast(action); + ProcessNext(); + } + } + + private void ProcessNext() + { + lock (actions) + { + if (actions.Count == 0 || isDisposed) + return; + + var action = actions.First.Value; + + if (action.IsScheduled) + return; + + action.schedule = parent.scheduler.Schedule(() => + { + try + { + switch (action.data.Kind) + { + case NotificationKind.OnNext: + observer.OnNext(action.data.Value); + break; + case NotificationKind.OnError: + observer.OnError(action.data.Exception); + break; + case NotificationKind.OnCompleted: + observer.OnCompleted(); + break; + } + } + finally + { + lock (actions) + { + action.Dispose(); + } + + if (action.data.Kind == NotificationKind.OnNext) + ProcessNext(); + else + Dispose(); + } + }); + } + } + } + + class ObserveOn_ : OperatorObserverBase + { + readonly ObserveOnObservable parent; + readonly ISchedulerQueueing scheduler; + readonly BooleanDisposable isDisposed; + readonly Action onNext; + + public ObserveOn_(ObserveOnObservable parent, ISchedulerQueueing scheduler, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.scheduler = scheduler; + this.isDisposed = new BooleanDisposable(); + this.onNext = new Action(OnNext_); // cache delegate + } + + public IDisposable Run() + { + var sourceDisposable = parent.source.Subscribe(this); + return StableCompositeDisposable.Create(sourceDisposable, isDisposed); + } + + void OnNext_(T value) + { + base.observer.OnNext(value); + } + + void OnError_(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + + void OnCompleted_(Unit _) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + + public override void OnNext(T value) + { + scheduler.ScheduleQueueing(isDisposed, value, onNext); + } + + public override void OnError(Exception error) + { + scheduler.ScheduleQueueing(isDisposed, error, OnError_); + } + + public override void OnCompleted() + { + scheduler.ScheduleQueueing(isDisposed, Unit.Default, OnCompleted_); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ObserveOn.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ObserveOn.cs.meta new file mode 100644 index 0000000..a4dde12 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ObserveOn.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 39df784f492c7404286d05b09a840705 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/OfType.cs b/Assets/Plugins/UniRx/Scripts/Operators/OfType.cs new file mode 100644 index 0000000..76857f8 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/OfType.cs @@ -0,0 +1,47 @@ +using System; + +namespace UniRx.Operators +{ + internal class OfTypeObservable : OperatorObservableBase + { + readonly IObservable source; + + public OfTypeObservable(IObservable source) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new OfType(observer, cancel)); + } + + class OfType : OperatorObserverBase + { + public OfType(IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + } + + public override void OnNext(TSource value) + { + if (value is TResult) + { + var castValue = (TResult)(object)value; + observer.OnNext(castValue); + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/OfType.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/OfType.cs.meta new file mode 100644 index 0000000..4cb3e09 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/OfType.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 981fd4bf7704404459a0deed254a03e5 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/OperatorObservableBase.cs b/Assets/Plugins/UniRx/Scripts/Operators/OperatorObservableBase.cs new file mode 100644 index 0000000..e00c864 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/OperatorObservableBase.cs @@ -0,0 +1,42 @@ +using System; + +namespace UniRx.Operators +{ + // implements note : all field must be readonly. + public abstract class OperatorObservableBase : IObservable, IOptimizedObservable + { + readonly bool isRequiredSubscribeOnCurrentThread; + + public OperatorObservableBase(bool isRequiredSubscribeOnCurrentThread) + { + this.isRequiredSubscribeOnCurrentThread = isRequiredSubscribeOnCurrentThread; + } + + public bool IsRequiredSubscribeOnCurrentThread() + { + return isRequiredSubscribeOnCurrentThread; + } + + public IDisposable Subscribe(IObserver observer) + { + var subscription = new SingleAssignmentDisposable(); + + // note: + // does not make the safe observer, it breaks exception durability. + // var safeObserver = Observer.CreateAutoDetachObserver(observer, subscription); + + if (isRequiredSubscribeOnCurrentThread && Scheduler.IsCurrentThreadSchedulerScheduleRequired) + { + Scheduler.CurrentThread.Schedule(() => subscription.Disposable = SubscribeCore(observer, subscription)); + } + else + { + subscription.Disposable = SubscribeCore(observer, subscription); + } + + return subscription; + } + + protected abstract IDisposable SubscribeCore(IObserver observer, IDisposable cancel); + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/OperatorObservableBase.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/OperatorObservableBase.cs.meta new file mode 100644 index 0000000..385c56f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/OperatorObservableBase.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1b94a1a0ae5d509488c6242454216bdb +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/OperatorObserverBase.cs b/Assets/Plugins/UniRx/Scripts/Operators/OperatorObserverBase.cs new file mode 100644 index 0000000..725842c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/OperatorObserverBase.cs @@ -0,0 +1,33 @@ +using System; +using System.Threading; + +namespace UniRx.Operators +{ + public abstract class OperatorObserverBase : IDisposable, IObserver + { + protected internal volatile IObserver observer; + IDisposable cancel; + + public OperatorObserverBase(IObserver observer, IDisposable cancel) + { + this.observer = observer; + this.cancel = cancel; + } + + public abstract void OnNext(TSource value); + + public abstract void OnError(Exception error); + + public abstract void OnCompleted(); + + public void Dispose() + { + observer = UniRx.InternalUtil.EmptyObserver.Instance; + var target = System.Threading.Interlocked.Exchange(ref cancel, null); + if (target != null) + { + target.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/OperatorObserverBase.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/OperatorObserverBase.cs.meta new file mode 100644 index 0000000..a58903d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/OperatorObserverBase.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 258901a4513be8f4a8bfcca91e70bb12 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/PairWise.cs b/Assets/Plugins/UniRx/Scripts/Operators/PairWise.cs new file mode 100644 index 0000000..4b9bccc --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/PairWise.cs @@ -0,0 +1,120 @@ +using System; + +namespace UniRx.Operators +{ + internal class PairwiseObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Func selector; + + public PairwiseObservable(IObservable source, Func selector) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.selector = selector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new Pairwise(this, observer, cancel)); + } + + class Pairwise : OperatorObserverBase + { + readonly PairwiseObservable parent; + T prev = default(T); + bool isFirst = true; + + public Pairwise(PairwiseObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public override void OnNext(T value) + { + if (isFirst) + { + isFirst = false; + prev = value; + return; + } + + TR v; + try + { + v = parent.selector(prev, value); + prev = value; + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + + observer.OnNext(v); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } + + internal class PairwiseObservable : OperatorObservableBase> + { + readonly IObservable source; + + public PairwiseObservable(IObservable source) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + return source.Subscribe(new Pairwise(observer, cancel)); + } + + class Pairwise : OperatorObserverBase> + { + T prev = default(T); + bool isFirst = true; + + public Pairwise(IObserver> observer, IDisposable cancel) + : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + if (isFirst) + { + isFirst = false; + prev = value; + return; + } + + var pair = new Pair(prev, value); + prev = value; + observer.OnNext(pair); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/PairWise.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/PairWise.cs.meta new file mode 100644 index 0000000..17b6aa0 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/PairWise.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f66e4871304e6e74d8548d597457e53c +timeCreated: 1455373902 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Range.cs b/Assets/Plugins/UniRx/Scripts/Operators/Range.cs new file mode 100644 index 0000000..b96da8e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Range.cs @@ -0,0 +1,89 @@ +using System; + +namespace UniRx.Operators +{ + internal class RangeObservable : OperatorObservableBase + { + readonly int start; + readonly int count; + readonly IScheduler scheduler; + + public RangeObservable(int start, int count, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread) + { + if (count < 0) throw new ArgumentOutOfRangeException("count < 0"); + + this.start = start; + this.count = count; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + observer = new Range(observer, cancel); + + if (scheduler == Scheduler.Immediate) + { + for (int i = 0; i < count; i++) + { + int v = start + i; + observer.OnNext(v); + } + observer.OnCompleted(); + + return Disposable.Empty; + } + else + { + var i = 0; + return scheduler.Schedule((Action self) => + { + if (i < count) + { + int v = start + i; + observer.OnNext(v); + i++; + self(); + } + else + { + observer.OnCompleted(); + } + }); + } + } + + class Range : OperatorObserverBase + { + public Range(IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + } + + public override void OnNext(int value) + { + try + { + base.observer.OnNext(value); + } + catch + { + Dispose(); + throw; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Range.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Range.cs.meta new file mode 100644 index 0000000..f49b0a7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Range.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2249fbe589c8d3042ac201c1ab4be76f +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/RefCount.cs b/Assets/Plugins/UniRx/Scripts/Operators/RefCount.cs new file mode 100644 index 0000000..4928706 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/RefCount.cs @@ -0,0 +1,77 @@ +using System; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class RefCountObservable : OperatorObservableBase + { + readonly IConnectableObservable source; + readonly object gate = new object(); + int refCount = 0; + IDisposable connection; + + public RefCountObservable(IConnectableObservable source) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new RefCount(this, observer, cancel).Run(); + } + + class RefCount : OperatorObserverBase + { + readonly RefCountObservable parent; + + public RefCount(RefCountObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + var subcription = parent.source.Subscribe(this); + + lock (parent.gate) + { + if (++parent.refCount == 1) + { + parent.connection = parent.source.Connect(); + } + } + + return Disposable.Create(() => + { + subcription.Dispose(); + + lock (parent.gate) + { + if (--parent.refCount == 0) + { + parent.connection.Dispose(); + } + } + }); + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/RefCount.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/RefCount.cs.meta new file mode 100644 index 0000000..66a6675 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/RefCount.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 17a77b422aa699d4d8cfbf6de804d238 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Repeat.cs b/Assets/Plugins/UniRx/Scripts/Operators/Repeat.cs new file mode 100644 index 0000000..4d519f5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Repeat.cs @@ -0,0 +1,99 @@ +using System; + +namespace UniRx.Operators +{ + internal class RepeatObservable : OperatorObservableBase + { + readonly T value; + readonly int? repeatCount; + readonly IScheduler scheduler; + + public RepeatObservable(T value, int? repeatCount, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread) + { + this.value = value; + this.repeatCount = repeatCount; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + observer = new Repeat(observer, cancel); + + if (repeatCount == null) + { + return scheduler.Schedule((Action self) => + { + observer.OnNext(value); + self(); + }); + } + else + { + if (scheduler == Scheduler.Immediate) + { + var count = this.repeatCount.Value; + for (int i = 0; i < count; i++) + { + observer.OnNext(value); + } + observer.OnCompleted(); + return Disposable.Empty; + } + else + { + var currentCount = this.repeatCount.Value; + return scheduler.Schedule((Action self) => + { + if (currentCount > 0) + { + observer.OnNext(value); + currentCount--; + } + + if (currentCount == 0) + { + observer.OnCompleted(); + return; + } + + self(); + }); + } + } + } + + class Repeat : OperatorObserverBase + { + public Repeat(IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + try + { + base.observer.OnNext(value); + } + catch + { + Dispose(); + throw; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Repeat.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Repeat.cs.meta new file mode 100644 index 0000000..6e484c5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Repeat.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 63930706f2ea6e847866fc6d914b0d2e +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/RepeatSafe.cs b/Assets/Plugins/UniRx/Scripts/Operators/RepeatSafe.cs new file mode 100644 index 0000000..4b4a0d9 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/RepeatSafe.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class RepeatSafeObservable : OperatorObservableBase + { + readonly IEnumerable> sources; + + public RepeatSafeObservable(IEnumerable> sources, bool isRequiredSubscribeOnCurrentThread) + : base(isRequiredSubscribeOnCurrentThread) + { + this.sources = sources; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new RepeatSafe(this, observer, cancel).Run(); + } + + class RepeatSafe : OperatorObserverBase + { + readonly RepeatSafeObservable parent; + readonly object gate = new object(); + + IEnumerator> e; + SerialDisposable subscription; + Action nextSelf; + bool isDisposed; + bool isRunNext; + + public RepeatSafe(RepeatSafeObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + isDisposed = false; + isRunNext = false; + e = parent.sources.GetEnumerator(); + subscription = new SerialDisposable(); + + var schedule = Scheduler.DefaultSchedulers.TailRecursion.Schedule(RecursiveRun); + + return StableCompositeDisposable.Create(schedule, subscription, Disposable.Create(() => + { + lock (gate) + { + isDisposed = true; + e.Dispose(); + } + })); + } + + void RecursiveRun(Action self) + { + lock (gate) + { + this.nextSelf = self; + if (isDisposed) return; + + var current = default(IObservable); + var hasNext = false; + var ex = default(Exception); + + try + { + hasNext = e.MoveNext(); + if (hasNext) + { + current = e.Current; + if (current == null) throw new InvalidOperationException("sequence is null."); + } + else + { + e.Dispose(); + } + } + catch (Exception exception) + { + ex = exception; + e.Dispose(); + } + + if (ex != null) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + if (!hasNext) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + + var source = e.Current; + var d = new SingleAssignmentDisposable(); + subscription.Disposable = d; + d.Disposable = source.Subscribe(this); + } + } + + public override void OnNext(T value) + { + isRunNext = true; + base.observer.OnNext(value); + } + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + if (isRunNext && !isDisposed) + { + isRunNext = false; + this.nextSelf(); + } + else + { + e.Dispose(); + if (!isDisposed) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/RepeatSafe.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/RepeatSafe.cs.meta new file mode 100644 index 0000000..85c808c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/RepeatSafe.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6458fa5124443dc4bb95ad3d0b743934 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Return.cs b/Assets/Plugins/UniRx/Scripts/Operators/Return.cs new file mode 100644 index 0000000..45167c7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Return.cs @@ -0,0 +1,205 @@ +using System; + +namespace UniRx.Operators +{ + internal class ReturnObservable : OperatorObservableBase + { + readonly T value; + readonly IScheduler scheduler; + + public ReturnObservable(T value, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread) + { + this.value = value; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + observer = new Return(observer, cancel); + + if (scheduler == Scheduler.Immediate) + { + observer.OnNext(value); + observer.OnCompleted(); + return Disposable.Empty; + } + else + { + return scheduler.Schedule(() => + { + observer.OnNext(value); + observer.OnCompleted(); + }); + } + } + + class Return : OperatorObserverBase + { + public Return(IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + try + { + base.observer.OnNext(value); + } + catch + { + Dispose(); + throw; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + internal class ImmediateReturnObservable : IObservable, IOptimizedObservable + { + readonly T value; + + public ImmediateReturnObservable(T value) + { + this.value = value; + } + + public bool IsRequiredSubscribeOnCurrentThread() + { + return false; + } + + public IDisposable Subscribe(IObserver observer) + { + observer.OnNext(value); + observer.OnCompleted(); + return Disposable.Empty; + } + } + + internal class ImmutableReturnUnitObservable : IObservable, IOptimizedObservable + { + internal static ImmutableReturnUnitObservable Instance = new ImmutableReturnUnitObservable(); + + ImmutableReturnUnitObservable() + { + + } + + public bool IsRequiredSubscribeOnCurrentThread() + { + return false; + } + + public IDisposable Subscribe(IObserver observer) + { + observer.OnNext(Unit.Default); + observer.OnCompleted(); + return Disposable.Empty; + } + } + + internal class ImmutableReturnTrueObservable : IObservable, IOptimizedObservable + { + internal static ImmutableReturnTrueObservable Instance = new ImmutableReturnTrueObservable(); + + ImmutableReturnTrueObservable() + { + + } + + public bool IsRequiredSubscribeOnCurrentThread() + { + return false; + } + + public IDisposable Subscribe(IObserver observer) + { + observer.OnNext(true); + observer.OnCompleted(); + return Disposable.Empty; + } + } + + internal class ImmutableReturnFalseObservable : IObservable, IOptimizedObservable + { + internal static ImmutableReturnFalseObservable Instance = new ImmutableReturnFalseObservable(); + + ImmutableReturnFalseObservable() + { + + } + + public bool IsRequiredSubscribeOnCurrentThread() + { + return false; + } + + public IDisposable Subscribe(IObserver observer) + { + observer.OnNext(false); + observer.OnCompleted(); + return Disposable.Empty; + } + } + + internal class ImmutableReturnInt32Observable : IObservable, IOptimizedObservable + { + static ImmutableReturnInt32Observable[] Caches = new ImmutableReturnInt32Observable[] + { + new ImmutableReturnInt32Observable(-1), + new ImmutableReturnInt32Observable(0), + new ImmutableReturnInt32Observable(1), + new ImmutableReturnInt32Observable(2), + new ImmutableReturnInt32Observable(3), + new ImmutableReturnInt32Observable(4), + new ImmutableReturnInt32Observable(5), + new ImmutableReturnInt32Observable(6), + new ImmutableReturnInt32Observable(7), + new ImmutableReturnInt32Observable(8), + new ImmutableReturnInt32Observable(9), + }; + + public static IObservable GetInt32Observable(int x) + { + if (-1 <= x && x <= 9) + { + return Caches[x + 1]; + } + + return new ImmediateReturnObservable(x); + } + + readonly int x; + + ImmutableReturnInt32Observable(int x) + { + this.x = x; + } + + public bool IsRequiredSubscribeOnCurrentThread() + { + return false; + } + + public IDisposable Subscribe(IObserver observer) + { + observer.OnNext(x); + observer.OnCompleted(); + return Disposable.Empty; + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Return.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Return.cs.meta new file mode 100644 index 0000000..df54f05 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Return.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 25648117feeec6043bd39468bfab62b7 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Sample.cs b/Assets/Plugins/UniRx/Scripts/Operators/Sample.cs new file mode 100644 index 0000000..7c73de7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Sample.cs @@ -0,0 +1,241 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniRx.Operators +{ + internal class SampleObservable : OperatorObservableBase + { + readonly IObservable source; + readonly TimeSpan interval; + readonly IScheduler scheduler; + + public SampleObservable(IObservable source, TimeSpan interval, IScheduler scheduler) + : base(source.IsRequiredSubscribeOnCurrentThread() || scheduler == Scheduler.CurrentThread) + { + this.source = source; + this.interval = interval; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Sample(this, observer, cancel).Run(); + } + + class Sample : OperatorObserverBase + { + readonly SampleObservable parent; + readonly object gate = new object(); + T latestValue = default(T); + bool isUpdated = false; + bool isCompleted = false; + SingleAssignmentDisposable sourceSubscription; + + public Sample(SampleObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + sourceSubscription = new SingleAssignmentDisposable(); + sourceSubscription.Disposable = parent.source.Subscribe(this); + + + IDisposable scheduling; + var periodicScheduler = parent.scheduler as ISchedulerPeriodic; + if (periodicScheduler != null) + { + scheduling = periodicScheduler.SchedulePeriodic(parent.interval, OnNextTick); + } + else + { + scheduling = parent.scheduler.Schedule(parent.interval, OnNextRecursive); + } + + return StableCompositeDisposable.Create(sourceSubscription, scheduling); + } + + void OnNextTick() + { + lock (gate) + { + if (isUpdated) + { + var value = latestValue; + isUpdated = false; + observer.OnNext(value); + } + if (isCompleted) + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } + + void OnNextRecursive(Action self) + { + lock (gate) + { + if (isUpdated) + { + var value = latestValue; + isUpdated = false; + observer.OnNext(value); + } + if (isCompleted) + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + self(parent.interval); + } + + public override void OnNext(T value) + { + lock (gate) + { + latestValue = value; + isUpdated = true; + } + } + + public override void OnError(Exception error) + { + lock (gate) + { + try { base.observer.OnError(error); } finally { Dispose(); } + } + } + + public override void OnCompleted() + { + lock (gate) + { + isCompleted = true; + sourceSubscription.Dispose(); + } + } + } + } + + internal class SampleObservable : OperatorObservableBase + { + readonly IObservable source; + readonly IObservable intervalSource; + + public SampleObservable(IObservable source, IObservable intervalSource) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.intervalSource = intervalSource; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Sample(this, observer, cancel).Run(); + } + + class Sample : OperatorObserverBase + { + readonly SampleObservable parent; + readonly object gate = new object(); + T latestValue = default(T); + bool isUpdated = false; + bool isCompleted = false; + SingleAssignmentDisposable sourceSubscription; + + public Sample( + SampleObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + sourceSubscription = new SingleAssignmentDisposable(); + sourceSubscription.Disposable = parent.source.Subscribe(this); + + var scheduling = this.parent.intervalSource.Subscribe(new SampleTick(this)); + + return StableCompositeDisposable.Create(sourceSubscription, scheduling); + } + + public override void OnNext(T value) + { + lock (gate) + { + latestValue = value; + isUpdated = true; + } + } + + public override void OnError(Exception error) + { + lock (gate) + { + try { base.observer.OnError(error); } finally { Dispose(); } + } + } + + public override void OnCompleted() + { + lock (gate) + { + isCompleted = true; + sourceSubscription.Dispose(); + } + } + + class SampleTick : IObserver + { + readonly Sample parent; + + public SampleTick(Sample parent) + { + this.parent = parent; + } + + public void OnCompleted() + { + lock (parent.gate) + { + if (parent.isUpdated) + { + parent.isUpdated = false; + parent.observer.OnNext(parent.latestValue); + } + if (parent.isCompleted) + { + try { parent.observer.OnCompleted(); } finally { parent.Dispose(); } + } + } + } + + public void OnError(Exception error) + { + } + + public void OnNext(T2 _) + { + lock (parent.gate) + { + if (parent.isUpdated) + { + var value = parent.latestValue; + parent.isUpdated = false; + parent.observer.OnNext(value); + } + if (parent.isCompleted) + { + try { parent.observer.OnCompleted(); } finally { parent.Dispose(); } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Sample.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Sample.cs.meta new file mode 100644 index 0000000..dfdce6c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Sample.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 414e918f6a4dfc549b2a8c916a6325e1 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Scan.cs b/Assets/Plugins/UniRx/Scripts/Operators/Scan.cs new file mode 100644 index 0000000..417222a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Scan.cs @@ -0,0 +1,139 @@ +using System; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class ScanObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Func accumulator; + + public ScanObservable(IObservable source, Func accumulator) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.accumulator = accumulator; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new Scan(this, observer, cancel)); + } + + class Scan : OperatorObserverBase + { + readonly ScanObservable parent; + TSource accumulation; + bool isFirst; + + public Scan(ScanObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.isFirst = true; + } + + public override void OnNext(TSource value) + { + if (isFirst) + { + isFirst = false; + accumulation = value; + } + else + { + try + { + accumulation = parent.accumulator(accumulation, value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + } + + observer.OnNext(accumulation); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + internal class ScanObservable : OperatorObservableBase + { + readonly IObservable source; + readonly TAccumulate seed; + readonly Func accumulator; + + public ScanObservable(IObservable source, TAccumulate seed, Func accumulator) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.seed = seed; + this.accumulator = accumulator; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new Scan(this, observer, cancel)); + } + + class Scan : OperatorObserverBase + { + readonly ScanObservable parent; + TAccumulate accumulation; + bool isFirst; + + public Scan(ScanObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.isFirst = true; + } + + public override void OnNext(TSource value) + { + if (isFirst) + { + isFirst = false; + accumulation = parent.seed; + } + + try + { + accumulation = parent.accumulator(accumulation, value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + observer.OnNext(accumulation); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Scan.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Scan.cs.meta new file mode 100644 index 0000000..87a736e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Scan.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 461fecd0ef4d48c4d95aae68c2ca2c1c +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Select.cs b/Assets/Plugins/UniRx/Scripts/Operators/Select.cs new file mode 100644 index 0000000..ec45e64 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Select.cs @@ -0,0 +1,146 @@ +using System; + +namespace UniRx.Operators +{ + internal interface ISelect + { + // IObservable CombineSelector(Func selector); + IObservable CombinePredicate(Func predicate); + } + + internal class SelectObservable : OperatorObservableBase, ISelect + { + readonly IObservable source; + readonly Func selector; + readonly Func selectorWithIndex; + + public SelectObservable(IObservable source, Func selector) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.selector = selector; + } + + public SelectObservable(IObservable source, Func selector) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.selectorWithIndex = selector; + } + + // sometimes cause "which no ahead of time (AOT) code was generated." on IL2CPP... + + //public IObservable CombineSelector(Func combineSelector) + //{ + // if (this.selector != null) + // { + // return new Select(source, x => combineSelector(this.selector(x))); + // } + // else + // { + // return new Select(this, combineSelector); + // } + //} + + public IObservable CombinePredicate(Func predicate) + { + if (this.selector != null) + { + return new SelectWhereObservable(this.source, this.selector, predicate); + } + else + { + return new WhereObservable(this, predicate); // can't combine + } + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (selector != null) + { + return source.Subscribe(new Select(this, observer, cancel)); + } + else + { + return source.Subscribe(new Select_(this, observer, cancel)); + } + } + + class Select : OperatorObserverBase + { + readonly SelectObservable parent; + + public Select(SelectObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public override void OnNext(T value) + { + var v = default(TR); + try + { + v = parent.selector(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + + observer.OnNext(v); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + // with Index + class Select_ : OperatorObserverBase + { + readonly SelectObservable parent; + int index; + + public Select_(SelectObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + this.index = 0; + } + + public override void OnNext(T value) + { + var v = default(TR); + try + { + v = parent.selectorWithIndex(value, index++); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + + observer.OnNext(v); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Select.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Select.cs.meta new file mode 100644 index 0000000..9a78495 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Select.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 997e36ad7b02b804ea1f03d05e60bed5 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SelectMany.cs b/Assets/Plugins/UniRx/Scripts/Operators/SelectMany.cs new file mode 100644 index 0000000..a199692 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/SelectMany.cs @@ -0,0 +1,910 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class SelectManyObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Func> selector; + readonly Func> selectorWithIndex; + readonly Func> selectorEnumerable; + readonly Func> selectorEnumerableWithIndex; + + public SelectManyObservable(IObservable source, Func> selector) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.selector = selector; + } + + public SelectManyObservable(IObservable source, Func> selector) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.selectorWithIndex = selector; + } + + public SelectManyObservable(IObservable source, Func> selector) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.selectorEnumerable = selector; + } + + public SelectManyObservable(IObservable source, Func> selector) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.selectorEnumerableWithIndex = selector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (this.selector != null) + { + return new SelectManyOuterObserver(this, observer, cancel).Run(); + } + else if (this.selectorWithIndex != null) + { + return new SelectManyObserverWithIndex(this, observer, cancel).Run(); + } + else if (this.selectorEnumerable != null) + { + return new SelectManyEnumerableObserver(this, observer, cancel).Run(); + } + else if (this.selectorEnumerableWithIndex != null) + { + return new SelectManyEnumerableObserverWithIndex(this, observer, cancel).Run(); + } + else + { + throw new InvalidOperationException(); + } + } + + class SelectManyOuterObserver : OperatorObserverBase + { + readonly SelectManyObservable parent; + + CompositeDisposable collectionDisposable; + SingleAssignmentDisposable sourceDisposable; + object gate = new object(); + bool isStopped = false; + + public SelectManyOuterObserver(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + collectionDisposable = new CompositeDisposable(); + sourceDisposable = new SingleAssignmentDisposable(); + collectionDisposable.Add(sourceDisposable); + + sourceDisposable.Disposable = parent.source.Subscribe(this); + return collectionDisposable; + } + + public override void OnNext(TSource value) + { + IObservable nextObservable; + try + { + nextObservable = parent.selector(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); }; + return; + } + + var disposable = new SingleAssignmentDisposable(); + collectionDisposable.Add(disposable); + var collectionObserver = new SelectMany(this, disposable); + disposable.Disposable = nextObservable.Subscribe(collectionObserver); + } + + public override void OnError(Exception error) + { + lock (gate) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + } + + public override void OnCompleted() + { + isStopped = true; + if (collectionDisposable.Count == 1) + { + lock (gate) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + else + { + sourceDisposable.Dispose(); + } + } + + class SelectMany : OperatorObserverBase + { + readonly SelectManyOuterObserver parent; + readonly IDisposable cancel; + + public SelectMany(SelectManyOuterObserver parent, IDisposable cancel) + : base(parent.observer, cancel) + { + this.parent = parent; + this.cancel = cancel; + } + + public override void OnNext(TResult value) + { + lock (parent.gate) + { + base.observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + lock (parent.gate) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + } + + public override void OnCompleted() + { + parent.collectionDisposable.Remove(cancel); + if (parent.isStopped && parent.collectionDisposable.Count == 1) + { + lock (parent.gate) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } + } + } + + class SelectManyObserverWithIndex : OperatorObserverBase + { + readonly SelectManyObservable parent; + + CompositeDisposable collectionDisposable; + int index = 0; + object gate = new object(); + bool isStopped = false; + SingleAssignmentDisposable sourceDisposable; + + public SelectManyObserverWithIndex(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + collectionDisposable = new CompositeDisposable(); + sourceDisposable = new SingleAssignmentDisposable(); + collectionDisposable.Add(sourceDisposable); + + sourceDisposable.Disposable = parent.source.Subscribe(this); + return collectionDisposable; + } + + public override void OnNext(TSource value) + { + IObservable nextObservable; + try + { + nextObservable = parent.selectorWithIndex(value, index++); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); }; + return; + } + + var disposable = new SingleAssignmentDisposable(); + collectionDisposable.Add(disposable); + var collectionObserver = new SelectMany(this, disposable); + disposable.Disposable = nextObservable.Subscribe(collectionObserver); + } + + public override void OnError(Exception error) + { + lock (gate) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + } + + public override void OnCompleted() + { + isStopped = true; + if (collectionDisposable.Count == 1) + { + lock (gate) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + else + { + sourceDisposable.Dispose(); + } + } + + class SelectMany : OperatorObserverBase + { + readonly SelectManyObserverWithIndex parent; + readonly IDisposable cancel; + + public SelectMany(SelectManyObserverWithIndex parent, IDisposable cancel) + : base(parent.observer, cancel) + { + this.parent = parent; + this.cancel = cancel; + } + + public override void OnNext(TResult value) + { + lock (parent.gate) + { + base.observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + lock (parent.gate) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + } + + public override void OnCompleted() + { + parent.collectionDisposable.Remove(cancel); + if (parent.isStopped && parent.collectionDisposable.Count == 1) + { + lock (parent.gate) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } + } + } + + class SelectManyEnumerableObserver : OperatorObserverBase + { + readonly SelectManyObservable parent; + + public SelectManyEnumerableObserver(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(TSource value) + { + IEnumerable nextEnumerable; + try + { + nextEnumerable = parent.selectorEnumerable(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); }; + return; + } + + var e = nextEnumerable.GetEnumerator(); + try + { + var hasNext = true; + while (hasNext) + { + hasNext = false; + var current = default(TResult); + + try + { + hasNext = e.MoveNext(); + if (hasNext) + { + current = e.Current; + } + } + catch (Exception exception) + { + try { observer.OnError(exception); } finally { Dispose(); } + return; + } + + if (hasNext) + { + observer.OnNext(current); + } + } + } + finally + { + if (e != null) + { + e.Dispose(); + } + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + class SelectManyEnumerableObserverWithIndex : OperatorObserverBase + { + readonly SelectManyObservable parent; + int index = 0; + + public SelectManyEnumerableObserverWithIndex(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(TSource value) + { + IEnumerable nextEnumerable; + try + { + nextEnumerable = parent.selectorEnumerableWithIndex(value, index++); + } + catch (Exception ex) + { + OnError(ex); + return; + } + + var e = nextEnumerable.GetEnumerator(); + try + { + var hasNext = true; + while (hasNext) + { + hasNext = false; + var current = default(TResult); + + try + { + hasNext = e.MoveNext(); + if (hasNext) + { + current = e.Current; + } + } + catch (Exception exception) + { + try { observer.OnError(exception); } finally { Dispose(); } + return; + } + + if (hasNext) + { + observer.OnNext(current); + } + } + } + finally + { + if (e != null) + { + e.Dispose(); + } + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } + + // with resultSelector + internal class SelectManyObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Func> collectionSelector; + readonly Func> collectionSelectorWithIndex; + readonly Func> collectionSelectorEnumerable; + readonly Func> collectionSelectorEnumerableWithIndex; + readonly Func resultSelector; + readonly Func resultSelectorWithIndex; + + public SelectManyObservable(IObservable source, Func> collectionSelector, Func resultSelector) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.collectionSelector = collectionSelector; + this.resultSelector = resultSelector; + } + + public SelectManyObservable(IObservable source, Func> collectionSelector, Func resultSelector) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.collectionSelectorWithIndex = collectionSelector; + this.resultSelectorWithIndex = resultSelector; + } + + public SelectManyObservable(IObservable source, Func> collectionSelector, Func resultSelector) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.collectionSelectorEnumerable = collectionSelector; + this.resultSelector = resultSelector; + } + + public SelectManyObservable(IObservable source, Func> collectionSelector, Func resultSelector) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.collectionSelectorEnumerableWithIndex = collectionSelector; + this.resultSelectorWithIndex = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (collectionSelector != null) + { + return new SelectManyOuterObserver(this, observer, cancel).Run(); + } + else if (collectionSelectorWithIndex != null) + { + return new SelectManyObserverWithIndex(this, observer, cancel).Run(); + } + else if (collectionSelectorEnumerable != null) + { + return new SelectManyEnumerableObserver(this, observer, cancel).Run(); + } + else if (collectionSelectorEnumerableWithIndex != null) + { + return new SelectManyEnumerableObserverWithIndex(this, observer, cancel).Run(); + } + else + { + throw new InvalidOperationException(); + } + } + + class SelectManyOuterObserver : OperatorObserverBase + { + readonly SelectManyObservable parent; + + CompositeDisposable collectionDisposable; + object gate = new object(); + bool isStopped = false; + SingleAssignmentDisposable sourceDisposable; + + public SelectManyOuterObserver(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + collectionDisposable = new CompositeDisposable(); + sourceDisposable = new SingleAssignmentDisposable(); + collectionDisposable.Add(sourceDisposable); + + sourceDisposable.Disposable = parent.source.Subscribe(this); + return collectionDisposable; + } + + public override void OnNext(TSource value) + { + IObservable nextObservable; + try + { + nextObservable = parent.collectionSelector(value); + } + catch (Exception ex) + { + OnError(ex); + return; + } + + var disposable = new SingleAssignmentDisposable(); + collectionDisposable.Add(disposable); + var collectionObserver = new SelectMany(this, value, disposable); + disposable.Disposable = nextObservable.Subscribe(collectionObserver); + } + + public override void OnError(Exception error) + { + lock (gate) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + } + + public override void OnCompleted() + { + isStopped = true; + if (collectionDisposable.Count == 1) + { + lock (gate) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + else + { + sourceDisposable.Dispose(); + } + } + + class SelectMany : OperatorObserverBase + { + readonly SelectManyOuterObserver parent; + readonly TSource sourceValue; + readonly IDisposable cancel; + + public SelectMany(SelectManyOuterObserver parent, TSource value, IDisposable cancel) + : base(parent.observer, cancel) + { + this.parent = parent; + this.sourceValue = value; + this.cancel = cancel; + } + + public override void OnNext(TCollection value) + { + TResult resultValue; + try + { + resultValue = parent.parent.resultSelector(sourceValue, value); + } + catch (Exception ex) + { + OnError(ex); + return; + } + + lock (parent.gate) + { + base.observer.OnNext(resultValue); + } + } + + public override void OnError(Exception error) + { + lock (parent.gate) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + } + + public override void OnCompleted() + { + parent.collectionDisposable.Remove(cancel); + if (parent.isStopped && parent.collectionDisposable.Count == 1) + { + lock (parent.gate) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } + } + } + + class SelectManyObserverWithIndex : OperatorObserverBase + { + readonly SelectManyObservable parent; + + CompositeDisposable collectionDisposable; + object gate = new object(); + bool isStopped = false; + SingleAssignmentDisposable sourceDisposable; + int index = 0; + + public SelectManyObserverWithIndex(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + collectionDisposable = new CompositeDisposable(); + sourceDisposable = new SingleAssignmentDisposable(); + collectionDisposable.Add(sourceDisposable); + + sourceDisposable.Disposable = parent.source.Subscribe(this); + return collectionDisposable; + } + + public override void OnNext(TSource value) + { + var i = index++; + IObservable nextObservable; + try + { + nextObservable = parent.collectionSelectorWithIndex(value, i); + } + catch (Exception ex) + { + OnError(ex); + return; + } + + var disposable = new SingleAssignmentDisposable(); + collectionDisposable.Add(disposable); + var collectionObserver = new SelectManyObserver(this, value, i, disposable); + disposable.Disposable = nextObservable.Subscribe(collectionObserver); + } + + public override void OnError(Exception error) + { + lock (gate) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + } + + public override void OnCompleted() + { + isStopped = true; + if (collectionDisposable.Count == 1) + { + lock (gate) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + else + { + sourceDisposable.Dispose(); + } + } + + class SelectManyObserver : OperatorObserverBase + { + readonly SelectManyObserverWithIndex parent; + readonly TSource sourceValue; + readonly int sourceIndex; + readonly IDisposable cancel; + int index; + + public SelectManyObserver(SelectManyObserverWithIndex parent, TSource value, int index, IDisposable cancel) + : base(parent.observer, cancel) + { + this.parent = parent; + this.sourceValue = value; + this.sourceIndex = index; + this.cancel = cancel; + } + + public override void OnNext(TCollection value) + { + TResult resultValue; + try + { + resultValue = parent.parent.resultSelectorWithIndex(sourceValue, sourceIndex, value, index++); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); }; + return; + } + + lock (parent.gate) + { + base.observer.OnNext(resultValue); + } + } + + public override void OnError(Exception error) + { + lock (parent.gate) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + } + + public override void OnCompleted() + { + parent.collectionDisposable.Remove(cancel); + if (parent.isStopped && parent.collectionDisposable.Count == 1) + { + lock (parent.gate) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } + } + } + + class SelectManyEnumerableObserver : OperatorObserverBase + { + readonly SelectManyObservable parent; + + public SelectManyEnumerableObserver(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(TSource value) + { + IEnumerable nextEnumerable; + try + { + nextEnumerable = parent.collectionSelectorEnumerable(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); }; + return; + } + + var e = nextEnumerable.GetEnumerator(); + try + { + var hasNext = true; + while (hasNext) + { + hasNext = false; + var current = default(TResult); + + try + { + hasNext = e.MoveNext(); + if (hasNext) + { + current = parent.resultSelector(value, e.Current); + } + } + catch (Exception exception) + { + try { observer.OnError(exception); } finally { Dispose(); } + return; + } + + if (hasNext) + { + observer.OnNext(current); + } + } + } + finally + { + if (e != null) + { + e.Dispose(); + } + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + class SelectManyEnumerableObserverWithIndex : OperatorObserverBase + { + readonly SelectManyObservable parent; + int index = 0; + + public SelectManyEnumerableObserverWithIndex(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(TSource value) + { + var i = index++; + IEnumerable nextEnumerable; + try + { + nextEnumerable = parent.collectionSelectorEnumerableWithIndex(value, i); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); }; + return; + } + + var e = nextEnumerable.GetEnumerator(); + try + { + var sequenceI = 0; + var hasNext = true; + while (hasNext) + { + hasNext = false; + var current = default(TResult); + + try + { + hasNext = e.MoveNext(); + if (hasNext) + { + current = parent.resultSelectorWithIndex(value, i, e.Current, sequenceI++); + } + } + catch (Exception exception) + { + try { observer.OnError(exception); } finally { Dispose(); } + return; + } + + if (hasNext) + { + observer.OnNext(current); + } + } + } + finally + { + if (e != null) + { + e.Dispose(); + } + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SelectMany.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/SelectMany.cs.meta new file mode 100644 index 0000000..35bc2f6 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/SelectMany.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6496e8557f6066e4380c32935b6f37c3 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SelectWhere.cs b/Assets/Plugins/UniRx/Scripts/Operators/SelectWhere.cs new file mode 100644 index 0000000..fd768e7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/SelectWhere.cs @@ -0,0 +1,77 @@ +using System; + +namespace UniRx.Operators +{ + // Optimize for .Select().Where() + + internal class SelectWhereObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Func selector; + readonly Func predicate; + + public SelectWhereObservable(IObservable source, Func selector, Func predicate) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.selector = selector; + this.predicate = predicate; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new SelectWhere(this, observer, cancel)); + } + + class SelectWhere : OperatorObserverBase + { + readonly SelectWhereObservable parent; + + public SelectWhere(SelectWhereObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public override void OnNext(T value) + { + var v = default(TR); + try + { + v = parent.selector(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + + var isPassed = false; + try + { + isPassed = parent.predicate(v); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + + if (isPassed) + { + observer.OnNext(v); + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SelectWhere.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/SelectWhere.cs.meta new file mode 100644 index 0000000..e6f2cac --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/SelectWhere.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6a7561d10967d6b4d9c2a67ffc3b9d85 +timeCreated: 1468748731 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Single.cs b/Assets/Plugins/UniRx/Scripts/Operators/Single.cs new file mode 100644 index 0000000..a7d828f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Single.cs @@ -0,0 +1,182 @@ +using System; + +namespace UniRx.Operators +{ + internal class SingleObservable : OperatorObservableBase + { + readonly IObservable source; + readonly bool useDefault; + readonly Func predicate; + + public SingleObservable(IObservable source, bool useDefault) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.useDefault = useDefault; + } + + public SingleObservable(IObservable source, Func predicate, bool useDefault) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.predicate = predicate; + this.useDefault = useDefault; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (predicate == null) + { + return source.Subscribe(new Single(this, observer, cancel)); + } + else + { + return source.Subscribe(new Single_(this, observer, cancel)); + } + } + + class Single : OperatorObserverBase + { + readonly SingleObservable parent; + bool seenValue; + T lastValue; + + public Single(SingleObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.seenValue = false; + } + + public override void OnNext(T value) + { + if (seenValue) + { + try { observer.OnError(new InvalidOperationException("sequence is not single")); } + finally { Dispose(); } + } + else + { + seenValue = true; + lastValue = value; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + if (parent.useDefault) + { + if (!seenValue) + { + observer.OnNext(default(T)); + } + else + { + observer.OnNext(lastValue); + } + try { observer.OnCompleted(); } + finally { Dispose(); } + } + else + { + if (!seenValue) + { + try { observer.OnError(new InvalidOperationException("sequence is empty")); } + finally { Dispose(); } + } + else + { + observer.OnNext(lastValue); + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + } + + class Single_ : OperatorObserverBase + { + readonly SingleObservable parent; + bool seenValue; + T lastValue; + + public Single_(SingleObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.seenValue = false; + } + + public override void OnNext(T value) + { + bool isPassed; + try + { + isPassed = parent.predicate(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + if (isPassed) + { + if (seenValue) + { + try { observer.OnError(new InvalidOperationException("sequence is not single")); } + finally { Dispose(); } + return; + } + else + { + seenValue = true; + lastValue = value; + } + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + if (parent.useDefault) + { + if (!seenValue) + { + observer.OnNext(default(T)); + } + else + { + observer.OnNext(lastValue); + } + try { observer.OnCompleted(); } + finally { Dispose(); } + } + else + { + if (!seenValue) + { + try { observer.OnError(new InvalidOperationException("sequence is empty")); } + finally { Dispose(); } + } + else + { + observer.OnNext(lastValue); + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Single.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Single.cs.meta new file mode 100644 index 0000000..88c862f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Single.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9a50aee929f403f4ea076fc11f71fc53 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Skip.cs b/Assets/Plugins/UniRx/Scripts/Operators/Skip.cs new file mode 100644 index 0000000..39cf4a0 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Skip.cs @@ -0,0 +1,138 @@ +using System; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class SkipObservable : OperatorObservableBase + { + readonly IObservable source; + readonly int count; + readonly TimeSpan duration; + internal readonly IScheduler scheduler; // public for optimization check + + public SkipObservable(IObservable source, int count) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.count = count; + } + + public SkipObservable(IObservable source, TimeSpan duration, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.duration = duration; + this.scheduler = scheduler; + } + + // optimize combiner + + public IObservable Combine(int count) + { + // use sum + // xs = 6 + // xs.Skip(2) = 4 + // xs.Skip(2).Skip(3) = 1 + + return new SkipObservable(source, this.count + count); + } + + public IObservable Combine(TimeSpan duration) + { + // use max + // xs = 6s + // xs.Skip(2s) = 2s + // xs.Skip(2s).Skip(3s) = 3s + + return (duration <= this.duration) + ? this + : new SkipObservable(source, duration, scheduler); + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (scheduler == null) + { + return source.Subscribe(new Skip(this, observer, cancel)); + } + else + { + return new Skip_(this, observer, cancel).Run(); + } + } + + class Skip : OperatorObserverBase + { + int remaining; + + public Skip(SkipObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.remaining = parent.count; + } + + public override void OnNext(T value) + { + if (remaining <= 0) + { + base.observer.OnNext(value); + } + else + { + remaining--; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + class Skip_ : OperatorObserverBase + { + readonly SkipObservable parent; + volatile bool open; + + public Skip_(SkipObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + var d1 = parent.scheduler.Schedule(parent.duration, Tick); + var d2 = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(d1, d2); + } + + void Tick() + { + open = true; + } + + public override void OnNext(T value) + { + if (open) + { + base.observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Skip.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Skip.cs.meta new file mode 100644 index 0000000..02833c7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Skip.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1ffcb45c02e14e94bb37c6513b04bb7c +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SkipUntil.cs b/Assets/Plugins/UniRx/Scripts/Operators/SkipUntil.cs new file mode 100644 index 0000000..21e6484 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/SkipUntil.cs @@ -0,0 +1,119 @@ +using System; + +namespace UniRx.Operators +{ + internal class SkipUntilObservable : OperatorObservableBase + { + readonly IObservable source; + readonly IObservable other; + + public SkipUntilObservable(IObservable source, IObservable other) + : base(source.IsRequiredSubscribeOnCurrentThread() || other.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.other = other; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new SkipUntilOuterObserver(this, observer, cancel).Run(); + } + + class SkipUntilOuterObserver : OperatorObserverBase + { + readonly SkipUntilObservable parent; + + public SkipUntilOuterObserver(SkipUntilObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + var sourceSubscription = new SingleAssignmentDisposable(); + var sourceObserver = new SkipUntil(this, sourceSubscription); + + var otherSubscription = new SingleAssignmentDisposable(); + var otherObserver = new SkipUntilOther(this, sourceObserver, otherSubscription); + + sourceSubscription.Disposable = parent.source.Subscribe(sourceObserver); + otherSubscription.Disposable = parent.other.Subscribe(otherObserver); + + return StableCompositeDisposable.Create(otherSubscription, sourceSubscription); + } + + public override void OnNext(T value) + { + } + + public override void OnError(Exception error) + { + } + + public override void OnCompleted() + { + } + + class SkipUntil : IObserver + { + public volatile IObserver observer; + readonly SkipUntilOuterObserver parent; + readonly IDisposable subscription; + + public SkipUntil(SkipUntilOuterObserver parent, IDisposable subscription) + { + this.parent = parent; + observer = UniRx.InternalUtil.EmptyObserver.Instance; + this.subscription = subscription; + } + + public void OnNext(T value) + { + observer.OnNext(value); + } + + public void OnError(Exception error) + { + try { observer.OnError(error); } + finally { parent.Dispose(); } + } + + public void OnCompleted() + { + try { observer.OnCompleted(); } + finally { subscription.Dispose(); } + } + } + + class SkipUntilOther : IObserver + { + readonly SkipUntilOuterObserver parent; + readonly SkipUntil sourceObserver; + readonly IDisposable subscription; + + public SkipUntilOther(SkipUntilOuterObserver parent, SkipUntil sourceObserver, IDisposable subscription) + { + this.parent = parent; + this.sourceObserver = sourceObserver; + this.subscription = subscription; + } + + public void OnNext(TOther value) + { + sourceObserver.observer = parent.observer; + subscription.Dispose(); + } + + public void OnError(Exception error) + { + try { parent.observer.OnError(error); } finally { parent.Dispose(); } + } + + public void OnCompleted() + { + subscription.Dispose(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SkipUntil.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/SkipUntil.cs.meta new file mode 100644 index 0000000..0e639d2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/SkipUntil.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 52314487e375f3d44a49bc5ceb90adab +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SkipWhile.cs b/Assets/Plugins/UniRx/Scripts/Operators/SkipWhile.cs new file mode 100644 index 0000000..c68c4e3 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/SkipWhile.cs @@ -0,0 +1,130 @@ +using System; + +namespace UniRx.Operators +{ + internal class SkipWhileObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Func predicate; + readonly Func predicateWithIndex; + + public SkipWhileObservable(IObservable source, Func predicate) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.predicate = predicate; + } + + public SkipWhileObservable(IObservable source, Func predicateWithIndex) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.predicateWithIndex = predicateWithIndex; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (predicate != null) + { + return new SkipWhile(this, observer, cancel).Run(); + } + else + { + return new SkipWhile_(this, observer, cancel).Run(); + } + } + + class SkipWhile : OperatorObserverBase + { + readonly SkipWhileObservable parent; + bool endSkip = false; + + public SkipWhile(SkipWhileObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + if (!endSkip) + { + try + { + endSkip = !parent.predicate(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + + if (!endSkip) return; + } + + observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + class SkipWhile_ : OperatorObserverBase + { + readonly SkipWhileObservable parent; + bool endSkip = false; + int index = 0; + + public SkipWhile_(SkipWhileObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + if (!endSkip) + { + try + { + endSkip = !parent.predicateWithIndex(value, index++); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + + if (!endSkip) return; + } + + observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SkipWhile.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/SkipWhile.cs.meta new file mode 100644 index 0000000..113e94b --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/SkipWhile.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4bc7a1e818d05654694d51e883739cca +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Start.cs b/Assets/Plugins/UniRx/Scripts/Operators/Start.cs new file mode 100644 index 0000000..72afaa5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Start.cs @@ -0,0 +1,101 @@ +using System; + +namespace UniRx.Operators +{ + internal class StartObservable : OperatorObservableBase + { + readonly Action action; + readonly Func function; + readonly IScheduler scheduler; + readonly TimeSpan? startAfter; + + public StartObservable(Func function, TimeSpan? startAfter, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread) + { + this.function = function; + this.startAfter = startAfter; + this.scheduler = scheduler; + } + + public StartObservable(Action action, TimeSpan? startAfter, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread) + { + this.action = action; + this.startAfter = startAfter; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (startAfter != null) + { + return scheduler.Schedule(startAfter.Value, new StartObserver(this, observer, cancel).Run); + } + else + { + return scheduler.Schedule(new StartObserver(this, observer, cancel).Run); + } + } + + class StartObserver : OperatorObserverBase + { + readonly StartObservable parent; + + public StartObserver(StartObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public void Run() + { + var result = default(T); + try + { + if (parent.function != null) + { + result = parent.function(); + } + else + { + parent.action(); + } + } + catch (Exception exception) + { + try { observer.OnError(exception); } + finally { Dispose(); } + return; + } + + OnNext(result); + try { observer.OnCompleted(); } + finally { Dispose(); } + } + + public override void OnNext(T value) + { + try + { + base.observer.OnNext(value); + } + catch + { + Dispose(); + throw; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Start.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Start.cs.meta new file mode 100644 index 0000000..9c42432 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Start.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2b99cac67f8c387439619e01a480c465 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/StartWith.cs b/Assets/Plugins/UniRx/Scripts/Operators/StartWith.cs new file mode 100644 index 0000000..877fad7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/StartWith.cs @@ -0,0 +1,82 @@ +using System; + +namespace UniRx.Operators +{ + internal class StartWithObservable : OperatorObservableBase + { + readonly IObservable source; + readonly T value; + readonly Func valueFactory; + + public StartWithObservable(IObservable source, T value) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.value = value; + } + + public StartWithObservable(IObservable source, Func valueFactory) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.valueFactory = valueFactory; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new StartWith(this, observer, cancel).Run(); + } + + class StartWith : OperatorObserverBase + { + readonly StartWithObservable parent; + + public StartWith(StartWithObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + T t; + if (parent.valueFactory == null) + { + t = parent.value; + } + else + { + try + { + t = parent.valueFactory(); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return Disposable.Empty; + } + } + + OnNext(t); + return parent.source.Subscribe(base.observer); // good bye StartWithObserver + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/StartWith.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/StartWith.cs.meta new file mode 100644 index 0000000..498a564 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/StartWith.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 05df6719453543e458dc3e0d29ac7fa8 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SubscribeOn.cs b/Assets/Plugins/UniRx/Scripts/Operators/SubscribeOn.cs new file mode 100644 index 0000000..75025f2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/SubscribeOn.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class SubscribeOnObservable : OperatorObservableBase + { + readonly IObservable source; + readonly IScheduler scheduler; + + public SubscribeOnObservable(IObservable source, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + var m = new SingleAssignmentDisposable(); + var d = new SerialDisposable(); + d.Disposable = m; + + m.Disposable = scheduler.Schedule(() => + { + d.Disposable = new ScheduledDisposable(scheduler, source.Subscribe(observer)); + }); + + return d; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SubscribeOn.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/SubscribeOn.cs.meta new file mode 100644 index 0000000..cf05344 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/SubscribeOn.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bff34f363b1797c4396815b5b3a4be1c +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Switch.cs b/Assets/Plugins/UniRx/Scripts/Operators/Switch.cs new file mode 100644 index 0000000..6e0d22b --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Switch.cs @@ -0,0 +1,130 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniRx.Operators +{ + internal class SwitchObservable : OperatorObservableBase + { + readonly IObservable> sources; + + public SwitchObservable(IObservable> sources) + : base(true) + { + this.sources = sources; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new SwitchObserver(this, observer, cancel).Run(); + } + + class SwitchObserver : OperatorObserverBase, T> + { + readonly SwitchObservable parent; + + readonly object gate = new object(); + readonly SerialDisposable innerSubscription = new SerialDisposable(); + bool isStopped = false; + ulong latest = 0UL; + bool hasLatest = false; + + public SwitchObserver(SwitchObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + var subscription = parent.sources.Subscribe(this); + return StableCompositeDisposable.Create(subscription, innerSubscription); + } + + public override void OnNext(IObservable value) + { + var id = default(ulong); + lock (gate) + { + id = unchecked(++latest); + hasLatest = true; + } + + var d = new SingleAssignmentDisposable(); + innerSubscription.Disposable = d; + d.Disposable = value.Subscribe(new Switch(this, id)); + } + + public override void OnError(Exception error) + { + lock (gate) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + } + + public override void OnCompleted() + { + lock (gate) + { + isStopped = true; + if (!hasLatest) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + class Switch : IObserver + { + readonly SwitchObserver parent; + readonly ulong id; + + public Switch(SwitchObserver observer, ulong id) + { + this.parent = observer; + this.id = id; + } + + public void OnNext(T value) + { + lock (parent.gate) + { + if (parent.latest == id) + { + parent.observer.OnNext(value); + } + } + } + + public void OnError(Exception error) + { + lock (parent.gate) + { + if (parent.latest == id) + { + parent.observer.OnError(error); + } + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + if (parent.latest == id) + { + parent.hasLatest = false; + if (parent.isStopped) + { + parent.observer.OnCompleted(); + } + } + } + } + } + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Switch.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Switch.cs.meta new file mode 100644 index 0000000..b68dd17 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Switch.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5e16cdc638ec3bf41bbd380b75991734 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Synchronize.cs b/Assets/Plugins/UniRx/Scripts/Operators/Synchronize.cs new file mode 100644 index 0000000..f39e0dd --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Synchronize.cs @@ -0,0 +1,57 @@ +using System; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class SynchronizeObservable : OperatorObservableBase + { + readonly IObservable source; + readonly object gate; + + public SynchronizeObservable(IObservable source, object gate) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.gate = gate; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new Synchronize(this, observer, cancel)); + } + + class Synchronize : OperatorObserverBase + { + readonly SynchronizeObservable parent; + + public Synchronize(SynchronizeObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public override void OnNext(T value) + { + lock (parent.gate) + { + base.observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + lock (parent.gate) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + } + + public override void OnCompleted() + { + lock (parent.gate) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Synchronize.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Synchronize.cs.meta new file mode 100644 index 0000000..c194498 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Synchronize.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 31ddcb8477b384b4c9867568f6dc8359 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SynchronizedObserver.cs b/Assets/Plugins/UniRx/Scripts/Operators/SynchronizedObserver.cs new file mode 100644 index 0000000..6bf8d2e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/SynchronizedObserver.cs @@ -0,0 +1,40 @@ +using System; + +namespace UniRx.Operators +{ + internal class SynchronizedObserver : IObserver + { + readonly IObserver observer; + readonly object gate; + + public SynchronizedObserver(IObserver observer, object gate) + { + this.observer = observer; + this.gate = gate; + } + + public void OnNext(T value) + { + lock (gate) + { + observer.OnNext(value); + } + } + + public void OnError(Exception error) + { + lock (gate) + { + observer.OnError(error); + } + } + + public void OnCompleted() + { + lock (gate) + { + observer.OnCompleted(); + } + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SynchronizedObserver.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/SynchronizedObserver.cs.meta new file mode 100644 index 0000000..abbaeeb --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/SynchronizedObserver.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4fd465af6ee05a64f9115b45b58360b7 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Take.cs b/Assets/Plugins/UniRx/Scripts/Operators/Take.cs new file mode 100644 index 0000000..3430888 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Take.cs @@ -0,0 +1,150 @@ +using System; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class TakeObservable : OperatorObservableBase + { + readonly IObservable source; + readonly int count; + readonly TimeSpan duration; + internal readonly IScheduler scheduler; // public for optimization check + + public TakeObservable(IObservable source, int count) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.count = count; + } + + public TakeObservable(IObservable source, TimeSpan duration, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.duration = duration; + this.scheduler = scheduler; + } + + // optimize combiner + + public IObservable Combine(int count) + { + // xs = 6 + // xs.Take(5) = 5 | xs.Take(3) = 3 + // xs.Take(5).Take(3) = 3 | xs.Take(3).Take(5) = 3 + + // use minimum one + return (this.count <= count) + ? this + : new TakeObservable(source, count); + } + + public IObservable Combine(TimeSpan duration) + { + // xs = 6s + // xs.Take(5s) = 5s | xs.Take(3s) = 3s + // xs.Take(5s).Take(3s) = 3s | xs.Take(3s).Take(5s) = 3s + + // use minimum one + return (this.duration <= duration) + ? this + : new TakeObservable(source, duration, scheduler); + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (scheduler == null) + { + return source.Subscribe(new Take(this, observer, cancel)); + } + else + { + return new Take_(this, observer, cancel).Run(); + } + } + + class Take : OperatorObserverBase + { + int rest; + + public Take(TakeObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.rest = parent.count; + } + + public override void OnNext(T value) + { + if (rest > 0) + { + rest -= 1; + base.observer.OnNext(value); + if (rest == 0) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + class Take_ : OperatorObserverBase + { + readonly TakeObservable parent; + readonly object gate = new object(); + + public Take_(TakeObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + var d1 = parent.scheduler.Schedule(parent.duration, Tick); + var d2 = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(d1, d2); + } + + void Tick() + { + lock (gate) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + + public override void OnNext(T value) + { + lock (gate) + { + base.observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + lock (gate) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + } + + public override void OnCompleted() + { + lock (gate) + { + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Take.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Take.cs.meta new file mode 100644 index 0000000..bc171a0 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Take.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5275fc8bb6611984781d8ccd56b9b572 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TakeLast.cs b/Assets/Plugins/UniRx/Scripts/Operators/TakeLast.cs new file mode 100644 index 0000000..95009a7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/TakeLast.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using UniRx.Operators; + +namespace UniRx.Operators +{ + internal class TakeLastObservable : OperatorObservableBase + { + readonly IObservable source; + + // count + readonly int count; + + // duration + readonly TimeSpan duration; + readonly IScheduler scheduler; + + public TakeLastObservable(IObservable source, int count) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.count = count; + } + + public TakeLastObservable(IObservable source, TimeSpan duration, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.duration = duration; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (scheduler == null) + { + return new TakeLast(this, observer, cancel).Run(); + } + else + { + return new TakeLast_(this, observer, cancel).Run(); + } + } + + // count + class TakeLast : OperatorObserverBase + { + readonly TakeLastObservable parent; + readonly Queue q; + + public TakeLast(TakeLastObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.q = new Queue(); + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + q.Enqueue(value); + if (q.Count > parent.count) + { + q.Dequeue(); + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + foreach (var item in q) + { + observer.OnNext(item); + } + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + // time + class TakeLast_ : OperatorObserverBase + { + DateTimeOffset startTime; + readonly TakeLastObservable parent; + readonly Queue> q; + + public TakeLast_(TakeLastObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.q = new Queue>(); + } + + public IDisposable Run() + { + startTime = parent.scheduler.Now; + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + var now = parent.scheduler.Now; + var elapsed = now - startTime; + q.Enqueue(new TimeInterval(value, elapsed)); + Trim(elapsed); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); }; + } + + public override void OnCompleted() + { + var now = parent.scheduler.Now; + var elapsed = now - startTime; + Trim(elapsed); + + foreach (var item in q) + { + observer.OnNext(item.Value); + } + try { observer.OnCompleted(); } finally { Dispose(); }; + } + + void Trim(TimeSpan now) + { + while (q.Count > 0 && now - q.Peek().Interval >= parent.duration) + { + q.Dequeue(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TakeLast.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/TakeLast.cs.meta new file mode 100644 index 0000000..25a0927 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/TakeLast.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8ea2ac59577a3214f9fb66ccc62f2ffd +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TakeUntil.cs b/Assets/Plugins/UniRx/Scripts/Operators/TakeUntil.cs new file mode 100644 index 0000000..dab95d0 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/TakeUntil.cs @@ -0,0 +1,128 @@ +using System; + +namespace UniRx.Operators +{ + internal class TakeUntilObservable : OperatorObservableBase + { + readonly IObservable source; + readonly IObservable other; + + public TakeUntilObservable(IObservable source, IObservable other) + : base(source.IsRequiredSubscribeOnCurrentThread() || other.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.other = other; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new TakeUntil(this, observer, cancel).Run(); + } + + class TakeUntil : OperatorObserverBase + { + readonly TakeUntilObservable parent; + object gate = new object(); + + public TakeUntil(TakeUntilObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + var otherSubscription = new SingleAssignmentDisposable(); + var otherObserver = new TakeUntilOther(this, otherSubscription); + otherSubscription.Disposable = parent.other.Subscribe(otherObserver); + + var sourceSubscription = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(otherSubscription, sourceSubscription); + } + + public override void OnNext(T value) + { + lock (gate) + { + observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + lock (gate) + { + try { observer.OnError(error); } finally { Dispose(); } + } + } + + public override void OnCompleted() + { + lock (gate) + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + class TakeUntilOther : IObserver + { + readonly TakeUntil sourceObserver; + readonly IDisposable subscription; + + public TakeUntilOther(TakeUntil sourceObserver, IDisposable subscription) + { + this.sourceObserver = sourceObserver; + this.subscription = subscription; + } + + public void OnNext(TOther value) + { + lock (sourceObserver.gate) + { + try + { + sourceObserver.observer.OnCompleted(); + } + finally + { + sourceObserver.Dispose(); + subscription.Dispose(); + } + } + } + + public void OnError(Exception error) + { + lock (sourceObserver.gate) + { + try + { + sourceObserver.observer.OnError(error); + } + finally + { + sourceObserver.Dispose(); + subscription.Dispose(); + } + } + } + + public void OnCompleted() + { + lock (sourceObserver.gate) + { + try + { + sourceObserver.observer.OnCompleted(); + } + finally + { + sourceObserver.Dispose(); + subscription.Dispose(); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TakeUntil.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/TakeUntil.cs.meta new file mode 100644 index 0000000..e81affb --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/TakeUntil.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 163e3eab299b735418c94e634fecd811 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TakeWhile.cs b/Assets/Plugins/UniRx/Scripts/Operators/TakeWhile.cs new file mode 100644 index 0000000..99b4de4 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/TakeWhile.cs @@ -0,0 +1,134 @@ +using System; + +namespace UniRx.Operators +{ + internal class TakeWhileObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Func predicate; + readonly Func predicateWithIndex; + + public TakeWhileObservable(IObservable source, Func predicate) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.predicate = predicate; + } + + public TakeWhileObservable(IObservable source, Func predicateWithIndex) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.predicateWithIndex = predicateWithIndex; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (predicate != null) + { + return new TakeWhile(this, observer, cancel).Run(); + } + else + { + return new TakeWhile_(this, observer, cancel).Run(); + } + } + + class TakeWhile : OperatorObserverBase + { + readonly TakeWhileObservable parent; + + public TakeWhile(TakeWhileObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + bool isPassed; + try + { + isPassed = parent.predicate(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + + if (isPassed) + { + observer.OnNext(value); + } + else + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + class TakeWhile_ : OperatorObserverBase + { + readonly TakeWhileObservable parent; + int index = 0; + + public TakeWhile_(TakeWhileObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + return parent.source.Subscribe(this); + } + + public override void OnNext(T value) + { + bool isPassed; + try + { + isPassed = parent.predicateWithIndex(value, index++); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + + if (isPassed) + { + observer.OnNext(value); + } + else + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TakeWhile.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/TakeWhile.cs.meta new file mode 100644 index 0000000..beb13c9 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/TakeWhile.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d6f2da76023d9734ebb4ed1883fda2bc +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Throttle.cs b/Assets/Plugins/UniRx/Scripts/Operators/Throttle.cs new file mode 100644 index 0000000..23a1c39 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Throttle.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniRx.Operators +{ + internal class ThrottleObservable : OperatorObservableBase + { + readonly IObservable source; + readonly TimeSpan dueTime; + readonly IScheduler scheduler; + + public ThrottleObservable(IObservable source, TimeSpan dueTime, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.dueTime = dueTime; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Throttle(this, observer, cancel).Run(); + } + + class Throttle : OperatorObserverBase + { + readonly ThrottleObservable parent; + readonly object gate = new object(); + T latestValue = default(T); + bool hasValue = false; + SerialDisposable cancelable; + ulong id = 0; + + public Throttle(ThrottleObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + cancelable = new SerialDisposable(); + var subscription = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(cancelable, subscription); + } + + void OnNext(ulong currentid) + { + lock (gate) + { + if (hasValue && id == currentid) + { + observer.OnNext(latestValue); + } + hasValue = false; + } + } + + public override void OnNext(T value) + { + ulong currentid; + lock (gate) + { + hasValue = true; + latestValue = value; + id = unchecked(id + 1); + currentid = id; + } + + var d = new SingleAssignmentDisposable(); + cancelable.Disposable = d; + d.Disposable = parent.scheduler.Schedule(parent.dueTime, () => OnNext(currentid)); + } + + public override void OnError(Exception error) + { + cancelable.Dispose(); + + lock (gate) + { + hasValue = false; + id = unchecked(id + 1); + try { observer.OnError(error); } finally { Dispose(); } + } + } + + public override void OnCompleted() + { + cancelable.Dispose(); + + lock (gate) + { + if (hasValue) + { + observer.OnNext(latestValue); + } + hasValue = false; + id = unchecked(id + 1); + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Throttle.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Throttle.cs.meta new file mode 100644 index 0000000..9e6e728 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Throttle.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dc296a61927394b4b908b385087f23d0 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ThrottleFirst.cs b/Assets/Plugins/UniRx/Scripts/Operators/ThrottleFirst.cs new file mode 100644 index 0000000..e3a36df --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ThrottleFirst.cs @@ -0,0 +1,87 @@ +using System; + +namespace UniRx.Operators +{ + internal class ThrottleFirstObservable : OperatorObservableBase + { + readonly IObservable source; + readonly TimeSpan dueTime; + readonly IScheduler scheduler; + + public ThrottleFirstObservable(IObservable source, TimeSpan dueTime, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.dueTime = dueTime; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new ThrottleFirst(this, observer, cancel).Run(); + } + + class ThrottleFirst : OperatorObserverBase + { + readonly ThrottleFirstObservable parent; + readonly object gate = new object(); + bool open = true; + SerialDisposable cancelable; + + public ThrottleFirst(ThrottleFirstObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + cancelable = new SerialDisposable(); + var subscription = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(cancelable, subscription); + } + + void OnNext() + { + lock (gate) + { + open = true; + } + } + + public override void OnNext(T value) + { + lock (gate) + { + if (!open) return; + observer.OnNext(value); + open = false; + } + + var d = new SingleAssignmentDisposable(); + cancelable.Disposable = d; + d.Disposable = parent.scheduler.Schedule(parent.dueTime, OnNext); + } + + public override void OnError(Exception error) + { + cancelable.Dispose(); + + lock (gate) + { + try { observer.OnError(error); } finally { Dispose(); } + } + } + + public override void OnCompleted() + { + cancelable.Dispose(); + + lock (gate) + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ThrottleFirst.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ThrottleFirst.cs.meta new file mode 100644 index 0000000..0fe0524 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ThrottleFirst.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 32b6a6efbab897b41a055d830a4d9755 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Throw.cs b/Assets/Plugins/UniRx/Scripts/Operators/Throw.cs new file mode 100644 index 0000000..ba618c8 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Throw.cs @@ -0,0 +1,69 @@ +using System; + +namespace UniRx.Operators +{ + internal class ThrowObservable : OperatorObservableBase + { + readonly Exception error; + readonly IScheduler scheduler; + + public ThrowObservable(Exception error, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread) + { + this.error = error; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + observer = new Throw(observer, cancel); + + if (scheduler == Scheduler.Immediate) + { + observer.OnError(error); + return Disposable.Empty; + } + else + { + return scheduler.Schedule(() => + { + observer.OnError(error); + observer.OnCompleted(); + }); + } + } + + class Throw : OperatorObserverBase + { + public Throw(IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + try + { + base.observer.OnNext(value); + } + catch + { + Dispose(); + throw; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Throw.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Throw.cs.meta new file mode 100644 index 0000000..5a6be2e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Throw.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1e5623719e9b1f1418aa67a63abed4cc +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TimeInterval.cs b/Assets/Plugins/UniRx/Scripts/Operators/TimeInterval.cs new file mode 100644 index 0000000..e28d672 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/TimeInterval.cs @@ -0,0 +1,56 @@ +using System; + +namespace UniRx.Operators +{ + internal class TimeIntervalObservable : OperatorObservableBase> + { + readonly IObservable source; + readonly IScheduler scheduler; + + public TimeIntervalObservable(IObservable source, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + return source.Subscribe(new TimeInterval(this, observer, cancel)); + } + + class TimeInterval : OperatorObserverBase> + { + readonly TimeIntervalObservable parent; + DateTimeOffset lastTime; + + public TimeInterval(TimeIntervalObservable parent, IObserver> observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + this.lastTime = parent.scheduler.Now; + } + + public override void OnNext(T value) + { + var now = parent.scheduler.Now; + var span = now.Subtract(lastTime); + lastTime = now; + + base.observer.OnNext(new UniRx.TimeInterval(value, span)); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TimeInterval.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/TimeInterval.cs.meta new file mode 100644 index 0000000..ab4108c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/TimeInterval.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 065e40ebd4bd4a848b58a7a90dac881d +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Timeout.cs b/Assets/Plugins/UniRx/Scripts/Operators/Timeout.cs new file mode 100644 index 0000000..541dd74 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Timeout.cs @@ -0,0 +1,198 @@ +using System; + +namespace UniRx.Operators +{ + internal class TimeoutObservable : OperatorObservableBase + { + readonly IObservable source; + readonly TimeSpan? dueTime; + readonly DateTimeOffset? dueTimeDT; + readonly IScheduler scheduler; + + public TimeoutObservable(IObservable source, TimeSpan dueTime, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.dueTime = dueTime; + this.scheduler = scheduler; + } + + public TimeoutObservable(IObservable source, DateTimeOffset dueTime, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.dueTimeDT = dueTime; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (dueTime != null) + { + return new Timeout(this, observer, cancel).Run(); + } + else + { + return new Timeout_(this, observer, cancel).Run(); + } + } + + class Timeout : OperatorObserverBase + { + readonly TimeoutObservable parent; + readonly object gate = new object(); + ulong objectId = 0ul; + bool isTimeout = false; + SingleAssignmentDisposable sourceSubscription; + SerialDisposable timerSubscription; + + public Timeout(TimeoutObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + sourceSubscription = new SingleAssignmentDisposable(); + timerSubscription = new SerialDisposable(); + timerSubscription.Disposable = RunTimer(objectId); + sourceSubscription.Disposable = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(timerSubscription, sourceSubscription); + } + + IDisposable RunTimer(ulong timerId) + { + return parent.scheduler.Schedule(parent.dueTime.Value, () => + { + lock (gate) + { + if (objectId == timerId) + { + isTimeout = true; + } + } + if (isTimeout) + { + try { observer.OnError(new TimeoutException()); } finally { Dispose(); } + } + }); + } + + public override void OnNext(T value) + { + ulong useObjectId; + bool timeout; + lock (gate) + { + timeout = isTimeout; + objectId++; + useObjectId = objectId; + } + if (timeout) return; + + timerSubscription.Disposable = Disposable.Empty; // cancel old timer + observer.OnNext(value); + timerSubscription.Disposable = RunTimer(useObjectId); + } + + public override void OnError(Exception error) + { + bool timeout; + lock (gate) + { + timeout = isTimeout; + objectId++; + } + if (timeout) return; + + timerSubscription.Dispose(); + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + bool timeout; + lock (gate) + { + timeout = isTimeout; + objectId++; + } + if (timeout) return; + + timerSubscription.Dispose(); + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + class Timeout_ : OperatorObserverBase + { + readonly TimeoutObservable parent; + readonly object gate = new object(); + bool isFinished = false; + SingleAssignmentDisposable sourceSubscription; + IDisposable timerSubscription; + + public Timeout_(TimeoutObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + sourceSubscription = new SingleAssignmentDisposable(); + + timerSubscription = parent.scheduler.Schedule(parent.dueTimeDT.Value, OnNext); + sourceSubscription.Disposable = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(timerSubscription, sourceSubscription); + } + + // in timer + void OnNext() + { + lock (gate) + { + if (isFinished) return; + isFinished = true; + } + + sourceSubscription.Dispose(); + try { observer.OnError(new TimeoutException()); } finally { Dispose(); } + } + + public override void OnNext(T value) + { + lock (gate) + { + if (!isFinished) observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + lock (gate) + { + if (isFinished) return; + isFinished = true; + timerSubscription.Dispose(); + } + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + + lock (gate) + { + if (!isFinished) + { + isFinished = true; + timerSubscription.Dispose(); + } + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Timeout.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Timeout.cs.meta new file mode 100644 index 0000000..c3c77d5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Timeout.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a22cd4a86f62fc64384dddb043530703 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Timer.cs b/Assets/Plugins/UniRx/Scripts/Operators/Timer.cs new file mode 100644 index 0000000..b2f1f1a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Timer.cs @@ -0,0 +1,124 @@ +using System; + +namespace UniRx.Operators +{ + internal class TimerObservable : OperatorObservableBase + { + readonly DateTimeOffset? dueTimeA; + readonly TimeSpan? dueTimeB; + readonly TimeSpan? period; + readonly IScheduler scheduler; + + public TimerObservable(DateTimeOffset dueTime, TimeSpan? period, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread) + { + this.dueTimeA = dueTime; + this.period = period; + this.scheduler = scheduler; + } + + public TimerObservable(TimeSpan dueTime, TimeSpan? period, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread) + { + this.dueTimeB = dueTime; + this.period = period; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + var timerObserver = new Timer(observer, cancel); + + var dueTime = (dueTimeA != null) + ? dueTimeA.Value - scheduler.Now + : dueTimeB.Value; + + // one-shot + if (period == null) + { + return scheduler.Schedule(Scheduler.Normalize(dueTime), () => + { + timerObserver.OnNext(); + timerObserver.OnCompleted(); + }); + } + else + { + var periodicScheduler = scheduler as ISchedulerPeriodic; + if (periodicScheduler != null) + { + if (dueTime == period.Value) + { + // same(Observable.Interval), run periodic + return periodicScheduler.SchedulePeriodic(Scheduler.Normalize(dueTime), timerObserver.OnNext); + } + else + { + // Schedule Once + Scheudle Periodic + var disposable = new SerialDisposable(); + + disposable.Disposable = scheduler.Schedule(Scheduler.Normalize(dueTime), () => + { + timerObserver.OnNext(); // run first + + var timeP = Scheduler.Normalize(period.Value); + disposable.Disposable = periodicScheduler.SchedulePeriodic(timeP, timerObserver.OnNext); // run periodic + }); + + return disposable; + } + } + else + { + var timeP = Scheduler.Normalize(period.Value); + + return scheduler.Schedule(Scheduler.Normalize(dueTime), self => + { + timerObserver.OnNext(); + self(timeP); + }); + } + } + } + + class Timer : OperatorObserverBase + { + long index = 0; + + public Timer(IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + } + + public void OnNext() + { + try + { + base.observer.OnNext(index++); + } + catch + { + Dispose(); + throw; + } + } + + public override void OnNext(long value) + { + // no use. + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Timer.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Timer.cs.meta new file mode 100644 index 0000000..7f55fe4 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Timer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6be220be1da39e14ea87b366c149953e +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Timestamp.cs b/Assets/Plugins/UniRx/Scripts/Operators/Timestamp.cs new file mode 100644 index 0000000..c81ce1a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Timestamp.cs @@ -0,0 +1,50 @@ +using System; + +namespace UniRx.Operators +{ + internal class TimestampObservable : OperatorObservableBase> + { + readonly IObservable source; + readonly IScheduler scheduler; + + public TimestampObservable(IObservable source, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + return source.Subscribe(new Timestamp(this, observer, cancel)); + } + + class Timestamp : OperatorObserverBase> + { + readonly TimestampObservable parent; + + public Timestamp(TimestampObservable parent, IObserver> observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public override void OnNext(T value) + { + base.observer.OnNext(new Timestamped(value, parent.scheduler.Now)); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Timestamp.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Timestamp.cs.meta new file mode 100644 index 0000000..1313978 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Timestamp.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d9ec806fec477b243a812e7f609a4453 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ToArray.cs b/Assets/Plugins/UniRx/Scripts/Operators/ToArray.cs new file mode 100644 index 0000000..6f92697 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ToArray.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class ToArrayObservable : OperatorObservableBase + { + readonly IObservable source; + + public ToArrayObservable(IObservable source) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new ToArray(observer, cancel)); + } + + class ToArray : OperatorObserverBase + { + readonly List list = new List(); + + public ToArray(IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + } + + public override void OnNext(TSource value) + { + try + { + list.Add(value); // sometimes cause error on multithread + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + TSource[] result; + try + { + result = list.ToArray(); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + + base.observer.OnNext(result); + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ToArray.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ToArray.cs.meta new file mode 100644 index 0000000..f2da5ba --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ToArray.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 38d1f7c869353b542af469b0e3fae89a +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ToList.cs b/Assets/Plugins/UniRx/Scripts/Operators/ToList.cs new file mode 100644 index 0000000..df0bbd9 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ToList.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class ToListObservable : OperatorObservableBase> + { + readonly IObservable source; + + public ToListObservable(IObservable source) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + return source.Subscribe(new ToList(observer, cancel)); + } + + class ToList : OperatorObserverBase> + { + readonly List list = new List(); + + public ToList(IObserver> observer, IDisposable cancel) + : base(observer, cancel) + { + } + + public override void OnNext(TSource value) + { + try + { + list.Add(value); // sometimes cause error on multithread + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + base.observer.OnNext(list); + try { observer.OnCompleted(); } finally { Dispose(); }; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ToList.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ToList.cs.meta new file mode 100644 index 0000000..586772b --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ToList.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cee1b9300a644c9458346c1f80f64197 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ToObservable.cs b/Assets/Plugins/UniRx/Scripts/Operators/ToObservable.cs new file mode 100644 index 0000000..6adaecd --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ToObservable.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class ToObservableObservable : OperatorObservableBase + { + readonly IEnumerable source; + readonly IScheduler scheduler; + + public ToObservableObservable(IEnumerable source, IScheduler scheduler) + : base(scheduler == Scheduler.CurrentThread) + { + this.source = source; + this.scheduler = scheduler; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new ToObservable(this, observer, cancel).Run(); + } + + class ToObservable : OperatorObserverBase + { + readonly ToObservableObservable parent; + + public ToObservable(ToObservableObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + var e = default(IEnumerator); + try + { + e = parent.source.GetEnumerator(); + } + catch (Exception exception) + { + OnError(exception); + return Disposable.Empty; + } + + if (parent.scheduler == Scheduler.Immediate) + { + while (true) + { + bool hasNext; + var current = default(T); + try + { + hasNext = e.MoveNext(); + if (hasNext) current = e.Current; + } + catch (Exception ex) + { + e.Dispose(); + try { observer.OnError(ex); } + finally { Dispose(); } + break; + } + + if (hasNext) + { + observer.OnNext(current); + } + else + { + e.Dispose(); + try { observer.OnCompleted(); } + finally { Dispose(); } + break; + } + } + + return Disposable.Empty; + } + + var flag = new SingleAssignmentDisposable(); + flag.Disposable = parent.scheduler.Schedule(self => + { + if (flag.IsDisposed) + { + e.Dispose(); + return; + } + + bool hasNext; + var current = default(T); + try + { + hasNext = e.MoveNext(); + if (hasNext) current = e.Current; + } + catch (Exception ex) + { + e.Dispose(); + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + if (hasNext) + { + observer.OnNext(current); + self(); + } + else + { + e.Dispose(); + try { observer.OnCompleted(); } + finally { Dispose(); } + } + }); + + return flag; + } + + public override void OnNext(T value) + { + // do nothing + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ToObservable.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ToObservable.cs.meta new file mode 100644 index 0000000..7714ed0 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ToObservable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7cd3ae084c8ca754f9aceca2e18c3af9 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Wait.cs b/Assets/Plugins/UniRx/Scripts/Operators/Wait.cs new file mode 100644 index 0000000..abf77f7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Wait.cs @@ -0,0 +1,63 @@ +using System; +using UniRx.InternalUtil; + +namespace UniRx.Operators +{ + internal class Wait : IObserver + { + static readonly TimeSpan InfiniteTimeSpan = new TimeSpan(0, 0, 0, 0, -1); // from .NET 4.5 + + readonly IObservable source; + readonly TimeSpan timeout; + + System.Threading.ManualResetEvent semaphore; + + bool seenValue = false; + T value = default(T); + Exception ex = default(Exception); + + public Wait(IObservable source, TimeSpan timeout) + { + this.source = source; + this.timeout = timeout; + } + + public T Run() + { + semaphore = new System.Threading.ManualResetEvent(false); + using (source.Subscribe(this)) + { + var waitComplete = (timeout == InfiniteTimeSpan) + ? semaphore.WaitOne() + : semaphore.WaitOne(timeout); + + if (!waitComplete) + { + throw new TimeoutException("OnCompleted not fired."); + } + } + + if (ex != null) ex.Throw(); + if (!seenValue) throw new InvalidOperationException("No Elements."); + + return value; + } + + public void OnNext(T value) + { + seenValue = true; + this.value = value; + } + + public void OnError(Exception error) + { + this.ex = error; + semaphore.Set(); + } + + public void OnCompleted() + { + semaphore.Set(); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Wait.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Wait.cs.meta new file mode 100644 index 0000000..5291736 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Wait.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ea55c5647aa075b4f894dd37abf5e469 +timeCreated: 1455373902 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/WhenAll.cs b/Assets/Plugins/UniRx/Scripts/Operators/WhenAll.cs new file mode 100644 index 0000000..88bcccc --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/WhenAll.cs @@ -0,0 +1,485 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class WhenAllObservable : OperatorObservableBase + { + readonly IObservable[] sources; + readonly IEnumerable> sourcesEnumerable; + + public WhenAllObservable(IObservable[] sources) + : base(false) + { + this.sources = sources; + } + + public WhenAllObservable(IEnumerable> sources) + : base(false) + { + this.sourcesEnumerable = sources; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (sources != null) + { + return new WhenAll(this.sources, observer, cancel).Run(); + } + else + { + var xs = sourcesEnumerable as IList>; + if (xs == null) + { + xs = new List>(sourcesEnumerable); // materialize observables + } + return new WhenAll_(xs, observer, cancel).Run(); + } + } + + class WhenAll : OperatorObserverBase + { + readonly IObservable[] sources; + readonly object gate = new object(); + int completedCount; + int length; + T[] values; + + public WhenAll(IObservable[] sources, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.sources = sources; + } + + public IDisposable Run() + { + length = sources.Length; + + // fail safe... + if (length == 0) + { + OnNext(new T[0]); + try { observer.OnCompleted(); } finally { Dispose(); } + return Disposable.Empty; + } + + completedCount = 0; + values = new T[length]; + + var subscriptions = new IDisposable[length]; + for (int index = 0; index < length; index++) + { + var source = sources[index]; + var observer = new WhenAllCollectionObserver(this, index); + subscriptions[index] = source.Subscribe(observer); + } + + return StableCompositeDisposable.CreateUnsafe(subscriptions); + } + + public override void OnNext(T[] value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + + class WhenAllCollectionObserver : IObserver + { + readonly WhenAll parent; + readonly int index; + bool isCompleted = false; + + public WhenAllCollectionObserver(WhenAll parent, int index) + { + this.parent = parent; + this.index = index; + } + + public void OnNext(T value) + { + lock (parent.gate) + { + if (!isCompleted) + { + parent.values[index] = value; + } + } + } + + public void OnError(Exception error) + { + lock (parent.gate) + { + if (!isCompleted) + { + parent.OnError(error); + } + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + if (!isCompleted) + { + isCompleted = true; + parent.completedCount++; + if (parent.completedCount == parent.length) + { + parent.OnNext(parent.values); + parent.OnCompleted(); + } + } + } + } + } + } + + class WhenAll_ : OperatorObserverBase + { + readonly IList> sources; + readonly object gate = new object(); + int completedCount; + int length; + T[] values; + + public WhenAll_(IList> sources, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.sources = sources; + } + + public IDisposable Run() + { + length = sources.Count; + + // fail safe... + if (length == 0) + { + OnNext(new T[0]); + try { observer.OnCompleted(); } finally { Dispose(); } + return Disposable.Empty; + } + + completedCount = 0; + values = new T[length]; + + var subscriptions = new IDisposable[length]; + for (int index = 0; index < length; index++) + { + var source = sources[index]; + var observer = new WhenAllCollectionObserver(this, index); + subscriptions[index] = source.Subscribe(observer); + } + + return StableCompositeDisposable.CreateUnsafe(subscriptions); + } + + public override void OnNext(T[] value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + + class WhenAllCollectionObserver : IObserver + { + readonly WhenAll_ parent; + readonly int index; + bool isCompleted = false; + + public WhenAllCollectionObserver(WhenAll_ parent, int index) + { + this.parent = parent; + this.index = index; + } + + public void OnNext(T value) + { + lock (parent.gate) + { + if (!isCompleted) + { + parent.values[index] = value; + } + } + } + + public void OnError(Exception error) + { + lock (parent.gate) + { + if (!isCompleted) + { + parent.OnError(error); + } + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + if (!isCompleted) + { + isCompleted = true; + parent.completedCount++; + if (parent.completedCount == parent.length) + { + parent.OnNext(parent.values); + parent.OnCompleted(); + } + } + } + } + } + } + } + + internal class WhenAllObservable : OperatorObservableBase + { + readonly IObservable[] sources; + readonly IEnumerable> sourcesEnumerable; + + public WhenAllObservable(IObservable[] sources) + : base(false) + { + this.sources = sources; + } + + public WhenAllObservable(IEnumerable> sources) + : base(false) + { + this.sourcesEnumerable = sources; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (sources != null) + { + return new WhenAll(this.sources, observer, cancel).Run(); + } + else + { + var xs = sourcesEnumerable as IList>; + if (xs == null) + { + xs = new List>(sourcesEnumerable); // materialize observables + } + return new WhenAll_(xs, observer, cancel).Run(); + } + } + + class WhenAll : OperatorObserverBase + { + readonly IObservable[] sources; + readonly object gate = new object(); + int completedCount; + int length; + + public WhenAll(IObservable[] sources, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.sources = sources; + } + + public IDisposable Run() + { + length = sources.Length; + + // fail safe... + if (length == 0) + { + OnNext(Unit.Default); + try { observer.OnCompleted(); } finally { Dispose(); } + return Disposable.Empty; + } + + completedCount = 0; + + var subscriptions = new IDisposable[length]; + for (int index = 0; index < sources.Length; index++) + { + var source = sources[index]; + var observer = new WhenAllCollectionObserver(this); + subscriptions[index] = source.Subscribe(observer); + } + + return StableCompositeDisposable.CreateUnsafe(subscriptions); + } + + public override void OnNext(Unit value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + + class WhenAllCollectionObserver : IObserver + { + readonly WhenAll parent; + bool isCompleted = false; + + public WhenAllCollectionObserver(WhenAll parent) + { + this.parent = parent; + } + + public void OnNext(Unit value) + { + } + + public void OnError(Exception error) + { + lock (parent.gate) + { + if (!isCompleted) + { + parent.OnError(error); + } + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + if (!isCompleted) + { + isCompleted = true; + parent.completedCount++; + if (parent.completedCount == parent.length) + { + parent.OnNext(Unit.Default); + parent.OnCompleted(); + } + } + } + } + } + } + + class WhenAll_ : OperatorObserverBase + { + readonly IList> sources; + readonly object gate = new object(); + int completedCount; + int length; + + public WhenAll_(IList> sources, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.sources = sources; + } + + public IDisposable Run() + { + length = sources.Count; + + // fail safe... + if (length == 0) + { + OnNext(Unit.Default); + try { observer.OnCompleted(); } finally { Dispose(); } + return Disposable.Empty; + } + + completedCount = 0; + + var subscriptions = new IDisposable[length]; + for (int index = 0; index < length; index++) + { + var source = sources[index]; + var observer = new WhenAllCollectionObserver(this); + subscriptions[index] = source.Subscribe(observer); + } + + return StableCompositeDisposable.CreateUnsafe(subscriptions); + } + + public override void OnNext(Unit value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + + class WhenAllCollectionObserver : IObserver + { + readonly WhenAll_ parent; + bool isCompleted = false; + + public WhenAllCollectionObserver(WhenAll_ parent) + { + this.parent = parent; + } + + public void OnNext(Unit value) + { + } + + public void OnError(Exception error) + { + lock (parent.gate) + { + if (!isCompleted) + { + parent.OnError(error); + } + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + if (!isCompleted) + { + isCompleted = true; + parent.completedCount++; + if (parent.completedCount == parent.length) + { + parent.OnNext(Unit.Default); + parent.OnCompleted(); + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/WhenAll.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/WhenAll.cs.meta new file mode 100644 index 0000000..4d47c87 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/WhenAll.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0af8ada83db8f8a408ee6e9aa994fbbd +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Where.cs b/Assets/Plugins/UniRx/Scripts/Operators/Where.cs new file mode 100644 index 0000000..9faf62d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Where.cs @@ -0,0 +1,147 @@ +using System; + +namespace UniRx.Operators +{ + internal class WhereObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Func predicate; + readonly Func predicateWithIndex; + + public WhereObservable(IObservable source, Func predicate) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.predicate = predicate; + } + + public WhereObservable(IObservable source, Func predicateWithIndex) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.predicateWithIndex = predicateWithIndex; + } + + // Optimize for .Where().Where() + + public IObservable CombinePredicate(Func combinePredicate) + { + if (this.predicate != null) + { + return new WhereObservable(source, x => this.predicate(x) && combinePredicate(x)); + } + else + { + return new WhereObservable(this, combinePredicate); + } + } + + // Optimize for .Where().Select() + + public IObservable CombineSelector(Func selector) + { + if (this.predicate != null) + { + return new WhereSelectObservable(source, predicate, selector); + } + else + { + return new SelectObservable(this, selector); // can't combine + } + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + if (predicate != null) + { + return source.Subscribe(new Where(this, observer, cancel)); + } + else + { + return source.Subscribe(new Where_(this, observer, cancel)); + } + } + + class Where : OperatorObserverBase + { + readonly WhereObservable parent; + + public Where(WhereObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public override void OnNext(T value) + { + var isPassed = false; + try + { + isPassed = parent.predicate(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + + if (isPassed) + { + observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + class Where_ : OperatorObserverBase + { + readonly WhereObservable parent; + int index; + + public Where_(WhereObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + this.index = 0; + } + + public override void OnNext(T value) + { + var isPassed = false; + try + { + isPassed = parent.predicateWithIndex(value, index++); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + + if (isPassed) + { + observer.OnNext(value); + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Where.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Where.cs.meta new file mode 100644 index 0000000..b440e73 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Where.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a035699dbe9572548afa47c460bad078 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/WhereSelect.cs b/Assets/Plugins/UniRx/Scripts/Operators/WhereSelect.cs new file mode 100644 index 0000000..72493ff --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/WhereSelect.cs @@ -0,0 +1,77 @@ +using System; + +namespace UniRx.Operators +{ + // Optimize for .Where().Select() + + internal class WhereSelectObservable : OperatorObservableBase + { + readonly IObservable source; + readonly Func predicate; + readonly Func selector; + + public WhereSelectObservable(IObservable source, Func predicate, Func selector) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.predicate = predicate; + this.selector = selector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return source.Subscribe(new WhereSelect(this, observer, cancel)); + } + + class WhereSelect : OperatorObserverBase + { + readonly WhereSelectObservable parent; + + public WhereSelect(WhereSelectObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public override void OnNext(T value) + { + var isPassed = false; + try + { + isPassed = parent.predicate(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + + if (isPassed) + { + var v = default(TR); + try + { + v = parent.selector(value); + } + catch (Exception ex) + { + try { observer.OnError(ex); } finally { Dispose(); } + return; + } + + observer.OnNext(v); + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/WhereSelect.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/WhereSelect.cs.meta new file mode 100644 index 0000000..55d0c46 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/WhereSelect.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f7453a184d42aa34c854977496f381b9 +timeCreated: 1468743755 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/WithLatestFrom.cs b/Assets/Plugins/UniRx/Scripts/Operators/WithLatestFrom.cs new file mode 100644 index 0000000..47d7d25 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/WithLatestFrom.cs @@ -0,0 +1,149 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniRx.Operators +{ + internal class WithLatestFromObservable : OperatorObservableBase + { + readonly IObservable left; + readonly IObservable right; + readonly Func selector; + + public WithLatestFromObservable(IObservable left, IObservable right, Func selector) + : base(left.IsRequiredSubscribeOnCurrentThread() || right.IsRequiredSubscribeOnCurrentThread()) + { + this.left = left; + this.right = right; + this.selector = selector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new WithLatestFrom(this, observer, cancel).Run(); + } + + class WithLatestFrom : OperatorObserverBase + { + readonly WithLatestFromObservable parent; + readonly object gate = new object(); + + volatile bool hasLatest; + TRight latestValue = default(TRight); + + public WithLatestFrom(WithLatestFromObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + var l = parent.left.Subscribe(new LeftObserver(this)); + var rSubscription = new SingleAssignmentDisposable(); + rSubscription.Disposable = parent.right.Subscribe(new RightObserver(this, rSubscription)); + + return StableCompositeDisposable.Create(l, rSubscription); + } + + public override void OnNext(TResult value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + + class LeftObserver : IObserver + { + readonly WithLatestFrom parent; + + public LeftObserver(WithLatestFrom parent) + { + this.parent = parent; + } + + public void OnNext(TLeft value) + { + if (parent.hasLatest) + { + var result = default(TResult); + try + { + result = parent.parent.selector(value, parent.latestValue); + } + catch (Exception ex) + { + lock (parent.gate) + { + parent.OnError(ex); + } + return; + } + + lock (parent.gate) + { + parent.OnNext(result); + } + } + } + + public void OnError(Exception error) + { + lock (parent.gate) + { + parent.OnError(error); + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + parent.OnCompleted(); + } + } + } + + class RightObserver : IObserver + { + readonly WithLatestFrom parent; + readonly IDisposable selfSubscription; + + public RightObserver(WithLatestFrom parent, IDisposable subscription) + { + this.parent = parent; + this.selfSubscription = subscription; + } + + public void OnNext(TRight value) + { + parent.latestValue = value; + parent.hasLatest = true; + } + + public void OnError(Exception error) + { + lock (parent.gate) + { + parent.OnError(error); + } + } + + public void OnCompleted() + { + selfSubscription.Dispose(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/WithLatestFrom.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/WithLatestFrom.cs.meta new file mode 100644 index 0000000..f94c77c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/WithLatestFrom.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: eb0bc7125d343ed45bb7e36ff1a53362 +timeCreated: 1455373902 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Zip.cs b/Assets/Plugins/UniRx/Scripts/Operators/Zip.cs new file mode 100644 index 0000000..1d66edc --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Zip.cs @@ -0,0 +1,1004 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + public delegate TR ZipFunc(T1 arg1, T2 arg2, T3 arg3); + public delegate TR ZipFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4); + public delegate TR ZipFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); + public delegate TR ZipFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6); + public delegate TR ZipFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7); + + // binary + internal class ZipObservable : OperatorObservableBase + { + readonly IObservable left; + readonly IObservable right; + readonly Func selector; + + public ZipObservable(IObservable left, IObservable right, Func selector) + : base(left.IsRequiredSubscribeOnCurrentThread() || right.IsRequiredSubscribeOnCurrentThread()) + { + this.left = left; + this.right = right; + this.selector = selector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Zip(this, observer, cancel).Run(); + } + + class Zip : OperatorObserverBase + { + readonly ZipObservable parent; + + readonly object gate = new object(); + readonly Queue leftQ = new Queue(); + bool leftCompleted = false; + readonly Queue rightQ = new Queue(); + bool rightCompleted = false; + + public Zip(ZipObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + var l = parent.left.Subscribe(new LeftZipObserver(this)); + var r = parent.right.Subscribe(new RightZipObserver(this)); + + return StableCompositeDisposable.Create(l, r, Disposable.Create(() => + { + lock (gate) + { + leftQ.Clear(); + rightQ.Clear(); + } + })); + } + + // dequeue is in the lock + void Dequeue() + { + TLeft lv; + TRight rv; + TResult v; + + if (leftQ.Count != 0 && rightQ.Count != 0) + { + lv = leftQ.Dequeue(); + rv = rightQ.Dequeue(); + } + else if (leftCompleted || rightCompleted) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + else + { + return; + } + + try + { + v = parent.selector(lv, rv); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + OnNext(v); + } + + public override void OnNext(TResult value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + + class LeftZipObserver : IObserver + { + readonly Zip parent; + + public LeftZipObserver(Zip parent) + { + this.parent = parent; + } + + public void OnNext(TLeft value) + { + lock (parent.gate) + { + parent.leftQ.Enqueue(value); + parent.Dequeue(); + } + } + + public void OnError(Exception ex) + { + lock (parent.gate) + { + parent.OnError(ex); + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + parent.leftCompleted = true; + if (parent.rightCompleted) parent.OnCompleted(); + } + } + } + + class RightZipObserver : IObserver + { + readonly Zip parent; + + public RightZipObserver(Zip parent) + { + this.parent = parent; + } + + public void OnNext(TRight value) + { + lock (parent.gate) + { + parent.rightQ.Enqueue(value); + parent.Dequeue(); + } + } + + public void OnError(Exception ex) + { + lock (parent.gate) + { + parent.OnError(ex); + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + parent.rightCompleted = true; + if (parent.leftCompleted) parent.OnCompleted(); + } + } + } + } + } + + // array + internal class ZipObservable : OperatorObservableBase> + { + readonly IObservable[] sources; + + public ZipObservable(IObservable[] sources) + : base(true) + { + this.sources = sources; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + return new Zip(this, observer, cancel).Run(); + } + + class Zip : OperatorObserverBase, IList> + { + readonly ZipObservable parent; + readonly object gate = new object(); + + Queue[] queues; + bool[] isDone; + int length; + + public Zip(ZipObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + length = parent.sources.Length; + queues = new Queue[length]; + isDone = new bool[length]; + + for (int i = 0; i < length; i++) + { + queues[i] = new Queue(); + } + + var disposables = new IDisposable[length + 1]; + for (int i = 0; i < length; i++) + { + var source = parent.sources[i]; + disposables[i] = source.Subscribe(new ZipObserver(this, i)); + } + + disposables[length] = Disposable.Create(() => + { + lock (gate) + { + for (int i = 0; i < length; i++) + { + var q = queues[i]; + q.Clear(); + } + } + }); + + return StableCompositeDisposable.CreateUnsafe(disposables); + } + + // dequeue is in the lock + void Dequeue(int index) + { + var allQueueHasValue = true; + for (int i = 0; i < length; i++) + { + if (queues[i].Count == 0) + { + allQueueHasValue = false; + break; + } + } + + if (!allQueueHasValue) + { + var allCompletedWithoutSelf = true; + for (int i = 0; i < length; i++) + { + if (i == index) continue; + if (!isDone[i]) + { + allCompletedWithoutSelf = false; + break; + } + } + + if (allCompletedWithoutSelf) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + else + { + return; + } + } + + var array = new T[length]; + for (int i = 0; i < length; i++) + { + array[i] = queues[i].Dequeue(); + } + + OnNext(array); + } + + public override void OnNext(IList value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + + class ZipObserver : IObserver + { + readonly Zip parent; + readonly int index; + + public ZipObserver(Zip parent, int index) + { + this.parent = parent; + this.index = index; + } + + public void OnNext(T value) + { + lock (parent.gate) + { + parent.queues[index].Enqueue(value); + parent.Dequeue(index); + } + } + + public void OnError(Exception ex) + { + lock (parent.gate) + { + parent.OnError(ex); + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + parent.isDone[index] = true; + var allTrue = true; + for (int i = 0; i < parent.length; i++) + { + if (!parent.isDone[i]) + { + allTrue = false; + break; + } + } + + if (allTrue) + { + parent.OnCompleted(); + } + } + } + } + } + } + + // Generated from UniRx.Console.ZipGenerator.tt + #region NTH + + internal class ZipObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + ZipFunc resultSelector; + + public ZipObservable( + IObservable source1, + IObservable source2, + IObservable source3, + ZipFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Zip(this, observer, cancel).Run(); + } + + class Zip : NthZipObserverBase + { + readonly ZipObservable parent; + readonly object gate = new object(); + readonly Queue q1 = new Queue(); + readonly Queue q2 = new Queue(); + readonly Queue q3 = new Queue(); + + public Zip(ZipObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + base.SetQueue(new System.Collections.ICollection[] { q1, q2, q3 }); + var s1 = parent.source1.Subscribe(new ZipObserver(gate, this, 0, q1)); + var s2 = parent.source2.Subscribe(new ZipObserver(gate, this, 1, q2)); + var s3 = parent.source3.Subscribe(new ZipObserver(gate, this, 2, q3)); + + return StableCompositeDisposable.Create(s1, s2, s3, Disposable.Create(() => + { + lock (gate) + { + q1.Clear(); q2.Clear(); q3.Clear(); + } + })); + } + + public override TR GetResult() + { + return parent.resultSelector(q1.Dequeue(), q2.Dequeue(), q3.Dequeue()); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + + internal class ZipObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + IObservable source4; + ZipFunc resultSelector; + + public ZipObservable( + IObservable source1, + IObservable source2, + IObservable source3, + IObservable source4, + ZipFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + source4.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Zip(this, observer, cancel).Run(); + } + + class Zip : NthZipObserverBase + { + readonly ZipObservable parent; + readonly object gate = new object(); + readonly Queue q1 = new Queue(); + readonly Queue q2 = new Queue(); + readonly Queue q3 = new Queue(); + readonly Queue q4 = new Queue(); + + public Zip(ZipObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + base.SetQueue(new System.Collections.ICollection[] { q1, q2, q3, q4 }); + var s1 = parent.source1.Subscribe(new ZipObserver(gate, this, 0, q1)); + var s2 = parent.source2.Subscribe(new ZipObserver(gate, this, 1, q2)); + var s3 = parent.source3.Subscribe(new ZipObserver(gate, this, 2, q3)); + var s4 = parent.source4.Subscribe(new ZipObserver(gate, this, 3, q4)); + + return StableCompositeDisposable.Create(s1, s2, s3, s4, Disposable.Create(() => + { + lock (gate) + { + q1.Clear(); q2.Clear(); q3.Clear(); q4.Clear(); + } + })); + } + + public override TR GetResult() + { + return parent.resultSelector(q1.Dequeue(), q2.Dequeue(), q3.Dequeue(), q4.Dequeue()); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + + internal class ZipObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + IObservable source4; + IObservable source5; + ZipFunc resultSelector; + + public ZipObservable( + IObservable source1, + IObservable source2, + IObservable source3, + IObservable source4, + IObservable source5, + ZipFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + source4.IsRequiredSubscribeOnCurrentThread() || + source5.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Zip(this, observer, cancel).Run(); + } + + class Zip : NthZipObserverBase + { + readonly ZipObservable parent; + readonly object gate = new object(); + readonly Queue q1 = new Queue(); + readonly Queue q2 = new Queue(); + readonly Queue q3 = new Queue(); + readonly Queue q4 = new Queue(); + readonly Queue q5 = new Queue(); + + public Zip(ZipObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + base.SetQueue(new System.Collections.ICollection[] { q1, q2, q3, q4, q5 }); + var s1 = parent.source1.Subscribe(new ZipObserver(gate, this, 0, q1)); + var s2 = parent.source2.Subscribe(new ZipObserver(gate, this, 1, q2)); + var s3 = parent.source3.Subscribe(new ZipObserver(gate, this, 2, q3)); + var s4 = parent.source4.Subscribe(new ZipObserver(gate, this, 3, q4)); + var s5 = parent.source5.Subscribe(new ZipObserver(gate, this, 4, q5)); + + return StableCompositeDisposable.Create(s1, s2, s3, s4, s5, Disposable.Create(() => + { + lock (gate) + { + q1.Clear(); q2.Clear(); q3.Clear(); q4.Clear(); q5.Clear(); + } + })); + } + + public override TR GetResult() + { + return parent.resultSelector(q1.Dequeue(), q2.Dequeue(), q3.Dequeue(), q4.Dequeue(), q5.Dequeue()); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + + internal class ZipObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + IObservable source4; + IObservable source5; + IObservable source6; + ZipFunc resultSelector; + + public ZipObservable( + IObservable source1, + IObservable source2, + IObservable source3, + IObservable source4, + IObservable source5, + IObservable source6, + ZipFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + source4.IsRequiredSubscribeOnCurrentThread() || + source5.IsRequiredSubscribeOnCurrentThread() || + source6.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Zip(this, observer, cancel).Run(); + } + + class Zip : NthZipObserverBase + { + readonly ZipObservable parent; + readonly object gate = new object(); + readonly Queue q1 = new Queue(); + readonly Queue q2 = new Queue(); + readonly Queue q3 = new Queue(); + readonly Queue q4 = new Queue(); + readonly Queue q5 = new Queue(); + readonly Queue q6 = new Queue(); + + public Zip(ZipObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + base.SetQueue(new System.Collections.ICollection[] { q1, q2, q3, q4, q5, q6 }); + var s1 = parent.source1.Subscribe(new ZipObserver(gate, this, 0, q1)); + var s2 = parent.source2.Subscribe(new ZipObserver(gate, this, 1, q2)); + var s3 = parent.source3.Subscribe(new ZipObserver(gate, this, 2, q3)); + var s4 = parent.source4.Subscribe(new ZipObserver(gate, this, 3, q4)); + var s5 = parent.source5.Subscribe(new ZipObserver(gate, this, 4, q5)); + var s6 = parent.source6.Subscribe(new ZipObserver(gate, this, 5, q6)); + + return StableCompositeDisposable.Create(s1, s2, s3, s4, s5, s6, Disposable.Create(() => + { + lock (gate) + { + q1.Clear(); q2.Clear(); q3.Clear(); q4.Clear(); q5.Clear(); q6.Clear(); + } + })); + } + + public override TR GetResult() + { + return parent.resultSelector(q1.Dequeue(), q2.Dequeue(), q3.Dequeue(), q4.Dequeue(), q5.Dequeue(), q6.Dequeue()); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + + internal class ZipObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + IObservable source4; + IObservable source5; + IObservable source6; + IObservable source7; + ZipFunc resultSelector; + + public ZipObservable( + IObservable source1, + IObservable source2, + IObservable source3, + IObservable source4, + IObservable source5, + IObservable source6, + IObservable source7, + ZipFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + source4.IsRequiredSubscribeOnCurrentThread() || + source5.IsRequiredSubscribeOnCurrentThread() || + source6.IsRequiredSubscribeOnCurrentThread() || + source7.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new Zip(this, observer, cancel).Run(); + } + + class Zip : NthZipObserverBase + { + readonly ZipObservable parent; + readonly object gate = new object(); + readonly Queue q1 = new Queue(); + readonly Queue q2 = new Queue(); + readonly Queue q3 = new Queue(); + readonly Queue q4 = new Queue(); + readonly Queue q5 = new Queue(); + readonly Queue q6 = new Queue(); + readonly Queue q7 = new Queue(); + + public Zip(ZipObservable parent, IObserver observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + base.SetQueue(new System.Collections.ICollection[] { q1, q2, q3, q4, q5, q6, q7 }); + var s1 = parent.source1.Subscribe(new ZipObserver(gate, this, 0, q1)); + var s2 = parent.source2.Subscribe(new ZipObserver(gate, this, 1, q2)); + var s3 = parent.source3.Subscribe(new ZipObserver(gate, this, 2, q3)); + var s4 = parent.source4.Subscribe(new ZipObserver(gate, this, 3, q4)); + var s5 = parent.source5.Subscribe(new ZipObserver(gate, this, 4, q5)); + var s6 = parent.source6.Subscribe(new ZipObserver(gate, this, 5, q6)); + var s7 = parent.source7.Subscribe(new ZipObserver(gate, this, 6, q7)); + + return StableCompositeDisposable.Create(s1, s2, s3, s4, s5, s6, s7, Disposable.Create(() => + { + lock (gate) + { + q1.Clear(); q2.Clear(); q3.Clear(); q4.Clear(); q5.Clear(); q6.Clear(); q7.Clear(); + } + })); + } + + public override TR GetResult() + { + return parent.resultSelector(q1.Dequeue(), q2.Dequeue(), q3.Dequeue(), q4.Dequeue(), q5.Dequeue(), q6.Dequeue(), q7.Dequeue()); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + #endregion + + // Nth infrastructure + + internal interface IZipObservable + { + void Dequeue(int index); + void Fail(Exception error); + void Done(int index); + } + + internal abstract class NthZipObserverBase : OperatorObserverBase, IZipObservable + { + System.Collections.ICollection[] queues; + bool[] isDone; + int length; + + public NthZipObserverBase(IObserver observer, IDisposable cancel) : base(observer, cancel) + { + } + + protected void SetQueue(System.Collections.ICollection[] queues) + { + this.queues = queues; + this.length = queues.Length; + this.isDone = new bool[length]; + } + + public abstract T GetResult(); + + // operators in lock + public void Dequeue(int index) + { + var allQueueHasValue = true; + for (int i = 0; i < length; i++) + { + if (queues[i].Count == 0) + { + allQueueHasValue = false; + break; + } + } + + if (!allQueueHasValue) + { + var allCompletedWithoutSelf = true; + for (int i = 0; i < length; i++) + { + if (i == index) continue; + if (!isDone[i]) + { + allCompletedWithoutSelf = false; + break; + } + } + + if (allCompletedWithoutSelf) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + else + { + return; + } + } + + var result = default(T); + try + { + result = GetResult(); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + OnNext(result); + } + + public void Done(int index) + { + isDone[index] = true; + var allTrue = true; + for (int i = 0; i < length; i++) + { + if (!isDone[i]) + { + allTrue = false; + break; + } + } + + if (allTrue) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + + public void Fail(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + } + + + // nth + internal class ZipObserver : IObserver + { + readonly object gate; + readonly IZipObservable parent; + readonly int index; + readonly Queue queue; + + public ZipObserver(object gate, IZipObservable parent, int index, Queue queue) + { + this.gate = gate; + this.parent = parent; + this.index = index; + this.queue = queue; + } + + public void OnNext(T value) + { + lock (gate) + { + queue.Enqueue(value); + parent.Dequeue(index); + } + } + + public void OnError(Exception error) + { + lock (gate) + { + parent.Fail(error); + } + } + + public void OnCompleted() + { + lock (gate) + { + parent.Done(index); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Zip.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Zip.cs.meta new file mode 100644 index 0000000..f394fdf --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/Zip.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4e92e25f9bb221d478d4af5bcd8b8a2c +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ZipLatest.cs b/Assets/Plugins/UniRx/Scripts/Operators/ZipLatest.cs new file mode 100644 index 0000000..424d421 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ZipLatest.cs @@ -0,0 +1,992 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UniRx.Operators +{ + public delegate TR ZipLatestFunc(T1 arg1, T2 arg2, T3 arg3); + public delegate TR ZipLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4); + public delegate TR ZipLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); + public delegate TR ZipLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6); + public delegate TR ZipLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7); + + // binary + internal class ZipLatestObservable : OperatorObservableBase + { + readonly IObservable left; + readonly IObservable right; + readonly Func selector; + + public ZipLatestObservable(IObservable left, IObservable right, Func selector) + : base(left.IsRequiredSubscribeOnCurrentThread() || right.IsRequiredSubscribeOnCurrentThread()) + { + this.left = left; + this.right = right; + this.selector = selector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new ZipLatest(this, observer, cancel).Run(); + } + + class ZipLatest : OperatorObserverBase + { + readonly ZipLatestObservable parent; + readonly object gate = new object(); + + TLeft leftValue = default(TLeft); + bool leftStarted = false; + bool leftCompleted = false; + + TRight rightValue = default(TRight); + bool rightStarted = false; + bool rightCompleted = false; + + public ZipLatest(ZipLatestObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + var l = parent.left.Subscribe(new LeftObserver(this)); + var r = parent.right.Subscribe(new RightObserver(this)); + + return StableCompositeDisposable.Create(l, r); + } + + // publish in lock + public void Publish() + { + if ((leftCompleted && !leftStarted) || (rightCompleted && !rightStarted)) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + else if (!(leftStarted && rightStarted)) + { + return; + } + + TResult v; + try + { + v = parent.selector(leftValue, rightValue); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + + OnNext(v); + leftStarted = false; + rightStarted = false; + + if (leftCompleted || rightCompleted) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + } + + public override void OnNext(TResult value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + + class LeftObserver : IObserver + { + readonly ZipLatest parent; + + public LeftObserver(ZipLatest parent) + { + this.parent = parent; + } + + public void OnNext(TLeft value) + { + lock (parent.gate) + { + parent.leftStarted = true; + parent.leftValue = value; + parent.Publish(); + } + } + + public void OnError(Exception error) + { + lock (parent.gate) + { + parent.OnError(error); + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + parent.leftCompleted = true; + if (parent.rightCompleted) parent.OnCompleted(); + } + } + } + + class RightObserver : IObserver + { + readonly ZipLatest parent; + + public RightObserver(ZipLatest parent) + { + this.parent = parent; + } + + + public void OnNext(TRight value) + { + lock (parent.gate) + { + parent.rightStarted = true; + parent.rightValue = value; + parent.Publish(); + } + } + + public void OnError(Exception error) + { + lock (parent.gate) + { + parent.OnError(error); + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + parent.rightCompleted = true; + if (parent.leftCompleted) parent.OnCompleted(); + } + } + } + } + } + + // array + internal class ZipLatestObservable : OperatorObservableBase> + { + readonly IObservable[] sources; + + public ZipLatestObservable(IObservable[] sources) + : base(true) + { + this.sources = sources; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + return new ZipLatest(this, observer, cancel).Run(); + } + + class ZipLatest : OperatorObserverBase, IList> + { + readonly ZipLatestObservable parent; + readonly object gate = new object(); + + int length; + T[] values; + bool[] isStarted; + bool[] isCompleted; + + public ZipLatest(ZipLatestObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + length = parent.sources.Length; + values = new T[length]; + isStarted = new bool[length]; + isCompleted = new bool[length]; + + var disposables = new IDisposable[length]; + for (int i = 0; i < length; i++) + { + var source = parent.sources[i]; + disposables[i] = source.Subscribe(new ZipLatestObserver(this, i)); + } + + return StableCompositeDisposable.CreateUnsafe(disposables); + } + + // publish is in the lock + void Publish(int index) + { + isStarted[index] = true; + + var hasOnCompleted = false; + var allValueStarted = true; + for (int i = 0; i < length; i++) + { + if (!isStarted[i]) + { + allValueStarted = false; + break; + } + if (i == index) continue; + if (isCompleted[i]) hasOnCompleted = true; + } + + if (allValueStarted) + { + OnNext(new List(values)); + if (hasOnCompleted) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + else + { + Array.Clear(isStarted, 0, length); // reset + return; + } + } + else + { + for (int i = 0; i < length; i++) + { + if (i == index) continue; + if (isCompleted[i] && !isStarted[i]) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + } + } + } + + public override void OnNext(IList value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + + class ZipLatestObserver : IObserver + { + readonly ZipLatest parent; + readonly int index; + + public ZipLatestObserver(ZipLatest parent, int index) + { + this.parent = parent; + this.index = index; + } + + public void OnNext(T value) + { + lock (parent.gate) + { + parent.values[index] = value; + parent.Publish(index); + } + } + + public void OnError(Exception ex) + { + lock (parent.gate) + { + parent.OnError(ex); + } + } + + public void OnCompleted() + { + lock (parent.gate) + { + parent.isCompleted[index] = true; + + var allTrue = true; + for (int i = 0; i < parent.length; i++) + { + if (!parent.isCompleted[i]) + { + allTrue = false; + break; + } + } + + if (allTrue) + { + parent.OnCompleted(); + } + } + } + } + } + } + + // generated from UniRx.Console.ZipLatestGenerator.tt + #region NTH + + internal class ZipLatestObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + ZipLatestFunc resultSelector; + + public ZipLatestObservable( + IObservable source1, + IObservable source2, + IObservable source3, + ZipLatestFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new ZipLatest(3, this, observer, cancel).Run(); + } + + class ZipLatest : NthZipLatestObserverBase + { + readonly ZipLatestObservable parent; + readonly object gate = new object(); + ZipLatestObserver c1; + ZipLatestObserver c2; + ZipLatestObserver c3; + + public ZipLatest(int length, ZipLatestObservable parent, IObserver observer, IDisposable cancel) + : base(length, observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + c1 = new ZipLatestObserver(gate, this, 0); + c2 = new ZipLatestObserver(gate, this, 1); + c3 = new ZipLatestObserver(gate, this, 2); + + var s1 = parent.source1.Subscribe(c1); + var s2 = parent.source2.Subscribe(c2); + var s3 = parent.source3.Subscribe(c3); + + return StableCompositeDisposable.Create(s1, s2, s3); + } + + public override TR GetResult() + { + return parent.resultSelector(c1.Value, c2.Value, c3.Value); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + + internal class ZipLatestObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + IObservable source4; + ZipLatestFunc resultSelector; + + public ZipLatestObservable( + IObservable source1, + IObservable source2, + IObservable source3, + IObservable source4, + ZipLatestFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + source4.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new ZipLatest(4, this, observer, cancel).Run(); + } + + class ZipLatest : NthZipLatestObserverBase + { + readonly ZipLatestObservable parent; + readonly object gate = new object(); + ZipLatestObserver c1; + ZipLatestObserver c2; + ZipLatestObserver c3; + ZipLatestObserver c4; + + public ZipLatest(int length, ZipLatestObservable parent, IObserver observer, IDisposable cancel) + : base(length, observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + c1 = new ZipLatestObserver(gate, this, 0); + c2 = new ZipLatestObserver(gate, this, 1); + c3 = new ZipLatestObserver(gate, this, 2); + c4 = new ZipLatestObserver(gate, this, 3); + + var s1 = parent.source1.Subscribe(c1); + var s2 = parent.source2.Subscribe(c2); + var s3 = parent.source3.Subscribe(c3); + var s4 = parent.source4.Subscribe(c4); + + return StableCompositeDisposable.Create(s1, s2, s3, s4); + } + + public override TR GetResult() + { + return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + + internal class ZipLatestObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + IObservable source4; + IObservable source5; + ZipLatestFunc resultSelector; + + public ZipLatestObservable( + IObservable source1, + IObservable source2, + IObservable source3, + IObservable source4, + IObservable source5, + ZipLatestFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + source4.IsRequiredSubscribeOnCurrentThread() || + source5.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new ZipLatest(5, this, observer, cancel).Run(); + } + + class ZipLatest : NthZipLatestObserverBase + { + readonly ZipLatestObservable parent; + readonly object gate = new object(); + ZipLatestObserver c1; + ZipLatestObserver c2; + ZipLatestObserver c3; + ZipLatestObserver c4; + ZipLatestObserver c5; + + public ZipLatest(int length, ZipLatestObservable parent, IObserver observer, IDisposable cancel) + : base(length, observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + c1 = new ZipLatestObserver(gate, this, 0); + c2 = new ZipLatestObserver(gate, this, 1); + c3 = new ZipLatestObserver(gate, this, 2); + c4 = new ZipLatestObserver(gate, this, 3); + c5 = new ZipLatestObserver(gate, this, 4); + + var s1 = parent.source1.Subscribe(c1); + var s2 = parent.source2.Subscribe(c2); + var s3 = parent.source3.Subscribe(c3); + var s4 = parent.source4.Subscribe(c4); + var s5 = parent.source5.Subscribe(c5); + + return StableCompositeDisposable.Create(s1, s2, s3, s4, s5); + } + + public override TR GetResult() + { + return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value, c5.Value); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + + internal class ZipLatestObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + IObservable source4; + IObservable source5; + IObservable source6; + ZipLatestFunc resultSelector; + + public ZipLatestObservable( + IObservable source1, + IObservable source2, + IObservable source3, + IObservable source4, + IObservable source5, + IObservable source6, + ZipLatestFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + source4.IsRequiredSubscribeOnCurrentThread() || + source5.IsRequiredSubscribeOnCurrentThread() || + source6.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new ZipLatest(6, this, observer, cancel).Run(); + } + + class ZipLatest : NthZipLatestObserverBase + { + readonly ZipLatestObservable parent; + readonly object gate = new object(); + ZipLatestObserver c1; + ZipLatestObserver c2; + ZipLatestObserver c3; + ZipLatestObserver c4; + ZipLatestObserver c5; + ZipLatestObserver c6; + + public ZipLatest(int length, ZipLatestObservable parent, IObserver observer, IDisposable cancel) + : base(length, observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + c1 = new ZipLatestObserver(gate, this, 0); + c2 = new ZipLatestObserver(gate, this, 1); + c3 = new ZipLatestObserver(gate, this, 2); + c4 = new ZipLatestObserver(gate, this, 3); + c5 = new ZipLatestObserver(gate, this, 4); + c6 = new ZipLatestObserver(gate, this, 5); + + var s1 = parent.source1.Subscribe(c1); + var s2 = parent.source2.Subscribe(c2); + var s3 = parent.source3.Subscribe(c3); + var s4 = parent.source4.Subscribe(c4); + var s5 = parent.source5.Subscribe(c5); + var s6 = parent.source6.Subscribe(c6); + + return StableCompositeDisposable.Create(s1, s2, s3, s4, s5, s6); + } + + public override TR GetResult() + { + return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value, c5.Value, c6.Value); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + + internal class ZipLatestObservable : OperatorObservableBase + { + IObservable source1; + IObservable source2; + IObservable source3; + IObservable source4; + IObservable source5; + IObservable source6; + IObservable source7; + ZipLatestFunc resultSelector; + + public ZipLatestObservable( + IObservable source1, + IObservable source2, + IObservable source3, + IObservable source4, + IObservable source5, + IObservable source6, + IObservable source7, + ZipLatestFunc resultSelector) + : base( + source1.IsRequiredSubscribeOnCurrentThread() || + source2.IsRequiredSubscribeOnCurrentThread() || + source3.IsRequiredSubscribeOnCurrentThread() || + source4.IsRequiredSubscribeOnCurrentThread() || + source5.IsRequiredSubscribeOnCurrentThread() || + source6.IsRequiredSubscribeOnCurrentThread() || + source7.IsRequiredSubscribeOnCurrentThread() || + false) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.resultSelector = resultSelector; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new ZipLatest(7, this, observer, cancel).Run(); + } + + class ZipLatest : NthZipLatestObserverBase + { + readonly ZipLatestObservable parent; + readonly object gate = new object(); + ZipLatestObserver c1; + ZipLatestObserver c2; + ZipLatestObserver c3; + ZipLatestObserver c4; + ZipLatestObserver c5; + ZipLatestObserver c6; + ZipLatestObserver c7; + + public ZipLatest(int length, ZipLatestObservable parent, IObserver observer, IDisposable cancel) + : base(length, observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + c1 = new ZipLatestObserver(gate, this, 0); + c2 = new ZipLatestObserver(gate, this, 1); + c3 = new ZipLatestObserver(gate, this, 2); + c4 = new ZipLatestObserver(gate, this, 3); + c5 = new ZipLatestObserver(gate, this, 4); + c6 = new ZipLatestObserver(gate, this, 5); + c7 = new ZipLatestObserver(gate, this, 6); + + var s1 = parent.source1.Subscribe(c1); + var s2 = parent.source2.Subscribe(c2); + var s3 = parent.source3.Subscribe(c3); + var s4 = parent.source4.Subscribe(c4); + var s5 = parent.source5.Subscribe(c5); + var s6 = parent.source6.Subscribe(c6); + var s7 = parent.source7.Subscribe(c7); + + return StableCompositeDisposable.Create(s1, s2, s3, s4, s5, s6, s7); + } + + public override TR GetResult() + { + return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value, c5.Value, c6.Value, c7.Value); + } + + public override void OnNext(TR value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + #endregion + + // Nth infrastructure + + internal interface IZipLatestObservable + { + void Publish(int index); + void Fail(Exception error); + void Done(int index); + } + + internal abstract class NthZipLatestObserverBase : OperatorObserverBase, IZipLatestObservable + { + readonly int length; + readonly bool[] isStarted; + readonly bool[] isCompleted; + + public NthZipLatestObserverBase(int length, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.length = length; + this.isStarted = new bool[length]; + this.isCompleted = new bool[length]; + } + + public abstract T GetResult(); + + // operators in lock + public void Publish(int index) + { + isStarted[index] = true; + + var hasOnCompleted = false; + var allValueStarted = true; + for (int i = 0; i < length; i++) + { + if (!isStarted[i]) + { + allValueStarted = false; + break; + } + if (i == index) continue; + if (isCompleted[i]) hasOnCompleted = true; + } + + if (allValueStarted) + { + var result = default(T); + try + { + result = GetResult(); + } + catch (Exception ex) + { + try { observer.OnError(ex); } + finally { Dispose(); } + return; + } + OnNext(result); + + if (hasOnCompleted) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + else + { + Array.Clear(isStarted, 0, length); // reset + return; + } + } + else + { + for (int i = 0; i < length; i++) + { + if (i == index) continue; + if (isCompleted[i] && !isStarted[i]) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + return; + } + } + } + } + + public void Done(int index) + { + isCompleted[index] = true; + + var allTrue = true; + for (int i = 0; i < length; i++) + { + if (!isCompleted[i]) + { + allTrue = false; + break; + } + } + + if (allTrue) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + + public void Fail(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + } + + // Nth + internal class ZipLatestObserver : IObserver + { + readonly object gate; + readonly IZipLatestObservable parent; + readonly int index; + T value; + + public T Value { get { return value; } } + + public ZipLatestObserver(object gate, IZipLatestObservable parent, int index) + { + this.gate = gate; + this.parent = parent; + this.index = index; + } + + public void OnNext(T value) + { + lock (gate) + { + this.value = value; + parent.Publish(index); + } + } + + public void OnError(Exception error) + { + lock (gate) + { + parent.Fail(error); + } + } + + public void OnCompleted() + { + lock (gate) + { + parent.Done(index); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ZipLatest.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ZipLatest.cs.meta new file mode 100644 index 0000000..725334d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Operators/ZipLatest.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f84ea50040d682c43811d1d98ae7fec8 +timeCreated: 1455373908 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Pair.cs b/Assets/Plugins/UniRx/Scripts/Pair.cs new file mode 100644 index 0000000..f511af0 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Pair.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; + +namespace UniRx +{ + // Pair is used for Observable.Pairwise + [Serializable] + public struct Pair : IEquatable> + { + readonly T previous; + readonly T current; + + public T Previous + { + get { return previous; } + } + + public T Current + { + get { return current; } + } + + public Pair(T previous, T current) + { + this.previous = previous; + this.current = current; + } + + public override int GetHashCode() + { + var comparer = EqualityComparer.Default; + + int h0; + h0 = comparer.GetHashCode(previous); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(current); + return h0; + } + + public override bool Equals(object obj) + { + if (!(obj is Pair)) return false; + + return Equals((Pair)obj); + } + + public bool Equals(Pair other) + { + var comparer = EqualityComparer.Default; + + return comparer.Equals(previous, other.Previous) && + comparer.Equals(current, other.Current); + } + + public override string ToString() + { + return string.Format("({0}, {1})", previous, current); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Pair.cs.meta b/Assets/Plugins/UniRx/Scripts/Pair.cs.meta new file mode 100644 index 0000000..16e1017 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Pair.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7947c520dfd9de94bb381e45dc105752 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers.meta b/Assets/Plugins/UniRx/Scripts/Schedulers.meta new file mode 100644 index 0000000..97df748 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Schedulers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d89c358fca20a564a95ba820eb22b51c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/CurrentThreadScheduler.cs b/Assets/Plugins/UniRx/Scripts/Schedulers/CurrentThreadScheduler.cs new file mode 100644 index 0000000..52f1028 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Schedulers/CurrentThreadScheduler.cs @@ -0,0 +1,135 @@ +// this code is borrowed from RxOfficial(rx.codeplex.com) and modified + +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. + +using System.ComponentModel; +using System.Threading; +using UniRx.InternalUtil; +using UniRx; +using System; +using System.Diagnostics; +using System.Collections.Generic; + +namespace UniRx +{ + + public static partial class Scheduler + { + public static readonly IScheduler CurrentThread = new CurrentThreadScheduler(); + + public static bool IsCurrentThreadSchedulerScheduleRequired { get { return CurrentThreadScheduler.IsScheduleRequired; } } + + /// + /// Represents an object that schedules units of work on the current thread. + /// + /// Singleton instance of this type exposed through this static property. + class CurrentThreadScheduler : IScheduler + { + [ThreadStatic] + static SchedulerQueue s_threadLocalQueue; + + [ThreadStatic] + static Stopwatch s_clock; + + private static SchedulerQueue GetQueue() + { + return s_threadLocalQueue; + } + + private static void SetQueue(SchedulerQueue newQueue) + { + s_threadLocalQueue = newQueue; + } + + private static TimeSpan Time + { + get + { + if (s_clock == null) + s_clock = Stopwatch.StartNew(); + + return s_clock.Elapsed; + } + } + + /// + /// Gets a value that indicates whether the caller must call a Schedule method. + /// + [EditorBrowsable(EditorBrowsableState.Advanced)] + public static bool IsScheduleRequired + { + get + { + return GetQueue() == null; + } + } + + public IDisposable Schedule(Action action) + { + return Schedule(TimeSpan.Zero, action); + } + + public IDisposable Schedule(TimeSpan dueTime, Action action) + { + if (action == null) + throw new ArgumentNullException("action"); + + var dt = Time + Scheduler.Normalize(dueTime); + + var si = new ScheduledItem(action, dt); + + var queue = GetQueue(); + + if (queue == null) + { + queue = new SchedulerQueue(4); + queue.Enqueue(si); + + CurrentThreadScheduler.SetQueue(queue); + try + { + Trampoline.Run(queue); + } + finally + { + CurrentThreadScheduler.SetQueue(null); + } + } + else + { + queue.Enqueue(si); + } + + return si.Cancellation; + } + + static class Trampoline + { + public static void Run(SchedulerQueue queue) + { + while (queue.Count > 0) + { + var item = queue.Dequeue(); + if (!item.IsCanceled) + { + var wait = item.DueTime - CurrentThreadScheduler.Time; + if (wait.Ticks > 0) + { + Thread.Sleep(wait); + } + + if (!item.IsCanceled) + item.Invoke(); + } + } + } + } + + public DateTimeOffset Now + { + get { return Scheduler.Now; } + } + } + } +} + diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/CurrentThreadScheduler.cs.meta b/Assets/Plugins/UniRx/Scripts/Schedulers/CurrentThreadScheduler.cs.meta new file mode 100644 index 0000000..b8bc6a0 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Schedulers/CurrentThreadScheduler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1d547b5ee71b7284db1fecfcdfa59fac +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/IScheduler.cs b/Assets/Plugins/UniRx/Scripts/Schedulers/IScheduler.cs new file mode 100644 index 0000000..71c9e51 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Schedulers/IScheduler.cs @@ -0,0 +1,30 @@ +using System; + +namespace UniRx +{ + public interface IScheduler + { + DateTimeOffset Now { get; } + + // Interface is changed from official Rx for avoid iOS AOT problem (state is dangerous). + + IDisposable Schedule(Action action); + + IDisposable Schedule(TimeSpan dueTime, Action action); + } + + public interface ISchedulerPeriodic + { + IDisposable SchedulePeriodic(TimeSpan period, Action action); + } + + public interface ISchedulerLongRunning + { + IDisposable ScheduleLongRunning(Action action); + } + + public interface ISchedulerQueueing + { + void ScheduleQueueing(ICancelable cancel, T state, Action action); + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/IScheduler.cs.meta b/Assets/Plugins/UniRx/Scripts/Schedulers/IScheduler.cs.meta new file mode 100644 index 0000000..5551cf8 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Schedulers/IScheduler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7409b202c20d3894b9677c8f2a27f3aa +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/ImmediateScheduler.cs b/Assets/Plugins/UniRx/Scripts/Schedulers/ImmediateScheduler.cs new file mode 100644 index 0000000..b41e245 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Schedulers/ImmediateScheduler.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Threading; + +namespace UniRx +{ + public static partial class Scheduler + { + public static readonly IScheduler Immediate = new ImmediateScheduler(); + + class ImmediateScheduler : IScheduler + { + public ImmediateScheduler() + { + } + + public DateTimeOffset Now + { + get { return Scheduler.Now; } + } + + public IDisposable Schedule(Action action) + { + action(); + return Disposable.Empty; + } + + public IDisposable Schedule(TimeSpan dueTime, Action action) + { + var wait = Scheduler.Normalize(dueTime); + if (wait.Ticks > 0) + { + Thread.Sleep(wait); + } + + action(); + return Disposable.Empty; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/ImmediateScheduler.cs.meta b/Assets/Plugins/UniRx/Scripts/Schedulers/ImmediateScheduler.cs.meta new file mode 100644 index 0000000..8cad6fe --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Schedulers/ImmediateScheduler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 87be5fca34f9b44428b7fb1ce9147860 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/Scheduler.cs b/Assets/Plugins/UniRx/Scripts/Schedulers/Scheduler.cs new file mode 100644 index 0000000..a9f63a1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Schedulers/Scheduler.cs @@ -0,0 +1,235 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Threading; + +namespace UniRx +{ + // Scheduler Extension + public static partial class Scheduler + { + // configurable defaults + public static class DefaultSchedulers + { + static IScheduler constantTime; + public static IScheduler ConstantTimeOperations + { + get + { + return constantTime ?? (constantTime = Scheduler.Immediate); + } + set + { + constantTime = value; + } + } + + static IScheduler tailRecursion; + public static IScheduler TailRecursion + { + get + { + return tailRecursion ?? (tailRecursion = Scheduler.Immediate); + } + set + { + tailRecursion = value; + } + } + + static IScheduler iteration; + public static IScheduler Iteration + { + get + { + return iteration ?? (iteration = Scheduler.CurrentThread); + } + set + { + iteration = value; + } + } + + static IScheduler timeBasedOperations; + public static IScheduler TimeBasedOperations + { + get + { +#if UniRxLibrary + return timeBasedOperations ?? (timeBasedOperations = Scheduler.ThreadPool); +#else + return timeBasedOperations ?? (timeBasedOperations = Scheduler.MainThread); // MainThread as default for TimeBased Operation +#endif + } + set + { + timeBasedOperations = value; + } + } + + static IScheduler asyncConversions; + public static IScheduler AsyncConversions + { + get + { +#if WEB_GL + // WebGL does not support threadpool + return asyncConversions ?? (asyncConversions = Scheduler.MainThread); +#else + return asyncConversions ?? (asyncConversions = Scheduler.ThreadPool); +#endif + } + set + { + asyncConversions = value; + } + } + + public static void SetDotNetCompatible() + { + ConstantTimeOperations = Scheduler.Immediate; + TailRecursion = Scheduler.Immediate; + Iteration = Scheduler.CurrentThread; + TimeBasedOperations = Scheduler.ThreadPool; + AsyncConversions = Scheduler.ThreadPool; + } + } + + // utils + + public static DateTimeOffset Now + { + get { return DateTimeOffset.UtcNow; } + } + + public static TimeSpan Normalize(TimeSpan timeSpan) + { + return timeSpan >= TimeSpan.Zero ? timeSpan : TimeSpan.Zero; + } + + public static IDisposable Schedule(this IScheduler scheduler, DateTimeOffset dueTime, Action action) + { + return scheduler.Schedule(dueTime - scheduler.Now, action); + } + + public static IDisposable Schedule(this IScheduler scheduler, Action action) + { + // InvokeRec1 + var group = new CompositeDisposable(1); + var gate = new object(); + + Action recursiveAction = null; + recursiveAction = () => action(() => + { + var isAdded = false; + var isDone = false; + var d = default(IDisposable); + d = scheduler.Schedule(() => + { + lock (gate) + { + if (isAdded) + group.Remove(d); + else + isDone = true; + } + recursiveAction(); + }); + + lock (gate) + { + if (!isDone) + { + group.Add(d); + isAdded = true; + } + } + }); + + group.Add(scheduler.Schedule(recursiveAction)); + + return group; + } + + public static IDisposable Schedule(this IScheduler scheduler, TimeSpan dueTime, Action> action) + { + // InvokeRec2 + + var group = new CompositeDisposable(1); + var gate = new object(); + + Action recursiveAction = null; + recursiveAction = () => action(dt => + { + var isAdded = false; + var isDone = false; + var d = default(IDisposable); + d = scheduler.Schedule(dt, () => + { + lock (gate) + { + if (isAdded) + group.Remove(d); + else + isDone = true; + } + recursiveAction(); + }); + + lock (gate) + { + if (!isDone) + { + group.Add(d); + isAdded = true; + } + } + }); + + group.Add(scheduler.Schedule(dueTime, recursiveAction)); + + return group; + } + + public static IDisposable Schedule(this IScheduler scheduler, DateTimeOffset dueTime, Action> action) + { + // InvokeRec3 + + var group = new CompositeDisposable(1); + var gate = new object(); + + Action recursiveAction = null; + recursiveAction = () => action(dt => + { + var isAdded = false; + var isDone = false; + var d = default(IDisposable); + d = scheduler.Schedule(dt, () => + { + lock (gate) + { + if (isAdded) + group.Remove(d); + else + isDone = true; + } + recursiveAction(); + }); + + lock (gate) + { + if (!isDone) + { + group.Add(d); + isAdded = true; + } + } + }); + + group.Add(scheduler.Schedule(dueTime, recursiveAction)); + + return group; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/Scheduler.cs.meta b/Assets/Plugins/UniRx/Scripts/Schedulers/Scheduler.cs.meta new file mode 100644 index 0000000..0fabcf2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Schedulers/Scheduler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bfeb53a7ea29f714798ba6bb3bd70ba4 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/ThreadPoolScheduler.cs b/Assets/Plugins/UniRx/Scripts/Schedulers/ThreadPoolScheduler.cs new file mode 100644 index 0000000..3a12b0a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Schedulers/ThreadPoolScheduler.cs @@ -0,0 +1,197 @@ +#if !UNITY_METRO + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using UniRx.InternalUtil; + +namespace UniRx +{ + public static partial class Scheduler + { + public static readonly IScheduler ThreadPool = new ThreadPoolScheduler(); + + class ThreadPoolScheduler : IScheduler, ISchedulerPeriodic + { + public ThreadPoolScheduler() + { + } + + public DateTimeOffset Now + { + get { return Scheduler.Now; } + } + + public IDisposable Schedule(Action action) + { + var d = new BooleanDisposable(); + + System.Threading.ThreadPool.QueueUserWorkItem(_ => + { + if (!d.IsDisposed) + { + action(); + } + }); + + return d; + } + + public IDisposable Schedule(DateTimeOffset dueTime, Action action) + { + return Schedule(dueTime - Now, action); + } + + public IDisposable Schedule(TimeSpan dueTime, Action action) + { + return new Timer(dueTime, action); + } + + public IDisposable SchedulePeriodic(TimeSpan period, Action action) + { + return new PeriodicTimer(period, action); + } + + public void ScheduleQueueing(ICancelable cancel, T state, Action action) + { + System.Threading.ThreadPool.QueueUserWorkItem(callBackState => + { + if (!cancel.IsDisposed) + { + action((T)callBackState); + } + }, state); + } + + // timer was borrwed from Rx Official + + sealed class Timer : IDisposable + { + static readonly HashSet s_timers = new HashSet(); + + private readonly SingleAssignmentDisposable _disposable; + + private Action _action; + private System.Threading.Timer _timer; + + private bool _hasAdded; + private bool _hasRemoved; + + public Timer(TimeSpan dueTime, Action action) + { + _disposable = new SingleAssignmentDisposable(); + _disposable.Disposable = Disposable.Create(Unroot); + + _action = action; + _timer = new System.Threading.Timer(Tick, null, dueTime, TimeSpan.FromMilliseconds(System.Threading.Timeout.Infinite)); + + lock (s_timers) + { + if (!_hasRemoved) + { + s_timers.Add(_timer); + + _hasAdded = true; + } + } + } + + private void Tick(object state) + { + try + { + if (!_disposable.IsDisposed) + { + _action(); + } + } + finally + { + Unroot(); + } + } + + private void Unroot() + { + _action = Stubs.Nop; + + var timer = default(System.Threading.Timer); + + lock (s_timers) + { + if (!_hasRemoved) + { + timer = _timer; + _timer = null; + + if (_hasAdded && timer != null) + s_timers.Remove(timer); + + _hasRemoved = true; + } + } + + if (timer != null) + timer.Dispose(); + } + + public void Dispose() + { + _disposable.Dispose(); + } + } + + sealed class PeriodicTimer : IDisposable + { + static readonly HashSet s_timers = new HashSet(); + + private Action _action; + private System.Threading.Timer _timer; + private readonly AsyncLock _gate; + + public PeriodicTimer(TimeSpan period, Action action) + { + this._action = action; + this._timer = new System.Threading.Timer(Tick, null, period, period); + this._gate = new AsyncLock(); + + lock (s_timers) + { + s_timers.Add(_timer); + } + } + + private void Tick(object state) + { + _gate.Wait(() => + { + _action(); + }); + } + + public void Dispose() + { + var timer = default(System.Threading.Timer); + + lock (s_timers) + { + timer = _timer; + _timer = null; + + if (timer != null) + s_timers.Remove(timer); + } + + if (timer != null) + { + timer.Dispose(); + _action = Stubs.Nop; + } + } + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/ThreadPoolScheduler.cs.meta b/Assets/Plugins/UniRx/Scripts/Schedulers/ThreadPoolScheduler.cs.meta new file mode 100644 index 0000000..f748fd1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Schedulers/ThreadPoolScheduler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f8189a60f4619be489df10eca6a78fbb +timeCreated: 1455373902 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects.meta b/Assets/Plugins/UniRx/Scripts/Subjects.meta new file mode 100644 index 0000000..a36a1a2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6a034afdd0b58824b81e7ae336c75f87 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/AsyncSubject.cs b/Assets/Plugins/UniRx/Scripts/Subjects/AsyncSubject.cs new file mode 100644 index 0000000..98b3086 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects/AsyncSubject.cs @@ -0,0 +1,328 @@ +using System; +using System.Collections.Generic; +using UniRx.InternalUtil; + +#if (NET_4_6 || NET_STANDARD_2_0) +using System.Runtime.CompilerServices; +using System.Threading; +#endif + +namespace UniRx +{ + public sealed class AsyncSubject : ISubject, IOptimizedObservable, IDisposable +#if (NET_4_6 || NET_STANDARD_2_0) + , INotifyCompletion +#endif + { + object observerLock = new object(); + + T lastValue; + bool hasValue; + bool isStopped; + bool isDisposed; + Exception lastError; + IObserver outObserver = EmptyObserver.Instance; + + public T Value + { + get + { + ThrowIfDisposed(); + if (!isStopped) throw new InvalidOperationException("AsyncSubject is not completed yet"); + if (lastError != null) lastError.Throw(); + return lastValue; + } + } + + public bool HasObservers + { + get + { + return !(outObserver is EmptyObserver) && !isStopped && !isDisposed; + } + } + + public bool IsCompleted { get { return isStopped; } } + + public void OnCompleted() + { + IObserver old; + T v; + bool hv; + lock (observerLock) + { + ThrowIfDisposed(); + if (isStopped) return; + + old = outObserver; + outObserver = EmptyObserver.Instance; + isStopped = true; + v = lastValue; + hv = hasValue; + } + + if (hv) + { + old.OnNext(v); + old.OnCompleted(); + } + else + { + old.OnCompleted(); + } + } + + public void OnError(Exception error) + { + if (error == null) throw new ArgumentNullException("error"); + + IObserver old; + lock (observerLock) + { + ThrowIfDisposed(); + if (isStopped) return; + + old = outObserver; + outObserver = EmptyObserver.Instance; + isStopped = true; + lastError = error; + } + + old.OnError(error); + } + + public void OnNext(T value) + { + lock (observerLock) + { + ThrowIfDisposed(); + if (isStopped) return; + + this.hasValue = true; + this.lastValue = value; + } + } + + public IDisposable Subscribe(IObserver observer) + { + if (observer == null) throw new ArgumentNullException("observer"); + + var ex = default(Exception); + var v = default(T); + var hv = false; + + lock (observerLock) + { + ThrowIfDisposed(); + if (!isStopped) + { + var listObserver = outObserver as ListObserver; + if (listObserver != null) + { + outObserver = listObserver.Add(observer); + } + else + { + var current = outObserver; + if (current is EmptyObserver) + { + outObserver = observer; + } + else + { + outObserver = new ListObserver(new ImmutableList>(new[] { current, observer })); + } + } + + return new Subscription(this, observer); + } + + ex = lastError; + v = lastValue; + hv = hasValue; + } + + if (ex != null) + { + observer.OnError(ex); + } + else if (hv) + { + observer.OnNext(v); + observer.OnCompleted(); + } + else + { + observer.OnCompleted(); + } + + return Disposable.Empty; + } + + public void Dispose() + { + lock (observerLock) + { + isDisposed = true; + outObserver = DisposedObserver.Instance; + lastError = null; + lastValue = default(T); + } + } + + void ThrowIfDisposed() + { + if (isDisposed) throw new ObjectDisposedException(""); + } + + public bool IsRequiredSubscribeOnCurrentThread() + { + return false; + } + + class Subscription : IDisposable + { + readonly object gate = new object(); + AsyncSubject parent; + IObserver unsubscribeTarget; + + public Subscription(AsyncSubject parent, IObserver unsubscribeTarget) + { + this.parent = parent; + this.unsubscribeTarget = unsubscribeTarget; + } + + public void Dispose() + { + lock (gate) + { + if (parent != null) + { + lock (parent.observerLock) + { + var listObserver = parent.outObserver as ListObserver; + if (listObserver != null) + { + parent.outObserver = listObserver.Remove(unsubscribeTarget); + } + else + { + parent.outObserver = EmptyObserver.Instance; + } + + unsubscribeTarget = null; + parent = null; + } + } + } + } + } + + +#if (NET_4_6 || NET_STANDARD_2_0) + + /// + /// Gets an awaitable object for the current AsyncSubject. + /// + /// Object that can be awaited. + public AsyncSubject GetAwaiter() + { + return this; + } + + /// + /// Specifies a callback action that will be invoked when the subject completes. + /// + /// Callback action that will be invoked when the subject completes. + /// is null. + public void OnCompleted(Action continuation) + { + if (continuation == null) + throw new ArgumentNullException("continuation"); + + OnCompleted(continuation, true); + } + + void OnCompleted(Action continuation, bool originalContext) + { + // + // [OK] Use of unsafe Subscribe: this type's Subscribe implementation is safe. + // + this.Subscribe/*Unsafe*/(new AwaitObserver(continuation, originalContext)); + } + + class AwaitObserver : IObserver + { + private readonly SynchronizationContext _context; + private readonly Action _callback; + + public AwaitObserver(Action callback, bool originalContext) + { + if (originalContext) + _context = SynchronizationContext.Current; + + _callback = callback; + } + + public void OnCompleted() + { + InvokeOnOriginalContext(); + } + + public void OnError(Exception error) + { + InvokeOnOriginalContext(); + } + + public void OnNext(T value) + { + } + + private void InvokeOnOriginalContext() + { + if (_context != null) + { + // + // No need for OperationStarted and OperationCompleted calls here; + // this code is invoked through await support and will have a way + // to observe its start/complete behavior, either through returned + // Task objects or the async method builder's interaction with the + // SynchronizationContext object. + // + _context.Post(c => ((Action)c)(), _callback); + } + else + { + _callback(); + } + } + } + + /// + /// Gets the last element of the subject, potentially blocking until the subject completes successfully or exceptionally. + /// + /// The last element of the subject. Throws an InvalidOperationException if no element was received. + /// The source sequence is empty. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "Await pattern for C# and VB compilers.")] + public T GetResult() + { + if (!isStopped) + { + var e = new ManualResetEvent(false); + OnCompleted(() => e.Set(), false); + e.WaitOne(); + } + + if (lastError != null) + { + lastError.Throw(); + } + + if (!hasValue) + throw new InvalidOperationException("NO_ELEMENTS"); + + return lastValue; + } +#endif + } +} diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/AsyncSubject.cs.meta b/Assets/Plugins/UniRx/Scripts/Subjects/AsyncSubject.cs.meta new file mode 100644 index 0000000..b994cf8 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects/AsyncSubject.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 137cd44250b484d4ba2390d510f8423f +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/BehaviorSubject.cs b/Assets/Plugins/UniRx/Scripts/Subjects/BehaviorSubject.cs new file mode 100644 index 0000000..028c783 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects/BehaviorSubject.cs @@ -0,0 +1,204 @@ +using System; +using UniRx.InternalUtil; + +namespace UniRx +{ + public sealed class BehaviorSubject : ISubject, IDisposable, IOptimizedObservable + { + object observerLock = new object(); + + bool isStopped; + bool isDisposed; + T lastValue; + Exception lastError; + IObserver outObserver = EmptyObserver.Instance; + + public BehaviorSubject(T defaultValue) + { + lastValue = defaultValue; + } + + public T Value + { + get + { + ThrowIfDisposed(); + if (lastError != null) lastError.Throw(); + return lastValue; + } + } + + public bool HasObservers + { + get + { + return !(outObserver is EmptyObserver) && !isStopped && !isDisposed; + } + } + + public void OnCompleted() + { + IObserver old; + lock (observerLock) + { + ThrowIfDisposed(); + if (isStopped) return; + + old = outObserver; + outObserver = EmptyObserver.Instance; + isStopped = true; + } + + old.OnCompleted(); + } + + public void OnError(Exception error) + { + if (error == null) throw new ArgumentNullException("error"); + + IObserver old; + lock (observerLock) + { + ThrowIfDisposed(); + if (isStopped) return; + + old = outObserver; + outObserver = EmptyObserver.Instance; + isStopped = true; + lastError = error; + } + + old.OnError(error); + } + + public void OnNext(T value) + { + IObserver current; + lock (observerLock) + { + if (isStopped) return; + + lastValue = value; + current = outObserver; + } + + current.OnNext(value); + } + + public IDisposable Subscribe(IObserver observer) + { + if (observer == null) throw new ArgumentNullException("observer"); + + var ex = default(Exception); + var v = default(T); + var subscription = default(Subscription); + + lock (observerLock) + { + ThrowIfDisposed(); + if (!isStopped) + { + var listObserver = outObserver as ListObserver; + if (listObserver != null) + { + outObserver = listObserver.Add(observer); + } + else + { + var current = outObserver; + if (current is EmptyObserver) + { + outObserver = observer; + } + else + { + outObserver = new ListObserver(new ImmutableList>(new[] { current, observer })); + } + } + + v = lastValue; + subscription = new Subscription(this, observer); + } + else + { + ex = lastError; + } + } + + if (subscription != null) + { + observer.OnNext(v); + return subscription; + } + else if (ex != null) + { + observer.OnError(ex); + } + else + { + observer.OnCompleted(); + } + + return Disposable.Empty; + } + + public void Dispose() + { + lock (observerLock) + { + isDisposed = true; + outObserver = DisposedObserver.Instance; + lastError = null; + lastValue = default(T); + } + } + + void ThrowIfDisposed() + { + if (isDisposed) throw new ObjectDisposedException(""); + } + + public bool IsRequiredSubscribeOnCurrentThread() + { + return false; + } + + class Subscription : IDisposable + { + readonly object gate = new object(); + BehaviorSubject parent; + IObserver unsubscribeTarget; + + public Subscription(BehaviorSubject parent, IObserver unsubscribeTarget) + { + this.parent = parent; + this.unsubscribeTarget = unsubscribeTarget; + } + + public void Dispose() + { + lock (gate) + { + if (parent != null) + { + lock (parent.observerLock) + { + var listObserver = parent.outObserver as ListObserver; + if (listObserver != null) + { + parent.outObserver = listObserver.Remove(unsubscribeTarget); + } + else + { + parent.outObserver = EmptyObserver.Instance; + } + + unsubscribeTarget = null; + parent = null; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/BehaviorSubject.cs.meta b/Assets/Plugins/UniRx/Scripts/Subjects/BehaviorSubject.cs.meta new file mode 100644 index 0000000..b679d0d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects/BehaviorSubject.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2fa461d2fc0c4ec4999e0b9aff16dd47 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/ConnectableObservable.cs b/Assets/Plugins/UniRx/Scripts/Subjects/ConnectableObservable.cs new file mode 100644 index 0000000..63862cb --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects/ConnectableObservable.cs @@ -0,0 +1,71 @@ +using System; + +namespace UniRx +{ + public interface IConnectableObservable : IObservable + { + IDisposable Connect(); + } + + public static partial class Observable + { + class ConnectableObservable : IConnectableObservable + { + readonly IObservable source; + readonly ISubject subject; + readonly object gate = new object(); + Connection connection; + + public ConnectableObservable(IObservable source, ISubject subject) + { + this.source = source.AsObservable(); + this.subject = subject; + } + + public IDisposable Connect() + { + lock (gate) + { + // don't subscribe twice + if (connection == null) + { + var subscription = source.Subscribe(subject); + connection = new Connection(this, subscription); + } + + return connection; + } + } + + public IDisposable Subscribe(IObserver observer) + { + return subject.Subscribe(observer); + } + + class Connection : IDisposable + { + readonly ConnectableObservable parent; + IDisposable subscription; + + public Connection(ConnectableObservable parent, IDisposable subscription) + { + this.parent = parent; + this.subscription = subscription; + } + + public void Dispose() + { + lock (parent.gate) + { + if (subscription != null) + { + subscription.Dispose(); + subscription = null; + parent.connection = null; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/ConnectableObservable.cs.meta b/Assets/Plugins/UniRx/Scripts/Subjects/ConnectableObservable.cs.meta new file mode 100644 index 0000000..d407f17 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects/ConnectableObservable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8de419b467eded246bc4fc5e70859f73 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/ISubject.cs b/Assets/Plugins/UniRx/Scripts/Subjects/ISubject.cs new file mode 100644 index 0000000..4d33f18 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects/ISubject.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace UniRx +{ + public interface ISubject : IObserver, IObservable + { + } + + public interface ISubject : ISubject, IObserver, IObservable + { + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/ISubject.cs.meta b/Assets/Plugins/UniRx/Scripts/Subjects/ISubject.cs.meta new file mode 100644 index 0000000..e0c92e5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects/ISubject.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e9dbcd28e4f3965408744e0ee03b7bc8 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/ReplaySubject.cs b/Assets/Plugins/UniRx/Scripts/Subjects/ReplaySubject.cs new file mode 100644 index 0000000..59d0cb6 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects/ReplaySubject.cs @@ -0,0 +1,251 @@ +using System; +using System.Collections.Generic; +using UniRx.InternalUtil; + +namespace UniRx +{ + public sealed class ReplaySubject : ISubject, IOptimizedObservable, IDisposable + { + object observerLock = new object(); + + bool isStopped; + bool isDisposed; + Exception lastError; + IObserver outObserver = EmptyObserver.Instance; + + readonly int bufferSize; + readonly TimeSpan window; + readonly DateTimeOffset startTime; + readonly IScheduler scheduler; + Queue> queue = new Queue>(); + + + public ReplaySubject() + : this(int.MaxValue, TimeSpan.MaxValue, Scheduler.DefaultSchedulers.Iteration) + { + } + + public ReplaySubject(IScheduler scheduler) + : this(int.MaxValue, TimeSpan.MaxValue, scheduler) + { + } + + public ReplaySubject(int bufferSize) + : this(bufferSize, TimeSpan.MaxValue, Scheduler.DefaultSchedulers.Iteration) + { + } + + public ReplaySubject(int bufferSize, IScheduler scheduler) + : this(bufferSize, TimeSpan.MaxValue, scheduler) + { + } + + public ReplaySubject(TimeSpan window) + : this(int.MaxValue, window, Scheduler.DefaultSchedulers.Iteration) + { + } + + public ReplaySubject(TimeSpan window, IScheduler scheduler) + : this(int.MaxValue, window, scheduler) + { + } + + // full constructor + public ReplaySubject(int bufferSize, TimeSpan window, IScheduler scheduler) + { + if (bufferSize < 0) throw new ArgumentOutOfRangeException("bufferSize"); + if (window < TimeSpan.Zero) throw new ArgumentOutOfRangeException("window"); + if (scheduler == null) throw new ArgumentNullException("scheduler"); + + this.bufferSize = bufferSize; + this.window = window; + this.scheduler = scheduler; + startTime = scheduler.Now; + } + + void Trim() + { + var elapsedTime = Scheduler.Normalize(scheduler.Now - startTime); + + while (queue.Count > bufferSize) + { + queue.Dequeue(); + } + while (queue.Count > 0 && elapsedTime.Subtract(queue.Peek().Interval).CompareTo(window) > 0) + { + queue.Dequeue(); + } + } + + public void OnCompleted() + { + IObserver old; + lock (observerLock) + { + ThrowIfDisposed(); + if (isStopped) return; + + old = outObserver; + outObserver = EmptyObserver.Instance; + isStopped = true; + Trim(); + } + + old.OnCompleted(); + } + + public void OnError(Exception error) + { + if (error == null) throw new ArgumentNullException("error"); + + IObserver old; + lock (observerLock) + { + ThrowIfDisposed(); + if (isStopped) return; + + old = outObserver; + outObserver = EmptyObserver.Instance; + isStopped = true; + lastError = error; + Trim(); + } + + old.OnError(error); + } + + public void OnNext(T value) + { + IObserver current; + lock (observerLock) + { + ThrowIfDisposed(); + if (isStopped) return; + + // enQ + queue.Enqueue(new TimeInterval(value, scheduler.Now - startTime)); + Trim(); + + current = outObserver; + } + + current.OnNext(value); + } + + public IDisposable Subscribe(IObserver observer) + { + if (observer == null) throw new ArgumentNullException("observer"); + + var ex = default(Exception); + var subscription = default(Subscription); + + lock (observerLock) + { + ThrowIfDisposed(); + if (!isStopped) + { + var listObserver = outObserver as ListObserver; + if (listObserver != null) + { + outObserver = listObserver.Add(observer); + } + else + { + var current = outObserver; + if (current is EmptyObserver) + { + outObserver = observer; + } + else + { + outObserver = new ListObserver(new ImmutableList>(new[] { current, observer })); + } + } + + subscription = new Subscription(this, observer); + } + + ex = lastError; + Trim(); + foreach (var item in queue) + { + observer.OnNext(item.Value); + } + } + + if (subscription != null) + { + return subscription; + } + else if (ex != null) + { + observer.OnError(ex); + } + else + { + observer.OnCompleted(); + } + + return Disposable.Empty; + } + + public void Dispose() + { + lock (observerLock) + { + isDisposed = true; + outObserver = DisposedObserver.Instance; + lastError = null; + queue = null; + } + } + + void ThrowIfDisposed() + { + if (isDisposed) throw new ObjectDisposedException(""); + } + + public bool IsRequiredSubscribeOnCurrentThread() + { + return false; + } + + class Subscription : IDisposable + { + readonly object gate = new object(); + ReplaySubject parent; + IObserver unsubscribeTarget; + + public Subscription(ReplaySubject parent, IObserver unsubscribeTarget) + { + this.parent = parent; + this.unsubscribeTarget = unsubscribeTarget; + } + + public void Dispose() + { + lock (gate) + { + if (parent != null) + { + lock (parent.observerLock) + { + var listObserver = parent.outObserver as ListObserver; + if (listObserver != null) + { + parent.outObserver = listObserver.Remove(unsubscribeTarget); + } + else + { + parent.outObserver = EmptyObserver.Instance; + } + + unsubscribeTarget = null; + parent = null; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/ReplaySubject.cs.meta b/Assets/Plugins/UniRx/Scripts/Subjects/ReplaySubject.cs.meta new file mode 100644 index 0000000..5275283 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects/ReplaySubject.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d9b0c2f29645e1f468259893bf9afb68 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/Subject.cs b/Assets/Plugins/UniRx/Scripts/Subjects/Subject.cs new file mode 100644 index 0000000..8fa7df1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects/Subject.cs @@ -0,0 +1,169 @@ +using System; +using System.Collections.Generic; +using System.Text; +using UniRx.InternalUtil; + +namespace UniRx +{ + public sealed class Subject : ISubject, IDisposable, IOptimizedObservable + { + object observerLock = new object(); + + bool isStopped; + bool isDisposed; + Exception lastError; + IObserver outObserver = EmptyObserver.Instance; + + public bool HasObservers + { + get + { + return !(outObserver is EmptyObserver) && !isStopped && !isDisposed; + } + } + + public void OnCompleted() + { + IObserver old; + lock (observerLock) + { + ThrowIfDisposed(); + if (isStopped) return; + + old = outObserver; + outObserver = EmptyObserver.Instance; + isStopped = true; + } + + old.OnCompleted(); + } + + public void OnError(Exception error) + { + if (error == null) throw new ArgumentNullException("error"); + + IObserver old; + lock (observerLock) + { + ThrowIfDisposed(); + if (isStopped) return; + + old = outObserver; + outObserver = EmptyObserver.Instance; + isStopped = true; + lastError = error; + } + + old.OnError(error); + } + + public void OnNext(T value) + { + outObserver.OnNext(value); + } + + public IDisposable Subscribe(IObserver observer) + { + if (observer == null) throw new ArgumentNullException("observer"); + + var ex = default(Exception); + + lock (observerLock) + { + ThrowIfDisposed(); + if (!isStopped) + { + var listObserver = outObserver as ListObserver; + if (listObserver != null) + { + outObserver = listObserver.Add(observer); + } + else + { + var current = outObserver; + if (current is EmptyObserver) + { + outObserver = observer; + } + else + { + outObserver = new ListObserver(new ImmutableList>(new[] { current, observer })); + } + } + + return new Subscription(this, observer); + } + + ex = lastError; + } + + if (ex != null) + { + observer.OnError(ex); + } + else + { + observer.OnCompleted(); + } + + return Disposable.Empty; + } + + public void Dispose() + { + lock (observerLock) + { + isDisposed = true; + outObserver = DisposedObserver.Instance; + } + } + + void ThrowIfDisposed() + { + if (isDisposed) throw new ObjectDisposedException(""); + } + + public bool IsRequiredSubscribeOnCurrentThread() + { + return false; + } + + class Subscription : IDisposable + { + readonly object gate = new object(); + Subject parent; + IObserver unsubscribeTarget; + + public Subscription(Subject parent, IObserver unsubscribeTarget) + { + this.parent = parent; + this.unsubscribeTarget = unsubscribeTarget; + } + + public void Dispose() + { + lock (gate) + { + if (parent != null) + { + lock (parent.observerLock) + { + var listObserver = parent.outObserver as ListObserver; + if (listObserver != null) + { + parent.outObserver = listObserver.Remove(unsubscribeTarget); + } + else + { + parent.outObserver = EmptyObserver.Instance; + } + + unsubscribeTarget = null; + parent = null; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/Subject.cs.meta b/Assets/Plugins/UniRx/Scripts/Subjects/Subject.cs.meta new file mode 100644 index 0000000..4769776 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects/Subject.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d5fdc90caca9cbe4b9cd9c3fae81e7f6 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/SubjectExtensions.cs b/Assets/Plugins/UniRx/Scripts/Subjects/SubjectExtensions.cs new file mode 100644 index 0000000..4cbc9a7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects/SubjectExtensions.cs @@ -0,0 +1,61 @@ +using System; + +namespace UniRx +{ + public static class SubjectExtensions + { + public static ISubject Synchronize(this ISubject subject) + { + return new AnonymousSubject((subject as IObserver).Synchronize(), subject); + } + + public static ISubject Synchronize(this ISubject subject, object gate) + { + return new AnonymousSubject((subject as IObserver).Synchronize(gate), subject); + } + + class AnonymousSubject : ISubject + { + readonly IObserver observer; + readonly IObservable observable; + + public AnonymousSubject(IObserver observer, IObservable observable) + { + this.observer = observer; + this.observable = observable; + } + + public void OnCompleted() + { + observer.OnCompleted(); + } + + public void OnError(Exception error) + { + if (error == null) throw new ArgumentNullException("error"); + + observer.OnError(error); + } + + public void OnNext(T value) + { + observer.OnNext(value); + } + + public IDisposable Subscribe(IObserver observer) + { + if (observer == null) throw new ArgumentNullException("observer"); + + return observable.Subscribe(observer); + } + } + + class AnonymousSubject : AnonymousSubject, ISubject + { + public AnonymousSubject(IObserver observer, IObservable observable) + : base(observer, observable) + { + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/SubjectExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Subjects/SubjectExtensions.cs.meta new file mode 100644 index 0000000..9377a3d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Subjects/SubjectExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 359bf19588606a14fb0edc6efa97deaf +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/System.meta b/Assets/Plugins/UniRx/Scripts/System.meta new file mode 100644 index 0000000..a483b17 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/System.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 75471d30c9f383f4c87a0e0f240afd09 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/System/IObservable.cs b/Assets/Plugins/UniRx/Scripts/System/IObservable.cs new file mode 100644 index 0000000..77516f5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/System/IObservable.cs @@ -0,0 +1,23 @@ +// defined from .NET Framework 4.0 and NETFX_CORE + +using System; + +#if !(NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) + +namespace UniRx +{ + public interface IObservable + { + IDisposable Subscribe(IObserver observer); + } +} + +#endif + +namespace UniRx +{ + public interface IGroupedObservable : IObservable + { + TKey Key { get; } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/System/IObservable.cs.meta b/Assets/Plugins/UniRx/Scripts/System/IObservable.cs.meta new file mode 100644 index 0000000..162258a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/System/IObservable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9703f7aad3c6b334badd37c1b41d0d8f +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/System/IObserver.cs b/Assets/Plugins/UniRx/Scripts/System/IObserver.cs new file mode 100644 index 0000000..bbc213f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/System/IObserver.cs @@ -0,0 +1,17 @@ +// defined from .NET Framework 4.0 and NETFX_CORE + +#if !(NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) + +using System; + +namespace UniRx +{ + public interface IObserver + { + void OnCompleted(); + void OnError(Exception error); + void OnNext(T value); + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/System/IObserver.cs.meta b/Assets/Plugins/UniRx/Scripts/System/IObserver.cs.meta new file mode 100644 index 0000000..11e3ec2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/System/IObserver.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1fc7a9cec9d3b644da7dbcf18ea16270 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/System/IOptimizedObservable.cs b/Assets/Plugins/UniRx/Scripts/System/IOptimizedObservable.cs new file mode 100644 index 0000000..124e4a0 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/System/IOptimizedObservable.cs @@ -0,0 +1,27 @@ +using System; + +namespace UniRx +{ + public interface IOptimizedObservable : IObservable + { + bool IsRequiredSubscribeOnCurrentThread(); + } + + public static class OptimizedObservableExtensions + { + public static bool IsRequiredSubscribeOnCurrentThread(this IObservable source) + { + var obs = source as IOptimizedObservable; + if (obs == null) return true; + + return obs.IsRequiredSubscribeOnCurrentThread(); + } + + public static bool IsRequiredSubscribeOnCurrentThread(this IObservable source, IScheduler scheduler) + { + if (scheduler == Scheduler.CurrentThread) return true; + + return IsRequiredSubscribeOnCurrentThread(source); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/System/IOptimizedObservable.cs.meta b/Assets/Plugins/UniRx/Scripts/System/IOptimizedObservable.cs.meta new file mode 100644 index 0000000..0bb6cbf --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/System/IOptimizedObservable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5a2d3a7c73260e14a875d62586ae28f9 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/System/IProgress.cs b/Assets/Plugins/UniRx/Scripts/System/IProgress.cs new file mode 100644 index 0000000..7764ec7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/System/IProgress.cs @@ -0,0 +1,30 @@ +// defined from .NET Framework 4.5 and NETFX_CORE + +#if !(NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) + +using System; + +namespace UniRx +{ + public interface IProgress + { + void Report(T value); + } + + public class Progress : IProgress + { + readonly Action report; + + public Progress(Action report) + { + this.report = report; + } + + public void Report(T value) + { + report(value); + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/System/IProgress.cs.meta b/Assets/Plugins/UniRx/Scripts/System/IProgress.cs.meta new file mode 100644 index 0000000..8432314 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/System/IProgress.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a38a024b6babf8d48b7e32f2f8fb8686 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/System/Tuple.cs b/Assets/Plugins/UniRx/Scripts/System/Tuple.cs new file mode 100644 index 0000000..47e04e1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/System/Tuple.cs @@ -0,0 +1,1195 @@ +// defined from .NET Framework 4.0 and NETFX_CORE +// This code is basaed from mono/mcs, but some performance modified +// 1. class to struct +// 2. implements IEquatable + +// note, we need to create ValueTuple or UniRxTuple... +#if !(NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace UniRx +{ + public interface IStructuralEquatable + { + bool Equals(object other, IEqualityComparer comparer); + + int GetHashCode(IEqualityComparer comparer); + } + + public interface IStructuralComparable + { + int CompareTo(object other, IComparer comparer); + } + + interface ITuple + { + string ToString(); + } + + public static class Tuple + { + public static Tuple> Create + ( + T1 item1, + T2 item2, + T3 item3, + T4 item4, + T5 item5, + T6 item6, + T7 item7, + T8 item8) + { + return new Tuple>(item1, item2, item3, item4, item5, item6, item7, new Tuple(item8)); + } + + public static Tuple Create + ( + T1 item1, + T2 item2, + T3 item3, + T4 item4, + T5 item5, + T6 item6, + T7 item7) + { + return new Tuple(item1, item2, item3, item4, item5, item6, item7); + } + + public static Tuple Create + ( + T1 item1, + T2 item2, + T3 item3, + T4 item4, + T5 item5, + T6 item6) + { + return new Tuple(item1, item2, item3, item4, item5, item6); + } + + public static Tuple Create + ( + T1 item1, + T2 item2, + T3 item3, + T4 item4, + T5 item5) + { + return new Tuple(item1, item2, item3, item4, item5); + } + + public static Tuple Create + ( + T1 item1, + T2 item2, + T3 item3, + T4 item4) + { + return new Tuple(item1, item2, item3, item4); + } + + public static Tuple Create + ( + T1 item1, + T2 item2, + T3 item3) + { + return new Tuple(item1, item2, item3); + } + + public static Tuple Create + ( + T1 item1, + T2 item2) + { + return new Tuple(item1, item2); + } + + public static Tuple Create + ( + T1 item1) + { + return new Tuple(item1); + } + } + + public partial class Tuple + { + public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest) + { + this.item1 = item1; + this.item2 = item2; + this.item3 = item3; + this.item4 = item4; + this.item5 = item5; + this.item6 = item6; + this.item7 = item7; + this.rest = rest; + + if (!(rest is ITuple)) + throw new ArgumentException("rest", "The last element of an eight element tuple must be a Tuple."); + } + } + + [Serializable] + public struct Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> + { + T1 item1; + + public Tuple(T1 item1) + { + this.item1 = item1; + } + + public T1 Item1 + { + get { return item1; } + } + + int IComparable.CompareTo(object obj) + { + return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); + } + + int IStructuralComparable.CompareTo(object other, IComparer comparer) + { + if (other == null) return 1; + if (!(other is Tuple)) + { + throw new ArgumentException("other"); + } + var t = (Tuple)other; + return comparer.Compare(item1, t.item1); + } + + public override bool Equals(object obj) + { + return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); + } + + bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) + { + if (!(other is Tuple)) + return false; + + var t = (Tuple)other; + return comparer.Equals(item1, t.item1); + } + + public override int GetHashCode() + { + return EqualityComparer.Default.GetHashCode(item1); + } + + int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) + { + return comparer.GetHashCode(item1); + } + + string ITuple.ToString() + { + return String.Format("{0}", item1); + } + + public override string ToString() + { + return "(" + ((ITuple)this).ToString() + ")"; + } + + public bool Equals(Tuple other) + { + return EqualityComparer.Default.Equals(item1, other.item1); + } + } + + [Serializable] + public struct Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> + { + T1 item1; + T2 item2; + + public Tuple(T1 item1, T2 item2) + { + this.item1 = item1; + this.item2 = item2; + } + + public T1 Item1 + { + get { return item1; } + } + + public T2 Item2 + { + get { return item2; } + } + + int IComparable.CompareTo(object obj) + { + return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); + } + + int IStructuralComparable.CompareTo(object other, IComparer comparer) + { + if (other == null) return 1; + if (!(other is Tuple)) + { + throw new ArgumentException("other"); + } + var t = (Tuple)other; + + int res = comparer.Compare(item1, t.item1); + if (res != 0) return res; + return comparer.Compare(item2, t.item2); + } + + public override bool Equals(object obj) + { + return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); + } + + bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) + { + if (!(other is Tuple)) + return false; + + var t = (Tuple)other; + return comparer.Equals(item1, t.item1) && + comparer.Equals(item2, t.item2); + } + + public override int GetHashCode() + { + var comparer1 = EqualityComparer.Default; + var comparer2 = EqualityComparer.Default; + + int h0; + h0 = comparer1.GetHashCode(item1); + h0 = (h0 << 5) + h0 ^ comparer2.GetHashCode(item2); + return h0; + } + + int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) + { + int h0; + h0 = comparer.GetHashCode(item1); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item2); + return h0; + } + + string ITuple.ToString() + { + return String.Format("{0}, {1}", item1, item2); + } + + public override string ToString() + { + return "(" + ((ITuple)this).ToString() + ")"; + } + + public bool Equals(Tuple other) + { + var comparer1 = EqualityComparer.Default; + var comparer2 = EqualityComparer.Default; + + return comparer1.Equals(item1, other.item1) && + comparer2.Equals(item2, other.item2); + } + } + + [Serializable] + public struct Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> + { + T1 item1; + T2 item2; + T3 item3; + + public Tuple(T1 item1, T2 item2, T3 item3) + { + this.item1 = item1; + this.item2 = item2; + this.item3 = item3; + } + + public T1 Item1 + { + get { return item1; } + } + + public T2 Item2 + { + get { return item2; } + } + + public T3 Item3 + { + get { return item3; } + } + + int IComparable.CompareTo(object obj) + { + return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); + } + + int IStructuralComparable.CompareTo(object other, IComparer comparer) + { + if (other == null) return 1; + if (!(other is Tuple)) + { + throw new ArgumentException("other"); + } + var t = (Tuple)other; + + int res = comparer.Compare(item1, t.item1); + if (res != 0) return res; + res = comparer.Compare(item2, t.item2); + if (res != 0) return res; + return comparer.Compare(item3, t.item3); + } + + public override bool Equals(object obj) + { + return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); + } + + bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) + { + if (!(other is Tuple)) + return false; + + var t = (Tuple)other; + return comparer.Equals(item1, t.item1) && + comparer.Equals(item2, t.item2) && + comparer.Equals(item3, t.item3); + } + + public override int GetHashCode() + { + var comparer1 = EqualityComparer.Default; + var comparer2 = EqualityComparer.Default; + var comparer3 = EqualityComparer.Default; + + int h0; + h0 = comparer1.GetHashCode(item1); + h0 = (h0 << 5) + h0 ^ comparer2.GetHashCode(item2); + h0 = (h0 << 5) + h0 ^ comparer3.GetHashCode(item3); + return h0; + } + + int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) + { + int h0; + h0 = comparer.GetHashCode(item1); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item2); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item3); + return h0; + } + + string ITuple.ToString() + { + return String.Format("{0}, {1}, {2}", item1, item2, item3); + } + + public override string ToString() + { + return "(" + ((ITuple)this).ToString() + ")"; + } + + public bool Equals(Tuple other) + { + var comparer1 = EqualityComparer.Default; + var comparer2 = EqualityComparer.Default; + var comparer3 = EqualityComparer.Default; + + return comparer1.Equals(item1, other.item1) && + comparer2.Equals(item2, other.item2) && + comparer3.Equals(item3, other.item3); + } + } + + [Serializable] + public struct Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> + { + T1 item1; + T2 item2; + T3 item3; + T4 item4; + + public Tuple(T1 item1, T2 item2, T3 item3, T4 item4) + { + this.item1 = item1; + this.item2 = item2; + this.item3 = item3; + this.item4 = item4; + } + + public T1 Item1 + { + get { return item1; } + } + + public T2 Item2 + { + get { return item2; } + } + + public T3 Item3 + { + get { return item3; } + } + + public T4 Item4 + { + get { return item4; } + } + + int IComparable.CompareTo(object obj) + { + return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); + } + + int IStructuralComparable.CompareTo(object other, IComparer comparer) + { + if (other == null) return 1; + if (!(other is Tuple)) + { + throw new ArgumentException("other"); + } + var t = (Tuple)other; + + int res = comparer.Compare(item1, t.item1); + if (res != 0) return res; + res = comparer.Compare(item2, t.item2); + if (res != 0) return res; + res = comparer.Compare(item3, t.item3); + if (res != 0) return res; + return comparer.Compare(item4, t.item4); + } + + public override bool Equals(object obj) + { + return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); + } + + bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) + { + if (!(other is Tuple)) + return false; + var t = (Tuple)other; + + return comparer.Equals(item1, t.item1) && + comparer.Equals(item2, t.item2) && + comparer.Equals(item3, t.item3) && + comparer.Equals(item4, t.item4); + } + + public override int GetHashCode() + { + var comparer1 = EqualityComparer.Default; + var comparer2 = EqualityComparer.Default; + var comparer3 = EqualityComparer.Default; + var comparer4 = EqualityComparer.Default; + + int h0, h1; + h0 = comparer1.GetHashCode(item1); + h0 = (h0 << 5) + h0 ^ comparer2.GetHashCode(item2); + h1 = comparer3.GetHashCode(item3); + h1 = (h1 << 5) + h1 ^ comparer4.GetHashCode(item4); + h0 = (h0 << 5) + h0 ^ h1; + return h0; + } + + int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) + { + int h0, h1; + h0 = comparer.GetHashCode(item1); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item2); + h1 = comparer.GetHashCode(item3); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item4); + h0 = (h0 << 5) + h0 ^ h1; + return h0; + } + + string ITuple.ToString() + { + return String.Format("{0}, {1}, {2}, {3}", item1, item2, item3, item4); + } + + public override string ToString() + { + return "(" + ((ITuple)this).ToString() + ")"; + } + + public bool Equals(Tuple other) + { + var comparer1 = EqualityComparer.Default; + var comparer2 = EqualityComparer.Default; + var comparer3 = EqualityComparer.Default; + var comparer4 = EqualityComparer.Default; + + return comparer1.Equals(item1, other.item1) && + comparer2.Equals(item2, other.item2) && + comparer3.Equals(item3, other.item3) && + comparer4.Equals(item4, other.item4); + } + } + + [Serializable] + public struct Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> + { + T1 item1; + T2 item2; + T3 item3; + T4 item4; + T5 item5; + + public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5) + { + this.item1 = item1; + this.item2 = item2; + this.item3 = item3; + this.item4 = item4; + this.item5 = item5; + } + + public T1 Item1 + { + get { return item1; } + } + + public T2 Item2 + { + get { return item2; } + } + + public T3 Item3 + { + get { return item3; } + } + + public T4 Item4 + { + get { return item4; } + } + + public T5 Item5 + { + get { return item5; } + } + + int IComparable.CompareTo(object obj) + { + return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); + } + + int IStructuralComparable.CompareTo(object other, IComparer comparer) + { + if (other == null) return 1; + if (!(other is Tuple)) + { + throw new ArgumentException("other"); + } + var t = (Tuple)other; + + int res = comparer.Compare(item1, t.item1); + if (res != 0) return res; + res = comparer.Compare(item2, t.item2); + if (res != 0) return res; + res = comparer.Compare(item3, t.item3); + if (res != 0) return res; + res = comparer.Compare(item4, t.item4); + if (res != 0) return res; + return comparer.Compare(item5, t.item5); + } + + public override bool Equals(object obj) + { + return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); + } + + bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) + { + if (!(other is Tuple)) + return false; + var t = (Tuple)other; + + return comparer.Equals(item1, t.item1) && + comparer.Equals(item2, t.item2) && + comparer.Equals(item3, t.item3) && + comparer.Equals(item4, t.item4) && + comparer.Equals(item5, t.item5); + } + + public override int GetHashCode() + { + var comparer1 = EqualityComparer.Default; + var comparer2 = EqualityComparer.Default; + var comparer3 = EqualityComparer.Default; + var comparer4 = EqualityComparer.Default; + var comparer5 = EqualityComparer.Default; + + int h0, h1; + h0 = comparer1.GetHashCode(item1); + h0 = (h0 << 5) + h0 ^ comparer2.GetHashCode(item2); + h1 = comparer3.GetHashCode(item3); + h1 = (h1 << 5) + h1 ^ comparer4.GetHashCode(item4); + h0 = (h0 << 5) + h0 ^ h1; + h0 = (h0 << 5) + h0 ^ comparer5.GetHashCode(item5); + return h0; + } + + int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) + { + int h0, h1; + h0 = comparer.GetHashCode(item1); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item2); + h1 = comparer.GetHashCode(item3); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item4); + h0 = (h0 << 5) + h0 ^ h1; + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item5); + return h0; + } + + string ITuple.ToString() + { + return String.Format("{0}, {1}, {2}, {3}, {4}", item1, item2, item3, item4, item5); + } + + public override string ToString() + { + return "(" + ((ITuple)this).ToString() + ")"; + } + + public bool Equals(Tuple other) + { + var comparer1 = EqualityComparer.Default; + var comparer2 = EqualityComparer.Default; + var comparer3 = EqualityComparer.Default; + var comparer4 = EqualityComparer.Default; + var comparer5 = EqualityComparer.Default; + + return comparer1.Equals(item1, other.Item1) && + comparer2.Equals(item2, other.Item2) && + comparer3.Equals(item3, other.Item3) && + comparer4.Equals(item4, other.Item4) && + comparer5.Equals(item5, other.Item5); + } + } + + [Serializable] + public struct Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> + { + T1 item1; + T2 item2; + T3 item3; + T4 item4; + T5 item5; + T6 item6; + + public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6) + { + this.item1 = item1; + this.item2 = item2; + this.item3 = item3; + this.item4 = item4; + this.item5 = item5; + this.item6 = item6; + } + + public T1 Item1 + { + get { return item1; } + } + + public T2 Item2 + { + get { return item2; } + } + + public T3 Item3 + { + get { return item3; } + } + + public T4 Item4 + { + get { return item4; } + } + + public T5 Item5 + { + get { return item5; } + } + + public T6 Item6 + { + get { return item6; } + } + + int IComparable.CompareTo(object obj) + { + return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); + } + + int IStructuralComparable.CompareTo(object other, IComparer comparer) + { + if (other == null) return 1; + if (!(other is Tuple)) + { + throw new ArgumentException("other"); + } + var t = (Tuple)other; + + int res = comparer.Compare(item1, t.item1); + if (res != 0) return res; + res = comparer.Compare(item2, t.item2); + if (res != 0) return res; + res = comparer.Compare(item3, t.item3); + if (res != 0) return res; + res = comparer.Compare(item4, t.item4); + if (res != 0) return res; + res = comparer.Compare(item5, t.item5); + if (res != 0) return res; + return comparer.Compare(item6, t.item6); + } + + public override bool Equals(object obj) + { + return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); + } + + bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) + { + if (!(other is Tuple)) + return false; + var t = (Tuple)other; + + return comparer.Equals(item1, t.item1) && + comparer.Equals(item2, t.item2) && + comparer.Equals(item3, t.item3) && + comparer.Equals(item4, t.item4) && + comparer.Equals(item5, t.item5) && + comparer.Equals(item6, t.item6); + } + + public override int GetHashCode() + { + var comparer1 = EqualityComparer.Default; + var comparer2 = EqualityComparer.Default; + var comparer3 = EqualityComparer.Default; + var comparer4 = EqualityComparer.Default; + var comparer5 = EqualityComparer.Default; + var comparer6 = EqualityComparer.Default; + + int h0, h1; + h0 = comparer1.GetHashCode(item1); + h0 = (h0 << 5) + h0 ^ comparer2.GetHashCode(item2); + h1 = comparer3.GetHashCode(item3); + h1 = (h1 << 5) + h1 ^ comparer4.GetHashCode(item4); + h0 = (h0 << 5) + h0 ^ h1; + h1 = comparer5.GetHashCode(item5); + h1 = (h1 << 5) + h1 ^ comparer6.GetHashCode(item6); + h0 = (h0 << 5) + h0 ^ h1; + return h0; + } + + int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) + { + int h0, h1; + h0 = comparer.GetHashCode(item1); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item2); + h1 = comparer.GetHashCode(item3); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item4); + h0 = (h0 << 5) + h0 ^ h1; + h1 = comparer.GetHashCode(item5); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item6); + h0 = (h0 << 5) + h0 ^ h1; + return h0; + } + + string ITuple.ToString() + { + return String.Format("{0}, {1}, {2}, {3}, {4}, {5}", item1, item2, item3, item4, item5, item6); + } + + public override string ToString() + { + return "(" + ((ITuple)this).ToString() + ")"; + } + + public bool Equals(Tuple other) + { + var comparer1 = EqualityComparer.Default; + var comparer2 = EqualityComparer.Default; + var comparer3 = EqualityComparer.Default; + var comparer4 = EqualityComparer.Default; + var comparer5 = EqualityComparer.Default; + var comparer6 = EqualityComparer.Default; + + return comparer1.Equals(item1, other.Item1) && + comparer2.Equals(item2, other.Item2) && + comparer3.Equals(item3, other.Item3) && + comparer4.Equals(item4, other.Item4) && + comparer5.Equals(item5, other.Item5) && + comparer6.Equals(item6, other.Item6); + } + } + + [Serializable] + public struct Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> + { + T1 item1; + T2 item2; + T3 item3; + T4 item4; + T5 item5; + T6 item6; + T7 item7; + + public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7) + { + this.item1 = item1; + this.item2 = item2; + this.item3 = item3; + this.item4 = item4; + this.item5 = item5; + this.item6 = item6; + this.item7 = item7; + } + + public T1 Item1 + { + get { return item1; } + } + + public T2 Item2 + { + get { return item2; } + } + + public T3 Item3 + { + get { return item3; } + } + + public T4 Item4 + { + get { return item4; } + } + + public T5 Item5 + { + get { return item5; } + } + + public T6 Item6 + { + get { return item6; } + } + + public T7 Item7 + { + get { return item7; } + } + + int IComparable.CompareTo(object obj) + { + return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); + } + + int IStructuralComparable.CompareTo(object other, IComparer comparer) + { + if (other == null) return 1; + if (!(other is Tuple)) + { + throw new ArgumentException("other"); + } + var t = (Tuple)other; + + int res = comparer.Compare(item1, t.item1); + if (res != 0) return res; + res = comparer.Compare(item2, t.item2); + if (res != 0) return res; + res = comparer.Compare(item3, t.item3); + if (res != 0) return res; + res = comparer.Compare(item4, t.item4); + if (res != 0) return res; + res = comparer.Compare(item5, t.item5); + if (res != 0) return res; + res = comparer.Compare(item6, t.item6); + if (res != 0) return res; + return comparer.Compare(item7, t.item7); + } + + public override bool Equals(object obj) + { + return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); + } + + bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) + { + if (!(other is Tuple)) + return false; + var t = (Tuple)other; + + return comparer.Equals(item1, t.item1) && + comparer.Equals(item2, t.item2) && + comparer.Equals(item3, t.item3) && + comparer.Equals(item4, t.item4) && + comparer.Equals(item5, t.item5) && + comparer.Equals(item6, t.item6) && + comparer.Equals(item7, t.item7); + } + + public override int GetHashCode() + { + var comparer1 = EqualityComparer.Default; + var comparer2 = EqualityComparer.Default; + var comparer3 = EqualityComparer.Default; + var comparer4 = EqualityComparer.Default; + var comparer5 = EqualityComparer.Default; + var comparer6 = EqualityComparer.Default; + var comparer7 = EqualityComparer.Default; + + int h0, h1; + h0 = comparer1.GetHashCode(item1); + h0 = (h0 << 5) + h0 ^ comparer2.GetHashCode(item2); + h1 = comparer3.GetHashCode(item3); + h1 = (h1 << 5) + h1 ^ comparer4.GetHashCode(item4); + h0 = (h0 << 5) + h0 ^ h1; + h1 = comparer5.GetHashCode(item5); + h1 = (h1 << 5) + h1 ^ comparer6.GetHashCode(item6); + h1 = (h1 << 5) + h1 ^ comparer7.GetHashCode(item7); + h0 = (h0 << 5) + h0 ^ h1; + return h0; + } + + int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) + { + int h0, h1; + h0 = comparer.GetHashCode(item1); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item2); + h1 = comparer.GetHashCode(item3); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item4); + h0 = (h0 << 5) + h0 ^ h1; + h1 = comparer.GetHashCode(item5); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item6); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item7); + h0 = (h0 << 5) + h0 ^ h1; + return h0; + } + + string ITuple.ToString() + { + return String.Format("{0}, {1}, {2}, {3}, {4}, {5}, {6}", item1, item2, item3, item4, item5, item6, item7); + } + + public override string ToString() + { + return "(" + ((ITuple)this).ToString() + ")"; + } + + public bool Equals(Tuple other) + { + var comparer1 = EqualityComparer.Default; + var comparer2 = EqualityComparer.Default; + var comparer3 = EqualityComparer.Default; + var comparer4 = EqualityComparer.Default; + var comparer5 = EqualityComparer.Default; + var comparer6 = EqualityComparer.Default; + var comparer7 = EqualityComparer.Default; + + return comparer1.Equals(item1, other.Item1) && + comparer2.Equals(item2, other.Item2) && + comparer3.Equals(item3, other.Item3) && + comparer4.Equals(item4, other.Item4) && + comparer5.Equals(item5, other.Item5) && + comparer6.Equals(item6, other.Item6) && + comparer7.Equals(item7, other.Item7); + } + } + + [Serializable] + public partial class Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> + { + T1 item1; + T2 item2; + T3 item3; + T4 item4; + T5 item5; + T6 item6; + T7 item7; + TRest rest; + + public T1 Item1 + { + get { return item1; } + } + + public T2 Item2 + { + get { return item2; } + } + + public T3 Item3 + { + get { return item3; } + } + + public T4 Item4 + { + get { return item4; } + } + + public T5 Item5 + { + get { return item5; } + } + + public T6 Item6 + { + get { return item6; } + } + + public T7 Item7 + { + get { return item7; } + } + + public TRest Rest + { + get { return rest; } + } + + int IComparable.CompareTo(object obj) + { + return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); + } + + int IStructuralComparable.CompareTo(object other, IComparer comparer) + { + if (other == null) return 1; + if (!(other is Tuple)) + { + throw new ArgumentException("other"); + } + var t = (Tuple)other; + + int res = comparer.Compare(item1, t.item1); + if (res != 0) return res; + res = comparer.Compare(item2, t.item2); + if (res != 0) return res; + res = comparer.Compare(item3, t.item3); + if (res != 0) return res; + res = comparer.Compare(item4, t.item4); + if (res != 0) return res; + res = comparer.Compare(item5, t.item5); + if (res != 0) return res; + res = comparer.Compare(item6, t.item6); + if (res != 0) return res; + res = comparer.Compare(item7, t.item7); + if (res != 0) return res; + return comparer.Compare(rest, t.rest); + } + + public override bool Equals(object obj) + { + return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); + } + + bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) + { + if (!(other is Tuple)) + return false; + var t = (Tuple)other; + + return comparer.Equals(item1, t.item1) && + comparer.Equals(item2, t.item2) && + comparer.Equals(item3, t.item3) && + comparer.Equals(item4, t.item4) && + comparer.Equals(item5, t.item5) && + comparer.Equals(item6, t.item6) && + comparer.Equals(item7, t.item7) && + comparer.Equals(rest, t.rest); + } + + public override int GetHashCode() + { + var comparer1 = EqualityComparer.Default; + var comparer2 = EqualityComparer.Default; + var comparer3 = EqualityComparer.Default; + var comparer4 = EqualityComparer.Default; + var comparer5 = EqualityComparer.Default; + var comparer6 = EqualityComparer.Default; + var comparer7 = EqualityComparer.Default; + var comparer8 = EqualityComparer.Default; + + int h0, h1, h2; + h0 = comparer1.GetHashCode(item1); + h0 = (h0 << 5) + h0 ^ comparer2.GetHashCode(item2); + h1 = comparer3.GetHashCode(item3); + h1 = (h1 << 5) + h1 ^ comparer4.GetHashCode(item4); + h0 = (h0 << 5) + h0 ^ h1; + h1 = comparer5.GetHashCode(item5); + h1 = (h1 << 5) + h1 ^ comparer6.GetHashCode(item6); + h2 = comparer7.GetHashCode(item7); + h2 = (h2 << 5) + h2 ^ comparer8.GetHashCode(rest); + h1 = (h1 << 5) + h1 ^ h2; + h0 = (h0 << 5) + h0 ^ h1; + return h0; + } + + int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) + { + int h0, h1, h2; + h0 = comparer.GetHashCode(item1); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item2); + h1 = comparer.GetHashCode(item3); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item4); + h0 = (h0 << 5) + h0 ^ h1; + h1 = comparer.GetHashCode(item5); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item6); + h2 = comparer.GetHashCode(item7); + h2 = (h2 << 5) + h2 ^ comparer.GetHashCode(rest); + h1 = (h1 << 5) + h1 ^ h2; + h0 = (h0 << 5) + h0 ^ h1; + return h0; + } + + string ITuple.ToString() + { + return String.Format("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}", item1, item2, item3, item4, item5, item6, item7, ((ITuple)rest).ToString()); + } + + public override string ToString() + { + return "(" + ((ITuple)this).ToString() + ")"; + } + + public bool Equals(Tuple other) + { + var comparer1 = EqualityComparer.Default; + var comparer2 = EqualityComparer.Default; + var comparer3 = EqualityComparer.Default; + var comparer4 = EqualityComparer.Default; + var comparer5 = EqualityComparer.Default; + var comparer6 = EqualityComparer.Default; + var comparer7 = EqualityComparer.Default; + var comparer8 = EqualityComparer.Default; + + return comparer1.Equals(item1, other.Item1) && + comparer2.Equals(item2, other.Item2) && + comparer3.Equals(item3, other.Item3) && + comparer4.Equals(item4, other.Item4) && + comparer5.Equals(item5, other.Item5) && + comparer6.Equals(item6, other.Item6) && + comparer7.Equals(item7, other.Item7) && + comparer8.Equals(rest, other.rest); + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/System/Tuple.cs.meta b/Assets/Plugins/UniRx/Scripts/System/Tuple.cs.meta new file mode 100644 index 0000000..376a26d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/System/Tuple.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: be811500a5640704b92de622c9202d48 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/System/Unit.cs b/Assets/Plugins/UniRx/Scripts/System/Unit.cs new file mode 100644 index 0000000..90b71eb --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/System/Unit.cs @@ -0,0 +1,41 @@ +using System; + +namespace UniRx +{ + [Serializable] + public struct Unit : IEquatable + { + static readonly Unit @default = new Unit(); + + public static Unit Default { get { return @default; } } + + public static bool operator ==(Unit first, Unit second) + { + return true; + } + + public static bool operator !=(Unit first, Unit second) + { + return false; + } + + public bool Equals(Unit other) + { + return true; + } + public override bool Equals(object obj) + { + return obj is Unit; + } + + public override int GetHashCode() + { + return 0; + } + + public override string ToString() + { + return "()"; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/System/Unit.cs.meta b/Assets/Plugins/UniRx/Scripts/System/Unit.cs.meta new file mode 100644 index 0000000..1c9fe58 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/System/Unit.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 14f6907c0ae17e64c8fc34f08c3038a4 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Tasks.meta b/Assets/Plugins/UniRx/Scripts/Tasks.meta new file mode 100644 index 0000000..abbb1c7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Tasks.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1a8e9dc9cb0e4794783b1d8c4f32d5c3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Tasks/TaskObservableExtensions.cs b/Assets/Plugins/UniRx/Scripts/Tasks/TaskObservableExtensions.cs new file mode 100644 index 0000000..d5a7970 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Tasks/TaskObservableExtensions.cs @@ -0,0 +1,367 @@ +// this code is borrowed from RxOfficial(rx.codeplex.com) and modified + +#if (NET_4_6 || NET_STANDARD_2_0) + +using System; +using System.Threading.Tasks; +using System.Threading; + +namespace UniRx +{ + /// + /// Provides a set of static methods for converting tasks to observable sequences. + /// + public static class TaskObservableExtensions + { + /// + /// Returns an observable sequence that signals when the task completes. + /// + /// Task to convert to an observable sequence. + /// An observable sequence that produces a unit value when the task completes, or propagates the exception produced by the task. + /// is null. + /// If the specified task object supports cancellation, consider using instead. + public static IObservable ToObservable(this Task task) + { + if (task == null) + throw new ArgumentNullException("task"); + + return ToObservableImpl(task, null); + } + + /// + /// Returns an observable sequence that signals when the task completes. + /// + /// Task to convert to an observable sequence. + /// Scheduler on which to notify observers about completion, cancellation or failure. + /// An observable sequence that produces a unit value when the task completes, or propagates the exception produced by the task. + /// is null or is null. + /// If the specified task object supports cancellation, consider using instead. + public static IObservable ToObservable(this Task task, IScheduler scheduler) + { + if (task == null) + throw new ArgumentNullException("task"); + if (scheduler == null) + throw new ArgumentNullException("scheduler"); + + return ToObservableImpl(task, scheduler); + } + + private static IObservable ToObservableImpl(Task task, IScheduler scheduler) + { + var res = default(IObservable); + + if (task.IsCompleted) + { + scheduler = scheduler ?? Scheduler.Immediate; + + switch (task.Status) + { + case TaskStatus.RanToCompletion: + res = Observable.Return(Unit.Default, scheduler); + break; + case TaskStatus.Faulted: + res = Observable.Throw(task.Exception.InnerException, scheduler); + break; + case TaskStatus.Canceled: + res = Observable.Throw(new TaskCanceledException(task), scheduler); + break; + } + } + else + { + // + // Separate method to avoid closure in synchronous completion case. + // + res = ToObservableSlow(task, scheduler); + } + + return res; + } + + private static IObservable ToObservableSlow(Task task, IScheduler scheduler) + { + var subject = new AsyncSubject(); + + var options = GetTaskContinuationOptions(scheduler); + + task.ContinueWith(t => ToObservableDone(task, subject), options); + + return ToObservableResult(subject, scheduler); + } + + private static void ToObservableDone(Task task, IObserver subject) + { + switch (task.Status) + { + case TaskStatus.RanToCompletion: + subject.OnNext(Unit.Default); + subject.OnCompleted(); + break; + case TaskStatus.Faulted: + subject.OnError(task.Exception.InnerException); + break; + case TaskStatus.Canceled: + subject.OnError(new TaskCanceledException(task)); + break; + } + } + + /// + /// Returns an observable sequence that propagates the result of the task. + /// + /// The type of the result produced by the task. + /// Task to convert to an observable sequence. + /// An observable sequence that produces the task's result, or propagates the exception produced by the task. + /// is null. + /// If the specified task object supports cancellation, consider using instead. + public static IObservable ToObservable(this Task task) + { + if (task == null) + throw new ArgumentNullException("task"); + + return ToObservableImpl(task, null); + } + + /// + /// Returns an observable sequence that propagates the result of the task. + /// + /// The type of the result produced by the task. + /// Task to convert to an observable sequence. + /// Scheduler on which to notify observers about completion, cancellation or failure. + /// An observable sequence that produces the task's result, or propagates the exception produced by the task. + /// is null or is null. + /// If the specified task object supports cancellation, consider using instead. + public static IObservable ToObservable(this Task task, IScheduler scheduler) + { + if (task == null) + throw new ArgumentNullException("task"); + if (scheduler == null) + throw new ArgumentNullException("scheduler"); + + return ToObservableImpl(task, scheduler); + } + + private static IObservable ToObservableImpl(Task task, IScheduler scheduler) + { + var res = default(IObservable); + + if (task.IsCompleted) + { + scheduler = scheduler ?? Scheduler.Immediate; + + switch (task.Status) + { + case TaskStatus.RanToCompletion: + res = Observable.Return(task.Result, scheduler); + break; + case TaskStatus.Faulted: + res = Observable.Throw(task.Exception.InnerException, scheduler); + break; + case TaskStatus.Canceled: + res = Observable.Throw(new TaskCanceledException(task), scheduler); + break; + } + } + else + { + // + // Separate method to avoid closure in synchronous completion case. + // + res = ToObservableSlow(task, scheduler); + } + + return res; + } + + private static IObservable ToObservableSlow(Task task, IScheduler scheduler) + { + var subject = new AsyncSubject(); + + var options = GetTaskContinuationOptions(scheduler); + + task.ContinueWith(t => ToObservableDone(task, subject), options); + + return ToObservableResult(subject, scheduler); + } + + private static void ToObservableDone(Task task, IObserver subject) + { + switch (task.Status) + { + case TaskStatus.RanToCompletion: + subject.OnNext(task.Result); + subject.OnCompleted(); + break; + case TaskStatus.Faulted: + subject.OnError(task.Exception.InnerException); + break; + case TaskStatus.Canceled: + subject.OnError(new TaskCanceledException(task)); + break; + } + } + + private static TaskContinuationOptions GetTaskContinuationOptions(IScheduler scheduler) + { + var options = TaskContinuationOptions.None; + + if (scheduler != null) + { + // + // We explicitly don't special-case the immediate scheduler here. If the user asks for a + // synchronous completion, we'll try our best. However, there's no guarantee due to the + // internal stack probing in the TPL, which may cause asynchronous completion on a thread + // pool thread in order to avoid stack overflows. Therefore we can only attempt to be more + // efficient in the case where the user specified a scheduler, hence we know that the + // continuation will trigger a scheduling operation. In case of the immediate scheduler, + // it really becomes "immediate scheduling" wherever the TPL decided to run the continuation, + // i.e. not necessarily where the task was completed from. + // + options |= TaskContinuationOptions.ExecuteSynchronously; + } + + return options; + } + + private static IObservable ToObservableResult(AsyncSubject subject, IScheduler scheduler) + { + if (scheduler != null) + { + return subject.ObserveOn(scheduler); + } + else + { + return subject.AsObservable(); + } + } + + /// + /// Returns a task that will receive the last value or the exception produced by the observable sequence. + /// + /// The type of the elements in the source sequence. + /// Observable sequence to convert to a task. + /// A task that will receive the last element or the exception produced by the observable sequence. + /// is null. + public static Task ToTask(this IObservable observable) + { + if (observable == null) + throw new ArgumentNullException("observable"); + + return observable.ToTask(new CancellationToken(), null); + } + + /// + /// Returns a task that will receive the last value or the exception produced by the observable sequence. + /// + /// The type of the elements in the source sequence. + /// Observable sequence to convert to a task. + /// The state to use as the underlying task's AsyncState. + /// A task that will receive the last element or the exception produced by the observable sequence. + /// is null. + public static Task ToTask(this IObservable observable, object state) + { + if (observable == null) + throw new ArgumentNullException("observable"); + + return observable.ToTask(new CancellationToken(), state); + } + + /// + /// Returns a task that will receive the last value or the exception produced by the observable sequence. + /// + /// The type of the elements in the source sequence. + /// Observable sequence to convert to a task. + /// Cancellation token that can be used to cancel the task, causing unsubscription from the observable sequence. + /// A task that will receive the last element or the exception produced by the observable sequence. + /// is null. + public static Task ToTask(this IObservable observable, CancellationToken cancellationToken) + { + if (observable == null) + throw new ArgumentNullException("observable"); + + return observable.ToTask(cancellationToken, null); + } + + /// + /// Returns a task that will receive the last value or the exception produced by the observable sequence. + /// + /// The type of the elements in the source sequence. + /// Observable sequence to convert to a task. + /// Cancellation token that can be used to cancel the task, causing unsubscription from the observable sequence. + /// The state to use as the underlying task's AsyncState. + /// A task that will receive the last element or the exception produced by the observable sequence. + /// is null. + public static Task ToTask(this IObservable observable, CancellationToken cancellationToken, object state) + { + if (observable == null) + throw new ArgumentNullException("observable"); + + var hasValue = false; + var lastValue = default(TResult); + + var tcs = new TaskCompletionSource(state); + + var disposable = new SingleAssignmentDisposable(); + + var ctr = default(CancellationTokenRegistration); + + if (cancellationToken.CanBeCanceled) + { + ctr = cancellationToken.Register(() => + { + disposable.Dispose(); + tcs.TrySetCanceled(cancellationToken); + }); + } + + var taskCompletionObserver = Observer.Create( + value => + { + hasValue = true; + lastValue = value; + }, + ex => + { + tcs.TrySetException(ex); + + ctr.Dispose(); // no null-check needed (struct) + disposable.Dispose(); + }, + () => + { + if (hasValue) + tcs.TrySetResult(lastValue); + else + tcs.TrySetException(new InvalidOperationException("Strings_Linq.NO_ELEMENTS")); + + ctr.Dispose(); // no null-check needed (struct) + disposable.Dispose(); + } + ); + + // + // Subtle race condition: if the source completes before we reach the line below, the SingleAssigmentDisposable + // will already have been disposed. Upon assignment, the disposable resource being set will be disposed on the + // spot, which may throw an exception. (Similar to TFS 487142) + // + try + { + // + // [OK] Use of unsafe Subscribe: we're catching the exception here to set the TaskCompletionSource. + // + // Notice we could use a safe subscription to route errors through OnError, but we still need the + // exception handling logic here for the reason explained above. We cannot afford to throw here + // and as a result never set the TaskCompletionSource, so we tunnel everything through here. + // + disposable.Disposable = observable.Subscribe/*Unsafe*/(taskCompletionObserver); + } + catch (Exception ex) + { + tcs.TrySetException(ex); + } + + return tcs.Task; + } + } +} +#endif diff --git a/Assets/Plugins/UniRx/Scripts/Tasks/TaskObservableExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Tasks/TaskObservableExtensions.cs.meta new file mode 100644 index 0000000..8156ead --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Tasks/TaskObservableExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d4f80d45cec56574e990cc840d1ac16b +timeCreated: 1475139656 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/TimeInterval.cs b/Assets/Plugins/UniRx/Scripts/TimeInterval.cs new file mode 100644 index 0000000..e43e79e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/TimeInterval.cs @@ -0,0 +1,117 @@ +// original code from rx.codeplex.com + +/* ------------------ */ + +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Globalization; + +namespace UniRx +{ + /// + /// Represents a value associated with time interval information. + /// The time interval can represent the time it took to produce the value, the interval relative to a previous value, the value's delivery time relative to a base, etc. + /// + /// The type of the value being annotated with time interval information. + [Serializable] + public struct TimeInterval : IEquatable> + { + private readonly TimeSpan _interval; + private readonly T _value; + + /// + /// Constructs a time interval value. + /// + /// The value to be annotated with a time interval. + /// Time interval associated with the value. + public TimeInterval(T value, TimeSpan interval) + { + _interval = interval; + _value = value; + } + + /// + /// Gets the value. + /// + public T Value + { + get { return _value; } + } + + /// + /// Gets the interval. + /// + public TimeSpan Interval + { + get { return _interval; } + } + + /// + /// Determines whether the current TimeInterval<T> value has the same Value and Interval as a specified TimeInterval<T> value. + /// + /// An object to compare to the current TimeInterval<T> value. + /// true if both TimeInterval<T> values have the same Value and Interval; otherwise, false. + public bool Equals(TimeInterval other) + { + return other.Interval.Equals(Interval) && EqualityComparer.Default.Equals(Value, other.Value); + } + + /// + /// Determines whether the two specified TimeInterval<T> values have the same Value and Interval. + /// + /// The first TimeInterval<T> value to compare. + /// The second TimeInterval<T> value to compare. + /// true if the first TimeInterval<T> value has the same Value and Interval as the second TimeInterval<T> value; otherwise, false. + public static bool operator ==(TimeInterval first, TimeInterval second) + { + return first.Equals(second); + } + + /// + /// Determines whether the two specified TimeInterval<T> values don't have the same Value and Interval. + /// + /// The first TimeInterval<T> value to compare. + /// The second TimeInterval<T> value to compare. + /// true if the first TimeInterval<T> value has a different Value or Interval as the second TimeInterval<T> value; otherwise, false. + public static bool operator !=(TimeInterval first, TimeInterval second) + { + return !first.Equals(second); + } + + /// + /// Determines whether the specified System.Object is equal to the current TimeInterval<T>. + /// + /// The System.Object to compare with the current TimeInterval<T>. + /// true if the specified System.Object is equal to the current TimeInterval<T>; otherwise, false. + public override bool Equals(object obj) + { + if (!(obj is TimeInterval)) + return false; + + var other = (TimeInterval)obj; + return this.Equals(other); + } + + /// + /// Returns the hash code for the current TimeInterval<T> value. + /// + /// A hash code for the current TimeInterval<T> value. + public override int GetHashCode() + { + var valueHashCode = Value == null ? 1963 : Value.GetHashCode(); + + return Interval.GetHashCode() ^ valueHashCode; + } + + /// + /// Returns a string representation of the current TimeInterval<T> value. + /// + /// String representation of the current TimeInterval<T> value. + public override string ToString() + { + return String.Format(CultureInfo.CurrentCulture, "{0}@{1}", Value, Interval); + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/TimeInterval.cs.meta b/Assets/Plugins/UniRx/Scripts/TimeInterval.cs.meta new file mode 100644 index 0000000..e7329f1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/TimeInterval.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dd48622e783cadc47af9a6b456ac8438 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Timestamped.cs b/Assets/Plugins/UniRx/Scripts/Timestamped.cs new file mode 100644 index 0000000..cc409d2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Timestamped.cs @@ -0,0 +1,135 @@ +// original code from rx.codeplex.com + +/* ------------------ */ + +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Globalization; + +namespace UniRx +{ + /// + /// Represents value with a timestamp on it. + /// The timestamp typically represents the time the value was received, using an IScheduler's clock to obtain the current time. + /// + /// The type of the value being timestamped. + [Serializable] + public struct Timestamped : IEquatable> + { + private readonly DateTimeOffset _timestamp; + private readonly T _value; + + /// + /// Constructs a timestamped value. + /// + /// The value to be annotated with a timestamp. + /// Timestamp associated with the value. + public Timestamped(T value, DateTimeOffset timestamp) + { + _timestamp = timestamp; + _value = value; + } + + /// + /// Gets the value. + /// + public T Value + { + get { return _value; } + } + + /// + /// Gets the timestamp. + /// + public DateTimeOffset Timestamp + { + get { return _timestamp; } + } + + /// + /// Determines whether the current Timestamped<T> value has the same Value and Timestamp as a specified Timestamped<T> value. + /// + /// An object to compare to the current Timestamped<T> value. + /// true if both Timestamped<T> values have the same Value and Timestamp; otherwise, false. + public bool Equals(Timestamped other) + { + return other.Timestamp.Equals(Timestamp) && EqualityComparer.Default.Equals(Value, other.Value); + } + + /// + /// Determines whether the two specified Timestamped<T> values have the same Value and Timestamp. + /// + /// The first Timestamped<T> value to compare. + /// The second Timestamped<T> value to compare. + /// true if the first Timestamped<T> value has the same Value and Timestamp as the second Timestamped<T> value; otherwise, false. + public static bool operator ==(Timestamped first, Timestamped second) + { + return first.Equals(second); + } + + /// + /// Determines whether the two specified Timestamped<T> values don't have the same Value and Timestamp. + /// + /// The first Timestamped<T> value to compare. + /// The second Timestamped<T> value to compare. + /// true if the first Timestamped<T> value has a different Value or Timestamp as the second Timestamped<T> value; otherwise, false. + public static bool operator !=(Timestamped first, Timestamped second) + { + return !first.Equals(second); + } + + /// + /// Determines whether the specified System.Object is equal to the current Timestamped<T>. + /// + /// The System.Object to compare with the current Timestamped<T>. + /// true if the specified System.Object is equal to the current Timestamped<T>; otherwise, false. + public override bool Equals(object obj) + { + if (!(obj is Timestamped)) + return false; + + var other = (Timestamped)obj; + return this.Equals(other); + } + + /// + /// Returns the hash code for the current Timestamped<T> value. + /// + /// A hash code for the current Timestamped<T> value. + public override int GetHashCode() + { + var valueHashCode = Value == null ? 1979 : Value.GetHashCode(); + + return _timestamp.GetHashCode() ^ valueHashCode; + } + + /// + /// Returns a string representation of the current Timestamped<T> value. + /// + /// String representation of the current Timestamped<T> value. + public override string ToString() + { + return String.Format(CultureInfo.CurrentCulture, "{0}@{1}", Value, Timestamp); + } + } + + /// + /// A helper class with a factory method for creating Timestamped<T> instances. + /// + public static class Timestamped + { + /// + /// Creates an instance of a Timestamped<T>. This is syntactic sugar that uses type inference + /// to avoid specifying a type in a constructor call, which is very useful when using anonymous types. + /// + /// The value to be annotated with a timestamp. + /// Timestamp associated with the value. + /// Creates a new timestamped value. + public static Timestamped Create(T value, DateTimeOffset timestamp) + { + return new Timestamped(value, timestamp); + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/Timestamped.cs.meta b/Assets/Plugins/UniRx/Scripts/Timestamped.cs.meta new file mode 100644 index 0000000..6eb3903 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/Timestamped.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c1d908b82d0e2b4489d3351a484e5eae +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UniRx.asmdef b/Assets/Plugins/UniRx/Scripts/UniRx.asmdef new file mode 100644 index 0000000..2339898 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UniRx.asmdef @@ -0,0 +1,12 @@ +{ + "name": "UniRx", + "references": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [] +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UniRx.asmdef.meta b/Assets/Plugins/UniRx/Scripts/UniRx.asmdef.meta new file mode 100644 index 0000000..aaf3bd2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UniRx.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 560b04d1a97f54a4e82edc0cbbb69285 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge.meta new file mode 100644 index 0000000..4ac7722 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 985510b22bf11b344bf39c2f0a6cd1b9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/AsyncOperationExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/AsyncOperationExtensions.cs new file mode 100644 index 0000000..996f160 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/AsyncOperationExtensions.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections; +using System.Threading; +using UnityEngine; + +#if !UniRxLibrary +using ObservableUnity = UniRx.Observable; +#endif + +namespace UniRx +{ + public static partial class AsyncOperationExtensions + { + /// + /// If you needs return value, use AsAsyncOperationObservable instead. + /// + public static IObservable AsObservable(this AsyncOperation asyncOperation, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => AsObservableCore(asyncOperation, observer, progress, cancellation)); + } + + // T: where T : AsyncOperation is ambigious with IObservable.AsObservable + public static IObservable AsAsyncOperationObservable(this T asyncOperation, IProgress progress = null) + where T : AsyncOperation + { + return ObservableUnity.FromCoroutine((observer, cancellation) => AsObservableCore(asyncOperation, observer, progress, cancellation)); + } + + static IEnumerator AsObservableCore(T asyncOperation, IObserver observer, IProgress reportProgress, CancellationToken cancel) + where T : AsyncOperation + { + if (reportProgress != null) + { + while (!asyncOperation.isDone && !cancel.IsCancellationRequested) + { + try + { + reportProgress.Report(asyncOperation.progress); + } + catch (Exception ex) + { + observer.OnError(ex); + yield break; + } + yield return null; + } + } + else + { + if (!asyncOperation.isDone) + { + yield return asyncOperation; + } + } + + if (cancel.IsCancellationRequested) yield break; + + if (reportProgress != null) + { + try + { + reportProgress.Report(asyncOperation.progress); + } + catch (Exception ex) + { + observer.OnError(ex); + yield break; + } + } + + observer.OnNext(asyncOperation); + observer.OnCompleted(); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/AsyncOperationExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/AsyncOperationExtensions.cs.meta new file mode 100644 index 0000000..d261ab7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/AsyncOperationExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 245d77a29b1ece34e96bfc80f8c825d8 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CancellationToken.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CancellationToken.cs new file mode 100644 index 0000000..0384ba6 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CancellationToken.cs @@ -0,0 +1,40 @@ +#if !(NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) + +using System; + +namespace UniRx +{ + public struct CancellationToken + { + readonly ICancelable source; + + public static readonly CancellationToken Empty = new CancellationToken(null); + + /// Same as Empty. + public static readonly CancellationToken None = new CancellationToken(null); + + public CancellationToken(ICancelable source) + { + this.source = source; + } + + public bool IsCancellationRequested + { + get + { + return (source == null) ? false : source.IsDisposed; + } + } + + public void ThrowIfCancellationRequested() + { + if (IsCancellationRequested) + { + throw new OperationCanceledException(); + } + } + } +} + +#endif + diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CancellationToken.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CancellationToken.cs.meta new file mode 100644 index 0000000..ebefcbc --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CancellationToken.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e02a1bf45f8861048a6014cf7eab1825 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CoroutineAsyncBridge.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CoroutineAsyncBridge.cs new file mode 100644 index 0000000..c2d8ee8 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CoroutineAsyncBridge.cs @@ -0,0 +1,125 @@ +#if (NET_4_6 || NET_STANDARD_2_0) + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace UniRx +{ + public class CoroutineAsyncBridge : INotifyCompletion + { + Action continuation; + public bool IsCompleted { get; private set; } + + CoroutineAsyncBridge() + { + IsCompleted = false; + } + + public static CoroutineAsyncBridge Start(T awaitTarget) + { + var bridge = new CoroutineAsyncBridge(); + MainThreadDispatcher.StartCoroutine(bridge.Run(awaitTarget)); + return bridge; + } + + IEnumerator Run(T target) + { + yield return target; + IsCompleted = true; + continuation(); + } + + public void OnCompleted(Action continuation) + { + this.continuation = continuation; + } + + public void GetResult() + { + if (!IsCompleted) throw new InvalidOperationException("coroutine not yet completed"); + } + } + + public class CoroutineAsyncBridge : INotifyCompletion + { + readonly T result; + Action continuation; + public bool IsCompleted { get; private set; } + + CoroutineAsyncBridge(T result) + { + IsCompleted = false; + this.result = result; + } + + public static CoroutineAsyncBridge Start(T awaitTarget) + { + var bridge = new CoroutineAsyncBridge(awaitTarget); + MainThreadDispatcher.StartCoroutine(bridge.Run(awaitTarget)); + return bridge; + } + + IEnumerator Run(T target) + { + yield return target; + IsCompleted = true; + continuation(); + } + + public void OnCompleted(Action continuation) + { + this.continuation = continuation; + } + + public T GetResult() + { + if (!IsCompleted) throw new InvalidOperationException("coroutine not yet completed"); + return result; + } + } + + public static class CoroutineAsyncExtensions + { + public static CoroutineAsyncBridge GetAwaiter(this Coroutine coroutine) + { + return CoroutineAsyncBridge.Start(coroutine); + } + +#if !(CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6))) + + // should use UniRx.Async in C# 7.0 + +#if UNITY_2018_3_OR_NEWER +#pragma warning disable CS0618 +#endif + public static CoroutineAsyncBridge GetAwaiter(this WWW www) + { + return CoroutineAsyncBridge.Start(www); + } +#if UNITY_2018_3_OR_NEWER +#pragma warning restore CS0618 +#endif + + + + public static CoroutineAsyncBridge GetAwaiter(this AsyncOperation asyncOperation) + { + return CoroutineAsyncBridge.Start(asyncOperation); + } + + public static CoroutineAsyncBridge GetAwaiter(this IEnumerator coroutine) + { + return CoroutineAsyncBridge.Start(coroutine); + } + +#endif + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CoroutineAsyncBridge.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CoroutineAsyncBridge.cs.meta new file mode 100644 index 0000000..2efbac5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CoroutineAsyncBridge.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 93ca3de3810199947871ab4a77014fa3 +timeCreated: 1475193276 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics.meta new file mode 100644 index 0000000..ab2be69 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6e6a509c96780334891d20ffced69045 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntry.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntry.cs new file mode 100644 index 0000000..d7c5d57 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntry.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Text; +using UnityEngine; + +namespace UniRx.Diagnostics +{ + public struct LogEntry + { + // requires + public string LoggerName { get; private set; } + public LogType LogType { get; private set; } + public string Message { get; private set; } + public DateTime Timestamp { get; private set; } + + // options + + /// [Optional] + public UnityEngine.Object Context { get; private set; } + /// [Optional] + public Exception Exception { get; private set; } + /// [Optional] + public string StackTrace { get; private set; } + /// [Optional] + public object State { get; private set; } + + public LogEntry(string loggerName, LogType logType, DateTime timestamp, string message, UnityEngine.Object context = null, Exception exception = null, string stackTrace = null, object state = null) + : this() + { + this.LoggerName = loggerName; + this.LogType = logType; + this.Timestamp = timestamp; + this.Message = message; + this.Context = context; + this.Exception = exception; + this.StackTrace = stackTrace; + this.State = state; + } + + public override string ToString() + { + var plusEx = (Exception != null) ? (Environment.NewLine + Exception.ToString()) : ""; + return "[" + Timestamp.ToString() + "]" + + "[" + LoggerName + "]" + + "[" + LogType.ToString() + "]" + + Message + + plusEx; + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntry.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntry.cs.meta new file mode 100644 index 0000000..7669e9f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntry.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 53917e87e91c0e4449402e5d85a04765 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntryExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntryExtensions.cs new file mode 100644 index 0000000..d70cc9d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntryExtensions.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace UniRx.Diagnostics +{ + public static partial class LogEntryExtensions + { + public static IDisposable LogToUnityDebug(this IObservable source) + { + return source.Subscribe(new UnityDebugSink()); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntryExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntryExtensions.cs.meta new file mode 100644 index 0000000..f4303f0 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntryExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8706ef5a13e53ec46b4848a7eec5e826 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/Logger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/Logger.cs new file mode 100644 index 0000000..9123bca --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/Logger.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.Text; +using UnityEngine; + +namespace UniRx.Diagnostics +{ + public partial class Logger + { + static bool isInitialized = false; + static bool isDebugBuild = false; + + public string Name { get; private set; } + protected readonly Action logPublisher; + + public Logger(string loggerName) + { + this.Name = loggerName; + this.logPublisher = ObservableLogger.RegisterLogger(this); + } + + /// Output LogType.Log but only enables isDebugBuild + public virtual void Debug(object message, UnityEngine.Object context = null) + { + if (!isInitialized) + { + isInitialized = true; + isDebugBuild = UnityEngine.Debug.isDebugBuild; + } + + if (isDebugBuild) + { + logPublisher(new LogEntry( + message: (message != null) ? message.ToString() : "", + logType: LogType.Log, + timestamp: DateTime.Now, + loggerName: Name, + context: context)); + } + } + + /// Output LogType.Log but only enables isDebugBuild + public virtual void DebugFormat(string format, params object[] args) + { + if (!isInitialized) + { + isInitialized = true; + isDebugBuild = UnityEngine.Debug.isDebugBuild; + } + + if (isDebugBuild) + { + logPublisher(new LogEntry( + message: (format != null) ? string.Format(format, args) : "", + logType: LogType.Log, + timestamp: DateTime.Now, + loggerName: Name, + context: null)); + } + } + + public virtual void Log(object message, UnityEngine.Object context = null) + { + logPublisher(new LogEntry( + message: (message != null) ? message.ToString() : "", + logType: LogType.Log, + timestamp: DateTime.Now, + loggerName: Name, + context: context)); + } + + public virtual void LogFormat(string format, params object[] args) + { + logPublisher(new LogEntry( + message: (format != null) ? string.Format(format, args) : "", + logType: LogType.Log, + timestamp: DateTime.Now, + loggerName: Name, + context: null)); + } + + public virtual void Warning(object message, UnityEngine.Object context = null) + { + logPublisher(new LogEntry( + message: (message != null) ? message.ToString() : "", + logType: LogType.Warning, + timestamp: DateTime.Now, + loggerName: Name, + context: context)); + } + + public virtual void WarningFormat(string format, params object[] args) + { + logPublisher(new LogEntry( + message: (format != null) ? string.Format(format, args) : "", + logType: LogType.Warning, + timestamp: DateTime.Now, + loggerName: Name, + context: null)); + } + + public virtual void Error(object message, UnityEngine.Object context = null) + { + logPublisher(new LogEntry( + message: (message != null) ? message.ToString() : "", + logType: LogType.Error, + timestamp: DateTime.Now, + loggerName: Name, + context: context)); + } + + public virtual void ErrorFormat(string format, params object[] args) + { + logPublisher(new LogEntry( + message: (format != null) ? string.Format(format, args) : "", + logType: LogType.Error, + timestamp: DateTime.Now, + loggerName: Name, + context: null)); + } + + public virtual void Exception(Exception exception, UnityEngine.Object context = null) + { + logPublisher(new LogEntry( + message: (exception != null) ? exception.ToString() : "", + exception: exception, + logType: LogType.Exception, + timestamp: DateTime.Now, + loggerName: Name, + context: context)); + } + + /// Publish raw LogEntry. + public virtual void Raw(LogEntry logEntry) + { + logPublisher(logEntry); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/Logger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/Logger.cs.meta new file mode 100644 index 0000000..348f963 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/Logger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f0ecf366503cb0644bdd90934d24da62 +timeCreated: 1455373902 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableDebugExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableDebugExtensions.cs new file mode 100644 index 0000000..f200681 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableDebugExtensions.cs @@ -0,0 +1,42 @@ +using System; + +namespace UniRx.Diagnostics +{ + public static class ObservableDebugExtensions + { + /// + /// Debug helper of observbale stream. Works for only DEBUG symbol. + /// + public static IObservable Debug(this IObservable source, string label = null) + { +#if DEBUG + var l = (label == null) ? "" : "[" + label + "]"; + return source.Materialize() + .Do(x => UnityEngine.Debug.Log(l + x.ToString())) + .Dematerialize() + .DoOnCancel(() => UnityEngine.Debug.Log(l + "OnCancel")) + .DoOnSubscribe(() => UnityEngine.Debug.Log(l + "OnSubscribe")); + +#else + return source; +#endif + } + + /// + /// Debug helper of observbale stream. Works for only DEBUG symbol. + /// + public static IObservable Debug(this IObservable source, UniRx.Diagnostics.Logger logger) + { +#if DEBUG + return source.Materialize() + .Do(x => logger.Debug(x.ToString())) + .Dematerialize() + .DoOnCancel(() => logger.Debug("OnCancel")) + .DoOnSubscribe(() => logger.Debug("OnSubscribe")); + +#else + return source; +#endif + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableDebugExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableDebugExtensions.cs.meta new file mode 100644 index 0000000..9968a5d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableDebugExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b43f948e095c3e749a0506709be90d68 +timeCreated: 1468662620 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableLogger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableLogger.cs new file mode 100644 index 0000000..44913a7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableLogger.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Text; +using UnityEngine; + +namespace UniRx.Diagnostics +{ + public class ObservableLogger : IObservable + { + static readonly Subject logPublisher = new Subject(); + + public static readonly ObservableLogger Listener = new ObservableLogger(); + + private ObservableLogger() + { + + } + + public static Action RegisterLogger(Logger logger) + { + if (logger.Name == null) throw new ArgumentNullException("logger.Name is null"); + + return logPublisher.OnNext; + } + + public IDisposable Subscribe(IObserver observer) + { + return logPublisher.Subscribe(observer); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableLogger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableLogger.cs.meta new file mode 100644 index 0000000..84b786e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableLogger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 063f79dc45f902c459f0955d27b445d7 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/UnityDebugSink.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/UnityDebugSink.cs new file mode 100644 index 0000000..ecaf327 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/UnityDebugSink.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Text; +using UnityEngine; + +namespace UniRx.Diagnostics +{ + public class UnityDebugSink : IObserver + { + public void OnCompleted() + { + // do nothing + } + + public void OnError(Exception error) + { + // do nothing + } + + public void OnNext(LogEntry value) + { + // avoid multithread exception. + // (value.Context == null) can only be called from the main thread. + var ctx = (System.Object)value.Context; + + switch (value.LogType) + { + case LogType.Error: + if (ctx == null) + { + Debug.LogError(value.Message); + } + else + { + Debug.LogError(value.Message, value.Context); + } + break; + case LogType.Exception: + if (ctx == null) + { + Debug.LogException(value.Exception); + } + else + { + Debug.LogException(value.Exception, value.Context); + } + break; + case LogType.Log: + if (ctx == null) + { + Debug.Log(value.Message); + } + else + { + Debug.Log(value.Message, value.Context); + } + break; + case LogType.Warning: + if (ctx == null) + { + Debug.LogWarning(value.Message); + } + else + { + Debug.LogWarning(value.Message, value.Context); + } + break; + default: + break; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/UnityDebugSink.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/UnityDebugSink.cs.meta new file mode 100644 index 0000000..b1db84b --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/UnityDebugSink.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 882166c30c3bff841b1e12d62c392e02 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/FrameInterval.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/FrameInterval.cs new file mode 100644 index 0000000..8d1333c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/FrameInterval.cs @@ -0,0 +1,111 @@ +using System; +using System.Collections.Generic; +using System.Globalization; + +namespace UniRx +{ + /// + /// Represents a value associated with time interval information. + /// The time interval can represent the time it took to produce the value, the interval relative to a previous value, the value's delivery time relative to a base, etc. + /// + /// The type of the value being annotated with time interval information. + [Serializable] + public struct FrameInterval : IEquatable> + { + private readonly int _interval; + private readonly T _value; + + /// + /// Constructs a time interval value. + /// + /// The value to be annotated with a time interval. + /// Time interval associated with the value. + public FrameInterval(T value, int interval) + { + _interval = interval; + _value = value; + } + + /// + /// Gets the value. + /// + public T Value + { + get { return _value; } + } + + /// + /// Gets the interval. + /// + public int Interval + { + get { return _interval; } + } + + /// + /// Determines whether the current FrameInterval<T> value has the same Value and Interval as a specified FrameInterval<T> value. + /// + /// An object to compare to the current FrameInterval<T> value. + /// true if both FrameInterval<T> values have the same Value and Interval; otherwise, false. + public bool Equals(FrameInterval other) + { + return other.Interval.Equals(Interval) && EqualityComparer.Default.Equals(Value, other.Value); + } + + /// + /// Determines whether the two specified FrameInterval<T> values have the same Value and Interval. + /// + /// The first FrameInterval<T> value to compare. + /// The second FrameInterval<T> value to compare. + /// true if the first FrameInterval<T> value has the same Value and Interval as the second FrameInterval<T> value; otherwise, false. + public static bool operator ==(FrameInterval first, FrameInterval second) + { + return first.Equals(second); + } + + /// + /// Determines whether the two specified FrameInterval<T> values don't have the same Value and Interval. + /// + /// The first FrameInterval<T> value to compare. + /// The second FrameInterval<T> value to compare. + /// true if the first FrameInterval<T> value has a different Value or Interval as the second FrameInterval<T> value; otherwise, false. + public static bool operator !=(FrameInterval first, FrameInterval second) + { + return !first.Equals(second); + } + + /// + /// Determines whether the specified System.Object is equal to the current FrameInterval<T>. + /// + /// The System.Object to compare with the current FrameInterval<T>. + /// true if the specified System.Object is equal to the current FrameInterval<T>; otherwise, false. + public override bool Equals(object obj) + { + if (!(obj is FrameInterval)) + return false; + + var other = (FrameInterval)obj; + return this.Equals(other); + } + + /// + /// Returns the hash code for the current FrameInterval<T> value. + /// + /// A hash code for the current FrameInterval<T> value. + public override int GetHashCode() + { + var valueHashCode = Value == null ? 1963 : Value.GetHashCode(); + + return Interval.GetHashCode() ^ valueHashCode; + } + + /// + /// Returns a string representation of the current FrameInterval<T> value. + /// + /// String representation of the current FrameInterval<T> value. + public override string ToString() + { + return String.Format(CultureInfo.CurrentCulture, "{0}@{1}", Value, Interval); + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/FrameInterval.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/FrameInterval.cs.meta new file mode 100644 index 0000000..128c3a6 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/FrameInterval.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 266d1e44d71e7774c9abc5b23773e3f1 +timeCreated: 1467771656 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectableReactiveProperty.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectableReactiveProperty.cs new file mode 100644 index 0000000..ac54988 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectableReactiveProperty.cs @@ -0,0 +1,325 @@ +using System; +using System.Collections.Generic; +using UniRx.InternalUtil; +using UnityEngine; + +namespace UniRx +{ + /// + /// Inspectable ReactiveProperty. + /// + [Serializable] + public class IntReactiveProperty : ReactiveProperty + { + public IntReactiveProperty() + : base() + { + + } + + public IntReactiveProperty(int initialValue) + : base(initialValue) + { + + } + } + + /// + /// Inspectable ReactiveProperty. + /// + [Serializable] + public class LongReactiveProperty : ReactiveProperty + { + public LongReactiveProperty() + : base() + { + + } + + public LongReactiveProperty(long initialValue) + : base(initialValue) + { + + } + } + + + /// + /// Inspectable ReactiveProperty. + /// + [Serializable] + public class ByteReactiveProperty : ReactiveProperty + { + public ByteReactiveProperty() + : base() + { + + } + + public ByteReactiveProperty(byte initialValue) + : base(initialValue) + { + + } + } + + /// + /// Inspectable ReactiveProperty. + /// + [Serializable] + public class FloatReactiveProperty : ReactiveProperty + { + public FloatReactiveProperty() + : base() + { + + } + + public FloatReactiveProperty(float initialValue) + : base(initialValue) + { + + } + } + + /// + /// Inspectable ReactiveProperty. + /// + [Serializable] + public class DoubleReactiveProperty : ReactiveProperty + { + public DoubleReactiveProperty() + : base() + { + + } + + public DoubleReactiveProperty(double initialValue) + : base(initialValue) + { + + } + } + + /// + /// Inspectable ReactiveProperty. + /// + [Serializable] + public class StringReactiveProperty : ReactiveProperty + { + public StringReactiveProperty() + : base() + { + + } + + public StringReactiveProperty(string initialValue) + : base(initialValue) + { + + } + } + + /// + /// Inspectable ReactiveProperty. + /// + [Serializable] + public class BoolReactiveProperty : ReactiveProperty + { + public BoolReactiveProperty() + : base() + { + + } + + public BoolReactiveProperty(bool initialValue) + : base(initialValue) + { + + } + } + + /// Inspectable ReactiveProperty. + [Serializable] + public class Vector2ReactiveProperty : ReactiveProperty + { + public Vector2ReactiveProperty() + { + + } + + public Vector2ReactiveProperty(Vector2 initialValue) + : base(initialValue) + { + + } + + protected override IEqualityComparer EqualityComparer + { + get + { + return UnityEqualityComparer.Vector2; + } + } + } + + /// Inspectable ReactiveProperty. + [Serializable] + public class Vector3ReactiveProperty : ReactiveProperty + { + public Vector3ReactiveProperty() + { + + } + + public Vector3ReactiveProperty(Vector3 initialValue) + : base(initialValue) + { + + } + + protected override IEqualityComparer EqualityComparer + { + get + { + return UnityEqualityComparer.Vector3; + } + } + } + + /// Inspectable ReactiveProperty. + [Serializable] + public class Vector4ReactiveProperty : ReactiveProperty + { + public Vector4ReactiveProperty() + { + + } + + public Vector4ReactiveProperty(Vector4 initialValue) + : base(initialValue) + { + + } + + protected override IEqualityComparer EqualityComparer + { + get + { + return UnityEqualityComparer.Vector4; + } + } + } + + /// Inspectable ReactiveProperty. + [Serializable] + public class ColorReactiveProperty : ReactiveProperty + { + public ColorReactiveProperty() + { + + } + + public ColorReactiveProperty(Color initialValue) + : base(initialValue) + { + + } + + protected override IEqualityComparer EqualityComparer + { + get + { + return UnityEqualityComparer.Color; + } + } + } + + /// Inspectable ReactiveProperty. + [Serializable] + public class RectReactiveProperty : ReactiveProperty + { + public RectReactiveProperty() + { + + } + + public RectReactiveProperty(Rect initialValue) + : base(initialValue) + { + + } + + protected override IEqualityComparer EqualityComparer + { + get + { + return UnityEqualityComparer.Rect; + } + } + } + + /// Inspectable ReactiveProperty. + [Serializable] + public class AnimationCurveReactiveProperty : ReactiveProperty + { + public AnimationCurveReactiveProperty() + { + + } + + public AnimationCurveReactiveProperty(AnimationCurve initialValue) + : base(initialValue) + { + + } + } + + /// Inspectable ReactiveProperty. + [Serializable] + public class BoundsReactiveProperty : ReactiveProperty + { + public BoundsReactiveProperty() + { + + } + + public BoundsReactiveProperty(Bounds initialValue) + : base(initialValue) + { + + } + + protected override IEqualityComparer EqualityComparer + { + get + { + return UnityEqualityComparer.Bounds; + } + } + } + + /// Inspectable ReactiveProperty. + [Serializable] + public class QuaternionReactiveProperty : ReactiveProperty + { + public QuaternionReactiveProperty() + { + + } + + public QuaternionReactiveProperty(Quaternion initialValue) + : base(initialValue) + { + + } + + protected override IEqualityComparer EqualityComparer + { + get + { + return UnityEqualityComparer.Quaternion; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectableReactiveProperty.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectableReactiveProperty.cs.meta new file mode 100644 index 0000000..968f323 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectableReactiveProperty.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 13c690f353ea23141aca4090d28aaa9c +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectorDisplayDrawer.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectorDisplayDrawer.cs new file mode 100644 index 0000000..9dd4316 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectorDisplayDrawer.cs @@ -0,0 +1,306 @@ +using System; +using System.Reflection; +using UnityEngine; +using System.Text.RegularExpressions; +using System.Collections; +using System.Linq; + +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace UniRx +{ + [System.AttributeUsage(System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] + public class InspectorDisplayAttribute : PropertyAttribute + { + public string FieldName { get; private set; } + public bool NotifyPropertyChanged { get; private set; } + + public InspectorDisplayAttribute(string fieldName = "value", bool notifyPropertyChanged = true) + { + FieldName = fieldName; + NotifyPropertyChanged = notifyPropertyChanged; + } + } + + /// + /// Enables multiline input field for StringReactiveProperty. Default line is 3. + /// + [System.AttributeUsage(System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] + public class MultilineReactivePropertyAttribute : PropertyAttribute + { + public int Lines { get; private set; } + + public MultilineReactivePropertyAttribute() + { + Lines = 3; + } + + public MultilineReactivePropertyAttribute(int lines) + { + this.Lines = lines; + } + } + + /// + /// Enables range input field for Int/FloatReactiveProperty. + /// + [System.AttributeUsage(System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] + public class RangeReactivePropertyAttribute : PropertyAttribute + { + public float Min { get; private set; } + public float Max { get; private set; } + + public RangeReactivePropertyAttribute(float min, float max) + { + this.Min = min; + this.Max = max; + } + } + +#if UNITY_EDITOR + + + // InspectorDisplay and for Specialized ReactiveProperty + // If you want to customize other specialized ReactiveProperty + // [UnityEditor.CustomPropertyDrawer(typeof(YourSpecializedReactiveProperty))] + // public class ExtendInspectorDisplayDrawer : InspectorDisplayDrawer { } + + [UnityEditor.CustomPropertyDrawer(typeof(InspectorDisplayAttribute))] + [UnityEditor.CustomPropertyDrawer(typeof(IntReactiveProperty))] + [UnityEditor.CustomPropertyDrawer(typeof(LongReactiveProperty))] + [UnityEditor.CustomPropertyDrawer(typeof(ByteReactiveProperty))] + [UnityEditor.CustomPropertyDrawer(typeof(FloatReactiveProperty))] + [UnityEditor.CustomPropertyDrawer(typeof(DoubleReactiveProperty))] + [UnityEditor.CustomPropertyDrawer(typeof(StringReactiveProperty))] + [UnityEditor.CustomPropertyDrawer(typeof(BoolReactiveProperty))] + [UnityEditor.CustomPropertyDrawer(typeof(Vector2ReactiveProperty))] + [UnityEditor.CustomPropertyDrawer(typeof(Vector3ReactiveProperty))] + [UnityEditor.CustomPropertyDrawer(typeof(Vector4ReactiveProperty))] + [UnityEditor.CustomPropertyDrawer(typeof(ColorReactiveProperty))] + [UnityEditor.CustomPropertyDrawer(typeof(RectReactiveProperty))] + [UnityEditor.CustomPropertyDrawer(typeof(AnimationCurveReactiveProperty))] + [UnityEditor.CustomPropertyDrawer(typeof(BoundsReactiveProperty))] + [UnityEditor.CustomPropertyDrawer(typeof(QuaternionReactiveProperty))] + public class InspectorDisplayDrawer : UnityEditor.PropertyDrawer + { + public override void OnGUI(Rect position, UnityEditor.SerializedProperty property, GUIContent label) + { + string fieldName; + bool notifyPropertyChanged; + { + var attr = this.attribute as InspectorDisplayAttribute; + fieldName = (attr == null) ? "value" : attr.FieldName; + notifyPropertyChanged = (attr == null) ? true : attr.NotifyPropertyChanged; + } + + if (notifyPropertyChanged) + { + EditorGUI.BeginChangeCheck(); + } + var targetSerializedProperty = property.FindPropertyRelative(fieldName); + if (targetSerializedProperty == null) + { + UnityEditor.EditorGUI.LabelField(position, label, new GUIContent() { text = "InspectorDisplay can't find target:" + fieldName }); + if (notifyPropertyChanged) + { + EditorGUI.EndChangeCheck(); + } + return; + } + else + { + EmitPropertyField(position, targetSerializedProperty, label); + } + + if (notifyPropertyChanged) + { + if (EditorGUI.EndChangeCheck()) + { + property.serializedObject.ApplyModifiedProperties(); // deserialize to field + + var paths = property.propertyPath.Split('.'); // X.Y.Z... + var attachedComponent = property.serializedObject.targetObject; + + var targetProp = (paths.Length == 1) + ? fieldInfo.GetValue(attachedComponent) + : GetValueRecursive(attachedComponent, 0, paths); + if (targetProp == null) return; + var propInfo = targetProp.GetType().GetProperty(fieldName, BindingFlags.IgnoreCase | BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); + var modifiedValue = propInfo.GetValue(targetProp, null); // retrieve new value + + var methodInfo = targetProp.GetType().GetMethod("SetValueAndForceNotify", BindingFlags.IgnoreCase | BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); + if (methodInfo != null) + { + methodInfo.Invoke(targetProp, new object[] { modifiedValue }); + } + } + else + { + property.serializedObject.ApplyModifiedProperties(); + } + } + } + + object GetValueRecursive(object obj, int index, string[] paths) + { + var path = paths[index]; + + FieldInfo fldInfo = null; + var type = obj.GetType(); + while (fldInfo == null) + { + // attempt to get information about the field + fldInfo = type.GetField(path, BindingFlags.IgnoreCase | BindingFlags.GetField | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); + + if (fldInfo != null || + type.BaseType == null || + type.BaseType.IsSubclassOf(typeof(ReactiveProperty<>))) break; + + // if the field information is missing, it may be in the base class + type = type.BaseType; + } + + // If array, path = Array.data[index] + if (fldInfo == null && path == "Array") + { + try + { + path = paths[++index]; + var m = Regex.Match(path, @"(.+)\[([0-9]+)*\]"); + var arrayIndex = int.Parse(m.Groups[2].Value); + var arrayValue = (obj as System.Collections.IList)[arrayIndex]; + if (index < paths.Length - 1) + { + return GetValueRecursive(arrayValue, ++index, paths); + } + else + { + return arrayValue; + } + } + catch + { + Debug.Log("InspectorDisplayDrawer Exception, objType:" + obj.GetType().Name + " path:" + string.Join(", ", paths)); + throw; + } + } + else if (fldInfo == null) + { + throw new Exception("Can't decode path, please report to UniRx's GitHub issues:" + string.Join(", ", paths)); + } + + var v = fldInfo.GetValue(obj); + if (index < paths.Length - 1) + { + return GetValueRecursive(v, ++index, paths); + } + + return v; + } + + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + var attr = this.attribute as InspectorDisplayAttribute; + var fieldName = (attr == null) ? "value" : attr.FieldName; + + var height = base.GetPropertyHeight(property, label); + var valueProperty = property.FindPropertyRelative(fieldName); + if (valueProperty == null) + { + return height; + } + + if (valueProperty.propertyType == SerializedPropertyType.Rect) + { + return height * 2; + } + if (valueProperty.propertyType == SerializedPropertyType.Bounds) + { + return height * 3; + } + if (valueProperty.propertyType == SerializedPropertyType.String) + { + var multilineAttr = GetMultilineAttribute(); + if (multilineAttr != null) + { + return ((!EditorGUIUtility.wideMode) ? 16f : 0f) + 16f + (float)((multilineAttr.Lines - 1) * 13); + }; + } + + if (valueProperty.isExpanded) + { + var count = 0; + var e = valueProperty.GetEnumerator(); + while (e.MoveNext()) count++; + return ((height + 4) * count) + 6; // (Line = 20 + Padding) ? + } + + return height; + } + + protected virtual void EmitPropertyField(Rect position, UnityEditor.SerializedProperty targetSerializedProperty, GUIContent label) + { + var multiline = GetMultilineAttribute(); + if (multiline == null) + { + var range = GetRangeAttribute(); + if (range == null) + { + UnityEditor.EditorGUI.PropertyField(position, targetSerializedProperty, label, includeChildren: true); + } + else + { + if (targetSerializedProperty.propertyType == SerializedPropertyType.Float) + { + EditorGUI.Slider(position, targetSerializedProperty, range.Min, range.Max, label); + } + else if (targetSerializedProperty.propertyType == SerializedPropertyType.Integer) + { + EditorGUI.IntSlider(position, targetSerializedProperty, (int)range.Min, (int)range.Max, label); + } + else + { + EditorGUI.LabelField(position, label.text, "Use Range with float or int."); + } + } + } + else + { + var property = targetSerializedProperty; + + label = EditorGUI.BeginProperty(position, label, property); + var method = typeof(EditorGUI).GetMethod("MultiFieldPrefixLabel", BindingFlags.Static | BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.NonPublic); + position = (Rect)method.Invoke(null, new object[] { position, 0, label, 1 }); + + EditorGUI.BeginChangeCheck(); + int indentLevel = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + var stringValue = EditorGUI.TextArea(position, property.stringValue); + EditorGUI.indentLevel = indentLevel; + if (EditorGUI.EndChangeCheck()) + { + property.stringValue = stringValue; + } + EditorGUI.EndProperty(); + } + } + + MultilineReactivePropertyAttribute GetMultilineAttribute() + { + var fi = this.fieldInfo; + if (fi == null) return null; + return fi.GetCustomAttributes(false).OfType().FirstOrDefault(); + } + + RangeReactivePropertyAttribute GetRangeAttribute() + { + var fi = this.fieldInfo; + if (fi == null) return null; + return fi.GetCustomAttributes(false).OfType().FirstOrDefault(); + } + } + +#endif +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectorDisplayDrawer.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectorDisplayDrawer.cs.meta new file mode 100644 index 0000000..1388fb4 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectorDisplayDrawer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6180f9fd2198dee44ae7f4a617529ffa +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/LifetimeDisposableExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/LifetimeDisposableExtensions.cs new file mode 100644 index 0000000..dd65fe2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/LifetimeDisposableExtensions.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UniRx.Triggers; +using UnityEngine; + +namespace UniRx +{ + public static partial class DisposableExtensions + { + /// Dispose self on target gameObject has been destroyed. Return value is self disposable. + public static T AddTo(this T disposable, GameObject gameObject) + where T : IDisposable + { + if (gameObject == null) + { + disposable.Dispose(); + return disposable; + } + + var trigger = gameObject.GetComponent(); + if (trigger == null) + { + trigger = gameObject.AddComponent(); + } + +#pragma warning disable 618 + + // If gameObject is deactive, does not raise OnDestroy, watch and invoke trigger. + if (!trigger.IsActivated && !trigger.IsMonitoredActivate && !trigger.gameObject.activeInHierarchy) + { + trigger.IsMonitoredActivate = true; + MainThreadDispatcher.StartEndOfFrameMicroCoroutine(MonitorTriggerHealth(trigger, gameObject)); + } + +#pragma warning restore 618 + + trigger.AddDisposableOnDestroy(disposable); + return disposable; + } + + static IEnumerator MonitorTriggerHealth(ObservableDestroyTrigger trigger, GameObject targetGameObject) + { + while (true) + { + yield return null; + if (trigger.IsActivated) yield break; + + if (targetGameObject == null) // isDestroy + { + trigger.ForceRaiseOnDestroy(); // Force publish OnDestroy + yield break; + } + } + } + + /// Dispose self on target gameObject has been destroyed. Return value is self disposable. + public static T AddTo(this T disposable, Component gameObjectComponent) + where T : IDisposable + { + if (gameObjectComponent == null) + { + disposable.Dispose(); + return disposable; + } + + return AddTo(disposable, gameObjectComponent.gameObject); + } + + /// + /// Add disposable(self) to CompositeDisposable(or other ICollection) and Dispose self on target gameObject has been destroyed. + /// Return value is self disposable. + /// + public static T AddTo(this T disposable, ICollection container, GameObject gameObject) + where T : IDisposable + { + return disposable.AddTo(container).AddTo(gameObject); + } + + /// + /// Add disposable(self) to CompositeDisposable(or other ICollection) and Dispose self on target gameObject has been destroyed. + /// Return value is self disposable. + /// + public static T AddTo(this T disposable, ICollection container, Component gameObjectComponent) + where T : IDisposable + { + return disposable.AddTo(container).AddTo(gameObjectComponent); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/LifetimeDisposableExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/LifetimeDisposableExtensions.cs.meta new file mode 100644 index 0000000..a774199 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/LifetimeDisposableExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a7474e4acdc541340a1f566b2df46355 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs new file mode 100644 index 0000000..91cc8c4 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs @@ -0,0 +1,683 @@ +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2) +#define SupportCustomYieldInstruction +#endif + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using System.Threading; +using UniRx.InternalUtil; +using UnityEngine; + +namespace UniRx +{ + public sealed class MainThreadDispatcher : MonoBehaviour + { + public enum CullingMode + { + /// + /// Won't remove any MainThreadDispatchers. + /// + Disabled, + + /// + /// Checks if there is an existing MainThreadDispatcher on Awake(). If so, the new dispatcher removes itself. + /// + Self, + + /// + /// Search for excess MainThreadDispatchers and removes them all on Awake(). + /// + All + } + + public static CullingMode cullingMode = CullingMode.Self; + +#if UNITY_EDITOR + + // In UnityEditor's EditorMode can't instantiate and work MonoBehaviour.Update. + // EditorThreadDispatcher use EditorApplication.update instead of MonoBehaviour.Update. + class EditorThreadDispatcher + { + static object gate = new object(); + static EditorThreadDispatcher instance; + + public static EditorThreadDispatcher Instance + { + get + { + // Activate EditorThreadDispatcher is dangerous, completely Lazy. + lock (gate) + { + if (instance == null) + { + instance = new EditorThreadDispatcher(); + } + + return instance; + } + } + } + + ThreadSafeQueueWorker editorQueueWorker = new ThreadSafeQueueWorker(); + + EditorThreadDispatcher() + { + UnityEditor.EditorApplication.update += Update; + } + + public void Enqueue(Action action, object state) + { + editorQueueWorker.Enqueue(action, state); + } + + public void UnsafeInvoke(Action action) + { + try + { + action(); + } + catch (Exception ex) + { + Debug.LogException(ex); + } + } + + public void UnsafeInvoke(Action action, T state) + { + try + { + action(state); + } + catch (Exception ex) + { + Debug.LogException(ex); + } + } + + public void PseudoStartCoroutine(IEnumerator routine) + { + editorQueueWorker.Enqueue(_ => ConsumeEnumerator(routine), null); + } + + void Update() + { + editorQueueWorker.ExecuteAll(x => Debug.LogException(x)); + } + + void ConsumeEnumerator(IEnumerator routine) + { + if (routine.MoveNext()) + { + var current = routine.Current; + if (current == null) + { + goto ENQUEUE; + } + + var type = current.GetType(); +#if UNITY_2018_3_OR_NEWER +#pragma warning disable CS0618 +#endif + if (type == typeof(WWW)) + { + var www = (WWW)current; + editorQueueWorker.Enqueue(_ => ConsumeEnumerator(UnwrapWaitWWW(www, routine)), null); + return; + } +#if UNITY_2018_3_OR_NEWER +#pragma warning restore CS0618 +#endif + else if (type == typeof(AsyncOperation)) + { + var asyncOperation = (AsyncOperation)current; + editorQueueWorker.Enqueue(_ => ConsumeEnumerator(UnwrapWaitAsyncOperation(asyncOperation, routine)), null); + return; + } + else if (type == typeof(WaitForSeconds)) + { + var waitForSeconds = (WaitForSeconds)current; + var accessor = typeof(WaitForSeconds).GetField("m_Seconds", BindingFlags.Instance | BindingFlags.GetField | BindingFlags.NonPublic); + var second = (float)accessor.GetValue(waitForSeconds); + editorQueueWorker.Enqueue(_ => ConsumeEnumerator(UnwrapWaitForSeconds(second, routine)), null); + return; + } + else if (type == typeof(Coroutine)) + { + Debug.Log("Can't wait coroutine on UnityEditor"); + goto ENQUEUE; + } +#if SupportCustomYieldInstruction + else if (current is IEnumerator) + { + var enumerator = (IEnumerator)current; + editorQueueWorker.Enqueue(_ => ConsumeEnumerator(UnwrapEnumerator(enumerator, routine)), null); + return; + } +#endif + + ENQUEUE: + editorQueueWorker.Enqueue(_ => ConsumeEnumerator(routine), null); // next update + } + } + +#if UNITY_2018_3_OR_NEWER +#pragma warning disable CS0618 +#endif + IEnumerator UnwrapWaitWWW(WWW www, IEnumerator continuation) + { + while (!www.isDone) + { + yield return null; + } + ConsumeEnumerator(continuation); + } +#if UNITY_2018_3_OR_NEWER +#pragma warning restore CS0618 +#endif + + IEnumerator UnwrapWaitAsyncOperation(AsyncOperation asyncOperation, IEnumerator continuation) + { + while (!asyncOperation.isDone) + { + yield return null; + } + ConsumeEnumerator(continuation); + } + + IEnumerator UnwrapWaitForSeconds(float second, IEnumerator continuation) + { + var startTime = DateTimeOffset.UtcNow; + while (true) + { + yield return null; + + var elapsed = (DateTimeOffset.UtcNow - startTime).TotalSeconds; + if (elapsed >= second) + { + break; + } + }; + ConsumeEnumerator(continuation); + } + + IEnumerator UnwrapEnumerator(IEnumerator enumerator, IEnumerator continuation) + { + while (enumerator.MoveNext()) + { + yield return null; + } + ConsumeEnumerator(continuation); + } + } + +#endif + + /// Dispatch Asyncrhonous action. + public static void Post(Action action, object state) + { +#if UNITY_EDITOR + if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.Enqueue(action, state); return; } + +#endif + + var dispatcher = Instance; + if (!isQuitting && !object.ReferenceEquals(dispatcher, null)) + { + dispatcher.queueWorker.Enqueue(action, state); + } + } + + /// Dispatch Synchronous action if possible. + public static void Send(Action action, object state) + { +#if UNITY_EDITOR + if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.Enqueue(action, state); return; } +#endif + + if (mainThreadToken != null) + { + try + { + action(state); + } + catch (Exception ex) + { + var dispatcher = MainThreadDispatcher.Instance; + if (dispatcher != null) + { + dispatcher.unhandledExceptionCallback(ex); + } + } + } + else + { + Post(action, state); + } + } + + /// Run Synchronous action. + public static void UnsafeSend(Action action) + { +#if UNITY_EDITOR + if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.UnsafeInvoke(action); return; } +#endif + + try + { + action(); + } + catch (Exception ex) + { + var dispatcher = MainThreadDispatcher.Instance; + if (dispatcher != null) + { + dispatcher.unhandledExceptionCallback(ex); + } + } + } + + /// Run Synchronous action. + public static void UnsafeSend(Action action, T state) + { +#if UNITY_EDITOR + if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.UnsafeInvoke(action, state); return; } +#endif + + try + { + action(state); + } + catch (Exception ex) + { + var dispatcher = MainThreadDispatcher.Instance; + if (dispatcher != null) + { + dispatcher.unhandledExceptionCallback(ex); + } + } + } + + /// ThreadSafe StartCoroutine. + public static void SendStartCoroutine(IEnumerator routine) + { + if (mainThreadToken != null) + { + StartCoroutine(routine); + } + else + { +#if UNITY_EDITOR + // call from other thread + if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.PseudoStartCoroutine(routine); return; } +#endif + + var dispatcher = Instance; + if (!isQuitting && !object.ReferenceEquals(dispatcher, null)) + { + dispatcher.queueWorker.Enqueue(_ => + { + var dispacher2 = Instance; + if (dispacher2 != null) + { + (dispacher2 as MonoBehaviour).StartCoroutine(routine); + } + }, null); + } + } + } + + public static void StartUpdateMicroCoroutine(IEnumerator routine) + { +#if UNITY_EDITOR + if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.PseudoStartCoroutine(routine); return; } +#endif + + var dispatcher = Instance; + if (dispatcher != null) + { + dispatcher.updateMicroCoroutine.AddCoroutine(routine); + } + } + + public static void StartFixedUpdateMicroCoroutine(IEnumerator routine) + { +#if UNITY_EDITOR + if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.PseudoStartCoroutine(routine); return; } +#endif + + var dispatcher = Instance; + if (dispatcher != null) + { + dispatcher.fixedUpdateMicroCoroutine.AddCoroutine(routine); + } + } + + public static void StartEndOfFrameMicroCoroutine(IEnumerator routine) + { +#if UNITY_EDITOR + if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.PseudoStartCoroutine(routine); return; } +#endif + + var dispatcher = Instance; + if (dispatcher != null) + { + dispatcher.endOfFrameMicroCoroutine.AddCoroutine(routine); + } + } + + new public static Coroutine StartCoroutine(IEnumerator routine) + { +#if UNITY_EDITOR + if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.PseudoStartCoroutine(routine); return null; } +#endif + + var dispatcher = Instance; + if (dispatcher != null) + { + return (dispatcher as MonoBehaviour).StartCoroutine(routine); + } + else + { + return null; + } + } + + public static void RegisterUnhandledExceptionCallback(Action exceptionCallback) + { + if (exceptionCallback == null) + { + // do nothing + Instance.unhandledExceptionCallback = Stubs.Ignore; + } + else + { + Instance.unhandledExceptionCallback = exceptionCallback; + } + } + + ThreadSafeQueueWorker queueWorker = new ThreadSafeQueueWorker(); + Action unhandledExceptionCallback = ex => Debug.LogException(ex); // default + + MicroCoroutine updateMicroCoroutine = null; + MicroCoroutine fixedUpdateMicroCoroutine = null; + MicroCoroutine endOfFrameMicroCoroutine = null; + + static MainThreadDispatcher instance; + static bool initialized; + static bool isQuitting = false; + + public static string InstanceName + { + get + { + if (instance == null) + { + throw new NullReferenceException("MainThreadDispatcher is not initialized."); + } + return instance.name; + } + } + + public static bool IsInitialized + { + get { return initialized && instance != null; } + } + + [ThreadStatic] + static object mainThreadToken; + + static MainThreadDispatcher Instance + { + get + { + Initialize(); + return instance; + } + } + + public static void Initialize() + { + if (!initialized) + { +#if UNITY_EDITOR + // Don't try to add a GameObject when the scene is not playing. Only valid in the Editor, EditorView. + if (!ScenePlaybackDetector.IsPlaying) return; +#endif + MainThreadDispatcher dispatcher = null; + + try + { + dispatcher = GameObject.FindObjectOfType(); + } + catch + { + // Throw exception when calling from a worker thread. + var ex = new Exception("UniRx requires a MainThreadDispatcher component created on the main thread. Make sure it is added to the scene before calling UniRx from a worker thread."); + UnityEngine.Debug.LogException(ex); + throw ex; + } + + if (isQuitting) + { + // don't create new instance after quitting + // avoid "Some objects were not cleaned up when closing the scene find target" error. + return; + } + + if (dispatcher == null) + { + // awake call immediately from UnityEngine + new GameObject("MainThreadDispatcher").AddComponent(); + } + else + { + dispatcher.Awake(); // force awake + } + } + } + + public static bool IsInMainThread + { + get + { + return (mainThreadToken != null); + } + } + + void Awake() + { + if (instance == null) + { + instance = this; + mainThreadToken = new object(); + initialized = true; + + updateMicroCoroutine = new MicroCoroutine(ex => unhandledExceptionCallback(ex)); + fixedUpdateMicroCoroutine = new MicroCoroutine(ex => unhandledExceptionCallback(ex)); + endOfFrameMicroCoroutine = new MicroCoroutine(ex => unhandledExceptionCallback(ex)); + + StartCoroutine(RunUpdateMicroCoroutine()); + StartCoroutine(RunFixedUpdateMicroCoroutine()); + StartCoroutine(RunEndOfFrameMicroCoroutine()); + + DontDestroyOnLoad(gameObject); + } + else + { + if (this != instance) + { + if (cullingMode == CullingMode.Self) + { + // Try to destroy this dispatcher if there's already one in the scene. + Debug.LogWarning("There is already a MainThreadDispatcher in the scene. Removing myself..."); + DestroyDispatcher(this); + } + else if (cullingMode == CullingMode.All) + { + Debug.LogWarning("There is already a MainThreadDispatcher in the scene. Cleaning up all excess dispatchers..."); + CullAllExcessDispatchers(); + } + else + { + Debug.LogWarning("There is already a MainThreadDispatcher in the scene."); + } + } + } + } + + IEnumerator RunUpdateMicroCoroutine() + { + while (true) + { + yield return null; + updateMicroCoroutine.Run(); + } + } + + IEnumerator RunFixedUpdateMicroCoroutine() + { + while (true) + { + yield return YieldInstructionCache.WaitForFixedUpdate; + fixedUpdateMicroCoroutine.Run(); + } + } + + IEnumerator RunEndOfFrameMicroCoroutine() + { + while (true) + { + yield return YieldInstructionCache.WaitForEndOfFrame; + endOfFrameMicroCoroutine.Run(); + } + } + + static void DestroyDispatcher(MainThreadDispatcher aDispatcher) + { + if (aDispatcher != instance) + { + // Try to remove game object if it's empty + var components = aDispatcher.gameObject.GetComponents(); + if (aDispatcher.gameObject.transform.childCount == 0 && components.Length == 2) + { + if (components[0] is Transform && components[1] is MainThreadDispatcher) + { + Destroy(aDispatcher.gameObject); + } + } + else + { + // Remove component + MonoBehaviour.Destroy(aDispatcher); + } + } + } + + public static void CullAllExcessDispatchers() + { + var dispatchers = GameObject.FindObjectsOfType(); + for (int i = 0; i < dispatchers.Length; i++) + { + DestroyDispatcher(dispatchers[i]); + } + } + + void OnDestroy() + { + if (instance == this) + { + instance = GameObject.FindObjectOfType(); + initialized = instance != null; + + /* + // Although `this` still refers to a gameObject, it won't be found. + var foundDispatcher = GameObject.FindObjectOfType(); + + if (foundDispatcher != null) + { + // select another game object + Debug.Log("new instance: " + foundDispatcher.name); + instance = foundDispatcher; + initialized = true; + } + */ + } + } + + void Update() + { + if (update != null) + { + try + { + update.OnNext(Unit.Default); + } + catch (Exception ex) + { + unhandledExceptionCallback(ex); + } + } + queueWorker.ExecuteAll(unhandledExceptionCallback); + } + + // for Lifecycle Management + + Subject update; + + public static IObservable UpdateAsObservable() + { + return Instance.update ?? (Instance.update = new Subject()); + } + + Subject lateUpdate; + + void LateUpdate() + { + if (lateUpdate != null) lateUpdate.OnNext(Unit.Default); + } + + public static IObservable LateUpdateAsObservable() + { + return Instance.lateUpdate ?? (Instance.lateUpdate = new Subject()); + } + + Subject onApplicationFocus; + + void OnApplicationFocus(bool focus) + { + if (onApplicationFocus != null) onApplicationFocus.OnNext(focus); + } + + public static IObservable OnApplicationFocusAsObservable() + { + return Instance.onApplicationFocus ?? (Instance.onApplicationFocus = new Subject()); + } + + Subject onApplicationPause; + + void OnApplicationPause(bool pause) + { + if (onApplicationPause != null) onApplicationPause.OnNext(pause); + } + + public static IObservable OnApplicationPauseAsObservable() + { + return Instance.onApplicationPause ?? (Instance.onApplicationPause = new Subject()); + } + + Subject onApplicationQuit; + + void OnApplicationQuit() + { + isQuitting = true; + if (onApplicationQuit != null) onApplicationQuit.OnNext(Unit.Default); + } + + public static IObservable OnApplicationQuitAsObservable() + { + return Instance.onApplicationQuit ?? (Instance.onApplicationQuit = new Subject()); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs.meta new file mode 100644 index 0000000..9db2ce3 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c3cd207057515c4438a31a6a7b548fe7 +timeCreated: 1465903910 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: -16000 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadScheduler.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadScheduler.cs new file mode 100644 index 0000000..03de6f3 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadScheduler.cs @@ -0,0 +1,579 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Threading; +using UnityEngine; + +namespace UniRx +{ +#if UniRxLibrary + public static partial class SchedulerUnity + { +#else + public static partial class Scheduler + { + public static void SetDefaultForUnity() + { + Scheduler.DefaultSchedulers.ConstantTimeOperations = Scheduler.Immediate; + Scheduler.DefaultSchedulers.TailRecursion = Scheduler.Immediate; + Scheduler.DefaultSchedulers.Iteration = Scheduler.CurrentThread; + Scheduler.DefaultSchedulers.TimeBasedOperations = MainThread; + Scheduler.DefaultSchedulers.AsyncConversions = Scheduler.ThreadPool; + } +#endif + static IScheduler mainThread; + + /// + /// Unity native MainThread Queue Scheduler. Run on mainthread and delayed on coroutine update loop, elapsed time is calculated based on Time.time. + /// + public static IScheduler MainThread + { + get + { + return mainThread ?? (mainThread = new MainThreadScheduler()); + } + } + + static IScheduler mainThreadIgnoreTimeScale; + + /// + /// Another MainThread scheduler, delay elapsed time is calculated based on Time.unscaledDeltaTime. + /// + public static IScheduler MainThreadIgnoreTimeScale + { + get + { + return mainThreadIgnoreTimeScale ?? (mainThreadIgnoreTimeScale = new IgnoreTimeScaleMainThreadScheduler()); + } + } + + static IScheduler mainThreadFixedUpdate; + + /// + /// Run on fixed update mainthread, delay elapsed time is calculated based on Time.fixedTime. + /// + public static IScheduler MainThreadFixedUpdate + { + get + { + return mainThreadFixedUpdate ?? (mainThreadFixedUpdate = new FixedUpdateMainThreadScheduler()); + } + } + + static IScheduler mainThreadEndOfFrame; + + /// + /// Run on end of frame mainthread, delay elapsed time is calculated based on Time.deltaTime. + /// + public static IScheduler MainThreadEndOfFrame + { + get + { + return mainThreadEndOfFrame ?? (mainThreadEndOfFrame = new EndOfFrameMainThreadScheduler()); + } + } + + class MainThreadScheduler : IScheduler, ISchedulerPeriodic, ISchedulerQueueing + { + readonly Action scheduleAction; + + public MainThreadScheduler() + { + MainThreadDispatcher.Initialize(); + scheduleAction = new Action(Schedule); + } + + // delay action is run in StartCoroutine + // Okay to action run synchronous and guaranteed run on MainThread + IEnumerator DelayAction(TimeSpan dueTime, Action action, ICancelable cancellation) + { + // zero == every frame + if (dueTime == TimeSpan.Zero) + { + yield return null; // not immediately, run next frame + } + else + { + yield return new WaitForSeconds((float)dueTime.TotalSeconds); + } + + if (cancellation.IsDisposed) yield break; + MainThreadDispatcher.UnsafeSend(action); + } + + IEnumerator PeriodicAction(TimeSpan period, Action action, ICancelable cancellation) + { + // zero == every frame + if (period == TimeSpan.Zero) + { + while (true) + { + yield return null; // not immediately, run next frame + if (cancellation.IsDisposed) yield break; + + MainThreadDispatcher.UnsafeSend(action); + } + } + else + { + var seconds = (float)(period.TotalMilliseconds / 1000.0); + var yieldInstruction = new WaitForSeconds(seconds); // cache single instruction object + + while (true) + { + yield return yieldInstruction; + if (cancellation.IsDisposed) yield break; + + MainThreadDispatcher.UnsafeSend(action); + } + } + } + + public DateTimeOffset Now + { + get { return Scheduler.Now; } + } + + void Schedule(object state) + { + var t = (Tuple)state; + if (!t.Item1.IsDisposed) + { + t.Item2(); + } + } + + public IDisposable Schedule(Action action) + { + var d = new BooleanDisposable(); + MainThreadDispatcher.Post(scheduleAction, Tuple.Create(d, action)); + return d; + } + + public IDisposable Schedule(DateTimeOffset dueTime, Action action) + { + return Schedule(dueTime - Now, action); + } + + public IDisposable Schedule(TimeSpan dueTime, Action action) + { + var d = new BooleanDisposable(); + var time = Scheduler.Normalize(dueTime); + + MainThreadDispatcher.SendStartCoroutine(DelayAction(time, action, d)); + + return d; + } + + public IDisposable SchedulePeriodic(TimeSpan period, Action action) + { + var d = new BooleanDisposable(); + var time = Scheduler.Normalize(period); + + MainThreadDispatcher.SendStartCoroutine(PeriodicAction(time, action, d)); + + return d; + } + + void ScheduleQueueing(object state) + { + var t = (Tuple>)state; + if (!t.Item1.IsDisposed) + { + t.Item3(t.Item2); + } + } + + public void ScheduleQueueing(ICancelable cancel, T state, Action action) + { + MainThreadDispatcher.Post(QueuedAction.Instance, Tuple.Create(cancel, state, action)); + } + + static class QueuedAction + { + public static readonly Action Instance = new Action(Invoke); + + public static void Invoke(object state) + { + var t = (Tuple>)state; + + if (!t.Item1.IsDisposed) + { + t.Item3(t.Item2); + } + } + } + } + + class IgnoreTimeScaleMainThreadScheduler : IScheduler, ISchedulerPeriodic, ISchedulerQueueing + { + readonly Action scheduleAction; + + public IgnoreTimeScaleMainThreadScheduler() + { + MainThreadDispatcher.Initialize(); + scheduleAction = new Action(Schedule); + } + + IEnumerator DelayAction(TimeSpan dueTime, Action action, ICancelable cancellation) + { + if (dueTime == TimeSpan.Zero) + { + yield return null; + if (cancellation.IsDisposed) yield break; + + MainThreadDispatcher.UnsafeSend(action); + } + else + { + var elapsed = 0f; + var dt = (float)dueTime.TotalSeconds; + while (true) + { + yield return null; + if (cancellation.IsDisposed) break; + + elapsed += Time.unscaledDeltaTime; + if (elapsed >= dt) + { + MainThreadDispatcher.UnsafeSend(action); + break; + } + } + } + } + + IEnumerator PeriodicAction(TimeSpan period, Action action, ICancelable cancellation) + { + // zero == every frame + if (period == TimeSpan.Zero) + { + while (true) + { + yield return null; // not immediately, run next frame + if (cancellation.IsDisposed) yield break; + + MainThreadDispatcher.UnsafeSend(action); + } + } + else + { + var elapsed = 0f; + var dt = (float)period.TotalSeconds; + while (true) + { + yield return null; + if (cancellation.IsDisposed) break; + + elapsed += Time.unscaledDeltaTime; + if (elapsed >= dt) + { + MainThreadDispatcher.UnsafeSend(action); + elapsed = 0; + } + } + } + } + + public DateTimeOffset Now + { + get { return Scheduler.Now; } + } + + void Schedule(object state) + { + var t = (Tuple)state; + if (!t.Item1.IsDisposed) + { + t.Item2(); + } + } + + public IDisposable Schedule(Action action) + { + var d = new BooleanDisposable(); + MainThreadDispatcher.Post(scheduleAction, Tuple.Create(d, action)); + return d; + } + + public IDisposable Schedule(DateTimeOffset dueTime, Action action) + { + return Schedule(dueTime - Now, action); + } + + public IDisposable Schedule(TimeSpan dueTime, Action action) + { + var d = new BooleanDisposable(); + var time = Scheduler.Normalize(dueTime); + + MainThreadDispatcher.SendStartCoroutine(DelayAction(time, action, d)); + + return d; + } + + public IDisposable SchedulePeriodic(TimeSpan period, Action action) + { + var d = new BooleanDisposable(); + var time = Scheduler.Normalize(period); + + MainThreadDispatcher.SendStartCoroutine(PeriodicAction(time, action, d)); + + return d; + } + + public void ScheduleQueueing(ICancelable cancel, T state, Action action) + { + MainThreadDispatcher.Post(QueuedAction.Instance, Tuple.Create(cancel, state, action)); + } + + static class QueuedAction + { + public static readonly Action Instance = new Action(Invoke); + + public static void Invoke(object state) + { + var t = (Tuple>)state; + + if (!t.Item1.IsDisposed) + { + t.Item3(t.Item2); + } + } + } + } + + class FixedUpdateMainThreadScheduler : IScheduler, ISchedulerPeriodic, ISchedulerQueueing + { + public FixedUpdateMainThreadScheduler() + { + MainThreadDispatcher.Initialize(); + } + + IEnumerator ImmediateAction(T state, Action action, ICancelable cancellation) + { + yield return null; + if (cancellation.IsDisposed) yield break; + + MainThreadDispatcher.UnsafeSend(action, state); + } + + IEnumerator DelayAction(TimeSpan dueTime, Action action, ICancelable cancellation) + { + if (dueTime == TimeSpan.Zero) + { + yield return null; + if (cancellation.IsDisposed) yield break; + + MainThreadDispatcher.UnsafeSend(action); + } + else + { + var startTime = Time.fixedTime; + var dt = (float)dueTime.TotalSeconds; + while (true) + { + yield return null; + if (cancellation.IsDisposed) break; + + var elapsed = Time.fixedTime - startTime; + if (elapsed >= dt) + { + MainThreadDispatcher.UnsafeSend(action); + break; + } + } + } + } + + IEnumerator PeriodicAction(TimeSpan period, Action action, ICancelable cancellation) + { + // zero == every frame + if (period == TimeSpan.Zero) + { + while (true) + { + yield return null; + if (cancellation.IsDisposed) yield break; + + MainThreadDispatcher.UnsafeSend(action); + } + } + else + { + var startTime = Time.fixedTime; + var dt = (float)period.TotalSeconds; + while (true) + { + yield return null; + if (cancellation.IsDisposed) break; + + var ft = Time.fixedTime; + var elapsed = ft - startTime; + if (elapsed >= dt) + { + MainThreadDispatcher.UnsafeSend(action); + startTime = ft; + } + } + } + } + + public DateTimeOffset Now + { + get { return Scheduler.Now; } + } + + public IDisposable Schedule(Action action) + { + return Schedule(TimeSpan.Zero, action); + } + + public IDisposable Schedule(DateTimeOffset dueTime, Action action) + { + return Schedule(dueTime - Now, action); + } + + public IDisposable Schedule(TimeSpan dueTime, Action action) + { + var d = new BooleanDisposable(); + var time = Scheduler.Normalize(dueTime); + + MainThreadDispatcher.StartFixedUpdateMicroCoroutine(DelayAction(time, action, d)); + + return d; + } + + public IDisposable SchedulePeriodic(TimeSpan period, Action action) + { + var d = new BooleanDisposable(); + var time = Scheduler.Normalize(period); + + MainThreadDispatcher.StartFixedUpdateMicroCoroutine(PeriodicAction(time, action, d)); + + return d; + } + + public void ScheduleQueueing(ICancelable cancel, T state, Action action) + { + MainThreadDispatcher.StartFixedUpdateMicroCoroutine(ImmediateAction(state, action, cancel)); + } + } + + class EndOfFrameMainThreadScheduler : IScheduler, ISchedulerPeriodic, ISchedulerQueueing + { + public EndOfFrameMainThreadScheduler() + { + MainThreadDispatcher.Initialize(); + } + + IEnumerator ImmediateAction(T state, Action action, ICancelable cancellation) + { + yield return null; + if (cancellation.IsDisposed) yield break; + + MainThreadDispatcher.UnsafeSend(action, state); + } + + IEnumerator DelayAction(TimeSpan dueTime, Action action, ICancelable cancellation) + { + if (dueTime == TimeSpan.Zero) + { + yield return null; + if (cancellation.IsDisposed) yield break; + + MainThreadDispatcher.UnsafeSend(action); + } + else + { + var elapsed = 0f; + var dt = (float)dueTime.TotalSeconds; + while (true) + { + yield return null; + if (cancellation.IsDisposed) break; + + elapsed += Time.deltaTime; + if (elapsed >= dt) + { + MainThreadDispatcher.UnsafeSend(action); + break; + } + } + } + } + + IEnumerator PeriodicAction(TimeSpan period, Action action, ICancelable cancellation) + { + // zero == every frame + if (period == TimeSpan.Zero) + { + while (true) + { + yield return null; + if (cancellation.IsDisposed) yield break; + + MainThreadDispatcher.UnsafeSend(action); + } + } + else + { + var elapsed = 0f; + var dt = (float)period.TotalSeconds; + while (true) + { + yield return null; + if (cancellation.IsDisposed) break; + + elapsed += Time.deltaTime; + if (elapsed >= dt) + { + MainThreadDispatcher.UnsafeSend(action); + elapsed = 0; + } + } + } + } + + public DateTimeOffset Now + { + get { return Scheduler.Now; } + } + + public IDisposable Schedule(Action action) + { + return Schedule(TimeSpan.Zero, action); + } + + public IDisposable Schedule(DateTimeOffset dueTime, Action action) + { + return Schedule(dueTime - Now, action); + } + + public IDisposable Schedule(TimeSpan dueTime, Action action) + { + var d = new BooleanDisposable(); + var time = Scheduler.Normalize(dueTime); + + MainThreadDispatcher.StartEndOfFrameMicroCoroutine(DelayAction(time, action, d)); + + return d; + } + + public IDisposable SchedulePeriodic(TimeSpan period, Action action) + { + var d = new BooleanDisposable(); + var time = Scheduler.Normalize(period); + + MainThreadDispatcher.StartEndOfFrameMicroCoroutine(PeriodicAction(time, action, d)); + + return d; + } + + public void ScheduleQueueing(ICancelable cancel, T state, Action action) + { + MainThreadDispatcher.StartEndOfFrameMicroCoroutine(ImmediateAction(state, action, cancel)); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadScheduler.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadScheduler.cs.meta new file mode 100644 index 0000000..64bd220 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadScheduler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f141c5dc72b97084a85631367a946ee8 +timeCreated: 1455373902 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs new file mode 100644 index 0000000..9090a6f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs @@ -0,0 +1,1168 @@ +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2) +#define SupportCustomYieldInstruction +#endif + +using System; +using System.Collections; +using System.Collections.Generic; +using UniRx.InternalUtil; +using UniRx.Triggers; +using UnityEngine; +using System.Threading; + +#if !UniRxLibrary +using SchedulerUnity = UniRx.Scheduler; +#endif + +namespace UniRx +{ + public enum FrameCountType + { + Update, + FixedUpdate, + EndOfFrame, + } + + public enum MainThreadDispatchType + { + /// yield return null + Update, + FixedUpdate, + EndOfFrame, + GameObjectUpdate, + LateUpdate, + } + + public static class FrameCountTypeExtensions + { + public static YieldInstruction GetYieldInstruction(this FrameCountType frameCountType) + { + switch (frameCountType) + { + case FrameCountType.FixedUpdate: + return YieldInstructionCache.WaitForFixedUpdate; + case FrameCountType.EndOfFrame: + return YieldInstructionCache.WaitForEndOfFrame; + case FrameCountType.Update: + default: + return null; + } + } + } + + internal interface ICustomYieldInstructionErrorHandler + { + bool HasError { get; } + Exception Error { get; } + bool IsReThrowOnError { get; } + void ForceDisableRethrowOnError(); + void ForceEnableRethrowOnError(); + } + + public class ObservableYieldInstruction : IEnumerator, ICustomYieldInstructionErrorHandler + { + readonly IDisposable subscription; + readonly CancellationToken cancel; + bool reThrowOnError; + T current; + T result; + bool moveNext; + bool hasResult; + Exception error; + + public ObservableYieldInstruction(IObservable source, bool reThrowOnError, CancellationToken cancel) + { + this.moveNext = true; + this.reThrowOnError = reThrowOnError; + this.cancel = cancel; + try + { + this.subscription = source.Subscribe(new ToYieldInstruction(this)); + } + catch + { + moveNext = false; + throw; + } + } + + public bool HasError + { + get { return error != null; } + } + + public bool HasResult + { + get { return hasResult; } + } + + public bool IsCanceled + { + get + { + if (hasResult) return false; + if (error != null) return false; + return cancel.IsCancellationRequested; + } + } + + /// + /// HasResult || IsCanceled || HasError + /// + public bool IsDone + { + get + { + return HasResult || HasError || (cancel.IsCancellationRequested); + } + } + + public T Result + { + get { return result; } + } + + T IEnumerator.Current + { + get + { + return current; + } + } + + object IEnumerator.Current + { + get + { + return current; + } + } + + public Exception Error + { + get + { + return error; + } + } + + bool IEnumerator.MoveNext() + { + if (!moveNext) + { + if (reThrowOnError && HasError) + { + Error.Throw(); + } + + return false; + } + + if (cancel.IsCancellationRequested) + { + subscription.Dispose(); + return false; + } + + return true; + } + + bool ICustomYieldInstructionErrorHandler.IsReThrowOnError + { + get { return reThrowOnError; } + } + + void ICustomYieldInstructionErrorHandler.ForceDisableRethrowOnError() + { + this.reThrowOnError = false; + } + + void ICustomYieldInstructionErrorHandler.ForceEnableRethrowOnError() + { + this.reThrowOnError = true; + } + + public void Dispose() + { + subscription.Dispose(); + } + + void IEnumerator.Reset() + { + throw new NotSupportedException(); + } + + class ToYieldInstruction : IObserver + { + readonly ObservableYieldInstruction parent; + + public ToYieldInstruction(ObservableYieldInstruction parent) + { + this.parent = parent; + } + + public void OnNext(T value) + { + parent.current = value; + } + + public void OnError(Exception error) + { + parent.moveNext = false; + parent.error = error; + } + + public void OnCompleted() + { + parent.moveNext = false; + parent.hasResult = true; + parent.result = parent.current; + } + } + } + +#if UniRxLibrary + public static partial class ObservableUnity +#else + public static partial class Observable +#endif + { + readonly static HashSet YieldInstructionTypes = new HashSet + { + #if UNITY_2018_3_OR_NEWER +#pragma warning disable CS0618 +#endif + typeof(WWW), + #if UNITY_2018_3_OR_NEWER +#pragma warning restore CS0618 +#endif + typeof(WaitForEndOfFrame), + typeof(WaitForFixedUpdate), + typeof(WaitForSeconds), + typeof(AsyncOperation), + typeof(Coroutine) + }; + +#if SupportCustomYieldInstruction + + class EveryAfterUpdateInvoker : IEnumerator + { + long count = -1; + readonly IObserver observer; + readonly CancellationToken cancellationToken; + + public EveryAfterUpdateInvoker(IObserver observer, CancellationToken cancellationToken) + { + this.observer = observer; + this.cancellationToken = cancellationToken; + } + + public bool MoveNext() + { + if (!cancellationToken.IsCancellationRequested) + { + if (count != -1) // ignore first/immediate invoke + { + observer.OnNext(count++); + } + else + { + count++; + } + return true; + } + else + { + return false; + } + } + + public object Current + { + get + { + return null; + } + } + + public void Reset() + { + throw new NotSupportedException(); + } + } + +#endif + + + + /// From has no callback coroutine to IObservable. If publishEveryYield = true then publish OnNext every yield return else return once on enumeration completed. + public static IObservable FromCoroutine(Func coroutine, bool publishEveryYield = false) + { + return FromCoroutine((observer, cancellationToken) => WrapEnumerator(coroutine(), observer, cancellationToken, publishEveryYield)); + } + + /// From has no callback coroutine to IObservable. If publishEveryYield = true then publish OnNext every yield return else return once on enumeration completed. + public static IObservable FromCoroutine(Func coroutine, bool publishEveryYield = false) + { + return FromCoroutine((observer, cancellationToken) => WrapEnumerator(coroutine(cancellationToken), observer, cancellationToken, publishEveryYield)); + } + + /// + /// MicroCoroutine is lightweight, fast coroutine dispatcher. + /// IEnumerator supports only yield return null. + /// If publishEveryYield = true then publish OnNext every yield return else return once on enumeration completed. + /// + public static IObservable FromMicroCoroutine(Func coroutine, bool publishEveryYield = false, FrameCountType frameCountType = FrameCountType.Update) + { + return FromMicroCoroutine((observer, cancellationToken) => WrapEnumerator(coroutine(), observer, cancellationToken, publishEveryYield), frameCountType); + } + + /// + /// MicroCoroutine is lightweight, fast coroutine dispatcher. + /// IEnumerator supports only yield return null. + /// If publishEveryYield = true then publish OnNext every yield return else return once on enumeration completed. + /// + public static IObservable FromMicroCoroutine(Func coroutine, bool publishEveryYield = false, FrameCountType frameCountType = FrameCountType.Update) + { + return FromMicroCoroutine((observer, cancellationToken) => WrapEnumerator(coroutine(cancellationToken), observer, cancellationToken, publishEveryYield), frameCountType); + } + + static IEnumerator WrapEnumerator(IEnumerator enumerator, IObserver observer, CancellationToken cancellationToken, bool publishEveryYield) + { + var hasNext = default(bool); + var raisedError = false; + do + { + try + { + hasNext = enumerator.MoveNext(); + } + catch (Exception ex) + { + try + { + raisedError = true; + observer.OnError(ex); + } + finally + { + var d = enumerator as IDisposable; + if (d != null) + { + d.Dispose(); + } + } + yield break; + } + if (hasNext && publishEveryYield) + { + try + { + observer.OnNext(Unit.Default); + } + catch + { + var d = enumerator as IDisposable; + if (d != null) + { + d.Dispose(); + } + throw; + } + } + if (hasNext) + { +#if SupportCustomYieldInstruction + var current = enumerator.Current; + var customHandler = current as ICustomYieldInstructionErrorHandler; + if (customHandler != null && customHandler.IsReThrowOnError) + { + // If throws exception in Custom YieldInsrtuction, can't handle parent coroutine. + // It is C# limitation. + // so store error info and retrieve from parent. + customHandler.ForceDisableRethrowOnError(); + yield return current; + customHandler.ForceEnableRethrowOnError(); + + if (customHandler.HasError) + { + try + { + raisedError = true; + observer.OnError(customHandler.Error); + } + finally + { + var d = enumerator as IDisposable; + if (d != null) + { + d.Dispose(); + } + } + yield break; + } + } + else + { + yield return enumerator.Current; // yield inner YieldInstruction + } +#else + yield return enumerator.Current; // yield inner YieldInstruction +#endif + } + } while (hasNext && !cancellationToken.IsCancellationRequested); + + try + { + if (!raisedError && !cancellationToken.IsCancellationRequested) + { + observer.OnNext(Unit.Default); // last one + observer.OnCompleted(); + } + } + finally + { + var d = enumerator as IDisposable; + if (d != null) + { + d.Dispose(); + } + } + } + + /// Convert coroutine to typed IObservable. If nullAsNextUpdate = true then yield return null when Enumerator.Current and no null publish observer.OnNext. + public static IObservable FromCoroutineValue(Func coroutine, bool nullAsNextUpdate = true) + { + return FromCoroutine((observer, cancellationToken) => WrapEnumeratorYieldValue(coroutine(), observer, cancellationToken, nullAsNextUpdate)); + } + + /// Convert coroutine to typed IObservable. If nullAsNextUpdate = true then yield return null when Enumerator.Current and no null publish observer.OnNext. + public static IObservable FromCoroutineValue(Func coroutine, bool nullAsNextUpdate = true) + { + return FromCoroutine((observer, cancellationToken) => WrapEnumeratorYieldValue(coroutine(cancellationToken), observer, cancellationToken, nullAsNextUpdate)); + } + + static IEnumerator WrapEnumeratorYieldValue(IEnumerator enumerator, IObserver observer, CancellationToken cancellationToken, bool nullAsNextUpdate) + { + var hasNext = default(bool); + var current = default(object); + var raisedError = false; + do + { + try + { + hasNext = enumerator.MoveNext(); + if (hasNext) current = enumerator.Current; + } + catch (Exception ex) + { + try + { + raisedError = true; + observer.OnError(ex); + } + finally + { + var d = enumerator as IDisposable; + if (d != null) + { + d.Dispose(); + } + } + yield break; + } + + if (hasNext) + { + if (current != null && YieldInstructionTypes.Contains(current.GetType())) + { + yield return current; + } +#if SupportCustomYieldInstruction + else if (current is IEnumerator) + { + var customHandler = current as ICustomYieldInstructionErrorHandler; + if (customHandler != null && customHandler.IsReThrowOnError) + { + // If throws exception in Custom YieldInsrtuction, can't handle parent coroutine. + // It is C# limitation. + // so store error info and retrieve from parent. + customHandler.ForceDisableRethrowOnError(); + yield return current; + customHandler.ForceEnableRethrowOnError(); + + if (customHandler.HasError) + { + try + { + raisedError = true; + observer.OnError(customHandler.Error); + } + finally + { + var d = enumerator as IDisposable; + if (d != null) + { + d.Dispose(); + } + } + yield break; + } + } + else + { + yield return current; + } + } +#endif + else if (current == null && nullAsNextUpdate) + { + yield return null; + } + else + { + try + { + observer.OnNext((T)current); + } + catch + { + var d = enumerator as IDisposable; + if (d != null) + { + d.Dispose(); + } + throw; + } + } + } + } while (hasNext && !cancellationToken.IsCancellationRequested); + + try + { + if (!raisedError && !cancellationToken.IsCancellationRequested) + { + observer.OnCompleted(); + } + } + finally + { + var d = enumerator as IDisposable; + if (d != null) + { + d.Dispose(); + } + } + } + + public static IObservable FromCoroutine(Func, IEnumerator> coroutine) + { + return FromCoroutine((observer, cancellationToken) => WrapToCancellableEnumerator(coroutine(observer), observer, cancellationToken)); + } + + /// + /// MicroCoroutine is lightweight, fast coroutine dispatcher. + /// IEnumerator supports only yield return null. + /// + public static IObservable FromMicroCoroutine(Func, IEnumerator> coroutine, FrameCountType frameCountType = FrameCountType.Update) + { + return FromMicroCoroutine((observer, cancellationToken) => WrapToCancellableEnumerator(coroutine(observer), observer, cancellationToken), frameCountType); + } + + static IEnumerator WrapToCancellableEnumerator(IEnumerator enumerator, IObserver observer, CancellationToken cancellationToken) + { + var hasNext = default(bool); + do + { + try + { + hasNext = enumerator.MoveNext(); + } + catch (Exception ex) + { + try + { + observer.OnError(ex); + } + finally + { + var d = enumerator as IDisposable; + if (d != null) + { + d.Dispose(); + } + } + yield break; + } + + yield return enumerator.Current; // yield inner YieldInstruction + } while (hasNext && !cancellationToken.IsCancellationRequested); + + { + var d = enumerator as IDisposable; + if (d != null) + { + d.Dispose(); + } + } + } + + public static IObservable FromCoroutine(Func, CancellationToken, IEnumerator> coroutine) + { + return new UniRx.Operators.FromCoroutineObservable(coroutine); + } + + /// + /// MicroCoroutine is lightweight, fast coroutine dispatcher. + /// IEnumerator supports only yield return null. + /// + public static IObservable FromMicroCoroutine(Func, CancellationToken, IEnumerator> coroutine, FrameCountType frameCountType = FrameCountType.Update) + { + return new UniRx.Operators.FromMicroCoroutineObservable(coroutine, frameCountType); + } + + public static IObservable SelectMany(this IObservable source, IEnumerator coroutine, bool publishEveryYield = false) + { + return source.SelectMany(FromCoroutine(() => coroutine, publishEveryYield)); + } + + public static IObservable SelectMany(this IObservable source, Func selector, bool publishEveryYield = false) + { + return source.SelectMany(FromCoroutine(() => selector(), publishEveryYield)); + } + + /// + /// Note: publishEveryYield is always false. If you want to set true, use Observable.FromCoroutine(() => selector(x), true). This is workaround of Unity compiler's bug. + /// + public static IObservable SelectMany(this IObservable source, Func selector) + { + return source.SelectMany(x => FromCoroutine(() => selector(x), false)); + } + + public static IObservable ToObservable(this IEnumerator coroutine, bool publishEveryYield = false) + { + return FromCoroutine((observer, cancellationToken) => WrapEnumerator(coroutine, observer, cancellationToken, publishEveryYield)); + } + +#if SupportCustomYieldInstruction + + public static ObservableYieldInstruction ToYieldInstruction(this IEnumerator coroutine) + { + return ToObservable(coroutine, false).ToYieldInstruction(); + } + + public static ObservableYieldInstruction ToYieldInstruction(this IEnumerator coroutine, bool throwOnError) + { + return ToObservable(coroutine, false).ToYieldInstruction(throwOnError); + } + + public static ObservableYieldInstruction ToYieldInstruction(this IEnumerator coroutine, CancellationToken cancellationToken) + { + return ToObservable(coroutine, false).ToYieldInstruction(cancellationToken); + } + + public static ObservableYieldInstruction ToYieldInstruction(this IEnumerator coroutine, bool throwOnError, CancellationToken cancellationToken) + { + return ToObservable(coroutine, false).ToYieldInstruction(throwOnError, cancellationToken); + } + +#endif + + // variation of FromCoroutine + + /// + /// EveryUpdate calls coroutine's yield return null timing. It is after all Update and before LateUpdate. + /// + public static IObservable EveryUpdate() + { + return FromMicroCoroutine((observer, cancellationToken) => EveryCycleCore(observer, cancellationToken), FrameCountType.Update); + } + + public static IObservable EveryFixedUpdate() + { + return FromMicroCoroutine((observer, cancellationToken) => EveryCycleCore(observer, cancellationToken), FrameCountType.FixedUpdate); + } + + public static IObservable EveryEndOfFrame() + { + return FromMicroCoroutine((observer, cancellationToken) => EveryCycleCore(observer, cancellationToken), FrameCountType.EndOfFrame); + } + + static IEnumerator EveryCycleCore(IObserver observer, CancellationToken cancellationToken) + { + if (cancellationToken.IsCancellationRequested) yield break; + var count = 0L; + while (true) + { + yield return null; + if (cancellationToken.IsCancellationRequested) yield break; + + observer.OnNext(count++); + } + } + + /// + /// EveryGameObjectUpdate calls from MainThreadDispatcher's Update. + /// + public static IObservable EveryGameObjectUpdate() + { + return MainThreadDispatcher.UpdateAsObservable().Scan(-1L, (x, y) => x + 1); + } + + /// + /// EveryLateUpdate calls from MainThreadDispatcher's OnLateUpdate. + /// + public static IObservable EveryLateUpdate() + { + return MainThreadDispatcher.LateUpdateAsObservable().Scan(-1L, (x, y) => x + 1); + } + +#if SupportCustomYieldInstruction + + /// + /// [Obsolete]Same as EveryUpdate. + /// + [Obsolete] + public static IObservable EveryAfterUpdate() + { + return FromCoroutine((observer, cancellationToken) => new EveryAfterUpdateInvoker(observer, cancellationToken)); + } + +#endif + + #region Observable.Time Frame Extensions + + // Interval, Timer, Delay, Sample, Throttle, Timeout + + public static IObservable NextFrame(FrameCountType frameCountType = FrameCountType.Update) + { + return FromMicroCoroutine((observer, cancellation) => NextFrameCore(observer, cancellation), frameCountType); + } + + static IEnumerator NextFrameCore(IObserver observer, CancellationToken cancellation) + { + yield return null; + + if (!cancellation.IsCancellationRequested) + { + observer.OnNext(Unit.Default); + observer.OnCompleted(); + } + } + + public static IObservable IntervalFrame(int intervalFrameCount, FrameCountType frameCountType = FrameCountType.Update) + { + return TimerFrame(intervalFrameCount, intervalFrameCount, frameCountType); + } + + public static IObservable TimerFrame(int dueTimeFrameCount, FrameCountType frameCountType = FrameCountType.Update) + { + return FromMicroCoroutine((observer, cancellation) => TimerFrameCore(observer, dueTimeFrameCount, cancellation), frameCountType); + } + + public static IObservable TimerFrame(int dueTimeFrameCount, int periodFrameCount, FrameCountType frameCountType = FrameCountType.Update) + { + return FromMicroCoroutine((observer, cancellation) => TimerFrameCore(observer, dueTimeFrameCount, periodFrameCount, cancellation), frameCountType); + } + + static IEnumerator TimerFrameCore(IObserver observer, int dueTimeFrameCount, CancellationToken cancel) + { + // normalize + if (dueTimeFrameCount <= 0) dueTimeFrameCount = 0; + + var currentFrame = 0; + + // initial phase + while (!cancel.IsCancellationRequested) + { + if (currentFrame++ == dueTimeFrameCount) + { + observer.OnNext(0); + observer.OnCompleted(); + break; + } + yield return null; + } + } + + static IEnumerator TimerFrameCore(IObserver observer, int dueTimeFrameCount, int periodFrameCount, CancellationToken cancel) + { + // normalize + if (dueTimeFrameCount <= 0) dueTimeFrameCount = 0; + if (periodFrameCount <= 0) periodFrameCount = 1; + + var sendCount = 0L; + var currentFrame = 0; + + // initial phase + while (!cancel.IsCancellationRequested) + { + if (currentFrame++ == dueTimeFrameCount) + { + observer.OnNext(sendCount++); + currentFrame = -1; + break; + } + yield return null; + } + + // period phase + while (!cancel.IsCancellationRequested) + { + if (++currentFrame == periodFrameCount) + { + observer.OnNext(sendCount++); + currentFrame = 0; + } + yield return null; + } + } + + public static IObservable DelayFrame(this IObservable source, int frameCount, FrameCountType frameCountType = FrameCountType.Update) + { + if (frameCount < 0) throw new ArgumentOutOfRangeException("frameCount"); + return new UniRx.Operators.DelayFrameObservable(source, frameCount, frameCountType); + } + + public static IObservable Sample(this IObservable source, IObservable sampler) + { + return new UniRx.Operators.SampleObservable(source, sampler); + } + + public static IObservable SampleFrame(this IObservable source, int frameCount, FrameCountType frameCountType = FrameCountType.Update) + { + if (frameCount < 0) throw new ArgumentOutOfRangeException("frameCount"); + return new UniRx.Operators.SampleFrameObservable(source, frameCount, frameCountType); + } + + public static IObservable ThrottleFrame(this IObservable source, int frameCount, FrameCountType frameCountType = FrameCountType.Update) + { + if (frameCount < 0) throw new ArgumentOutOfRangeException("frameCount"); + return new UniRx.Operators.ThrottleFrameObservable(source, frameCount, frameCountType); + } + + public static IObservable ThrottleFirstFrame(this IObservable source, int frameCount, FrameCountType frameCountType = FrameCountType.Update) + { + if (frameCount < 0) throw new ArgumentOutOfRangeException("frameCount"); + return new UniRx.Operators.ThrottleFirstFrameObservable(source, frameCount, frameCountType); + } + + public static IObservable TimeoutFrame(this IObservable source, int frameCount, FrameCountType frameCountType = FrameCountType.Update) + { + if (frameCount < 0) throw new ArgumentOutOfRangeException("frameCount"); + return new UniRx.Operators.TimeoutFrameObservable(source, frameCount, frameCountType); + } + + public static IObservable DelayFrameSubscription(this IObservable source, int frameCount, FrameCountType frameCountType = FrameCountType.Update) + { + if (frameCount < 0) throw new ArgumentOutOfRangeException("frameCount"); + return new UniRx.Operators.DelayFrameSubscriptionObservable(source, frameCount, frameCountType); + } + + #endregion + +#if SupportCustomYieldInstruction + + /// + /// Convert to yieldable IEnumerator. e.g. yield return source.ToYieldInstruction();. + /// If needs last result, you can take ObservableYieldInstruction.HasResult/Result property. + /// This overload throws exception if received OnError events(same as coroutine). + /// + public static ObservableYieldInstruction ToYieldInstruction(this IObservable source) + { + return new ObservableYieldInstruction(source, true, CancellationToken.None); + } + + /// + /// Convert to yieldable IEnumerator. e.g. yield return source.ToYieldInstruction();. + /// If needs last result, you can take ObservableYieldInstruction.HasResult/Result property. + /// This overload throws exception if received OnError events(same as coroutine). + /// + public static ObservableYieldInstruction ToYieldInstruction(this IObservable source, CancellationToken cancel) + { + return new ObservableYieldInstruction(source, true, cancel); + } + + /// + /// Convert to yieldable IEnumerator. e.g. yield return source.ToYieldInstruction();. + /// If needs last result, you can take ObservableYieldInstruction.HasResult/Result property. + /// If throwOnError = false, you can take ObservableYieldInstruction.HasError/Error property. + /// + public static ObservableYieldInstruction ToYieldInstruction(this IObservable source, bool throwOnError) + { + return new ObservableYieldInstruction(source, throwOnError, CancellationToken.None); + } + + /// + /// Convert to yieldable IEnumerator. e.g. yield return source.ToYieldInstruction();. + /// If needs last result, you can take ObservableYieldInstruction.HasResult/Result property. + /// If throwOnError = false, you can take ObservableYieldInstruction.HasError/Error property. + /// + public static ObservableYieldInstruction ToYieldInstruction(this IObservable source, bool throwOnError, CancellationToken cancel) + { + return new ObservableYieldInstruction(source, throwOnError, cancel); + } + +#endif + + /// Convert to awaitable IEnumerator. + public static IEnumerator ToAwaitableEnumerator(this IObservable source, CancellationToken cancel = default(CancellationToken)) + { + return ToAwaitableEnumerator(source, Stubs.Ignore, Stubs.Throw, cancel); + } + + /// Convert to awaitable IEnumerator. + public static IEnumerator ToAwaitableEnumerator(this IObservable source, Action onResult, CancellationToken cancel = default(CancellationToken)) + { + return ToAwaitableEnumerator(source, onResult, Stubs.Throw, cancel); + } + + /// Convert to awaitable IEnumerator. + public static IEnumerator ToAwaitableEnumerator(this IObservable source, Action onError, CancellationToken cancel = default(CancellationToken)) + { + return ToAwaitableEnumerator(source, Stubs.Ignore, onError, cancel); + } + + /// Convert to awaitable IEnumerator. + public static IEnumerator ToAwaitableEnumerator(this IObservable source, Action onResult, Action onError, CancellationToken cancel = default(CancellationToken)) + { + var enumerator = new ObservableYieldInstruction(source, false, cancel); + var e = (IEnumerator)enumerator; + while (e.MoveNext() && !cancel.IsCancellationRequested) + { + yield return null; + } + + if (cancel.IsCancellationRequested) + { + enumerator.Dispose(); + yield break; + } + + if (enumerator.HasResult) + { + onResult(enumerator.Result); + } + else if (enumerator.HasError) + { + onError(enumerator.Error); + } + } + + /// AutoStart observable as coroutine. + public static Coroutine StartAsCoroutine(this IObservable source, CancellationToken cancel = default(CancellationToken)) + { + return StartAsCoroutine(source, Stubs.Ignore, Stubs.Throw, cancel); + } + + /// AutoStart observable as coroutine. + public static Coroutine StartAsCoroutine(this IObservable source, Action onResult, CancellationToken cancel = default(CancellationToken)) + { + return StartAsCoroutine(source, onResult, Stubs.Throw, cancel); + } + + /// AutoStart observable as coroutine. + public static Coroutine StartAsCoroutine(this IObservable source, Action onError, CancellationToken cancel = default(CancellationToken)) + { + return StartAsCoroutine(source, Stubs.Ignore, onError, cancel); + } + + /// AutoStart observable as coroutine. + public static Coroutine StartAsCoroutine(this IObservable source, Action onResult, Action onError, CancellationToken cancel = default(CancellationToken)) + { + return MainThreadDispatcher.StartCoroutine(source.ToAwaitableEnumerator(onResult, onError, cancel)); + } + + public static IObservable ObserveOnMainThread(this IObservable source) + { + return source.ObserveOn(SchedulerUnity.MainThread); + } + + public static IObservable ObserveOnMainThread(this IObservable source, MainThreadDispatchType dispatchType) + { + switch (dispatchType) + { + case MainThreadDispatchType.Update: + return source.ObserveOnMainThread(); // faster path + + // others, bit slower + + case MainThreadDispatchType.FixedUpdate: + return source.SelectMany(_ => EveryFixedUpdate().Take(1), (x, _) => x); + case MainThreadDispatchType.EndOfFrame: + return source.SelectMany(_ => EveryEndOfFrame().Take(1), (x, _) => x); + case MainThreadDispatchType.GameObjectUpdate: + return source.SelectMany(_ => MainThreadDispatcher.UpdateAsObservable().Take(1), (x, _) => x); + case MainThreadDispatchType.LateUpdate: + return source.SelectMany(_ => MainThreadDispatcher.LateUpdateAsObservable().Take(1), (x, _) => x); + default: + throw new ArgumentException("type is invalid"); + } + } + + public static IObservable SubscribeOnMainThread(this IObservable source) + { + return source.SubscribeOn(SchedulerUnity.MainThread); + } + + // I can't avoid Unity 5.3's uNET weaver bug, pending... + + //public static IObservable SubscribeOnMainThread(this IObservable source, MainThreadDispatchType dispatchType) + //{ + // switch (dispatchType) + // { + // case MainThreadDispatchType.Update: + // return source.SubscribeOnMainThread(); // faster path + + // // others, bit slower + + // case MainThreadDispatchType.FixedUpdate: + // return new UniRx.Operators.SubscribeOnMainThreadObservable(source, EveryFixedUpdate().Take(1)); + // case MainThreadDispatchType.EndOfFrame: + // return new UniRx.Operators.SubscribeOnMainThreadObservable(source, EveryEndOfFrame().Take(1)); + // case MainThreadDispatchType.GameObjectUpdate: + // return new UniRx.Operators.SubscribeOnMainThreadObservable(source, MainThreadDispatcher.UpdateAsObservable().Select(_ => 0L).Take(1)); + // case MainThreadDispatchType.LateUpdate: + // return new UniRx.Operators.SubscribeOnMainThreadObservable(source, MainThreadDispatcher.LateUpdateAsObservable().Select(_ => 0L).Take(1)); + // case MainThreadDispatchType.AfterUpdate: + // return new UniRx.Operators.SubscribeOnMainThreadObservable(source, EveryAfterUpdate().Take(1)); + // default: + // throw new ArgumentException("type is invalid"); + // } + //} + + public static IObservable EveryApplicationPause() + { + return MainThreadDispatcher.OnApplicationPauseAsObservable().AsObservable(); + } + + public static IObservable EveryApplicationFocus() + { + return MainThreadDispatcher.OnApplicationFocusAsObservable().AsObservable(); + } + + /// publish OnNext(Unit) and OnCompleted() on application quit. + public static IObservable OnceApplicationQuit() + { + return MainThreadDispatcher.OnApplicationQuitAsObservable().Take(1); + } + + public static IObservable TakeUntilDestroy(this IObservable source, Component target) + { + return source.TakeUntil(target.OnDestroyAsObservable()); + } + + public static IObservable TakeUntilDestroy(this IObservable source, GameObject target) + { + return source.TakeUntil(target.OnDestroyAsObservable()); + } + + public static IObservable TakeUntilDisable(this IObservable source, Component target) + { + return source.TakeUntil(target.OnDisableAsObservable()); + } + + public static IObservable TakeUntilDisable(this IObservable source, GameObject target) + { + return source.TakeUntil(target.OnDisableAsObservable()); + } + + public static IObservable RepeatUntilDestroy(this IObservable source, GameObject target) + { + return RepeatUntilCore(RepeatInfinite(source), target.OnDestroyAsObservable(), target); + } + + public static IObservable RepeatUntilDestroy(this IObservable source, Component target) + { + return RepeatUntilCore(RepeatInfinite(source), target.OnDestroyAsObservable(), (target != null) ? target.gameObject : null); + } + + public static IObservable RepeatUntilDisable(this IObservable source, GameObject target) + { + return RepeatUntilCore(RepeatInfinite(source), target.OnDisableAsObservable(), target); + } + + public static IObservable RepeatUntilDisable(this IObservable source, Component target) + { + return RepeatUntilCore(RepeatInfinite(source), target.OnDisableAsObservable(), (target != null) ? target.gameObject : null); + } + + static IObservable RepeatUntilCore(this IEnumerable> sources, IObservable trigger, GameObject lifeTimeChecker) + { + return new UniRx.Operators.RepeatUntilObservable(sources, trigger, lifeTimeChecker); + } + + public static IObservable> FrameInterval(this IObservable source) + { + return new UniRx.Operators.FrameIntervalObservable(source); + } + + public static IObservable> FrameTimeInterval(this IObservable source, bool ignoreTimeScale = false) + { + return new UniRx.Operators.FrameTimeIntervalObservable(source, ignoreTimeScale); + } + + /// + /// Buffer elements in during target frame counts. Default raise same frame of end(frameCount = 0, frameCountType = EndOfFrame). + /// + public static IObservable> BatchFrame(this IObservable source) + { + // if use default argument, comiler errors ambiguous(Unity's limitation) + return BatchFrame(source, 0, FrameCountType.EndOfFrame); + } + + /// + /// Buffer elements in during target frame counts. + /// + public static IObservable> BatchFrame(this IObservable source, int frameCount, FrameCountType frameCountType) + { + if (frameCount < 0) throw new ArgumentException("frameCount must be >= 0, frameCount:" + frameCount); + return new UniRx.Operators.BatchFrameObservable(source, frameCount, frameCountType); + } + + /// + /// Wait command in during target frame counts. Default raise same frame of end(frameCount = 0, frameCountType = EndOfFrame). + /// + public static IObservable BatchFrame(this IObservable source) + { + return BatchFrame(source, 0, FrameCountType.EndOfFrame); + } + + /// + /// Wait command in during target frame counts. + /// + public static IObservable BatchFrame(this IObservable source, int frameCount, FrameCountType frameCountType) + { + if (frameCount < 0) throw new ArgumentException("frameCount must be >= 0, frameCount:" + frameCount); + return new UniRx.Operators.BatchFrameObservable(source, frameCount, frameCountType); + } + +#if UniRxLibrary + + static IEnumerable> RepeatInfinite(IObservable source) + { + while (true) + { + yield return source; + } + } + + internal static class Stubs + { + public static readonly Action Nop = () => { }; + public static readonly Action Throw = ex => { ex.Throw(); }; + + // Stubs.Ignore can't avoid iOS AOT problem. + public static void Ignore(T t) + { + } + + // marker for CatchIgnore and Catch avoid iOS AOT problem. + public static IObservable CatchIgnore(Exception ex) + { + return Observable.Empty(); + } + } +#endif + } +} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs.meta new file mode 100644 index 0000000..e78c0a2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c6ef0a186b9ceaf41af7f2a9f4006216 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs new file mode 100644 index 0000000..e1bc7d7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs @@ -0,0 +1,442 @@ +using System; +using System.Collections; +using UnityEngine; + +#if !UniRxLibrary +using ObservableUnity = UniRx.Observable; +#endif + +#if UNITY_2018_3_OR_NEWER +#pragma warning disable CS0618 +#endif + +namespace UniRx +{ + using System.Threading; +#if !(UNITY_METRO || UNITY_WP8) && (UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4_0_1 || UNITY_4_0 || UNITY_3_5 || UNITY_3_4 || UNITY_3_3 || UNITY_3_2 || UNITY_3_1 || UNITY_3_0_0 || UNITY_3_0 || UNITY_2_6_1 || UNITY_2_6) + // Fallback for Unity versions below 4.5 + using Hash = System.Collections.Hashtable; + using HashEntry = System.Collections.DictionaryEntry; +#else + // Unity 4.5 release notes: + // WWW: deprecated 'WWW(string url, byte[] postData, Hashtable headers)', + // use 'public WWW(string url, byte[] postData, Dictionary headers)' instead. + using Hash = System.Collections.Generic.Dictionary; + using HashEntry = System.Collections.Generic.KeyValuePair; +#endif + +#if UNITY_2018_3_OR_NEWER + [Obsolete("Use UnityWebRequest, a fully featured replacement which is more efficient and has additional features")] +#endif + public static partial class ObservableWWW + { + public static IObservable Get(string url, Hash headers = null, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => FetchText(new WWW(url, null, (headers ?? new Hash())), observer, progress, cancellation)); + } + + public static IObservable GetAndGetBytes(string url, Hash headers = null, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => FetchBytes(new WWW(url, null, (headers ?? new Hash())), observer, progress, cancellation)); + } + public static IObservable GetWWW(string url, Hash headers = null, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => Fetch(new WWW(url, null, (headers ?? new Hash())), observer, progress, cancellation)); + } + + public static IObservable Post(string url, byte[] postData, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => FetchText(new WWW(url, postData), observer, progress, cancellation)); + } + + public static IObservable Post(string url, byte[] postData, Hash headers, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => FetchText(new WWW(url, postData, headers), observer, progress, cancellation)); + } + + public static IObservable Post(string url, WWWForm content, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => FetchText(new WWW(url, content), observer, progress, cancellation)); + } + + public static IObservable Post(string url, WWWForm content, Hash headers, IProgress progress = null) + { + var contentHeaders = content.headers; + return ObservableUnity.FromCoroutine((observer, cancellation) => FetchText(new WWW(url, content.data, MergeHash(contentHeaders, headers)), observer, progress, cancellation)); + } + + public static IObservable PostAndGetBytes(string url, byte[] postData, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => FetchBytes(new WWW(url, postData), observer, progress, cancellation)); + } + + public static IObservable PostAndGetBytes(string url, byte[] postData, Hash headers, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => FetchBytes(new WWW(url, postData, headers), observer, progress, cancellation)); + } + + public static IObservable PostAndGetBytes(string url, WWWForm content, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => FetchBytes(new WWW(url, content), observer, progress, cancellation)); + } + + public static IObservable PostAndGetBytes(string url, WWWForm content, Hash headers, IProgress progress = null) + { + var contentHeaders = content.headers; + return ObservableUnity.FromCoroutine((observer, cancellation) => FetchBytes(new WWW(url, content.data, MergeHash(contentHeaders, headers)), observer, progress, cancellation)); + } + + public static IObservable PostWWW(string url, byte[] postData, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => Fetch(new WWW(url, postData), observer, progress, cancellation)); + } + + public static IObservable PostWWW(string url, byte[] postData, Hash headers, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => Fetch(new WWW(url, postData, headers), observer, progress, cancellation)); + } + + public static IObservable PostWWW(string url, WWWForm content, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => Fetch(new WWW(url, content), observer, progress, cancellation)); + } + + public static IObservable PostWWW(string url, WWWForm content, Hash headers, IProgress progress = null) + { + var contentHeaders = content.headers; + return ObservableUnity.FromCoroutine((observer, cancellation) => Fetch(new WWW(url, content.data, MergeHash(contentHeaders, headers)), observer, progress, cancellation)); + } + + public static IObservable LoadFromCacheOrDownload(string url, int version, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => FetchAssetBundle(WWW.LoadFromCacheOrDownload(url, version), observer, progress, cancellation)); + } + + public static IObservable LoadFromCacheOrDownload(string url, int version, uint crc, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => FetchAssetBundle(WWW.LoadFromCacheOrDownload(url, version, crc), observer, progress, cancellation)); + } + + // over Unity5 supports Hash128 +#if !(UNITY_4_7 || UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4_0_1 || UNITY_4_0 || UNITY_3_5 || UNITY_3_4 || UNITY_3_3 || UNITY_3_2 || UNITY_3_1 || UNITY_3_0_0 || UNITY_3_0 || UNITY_2_6_1 || UNITY_2_6) + public static IObservable LoadFromCacheOrDownload(string url, Hash128 hash128, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => FetchAssetBundle(WWW.LoadFromCacheOrDownload(url, hash128), observer, progress, cancellation)); + } + + public static IObservable LoadFromCacheOrDownload(string url, Hash128 hash128, uint crc, IProgress progress = null) + { + return ObservableUnity.FromCoroutine((observer, cancellation) => FetchAssetBundle(WWW.LoadFromCacheOrDownload(url, hash128, crc), observer, progress, cancellation)); + } +#endif + + // over 4.5, Hash define is Dictionary. + // below Unity 4.5, WWW only supports Hashtable. + // Unity 4.5, 4.6 WWW supports Dictionary and [Obsolete]Hashtable but WWWForm.content is Hashtable. + // Unity 5.0 WWW only supports Dictionary and WWWForm.content is also Dictionary. +#if !(UNITY_METRO || UNITY_WP8) && (UNITY_4_5 || UNITY_4_6 || UNITY_4_7) + static Hash MergeHash(Hashtable wwwFormHeaders, Hash externalHeaders) + { + var newHeaders = new Hash(); + foreach (DictionaryEntry item in wwwFormHeaders) + { + newHeaders[item.Key.ToString()] = item.Value.ToString(); + } + foreach (HashEntry item in externalHeaders) + { + newHeaders[item.Key] = item.Value; + } + return newHeaders; + } +#else + static Hash MergeHash(Hash wwwFormHeaders, Hash externalHeaders) + { + foreach (HashEntry item in externalHeaders) + { + wwwFormHeaders[item.Key] = item.Value; + } + return wwwFormHeaders; + } +#endif + + static IEnumerator Fetch(WWW www, IObserver observer, IProgress reportProgress, CancellationToken cancel) + { + using (www) + { + if (reportProgress != null) + { + while (!www.isDone && !cancel.IsCancellationRequested) + { + try + { + reportProgress.Report(www.progress); + } + catch (Exception ex) + { + observer.OnError(ex); + yield break; + } + yield return null; + } + } + else + { + if (!www.isDone) + { + yield return www; + } + } + + if (cancel.IsCancellationRequested) + { + yield break; + } + + if (reportProgress != null) + { + try + { + reportProgress.Report(www.progress); + } + catch (Exception ex) + { + observer.OnError(ex); + yield break; + } + } + + if (!string.IsNullOrEmpty(www.error)) + { + observer.OnError(new WWWErrorException(www, www.text)); + } + else + { + observer.OnNext(www); + observer.OnCompleted(); + } + } + } + + static IEnumerator FetchText(WWW www, IObserver observer, IProgress reportProgress, CancellationToken cancel) + { + using (www) + { + if (reportProgress != null) + { + while (!www.isDone && !cancel.IsCancellationRequested) + { + try + { + reportProgress.Report(www.progress); + } + catch (Exception ex) + { + observer.OnError(ex); + yield break; + } + yield return null; + } + } + else + { + if (!www.isDone) + { + yield return www; + } + } + + if (cancel.IsCancellationRequested) + { + yield break; + } + + if (reportProgress != null) + { + try + { + reportProgress.Report(www.progress); + } + catch (Exception ex) + { + observer.OnError(ex); + yield break; + } + } + + if (!string.IsNullOrEmpty(www.error)) + { + observer.OnError(new WWWErrorException(www, www.text)); + } + else + { + observer.OnNext(www.text); + observer.OnCompleted(); + } + } + } + + static IEnumerator FetchBytes(WWW www, IObserver observer, IProgress reportProgress, CancellationToken cancel) + { + using (www) + { + if (reportProgress != null) + { + while (!www.isDone && !cancel.IsCancellationRequested) + { + try + { + reportProgress.Report(www.progress); + } + catch (Exception ex) + { + observer.OnError(ex); + yield break; + } + yield return null; + } + } + else + { + if (!www.isDone) + { + yield return www; + } + } + + if (cancel.IsCancellationRequested) + { + yield break; + } + + if (reportProgress != null) + { + try + { + reportProgress.Report(www.progress); + } + catch (Exception ex) + { + observer.OnError(ex); + yield break; + } + } + + if (!string.IsNullOrEmpty(www.error)) + { + observer.OnError(new WWWErrorException(www, www.text)); + } + else + { + observer.OnNext(www.bytes); + observer.OnCompleted(); + } + } + } + + static IEnumerator FetchAssetBundle(WWW www, IObserver observer, IProgress reportProgress, CancellationToken cancel) + { + using (www) + { + if (reportProgress != null) + { + while (!www.isDone && !cancel.IsCancellationRequested) + { + try + { + reportProgress.Report(www.progress); + } + catch (Exception ex) + { + observer.OnError(ex); + yield break; + } + yield return null; + } + } + else + { + if (!www.isDone) + { + yield return www; + } + } + + if (cancel.IsCancellationRequested) + { + yield break; + } + + if (reportProgress != null) + { + try + { + reportProgress.Report(www.progress); + } + catch (Exception ex) + { + observer.OnError(ex); + yield break; + } + } + + if (!string.IsNullOrEmpty(www.error)) + { + observer.OnError(new WWWErrorException(www, "")); + } + else + { + observer.OnNext(www.assetBundle); + observer.OnCompleted(); + } + } + } + } + + public class WWWErrorException : Exception + { + public string RawErrorMessage { get; private set; } + public bool HasResponse { get; private set; } + public string Text { get; private set; } + public System.Net.HttpStatusCode StatusCode { get; private set; } + public System.Collections.Generic.Dictionary ResponseHeaders { get; private set; } + public WWW WWW { get; private set; } + + // cache the text because if www was disposed, can't access it. + public WWWErrorException(WWW www, string text) + { + this.WWW = www; + this.RawErrorMessage = www.error; + this.ResponseHeaders = www.responseHeaders; + this.HasResponse = false; + this.Text = text; + + var splitted = RawErrorMessage.Split(' ', ':'); + if (splitted.Length != 0) + { + int statusCode; + if (int.TryParse(splitted[0], out statusCode)) + { + this.HasResponse = true; + this.StatusCode = (System.Net.HttpStatusCode)statusCode; + } + } + } + + public override string ToString() + { + var text = this.Text; + if (string.IsNullOrEmpty(text)) + { + return RawErrorMessage; + } + else + { + return RawErrorMessage + " " + text; + } + } + } +} + +#if UNITY_2018_3_OR_NEWER +#pragma warning restore CS0618 +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs.meta new file mode 100644 index 0000000..cf317e4 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ba71e5544e233dd4b83d4c5a6c696d05 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObserveExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObserveExtensions.cs new file mode 100644 index 0000000..a272623 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObserveExtensions.cs @@ -0,0 +1,264 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading; +using UniRx.InternalUtil; +using UniRx.Triggers; + +#if !UniRxLibrary +using ObservableUnity = UniRx.Observable; +#endif + +namespace UniRx +{ + public static partial class ObserveExtensions + { + /// + /// Publish target property when value is changed. If source is destroyed/destructed, publish OnCompleted. + /// + /// If true and target is UnityObject, use destroyed check by additional component. It is faster check for lifecycle but needs initial cost. + public static IObservable ObserveEveryValueChanged(this TSource source, Func propertySelector, FrameCountType frameCountType = FrameCountType.Update, bool fastDestroyCheck = false) + where TSource : class + { + return ObserveEveryValueChanged(source, propertySelector, frameCountType, UnityEqualityComparer.GetDefault(), fastDestroyCheck); + } + + /// + /// Publish target property when value is changed. If source is destroyed/destructed, publish OnCompleted. + /// + public static IObservable ObserveEveryValueChanged(this TSource source, Func propertySelector, FrameCountType frameCountType, IEqualityComparer comparer) + where TSource : class + { + return ObserveEveryValueChanged(source, propertySelector, frameCountType, comparer, false); + } + + /// + /// Publish target property when value is changed. If source is destroyed/destructed, publish OnCompleted. + /// + /// If true and target is UnityObject, use destroyed check by additional component. It is faster check for lifecycle but needs initial cost. + public static IObservable ObserveEveryValueChanged(this TSource source, Func propertySelector, FrameCountType frameCountType, IEqualityComparer comparer, bool fastDestroyCheck) + where TSource : class + { + if (source == null) return Observable.Empty(); + if (comparer == null) comparer = UnityEqualityComparer.GetDefault(); + + var unityObject = source as UnityEngine.Object; + var isUnityObject = source is UnityEngine.Object; + if (isUnityObject && unityObject == null) return Observable.Empty(); + + // MicroCoroutine does not publish value immediately, so publish value on subscribe. + if (isUnityObject) + { + return ObservableUnity.FromMicroCoroutine((observer, cancellationToken) => + { + if (unityObject != null) + { + var firstValue = default(TProperty); + try + { + firstValue = propertySelector((TSource)(object)unityObject); + } + catch (Exception ex) + { + observer.OnError(ex); + return EmptyEnumerator(); + } + + observer.OnNext(firstValue); + return PublishUnityObjectValueChanged(unityObject, firstValue, propertySelector, comparer, observer, cancellationToken, fastDestroyCheck); + } + else + { + observer.OnCompleted(); + return EmptyEnumerator(); + } + }, frameCountType); + } + else + { + var reference = new WeakReference(source); + source = null; + + return ObservableUnity.FromMicroCoroutine((observer, cancellationToken) => + { + var target = reference.Target; + if (target != null) + { + var firstValue = default(TProperty); + try + { + firstValue = propertySelector((TSource)target); + } + catch (Exception ex) + { + observer.OnError(ex); + return EmptyEnumerator(); + } + finally + { + target = null; + } + + observer.OnNext(firstValue); + return PublishPocoValueChanged(reference, firstValue, propertySelector, comparer, observer, cancellationToken); + } + else + { + observer.OnCompleted(); + return EmptyEnumerator(); + } + }, frameCountType); + } + } + + static IEnumerator EmptyEnumerator() + { + yield break; + } + + static IEnumerator PublishPocoValueChanged(WeakReference sourceReference, TProperty firstValue, Func propertySelector, IEqualityComparer comparer, IObserver observer, CancellationToken cancellationToken) + { + var currentValue = default(TProperty); + var prevValue = firstValue; + + while (!cancellationToken.IsCancellationRequested) + { + var target = sourceReference.Target; + if (target != null) + { + try + { + currentValue = propertySelector((TSource)target); + } + catch (Exception ex) + { + observer.OnError(ex); + yield break; + } + finally + { + target = null; // remove reference(must need!) + } + } + else + { + observer.OnCompleted(); + yield break; + } + + if (!comparer.Equals(currentValue, prevValue)) + { + observer.OnNext(currentValue); + prevValue = currentValue; + } + + yield return null; + } + } + + static IEnumerator PublishUnityObjectValueChanged(UnityEngine.Object unityObject, TProperty firstValue, Func propertySelector, IEqualityComparer comparer, IObserver observer, CancellationToken cancellationToken, bool fastDestroyCheck) + { + var currentValue = default(TProperty); + var prevValue = firstValue; + + var source = (TSource)(object)unityObject; + + if (fastDestroyCheck) + { + ObservableDestroyTrigger destroyTrigger = null; + { + var gameObject = unityObject as UnityEngine.GameObject; + if (gameObject == null) + { + var comp = unityObject as UnityEngine.Component; + if (comp != null) + { + gameObject = comp.gameObject; + } + } + + // can't use faster path + if (gameObject == null) goto STANDARD_LOOP; + + destroyTrigger = GetOrAddDestroyTrigger(gameObject); + } + + // fast compare path + while (!cancellationToken.IsCancellationRequested) + { + var isDestroyed = destroyTrigger.IsActivated + ? !destroyTrigger.IsCalledOnDestroy + : (unityObject != null); + + if (isDestroyed) + { + try + { + currentValue = propertySelector(source); + } + catch (Exception ex) + { + observer.OnError(ex); + yield break; + } + } + else + { + observer.OnCompleted(); + yield break; + } + + if (!comparer.Equals(currentValue, prevValue)) + { + observer.OnNext(currentValue); + prevValue = currentValue; + } + + yield return null; + } + + yield break; + } + + STANDARD_LOOP: + while (!cancellationToken.IsCancellationRequested) + { + if (unityObject != null) + { + try + { + currentValue = propertySelector(source); + } + catch (Exception ex) + { + observer.OnError(ex); + yield break; + } + } + else + { + observer.OnCompleted(); + yield break; + } + + if (!comparer.Equals(currentValue, prevValue)) + { + observer.OnNext(currentValue); + prevValue = currentValue; + } + + yield return null; + } + } + + static ObservableDestroyTrigger GetOrAddDestroyTrigger(UnityEngine.GameObject go) + { + var dt = go.GetComponent(); + if (dt == null) + { + dt = go.AddComponent(); + } + return dt; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObserveExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObserveExtensions.cs.meta new file mode 100644 index 0000000..84e9e6c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObserveExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8741793924a6c2f4ea22ba27031d531f +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators.meta new file mode 100644 index 0000000..7685d16 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9dce5e02df57f3f44ad71d7250e1b44f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/BatchFrame.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/BatchFrame.cs new file mode 100644 index 0000000..638d6f4 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/BatchFrame.cs @@ -0,0 +1,282 @@ +using System; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class BatchFrameObservable : OperatorObservableBase> + { + readonly IObservable source; + readonly int frameCount; + readonly FrameCountType frameCountType; + + public BatchFrameObservable(IObservable source, int frameCount, FrameCountType frameCountType) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.frameCount = frameCount; + this.frameCountType = frameCountType; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + return new BatchFrame(this, observer, cancel).Run(); + } + + class BatchFrame : OperatorObserverBase> + { + readonly BatchFrameObservable parent; + readonly object gate = new object(); + readonly BooleanDisposable cancellationToken = new BooleanDisposable(); + readonly System.Collections.IEnumerator timer; + bool isRunning; + bool isCompleted; + List list; + + public BatchFrame(BatchFrameObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.timer = new ReusableEnumerator(this); + } + + public IDisposable Run() + { + list = new List(); + var sourceSubscription = parent.source.Subscribe(this); + return StableCompositeDisposable.Create(sourceSubscription, cancellationToken); + } + + public override void OnNext(T value) + { + lock (gate) + { + if (isCompleted) return; + list.Add(value); + if (!isRunning) + { + isRunning = true; + timer.Reset(); // reuse + + switch (parent.frameCountType) + { + case FrameCountType.Update: + MainThreadDispatcher.StartUpdateMicroCoroutine(timer); + break; + case FrameCountType.FixedUpdate: + MainThreadDispatcher.StartFixedUpdateMicroCoroutine(timer); + break; + case FrameCountType.EndOfFrame: + MainThreadDispatcher.StartEndOfFrameMicroCoroutine(timer); + break; + default: + break; + } + } + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + List currentList; + lock (gate) + { + isCompleted = true; + currentList = list; + } + if (currentList.Count != 0) + { + observer.OnNext(currentList); + } + try { observer.OnCompleted(); } finally { Dispose(); } + } + + // reuse, no gc allocate + class ReusableEnumerator : System.Collections.IEnumerator + { + readonly BatchFrame parent; + int currentFrame; + + public ReusableEnumerator(BatchFrame parent) + { + this.parent = parent; + } + + public object Current + { + get { return null; } + } + + public bool MoveNext() + { + if (parent.cancellationToken.IsDisposed) return false; + + List currentList; + lock (parent.gate) + { + if (currentFrame++ == parent.parent.frameCount) + { + if (parent.isCompleted) return false; + + currentList = parent.list; + parent.list = new List(); + parent.isRunning = false; + + // exit lock + } + else + { + return true; + } + } + + parent.observer.OnNext(currentList); + return false; + } + + public void Reset() + { + currentFrame = 0; + } + } + } + } + + internal class BatchFrameObservable : OperatorObservableBase + { + readonly IObservable source; + readonly int frameCount; + readonly FrameCountType frameCountType; + + public BatchFrameObservable(IObservable source, int frameCount, FrameCountType frameCountType) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.frameCount = frameCount; + this.frameCountType = frameCountType; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new BatchFrame(this, observer, cancel).Run(); + } + + class BatchFrame : OperatorObserverBase + { + readonly BatchFrameObservable parent; + readonly object gate = new object(); + readonly BooleanDisposable cancellationToken = new BooleanDisposable(); + readonly System.Collections.IEnumerator timer; + + bool isRunning; + bool isCompleted; + + public BatchFrame(BatchFrameObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + this.timer = new ReusableEnumerator(this); + } + + public IDisposable Run() + { + var sourceSubscription = parent.source.Subscribe(this); + return StableCompositeDisposable.Create(sourceSubscription, cancellationToken); + } + + public override void OnNext(Unit value) + { + lock (gate) + { + if (!isRunning) + { + isRunning = true; + timer.Reset(); // reuse + + switch (parent.frameCountType) + { + case FrameCountType.Update: + MainThreadDispatcher.StartUpdateMicroCoroutine(timer); + break; + case FrameCountType.FixedUpdate: + MainThreadDispatcher.StartFixedUpdateMicroCoroutine(timer); + break; + case FrameCountType.EndOfFrame: + MainThreadDispatcher.StartEndOfFrameMicroCoroutine(timer); + break; + default: + break; + } + } + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + bool running; + lock (gate) + { + running = isRunning; + isCompleted = true; + } + if (running) + { + observer.OnNext(Unit.Default); + } + try { observer.OnCompleted(); } finally { Dispose(); } + } + + // reuse, no gc allocate + class ReusableEnumerator : System.Collections.IEnumerator + { + readonly BatchFrame parent; + int currentFrame; + + public ReusableEnumerator(BatchFrame parent) + { + this.parent = parent; + } + + public object Current + { + get { return null; } + } + + public bool MoveNext() + { + if (parent.cancellationToken.IsDisposed) return false; + + lock (parent.gate) + { + if (currentFrame++ == parent.parent.frameCount) + { + if (parent.isCompleted) return false; + parent.isRunning = false; + + // exit lock + } + else + { + return true; + } + } + + parent.observer.OnNext(Unit.Default); + return false; + } + + public void Reset() + { + currentFrame = 0; + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/BatchFrame.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/BatchFrame.cs.meta new file mode 100644 index 0000000..803040e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/BatchFrame.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 74a2b6b8c63d1144f914c7f0d6719a36 +timeCreated: 1467771656 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrame.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrame.cs new file mode 100644 index 0000000..a934ea8 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrame.cs @@ -0,0 +1,260 @@ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace UniRx.Operators +{ + internal class DelayFrameObservable : OperatorObservableBase + { + readonly IObservable source; + readonly int frameCount; + readonly FrameCountType frameCountType; + + public DelayFrameObservable(IObservable source, int frameCount, FrameCountType frameCountType) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.frameCount = frameCount; + this.frameCountType = frameCountType; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new DelayFrame(this, observer, cancel).Run(); + } + + class DelayFrame : OperatorObserverBase + { + readonly DelayFrameObservable parent; + readonly object gate = new object(); + readonly QueuePool pool = new QueuePool(); + int runningEnumeratorCount; + bool readyDrainEnumerator; + bool running; + IDisposable sourceSubscription; + Queue currentQueueReference; + bool calledCompleted; + bool hasError; + Exception error; + BooleanDisposable cancelationToken; + + public DelayFrame(DelayFrameObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + cancelationToken = new BooleanDisposable(); + + var _sourceSubscription = new SingleAssignmentDisposable(); + sourceSubscription = _sourceSubscription; + _sourceSubscription.Disposable = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(cancelationToken, sourceSubscription); + } + + IEnumerator DrainQueue(Queue q, int frameCount) + { + lock (gate) + { + readyDrainEnumerator = false; // use next queue. + running = false; + } + + while (!cancelationToken.IsDisposed && frameCount-- != 0) + { + yield return null; + } + + try + { + if (q != null) + { + while (q.Count > 0 && !hasError) + { + if (cancelationToken.IsDisposed) break; + + lock (gate) + { + running = true; + } + + var value = q.Dequeue(); + observer.OnNext(value); + + lock (gate) + { + running = false; + } + } + + if (q.Count == 0) + { + pool.Return(q); + } + } + + if (hasError) + { + if (!cancelationToken.IsDisposed) + { + cancelationToken.Dispose(); + + try { observer.OnError(error); } finally { Dispose(); } + } + } + else if (calledCompleted) + { + lock (gate) + { + // not self only + if (runningEnumeratorCount != 1) yield break; + } + + if (!cancelationToken.IsDisposed) + { + cancelationToken.Dispose(); + + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + finally + { + lock (gate) + { + runningEnumeratorCount--; + } + } + } + + public override void OnNext(T value) + { + if (cancelationToken.IsDisposed) return; + + Queue targetQueue = null; + lock (gate) + { + if (!readyDrainEnumerator) + { + readyDrainEnumerator = true; + runningEnumeratorCount++; + targetQueue = currentQueueReference = pool.Get(); + targetQueue.Enqueue(value); + } + else + { + if (currentQueueReference != null) // null - if doesn't start OnNext and start OnCompleted + { + currentQueueReference.Enqueue(value); + } + return; + } + } + + switch (parent.frameCountType) + { + case FrameCountType.Update: + MainThreadDispatcher.StartUpdateMicroCoroutine(DrainQueue(targetQueue, parent.frameCount)); + break; + case FrameCountType.FixedUpdate: + MainThreadDispatcher.StartFixedUpdateMicroCoroutine(DrainQueue(targetQueue, parent.frameCount)); + break; + case FrameCountType.EndOfFrame: + MainThreadDispatcher.StartEndOfFrameMicroCoroutine(DrainQueue(targetQueue, parent.frameCount)); + break; + default: + throw new ArgumentException("Invalid FrameCountType:" + parent.frameCountType); + } + } + + public override void OnError(Exception error) + { + sourceSubscription.Dispose(); // stop subscription + + if (cancelationToken.IsDisposed) return; + + lock (gate) + { + if (running) + { + hasError = true; + this.error = error; + return; + } + } + + cancelationToken.Dispose(); + try { base.observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + sourceSubscription.Dispose(); // stop subscription + + if (cancelationToken.IsDisposed) return; + + lock (gate) + { + calledCompleted = true; + + if (!readyDrainEnumerator) + { + readyDrainEnumerator = true; + runningEnumeratorCount++; + } + else + { + return; + } + } + + switch (parent.frameCountType) + { + case FrameCountType.Update: + MainThreadDispatcher.StartUpdateMicroCoroutine(DrainQueue(null, parent.frameCount)); + break; + case FrameCountType.FixedUpdate: + MainThreadDispatcher.StartFixedUpdateMicroCoroutine(DrainQueue(null, parent.frameCount)); + break; + case FrameCountType.EndOfFrame: + MainThreadDispatcher.StartEndOfFrameMicroCoroutine(DrainQueue(null, parent.frameCount)); + break; + default: + throw new ArgumentException("Invalid FrameCountType:" + parent.frameCountType); + } + } + } + + class QueuePool + { + readonly object gate = new object(); + readonly Queue> pool = new Queue>(2); + + public Queue Get() + { + lock (gate) + { + if (pool.Count == 0) + { + return new Queue(2); + } + else + { + return pool.Dequeue(); + } + } + } + + public void Return(Queue q) + { + lock (gate) + { + pool.Enqueue(q); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrame.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrame.cs.meta new file mode 100644 index 0000000..bff7e5e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrame.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 868f75a703f1a944a801ab9c9b4512aa +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrameSubscription.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrameSubscription.cs new file mode 100644 index 0000000..2132b4a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrameSubscription.cs @@ -0,0 +1,37 @@ +using System; + +#if UniRxLibrary +using UnityObservable = UniRx.ObservableUnity; +#else +using UnityObservable = UniRx.Observable; +#endif + +namespace UniRx.Operators +{ + internal class DelayFrameSubscriptionObservable : OperatorObservableBase + { + readonly IObservable source; + readonly int frameCount; + readonly FrameCountType frameCountType; + + public DelayFrameSubscriptionObservable(IObservable source, int frameCount, FrameCountType frameCountType) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.frameCount = frameCount; + this.frameCountType = frameCountType; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + var d = new MultipleAssignmentDisposable(); + d.Disposable = UnityObservable.TimerFrame(frameCount, frameCountType) + .SubscribeWithState3(observer, d, source, (_, o, disp, s) => + { + disp.Disposable = s.Subscribe(o); + }); + + return d; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrameSubscription.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrameSubscription.cs.meta new file mode 100644 index 0000000..8755182 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrameSubscription.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ecfef95eedf36c2448944fb8932f682c +timeCreated: 1455373902 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameInterval.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameInterval.cs new file mode 100644 index 0000000..df0900d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameInterval.cs @@ -0,0 +1,52 @@ +using System; + +namespace UniRx.Operators +{ + internal class FrameIntervalObservable : OperatorObservableBase> + { + readonly IObservable source; + + public FrameIntervalObservable(IObservable source) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + return source.Subscribe(new FrameInterval(observer, cancel)); + } + + class FrameInterval : OperatorObserverBase> + { + int lastFrame; + + public FrameInterval(IObserver> observer, IDisposable cancel) + : base(observer, cancel) + { + this.lastFrame = UnityEngine.Time.frameCount; + } + + public override void OnNext(T value) + { + var now = UnityEngine.Time.frameCount; + var span = now - lastFrame; + lastFrame = now; + + base.observer.OnNext(new UniRx.FrameInterval(value, span)); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameInterval.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameInterval.cs.meta new file mode 100644 index 0000000..8604067 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameInterval.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a731a1a74be20a04a9d7dedc5ceefab2 +timeCreated: 1467771656 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameTimeInterval.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameTimeInterval.cs new file mode 100644 index 0000000..0ebaf54 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameTimeInterval.cs @@ -0,0 +1,60 @@ +using System; + +namespace UniRx.Operators +{ + internal class FrameTimeIntervalObservable : OperatorObservableBase> + { + readonly IObservable source; + readonly bool ignoreTimeScale; + + public FrameTimeIntervalObservable(IObservable source, bool ignoreTimeScale) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.ignoreTimeScale = ignoreTimeScale; + } + + protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) + { + return source.Subscribe(new FrameTimeInterval(this, observer, cancel)); + } + + class FrameTimeInterval : OperatorObserverBase> + { + readonly FrameTimeIntervalObservable parent; + float lastTime; + + public FrameTimeInterval(FrameTimeIntervalObservable parent, IObserver> observer, IDisposable cancel) + : base(observer, cancel) + { + this.parent = parent; + this.lastTime = (parent.ignoreTimeScale) + ? UnityEngine.Time.unscaledTime + : UnityEngine.Time.time; + } + + public override void OnNext(T value) + { + var now = (parent.ignoreTimeScale) + ? UnityEngine.Time.unscaledTime + : UnityEngine.Time.time; + var span = now - lastTime; + lastTime = now; + + base.observer.OnNext(new UniRx.TimeInterval(value, TimeSpan.FromSeconds(span))); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameTimeInterval.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameTimeInterval.cs.meta new file mode 100644 index 0000000..28adfca --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameTimeInterval.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a55cce9ef638364409d1227a25a32421 +timeCreated: 1467771656 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FromCoroutine.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FromCoroutine.cs new file mode 100644 index 0000000..39515f2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FromCoroutine.cs @@ -0,0 +1,141 @@ +using System; +using System.Collections; +using System.Threading; + +namespace UniRx.Operators +{ + internal class FromCoroutineObservable : OperatorObservableBase + { + readonly Func, CancellationToken, IEnumerator> coroutine; + + public FromCoroutineObservable(Func, CancellationToken, IEnumerator> coroutine) + : base(false) + { + this.coroutine = coroutine; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + var fromCoroutineObserver = new FromCoroutine(observer, cancel); + +#if (NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) + var moreCancel = new CancellationDisposable(); + var token = moreCancel.Token; +#else + var moreCancel = new BooleanDisposable(); + var token = new CancellationToken(moreCancel); +#endif + + MainThreadDispatcher.SendStartCoroutine(coroutine(fromCoroutineObserver, token)); + + return moreCancel; + } + + class FromCoroutine : OperatorObserverBase + { + public FromCoroutine(IObserver observer, IDisposable cancel) : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + try + { + base.observer.OnNext(value); + } + catch + { + Dispose(); + throw; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + + internal class FromMicroCoroutineObservable : OperatorObservableBase + { + readonly Func, CancellationToken, IEnumerator> coroutine; + readonly FrameCountType frameCountType; + + public FromMicroCoroutineObservable(Func, CancellationToken, IEnumerator> coroutine, FrameCountType frameCountType) + : base(false) + { + this.coroutine = coroutine; + this.frameCountType = frameCountType; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + var microCoroutineObserver = new FromMicroCoroutine(observer, cancel); + +#if (NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) + var moreCancel = new CancellationDisposable(); + var token = moreCancel.Token; +#else + var moreCancel = new BooleanDisposable(); + var token = new CancellationToken(moreCancel); +#endif + + switch (frameCountType) + { + case FrameCountType.Update: + MainThreadDispatcher.StartUpdateMicroCoroutine(coroutine(microCoroutineObserver, token)); + break; + case FrameCountType.FixedUpdate: + MainThreadDispatcher.StartFixedUpdateMicroCoroutine(coroutine(microCoroutineObserver, token)); + break; + case FrameCountType.EndOfFrame: + MainThreadDispatcher.StartEndOfFrameMicroCoroutine(coroutine(microCoroutineObserver, token)); + break; + default: + throw new ArgumentException("Invalid FrameCountType:" + frameCountType); + } + + return moreCancel; + } + + class FromMicroCoroutine : OperatorObserverBase + { + public FromMicroCoroutine(IObserver observer, IDisposable cancel) : base(observer, cancel) + { + } + + public override void OnNext(T value) + { + try + { + base.observer.OnNext(value); + } + catch + { + Dispose(); + throw; + } + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FromCoroutine.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FromCoroutine.cs.meta new file mode 100644 index 0000000..62a69e9 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FromCoroutine.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e83ddad992535fb4f8a68a1e7ef8be60 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/RepeatUntil.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/RepeatUntil.cs new file mode 100644 index 0000000..67dba77 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/RepeatUntil.cs @@ -0,0 +1,178 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace UniRx.Operators +{ + internal class RepeatUntilObservable : OperatorObservableBase + { + readonly IEnumerable> sources; + readonly IObservable trigger; + readonly GameObject lifeTimeChecker; + + public RepeatUntilObservable(IEnumerable> sources, IObservable trigger, GameObject lifeTimeChecker) + : base(true) + { + this.sources = sources; + this.trigger = trigger; + this.lifeTimeChecker = lifeTimeChecker; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new RepeatUntil(this, observer, cancel).Run(); + } + + class RepeatUntil : OperatorObserverBase + { + readonly RepeatUntilObservable parent; + readonly object gate = new object(); + + IEnumerator> e; + SerialDisposable subscription; + SingleAssignmentDisposable schedule; + Action nextSelf; + bool isStopped; + bool isDisposed; + bool isFirstSubscribe; + IDisposable stopper; + + public RepeatUntil(RepeatUntilObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + isFirstSubscribe = true; + isDisposed = false; + isStopped = false; + e = parent.sources.GetEnumerator(); + subscription = new SerialDisposable(); + schedule = new SingleAssignmentDisposable(); + + stopper = parent.trigger.Subscribe(_ => + { + lock (gate) + { + isStopped = true; + e.Dispose(); + subscription.Dispose(); + schedule.Dispose(); + observer.OnCompleted(); + } + }, observer.OnError); + + schedule.Disposable = Scheduler.CurrentThread.Schedule(RecursiveRun); + + return new CompositeDisposable(schedule, subscription, stopper, Disposable.Create(() => + { + lock (gate) + { + isDisposed = true; + e.Dispose(); + } + })); + } + + void RecursiveRun(Action self) + { + lock (gate) + { + this.nextSelf = self; + if (isDisposed) return; + if (isStopped) return; + + var current = default(IObservable); + var hasNext = false; + var ex = default(Exception); + + try + { + hasNext = e.MoveNext(); + if (hasNext) + { + current = e.Current; + if (current == null) throw new InvalidOperationException("sequence is null."); + } + else + { + e.Dispose(); + } + } + catch (Exception exception) + { + ex = exception; + e.Dispose(); + } + + if (ex != null) + { + stopper.Dispose(); + observer.OnError(ex); + return; + } + + if (!hasNext) + { + stopper.Dispose(); + observer.OnCompleted(); + return; + } + + var source = e.Current; + var d = new SingleAssignmentDisposable(); + subscription.Disposable = d; + + if (isFirstSubscribe) + { + isFirstSubscribe = false; + d.Disposable = source.Subscribe(this); + } + else + { + MainThreadDispatcher.SendStartCoroutine(SubscribeAfterEndOfFrame(d, source, this, parent.lifeTimeChecker)); + } + } + } + + static IEnumerator SubscribeAfterEndOfFrame(SingleAssignmentDisposable d, IObservable source, IObserver observer, GameObject lifeTimeChecker) + { + yield return YieldInstructionCache.WaitForEndOfFrame; + if (!d.IsDisposed && lifeTimeChecker != null) + { + d.Disposable = source.Subscribe(observer); + } + } + + public override void OnNext(T value) + { + base.observer.OnNext(value); + } + + public override void OnError(Exception error) + { + try { observer.OnError(error); } + finally { Dispose(); } + } + + public override void OnCompleted() + { + if (!isDisposed) + { + this.nextSelf(); + } + else + { + e.Dispose(); + if (!isDisposed) + { + try { observer.OnCompleted(); } + finally { Dispose(); } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/RepeatUntil.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/RepeatUntil.cs.meta new file mode 100644 index 0000000..e2c843c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/RepeatUntil.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 93507e8a72a71094f870c8dbe1e5bed8 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SampleFrame.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SampleFrame.cs new file mode 100644 index 0000000..aebfd65 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SampleFrame.cs @@ -0,0 +1,132 @@ +using System; + +#if UniRxLibrary +using UnityObservable = UniRx.ObservableUnity; +#else +using UnityObservable = UniRx.Observable; +#endif + +namespace UniRx.Operators +{ + internal class SampleFrameObservable : OperatorObservableBase + { + readonly IObservable source; + readonly int frameCount; + readonly FrameCountType frameCountType; + + public SampleFrameObservable(IObservable source, int frameCount, FrameCountType frameCountType) : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.frameCount = frameCount; + this.frameCountType = frameCountType; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new SampleFrame(this, observer, cancel).Run(); + } + + class SampleFrame : OperatorObserverBase + { + readonly SampleFrameObservable parent; + readonly object gate = new object(); + T latestValue = default(T); + bool isUpdated = false; + bool isCompleted = false; + SingleAssignmentDisposable sourceSubscription; + + public SampleFrame(SampleFrameObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + sourceSubscription = new SingleAssignmentDisposable(); + sourceSubscription.Disposable = parent.source.Subscribe(this); + + var scheduling = UnityObservable.IntervalFrame(parent.frameCount, parent.frameCountType) + .Subscribe(new SampleFrameTick(this)); + + return StableCompositeDisposable.Create(sourceSubscription, scheduling); + } + + void OnNextTick(long _) + { + lock (gate) + { + if (isUpdated) + { + var value = latestValue; + isUpdated = false; + observer.OnNext(value); + } + if (isCompleted) + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + } + + public override void OnNext(T value) + { + lock (gate) + { + latestValue = value; + isUpdated = true; + } + } + + public override void OnError(Exception error) + { + lock (gate) + { + try { base.observer.OnError(error); } finally { Dispose(); } + } + } + + public override void OnCompleted() + { + lock (gate) + { + isCompleted = true; + sourceSubscription.Dispose(); + } + } + class SampleFrameTick : IObserver + { + readonly SampleFrame parent; + + public SampleFrameTick(SampleFrame parent) + { + this.parent = parent; + } + + public void OnCompleted() + { + } + + public void OnError(Exception error) + { + } + + public void OnNext(long _) + { + lock (parent.gate) + { + if (parent.isUpdated) + { + var value = parent.latestValue; + parent.isUpdated = false; + parent.observer.OnNext(value); + } + if (parent.isCompleted) + { + try { parent.observer.OnCompleted(); } finally { parent.Dispose(); } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SampleFrame.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SampleFrame.cs.meta new file mode 100644 index 0000000..e755f50 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SampleFrame.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e04c7fc1929a3db458bf7ae31bcd9e55 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SubscribeOnMainThread.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SubscribeOnMainThread.cs new file mode 100644 index 0000000..ba6d06e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SubscribeOnMainThread.cs @@ -0,0 +1,31 @@ +using System; + +namespace UniRx.Operators +{ + internal class SubscribeOnMainThreadObservable : OperatorObservableBase + { + readonly IObservable source; + readonly IObservable subscribeTrigger; + + public SubscribeOnMainThreadObservable(IObservable source, IObservable subscribeTrigger) + : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.subscribeTrigger = subscribeTrigger; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + var m = new SingleAssignmentDisposable(); + var d = new SerialDisposable(); + d.Disposable = m; + + m.Disposable = subscribeTrigger.SubscribeWithState3(observer, d, source, (_, o, disp, s) => + { + disp.Disposable = s.Subscribe(o); + }); + + return d; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SubscribeOnMainThread.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SubscribeOnMainThread.cs.meta new file mode 100644 index 0000000..bb5461a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SubscribeOnMainThread.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: da3fd97518766ab43827991b7b5d4270 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFirstFrame.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFirstFrame.cs new file mode 100644 index 0000000..6b9ccbc --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFirstFrame.cs @@ -0,0 +1,123 @@ +using System; + +#if UniRxLibrary +using UnityObservable = UniRx.ObservableUnity; +#else +using UnityObservable = UniRx.Observable; +#endif + +namespace UniRx.Operators +{ + internal class ThrottleFirstFrameObservable : OperatorObservableBase + { + readonly IObservable source; + readonly int frameCount; + readonly FrameCountType frameCountType; + + public ThrottleFirstFrameObservable(IObservable source, int frameCount, FrameCountType frameCountType) : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.frameCount = frameCount; + this.frameCountType = frameCountType; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new ThrottleFirstFrame(this, observer, cancel).Run(); + } + + class ThrottleFirstFrame : OperatorObserverBase + { + readonly ThrottleFirstFrameObservable parent; + readonly object gate = new object(); + bool open = true; + SerialDisposable cancelable; + + ThrottleFirstFrameTick tick; + + public ThrottleFirstFrame(ThrottleFirstFrameObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + tick = new ThrottleFirstFrameTick(this); + cancelable = new SerialDisposable(); + + var subscription = parent.source.Subscribe(this); + return StableCompositeDisposable.Create(cancelable, subscription); + } + + void OnNext() + { + lock (gate) + { + open = true; + } + } + + public override void OnNext(T value) + { + lock (gate) + { + if (!open) return; + observer.OnNext(value); + open = false; + } + + var d = new SingleAssignmentDisposable(); + cancelable.Disposable = d; + d.Disposable = UnityObservable.TimerFrame(parent.frameCount, parent.frameCountType) + .Subscribe(tick); + } + + public override void OnError(Exception error) + { + cancelable.Dispose(); + + lock (gate) + { + try { observer.OnError(error); } finally { Dispose(); } + } + } + + public override void OnCompleted() + { + cancelable.Dispose(); + + lock (gate) + { + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + // immutable, can share. + class ThrottleFirstFrameTick : IObserver + { + readonly ThrottleFirstFrame parent; + + public ThrottleFirstFrameTick(ThrottleFirstFrame parent) + { + this.parent = parent; + } + + public void OnCompleted() + { + } + + public void OnError(Exception error) + { + } + + public void OnNext(long _) + { + lock (parent.gate) + { + parent.open = true; + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFirstFrame.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFirstFrame.cs.meta new file mode 100644 index 0000000..e8b8b53 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFirstFrame.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3ec92e777b0b4d949967b0663ce8bee8 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFrame.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFrame.cs new file mode 100644 index 0000000..6e3634a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFrame.cs @@ -0,0 +1,129 @@ +using System; + +#if UniRxLibrary +using UnityObservable = UniRx.ObservableUnity; +#else +using UnityObservable = UniRx.Observable; +#endif + +namespace UniRx.Operators +{ + internal class ThrottleFrameObservable : OperatorObservableBase + { + readonly IObservable source; + readonly int frameCount; + readonly FrameCountType frameCountType; + + public ThrottleFrameObservable(IObservable source, int frameCount, FrameCountType frameCountType) : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.frameCount = frameCount; + this.frameCountType = frameCountType; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new ThrottleFrame(this, observer, cancel).Run(); + } + + class ThrottleFrame : OperatorObserverBase + { + readonly ThrottleFrameObservable parent; + readonly object gate = new object(); + T latestValue = default(T); + bool hasValue = false; + SerialDisposable cancelable; + ulong id = 0; + + public ThrottleFrame(ThrottleFrameObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + cancelable = new SerialDisposable(); + var subscription = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(cancelable, subscription); + } + + public override void OnNext(T value) + { + ulong currentid; + lock (gate) + { + hasValue = true; + latestValue = value; + id = unchecked(id + 1); + currentid = id; + } + + var d = new SingleAssignmentDisposable(); + cancelable.Disposable = d; + d.Disposable = UnityObservable.TimerFrame(parent.frameCount, parent.frameCountType) + .Subscribe(new ThrottleFrameTick(this, currentid)); + } + + public override void OnError(Exception error) + { + cancelable.Dispose(); + + lock (gate) + { + hasValue = false; + id = unchecked(id + 1); + try { observer.OnError(error); } finally { Dispose(); } + } + } + + public override void OnCompleted() + { + cancelable.Dispose(); + + lock (gate) + { + if (hasValue) + { + observer.OnNext(latestValue); + } + hasValue = false; + id = unchecked(id + 1); + try { observer.OnCompleted(); } finally { Dispose(); } + } + } + + class ThrottleFrameTick : IObserver + { + readonly ThrottleFrame parent; + readonly ulong currentid; + + public ThrottleFrameTick(ThrottleFrame parent, ulong currentid) + { + this.parent = parent; + this.currentid = currentid; + } + + public void OnCompleted() + { + } + + public void OnError(Exception error) + { + } + + public void OnNext(long _) + { + lock (parent.gate) + { + if (parent.hasValue && parent.id == currentid) + { + parent.observer.OnNext(parent.latestValue); + } + parent.hasValue = false; + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFrame.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFrame.cs.meta new file mode 100644 index 0000000..9addfec --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFrame.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2c4ef0bfcfe787543999c7a6cda03c07 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/TimeoutFrame.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/TimeoutFrame.cs new file mode 100644 index 0000000..eada0e5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/TimeoutFrame.cs @@ -0,0 +1,142 @@ +using System; + +#if UniRxLibrary +using UnityObservable = UniRx.ObservableUnity; +#else +using UnityObservable = UniRx.Observable; +#endif + +namespace UniRx.Operators +{ + internal class TimeoutFrameObservable : OperatorObservableBase + { + readonly IObservable source; + readonly int frameCount; + readonly FrameCountType frameCountType; + + public TimeoutFrameObservable(IObservable source, int frameCount, FrameCountType frameCountType) : base(source.IsRequiredSubscribeOnCurrentThread()) + { + this.source = source; + this.frameCount = frameCount; + this.frameCountType = frameCountType; + } + + protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) + { + return new TimeoutFrame(this, observer, cancel).Run(); + } + + class TimeoutFrame : OperatorObserverBase + { + readonly TimeoutFrameObservable parent; + readonly object gate = new object(); + ulong objectId = 0ul; + bool isTimeout = false; + SingleAssignmentDisposable sourceSubscription; + SerialDisposable timerSubscription; + + public TimeoutFrame(TimeoutFrameObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) + { + this.parent = parent; + } + + public IDisposable Run() + { + sourceSubscription = new SingleAssignmentDisposable(); + timerSubscription = new SerialDisposable(); + timerSubscription.Disposable = RunTimer(objectId); + sourceSubscription.Disposable = parent.source.Subscribe(this); + + return StableCompositeDisposable.Create(timerSubscription, sourceSubscription); + } + + IDisposable RunTimer(ulong timerId) + { + return UnityObservable.TimerFrame(parent.frameCount, parent.frameCountType) + .Subscribe(new TimeoutFrameTick(this, timerId)); + } + + public override void OnNext(T value) + { + ulong useObjectId; + bool timeout; + lock (gate) + { + timeout = isTimeout; + objectId++; + useObjectId = objectId; + } + if (timeout) return; + + timerSubscription.Disposable = Disposable.Empty; // cancel old timer + observer.OnNext(value); + timerSubscription.Disposable = RunTimer(useObjectId); + } + + public override void OnError(Exception error) + { + bool timeout; + lock (gate) + { + timeout = isTimeout; + objectId++; + } + if (timeout) return; + + timerSubscription.Dispose(); + try { observer.OnError(error); } finally { Dispose(); } + } + + public override void OnCompleted() + { + bool timeout; + lock (gate) + { + timeout = isTimeout; + objectId++; + } + if (timeout) return; + + timerSubscription.Dispose(); + try { observer.OnCompleted(); } finally { Dispose(); } + } + + class TimeoutFrameTick : IObserver + { + readonly TimeoutFrame parent; + readonly ulong timerId; + + public TimeoutFrameTick(TimeoutFrame parent, ulong timerId) + { + this.parent = parent; + this.timerId = timerId; + } + + public void OnCompleted() + { + } + + public void OnError(Exception error) + { + } + + public void OnNext(long _) + { + + + lock (parent.gate) + { + if (parent.objectId == timerId) + { + parent.isTimeout = true; + } + } + if (parent.isTimeout) + { + try { parent.observer.OnError(new TimeoutException()); } finally { parent.Dispose(); } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/TimeoutFrame.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/TimeoutFrame.cs.meta new file mode 100644 index 0000000..a969e19 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/TimeoutFrame.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c27be0a585d78a944bccd31b86ee6722 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCollection.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCollection.cs new file mode 100644 index 0000000..12471d0 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCollection.cs @@ -0,0 +1,333 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace UniRx +{ + public struct CollectionAddEvent : IEquatable> + { + public int Index { get; private set; } + public T Value { get; private set; } + + public CollectionAddEvent(int index, T value) + :this() + { + Index = index; + Value = value; + } + + public override string ToString() + { + return string.Format("Index:{0} Value:{1}", Index, Value); + } + + public override int GetHashCode() + { + return Index.GetHashCode() ^ EqualityComparer.Default.GetHashCode(Value) << 2; + } + + public bool Equals(CollectionAddEvent other) + { + return Index.Equals(other.Index) && EqualityComparer.Default.Equals(Value, other.Value); + } + } + + public struct CollectionRemoveEvent : IEquatable> + { + public int Index { get; private set; } + public T Value { get; private set; } + + public CollectionRemoveEvent(int index, T value) + : this() + { + Index = index; + Value = value; + } + + public override string ToString() + { + return string.Format("Index:{0} Value:{1}", Index, Value); + } + + public override int GetHashCode() + { + return Index.GetHashCode() ^ EqualityComparer.Default.GetHashCode(Value) << 2; + } + + public bool Equals(CollectionRemoveEvent other) + { + return Index.Equals(other.Index) && EqualityComparer.Default.Equals(Value, other.Value); + } + } + + public struct CollectionMoveEvent : IEquatable> + { + public int OldIndex { get; private set; } + public int NewIndex { get; private set; } + public T Value { get; private set; } + + public CollectionMoveEvent(int oldIndex, int newIndex, T value) + : this() + { + OldIndex = oldIndex; + NewIndex = newIndex; + Value = value; + } + + public override string ToString() + { + return string.Format("OldIndex:{0} NewIndex:{1} Value:{2}", OldIndex, NewIndex, Value); + } + + public override int GetHashCode() + { + return OldIndex.GetHashCode() ^ NewIndex.GetHashCode() << 2 ^ EqualityComparer.Default.GetHashCode(Value) >> 2; + } + + public bool Equals(CollectionMoveEvent other) + { + return OldIndex.Equals(other.OldIndex) && NewIndex.Equals(other.NewIndex) && EqualityComparer.Default.Equals(Value, other.Value); + } + } + + public struct CollectionReplaceEvent : IEquatable> + { + public int Index { get; private set; } + public T OldValue { get; private set; } + public T NewValue { get; private set; } + + public CollectionReplaceEvent(int index, T oldValue, T newValue) + : this() + { + Index = index; + OldValue = oldValue; + NewValue = newValue; + } + + public override string ToString() + { + return string.Format("Index:{0} OldValue:{1} NewValue:{2}", Index, OldValue, NewValue); + } + + public override int GetHashCode() + { + return Index.GetHashCode() ^ EqualityComparer.Default.GetHashCode(OldValue) << 2 ^ EqualityComparer.Default.GetHashCode(NewValue) >> 2; + } + + public bool Equals(CollectionReplaceEvent other) + { + return Index.Equals(other.Index) + && EqualityComparer.Default.Equals(OldValue, other.OldValue) + && EqualityComparer.Default.Equals(NewValue, other.NewValue); + } + } + + // IReadOnlyList is from .NET 4.5 + public interface IReadOnlyReactiveCollection : IEnumerable + { + int Count { get; } + T this[int index] { get; } + IObservable> ObserveAdd(); + IObservable ObserveCountChanged(bool notifyCurrentCount = false); + IObservable> ObserveMove(); + IObservable> ObserveRemove(); + IObservable> ObserveReplace(); + IObservable ObserveReset(); + } + + public interface IReactiveCollection : IList, IReadOnlyReactiveCollection + { + new int Count { get; } + new T this[int index] { get; set; } + void Move(int oldIndex, int newIndex); + } + + [Serializable] + public class ReactiveCollection : Collection, IReactiveCollection, IDisposable + { + [NonSerialized] + bool isDisposed = false; + + public ReactiveCollection() + { + + } + + public ReactiveCollection(IEnumerable collection) + { + if (collection == null) throw new ArgumentNullException("collection"); + + foreach (var item in collection) + { + Add(item); + } + } + + public ReactiveCollection(List list) + : base(list != null ? new List(list) : null) + { + } + + protected override void ClearItems() + { + var beforeCount = Count; + base.ClearItems(); + + if (collectionReset != null) collectionReset.OnNext(Unit.Default); + if (beforeCount > 0) + { + if (countChanged != null) countChanged.OnNext(Count); + } + } + + protected override void InsertItem(int index, T item) + { + base.InsertItem(index, item); + + if (collectionAdd != null) collectionAdd.OnNext(new CollectionAddEvent(index, item)); + if (countChanged != null) countChanged.OnNext(Count); + } + + public void Move(int oldIndex, int newIndex) + { + MoveItem(oldIndex, newIndex); + } + + protected virtual void MoveItem(int oldIndex, int newIndex) + { + T item = this[oldIndex]; + base.RemoveItem(oldIndex); + base.InsertItem(newIndex, item); + + if (collectionMove != null) collectionMove.OnNext(new CollectionMoveEvent(oldIndex, newIndex, item)); + } + + protected override void RemoveItem(int index) + { + T item = this[index]; + base.RemoveItem(index); + + if (collectionRemove != null) collectionRemove.OnNext(new CollectionRemoveEvent(index, item)); + if (countChanged != null) countChanged.OnNext(Count); + } + + protected override void SetItem(int index, T item) + { + T oldItem = this[index]; + base.SetItem(index, item); + + if (collectionReplace != null) collectionReplace.OnNext(new CollectionReplaceEvent(index, oldItem, item)); + } + + + [NonSerialized] + Subject countChanged = null; + public IObservable ObserveCountChanged(bool notifyCurrentCount = false) + { + if (isDisposed) return Observable.Empty(); + + var subject = countChanged ?? (countChanged = new Subject()); + if (notifyCurrentCount) + { + return subject.StartWith(() => this.Count); + } + else + { + return subject; + } + } + + [NonSerialized] + Subject collectionReset = null; + public IObservable ObserveReset() + { + if (isDisposed) return Observable.Empty(); + return collectionReset ?? (collectionReset = new Subject()); + } + + [NonSerialized] + Subject> collectionAdd = null; + public IObservable> ObserveAdd() + { + if (isDisposed) return Observable.Empty>(); + return collectionAdd ?? (collectionAdd = new Subject>()); + } + + [NonSerialized] + Subject> collectionMove = null; + public IObservable> ObserveMove() + { + if (isDisposed) return Observable.Empty>(); + return collectionMove ?? (collectionMove = new Subject>()); + } + + [NonSerialized] + Subject> collectionRemove = null; + public IObservable> ObserveRemove() + { + if (isDisposed) return Observable.Empty>(); + return collectionRemove ?? (collectionRemove = new Subject>()); + } + + [NonSerialized] + Subject> collectionReplace = null; + public IObservable> ObserveReplace() + { + if (isDisposed) return Observable.Empty>(); + return collectionReplace ?? (collectionReplace = new Subject>()); + } + + void DisposeSubject(ref Subject subject) + { + if (subject != null) + { + try + { + subject.OnCompleted(); + } + finally + { + subject.Dispose(); + subject = null; + } + } + } + + #region IDisposable Support + + private bool disposedValue = false; + + protected virtual void Dispose(bool disposing) + { + if (!disposedValue) + { + if (disposing) + { + DisposeSubject(ref collectionReset); + DisposeSubject(ref collectionAdd); + DisposeSubject(ref collectionMove); + DisposeSubject(ref collectionRemove); + DisposeSubject(ref collectionReplace); + DisposeSubject(ref countChanged); + } + + disposedValue = true; + } + } + + public void Dispose() + { + Dispose(true); + } + + #endregion + } + + public static partial class ReactiveCollectionExtensions + { + public static ReactiveCollection ToReactiveCollection(this IEnumerable source) + { + return new ReactiveCollection(source); + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCollection.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCollection.cs.meta new file mode 100644 index 0000000..76579b7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCollection.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2e22185fb1dbcef42bc613efd4769011 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs new file mode 100644 index 0000000..18471bf --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs @@ -0,0 +1,487 @@ +using System; +using System.Collections.Generic; +using System.Threading; + +#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) +using System.Threading.Tasks; +using UniRx.InternalUtil; +#endif +namespace UniRx +{ + public interface IReactiveCommand : IObservable + { + IReadOnlyReactiveProperty CanExecute { get; } + bool Execute(T parameter); + } + + public interface IAsyncReactiveCommand + { + IReadOnlyReactiveProperty CanExecute { get; } + IDisposable Execute(T parameter); + IDisposable Subscribe(Func> asyncAction); + } + + /// + /// Represents ReactiveCommand<Unit> + /// + public class ReactiveCommand : ReactiveCommand + { + /// + /// CanExecute is always true. + /// + public ReactiveCommand() + : base() + { } + + /// + /// CanExecute is changed from canExecute sequence. + /// + public ReactiveCommand(IObservable canExecuteSource, bool initialValue = true) + : base(canExecuteSource, initialValue) + { + } + + /// Push null to subscribers. + public bool Execute() + { + return Execute(Unit.Default); + } + + /// Force push parameter to subscribers. + public void ForceExecute() + { + ForceExecute(Unit.Default); + } + } + + public class ReactiveCommand : IReactiveCommand, IDisposable + { + readonly Subject trigger = new Subject(); + readonly IDisposable canExecuteSubscription; + + ReactiveProperty canExecute; + public IReadOnlyReactiveProperty CanExecute + { + get + { + return canExecute; + } + } + + public bool IsDisposed { get; private set; } + + /// + /// CanExecute is always true. + /// + public ReactiveCommand() + { + this.canExecute = new ReactiveProperty(true); + this.canExecuteSubscription = Disposable.Empty; + } + + /// + /// CanExecute is changed from canExecute sequence. + /// + public ReactiveCommand(IObservable canExecuteSource, bool initialValue = true) + { + this.canExecute = new ReactiveProperty(initialValue); + this.canExecuteSubscription = canExecuteSource + .DistinctUntilChanged() + .SubscribeWithState(canExecute, (b, c) => c.Value = b); + } + + /// Push parameter to subscribers when CanExecute. + public bool Execute(T parameter) + { + if (canExecute.Value) + { + trigger.OnNext(parameter); + return true; + } + else + { + return false; + } + } + + /// Force push parameter to subscribers. + public void ForceExecute(T parameter) + { + trigger.OnNext(parameter); + } + + /// Subscribe execute. + public IDisposable Subscribe(IObserver observer) + { + return trigger.Subscribe(observer); + } + + /// + /// Stop all subscription and lock CanExecute is false. + /// + public void Dispose() + { + if (IsDisposed) return; + + IsDisposed = true; + canExecute.Dispose(); + trigger.OnCompleted(); + trigger.Dispose(); + canExecuteSubscription.Dispose(); + } + } + + /// + /// Variation of ReactiveCommand, when executing command then CanExecute = false after CanExecute = true. + /// + public class AsyncReactiveCommand : AsyncReactiveCommand + { + /// + /// CanExecute is automatically changed when executing to false and finished to true. + /// + public AsyncReactiveCommand() + : base() + { + + } + + /// + /// CanExecute is automatically changed when executing to false and finished to true. + /// + public AsyncReactiveCommand(IObservable canExecuteSource) + : base(canExecuteSource) + { + } + + /// + /// CanExecute is automatically changed when executing to false and finished to true. + /// The source is shared between other AsyncReactiveCommand. + /// + public AsyncReactiveCommand(IReactiveProperty sharedCanExecute) + : base(sharedCanExecute) + { + } + + public IDisposable Execute() + { + return base.Execute(Unit.Default); + } + } + + /// + /// Variation of ReactiveCommand, canExecute is changed when executing command then CanExecute = false after CanExecute = true. + /// + public class AsyncReactiveCommand : IAsyncReactiveCommand + { + UniRx.InternalUtil.ImmutableList>> asyncActions = UniRx.InternalUtil.ImmutableList>>.Empty; + + readonly object gate = new object(); + readonly IReactiveProperty canExecuteSource; + readonly IReadOnlyReactiveProperty canExecute; + + public IReadOnlyReactiveProperty CanExecute + { + get + { + return canExecute; + } + } + + public bool IsDisposed { get; private set; } + + /// + /// CanExecute is automatically changed when executing to false and finished to true. + /// + public AsyncReactiveCommand() + { + this.canExecuteSource = new ReactiveProperty(true); + this.canExecute = canExecuteSource; + } + + /// + /// CanExecute is automatically changed when executing to false and finished to true. + /// + public AsyncReactiveCommand(IObservable canExecuteSource) + { + this.canExecuteSource = new ReactiveProperty(true); + this.canExecute = this.canExecuteSource.CombineLatest(canExecuteSource, (x, y) => x && y).ToReactiveProperty(); + } + + /// + /// CanExecute is automatically changed when executing to false and finished to true. + /// The source is shared between other AsyncReactiveCommand. + /// + public AsyncReactiveCommand(IReactiveProperty sharedCanExecute) + { + this.canExecuteSource = sharedCanExecute; + this.canExecute = sharedCanExecute; + } + + /// Push parameter to subscribers when CanExecute. + public IDisposable Execute(T parameter) + { + if (canExecute.Value) + { + canExecuteSource.Value = false; + var a = asyncActions.Data; + if (a.Length == 1) + { + try + { + var asyncState = a[0].Invoke(parameter) ?? Observable.ReturnUnit(); + return asyncState.Finally(() => canExecuteSource.Value = true).Subscribe(); + } + catch + { + canExecuteSource.Value = true; + throw; + } + } + else + { + var xs = new IObservable[a.Length]; + try + { + for (int i = 0; i < a.Length; i++) + { + xs[i] = a[i].Invoke(parameter) ?? Observable.ReturnUnit(); + } + } + catch + { + canExecuteSource.Value = true; + throw; + } + + return Observable.WhenAll(xs).Finally(() => canExecuteSource.Value = true).Subscribe(); + } + } + else + { + return Disposable.Empty; + } + } + + /// Subscribe execute. + public IDisposable Subscribe(Func> asyncAction) + { + lock (gate) + { + asyncActions = asyncActions.Add(asyncAction); + } + + return new Subscription(this, asyncAction); + } + + /// + /// Stop all subscription and lock CanExecute is false. + /// + public void Dispose() + { + if (IsDisposed) return; + + IsDisposed = true; + asyncActions = UniRx.InternalUtil.ImmutableList>>.Empty; + } + class Subscription : IDisposable + { + readonly AsyncReactiveCommand parent; + readonly Func> asyncAction; + + public Subscription(AsyncReactiveCommand parent, Func> asyncAction) + { + this.parent = parent; + this.asyncAction = asyncAction; + } + + public void Dispose() + { + lock (parent.gate) + { + parent.asyncActions = parent.asyncActions.Remove(asyncAction); + } + } + } + } + + public static class ReactiveCommandExtensions + { + /// + /// Create non parameter commands. CanExecute is changed from canExecute sequence. + /// + public static ReactiveCommand ToReactiveCommand(this IObservable canExecuteSource, bool initialValue = true) + { + return new ReactiveCommand(canExecuteSource, initialValue); + } + + /// + /// Create parametered comamnds. CanExecute is changed from canExecute sequence. + /// + public static ReactiveCommand ToReactiveCommand(this IObservable canExecuteSource, bool initialValue = true) + { + return new ReactiveCommand(canExecuteSource, initialValue); + } + +#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) + + static readonly Action Callback = CancelCallback; + + static void CancelCallback(object state) + { + var tuple = (Tuple)state; + tuple.Item2.Dispose(); + tuple.Item1.TrySetCanceled(); + } + + public static Task WaitUntilExecuteAsync(this IReactiveCommand source, CancellationToken cancellationToken = default(CancellationToken)) + { + var tcs = new CancellableTaskCompletionSource(); + + var disposable = new SingleAssignmentDisposable(); + disposable.Disposable = source.Subscribe(x => + { + disposable.Dispose(); // finish subscription. + tcs.TrySetResult(x); + }, ex => tcs.TrySetException(ex), () => tcs.TrySetCanceled()); + + cancellationToken.Register(Callback, Tuple.Create(tcs, disposable.Disposable), false); + + return tcs.Task; + } + + public static System.Runtime.CompilerServices.TaskAwaiter GetAwaiter(this IReactiveCommand command) + { + return command.WaitUntilExecuteAsync(CancellationToken.None).GetAwaiter(); + } + +#endif + +#if !UniRxLibrary + + // for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + + /// + /// Bind ReactiveCommand to button's interactable and onClick. + /// + public static IDisposable BindTo(this IReactiveCommand command, UnityEngine.UI.Button button) + { + var d1 = command.CanExecute.SubscribeToInteractable(button); + var d2 = button.OnClickAsObservable().SubscribeWithState(command, (x, c) => c.Execute(x)); + return StableCompositeDisposable.Create(d1, d2); + } + + /// + /// Bind ReactiveCommand to button's interactable and onClick and register onClick action to command. + /// + public static IDisposable BindToOnClick(this IReactiveCommand command, UnityEngine.UI.Button button, Action onClick) + { + var d1 = command.CanExecute.SubscribeToInteractable(button); + var d2 = button.OnClickAsObservable().SubscribeWithState(command, (x, c) => c.Execute(x)); + var d3 = command.Subscribe(onClick); + + return StableCompositeDisposable.Create(d1, d2, d3); + } + + /// + /// Bind canExecuteSource to button's interactable and onClick and register onClick action to command. + /// + public static IDisposable BindToButtonOnClick(this IObservable canExecuteSource, UnityEngine.UI.Button button, Action onClick, bool initialValue = true) + { + return ToReactiveCommand(canExecuteSource, initialValue).BindToOnClick(button, onClick); + } + +#endif + +#endif + } + + public static class AsyncReactiveCommandExtensions + { + public static AsyncReactiveCommand ToAsyncReactiveCommand(this IReactiveProperty sharedCanExecuteSource) + { + return new AsyncReactiveCommand(sharedCanExecuteSource); + } + + public static AsyncReactiveCommand ToAsyncReactiveCommand(this IReactiveProperty sharedCanExecuteSource) + { + return new AsyncReactiveCommand(sharedCanExecuteSource); + } + +#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) + + static readonly Action Callback = CancelCallback; + + static void CancelCallback(object state) + { + var tuple = (Tuple)state; + tuple.Item2.Dispose(); + tuple.Item1.TrySetCanceled(); + } + + public static Task WaitUntilExecuteAsync(this IAsyncReactiveCommand source, CancellationToken cancellationToken = default(CancellationToken)) + { + var tcs = new CancellableTaskCompletionSource(); + + var subscription = source.Subscribe(x => { tcs.TrySetResult(x); return Observable.ReturnUnit(); }); + cancellationToken.Register(Callback, Tuple.Create(tcs, subscription), false); + + return tcs.Task; + } + + public static System.Runtime.CompilerServices.TaskAwaiter GetAwaiter(this IAsyncReactiveCommand command) + { + return command.WaitUntilExecuteAsync(CancellationToken.None).GetAwaiter(); + } + +#endif + + +#if !UniRxLibrary + + // for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + + /// + /// Bind AsyncRaectiveCommand to button's interactable and onClick. + /// + public static IDisposable BindTo(this IAsyncReactiveCommand command, UnityEngine.UI.Button button) + { + var d1 = command.CanExecute.SubscribeToInteractable(button); + var d2 = button.OnClickAsObservable().SubscribeWithState(command, (x, c) => c.Execute(x)); + + return StableCompositeDisposable.Create(d1, d2); + } + + /// + /// Bind AsyncRaectiveCommand to button's interactable and onClick and register async action to command. + /// + public static IDisposable BindToOnClick(this IAsyncReactiveCommand command, UnityEngine.UI.Button button, Func> asyncOnClick) + { + var d1 = command.CanExecute.SubscribeToInteractable(button); + var d2 = button.OnClickAsObservable().SubscribeWithState(command, (x, c) => c.Execute(x)); + var d3 = command.Subscribe(asyncOnClick); + + return StableCompositeDisposable.Create(d1, d2, d3); + } + + /// + /// Create AsyncReactiveCommand and bind to button's interactable and onClick and register async action to command. + /// + public static IDisposable BindToOnClick(this UnityEngine.UI.Button button, Func> asyncOnClick) + { + return new AsyncReactiveCommand().BindToOnClick(button, asyncOnClick); + } + + /// + /// Create AsyncReactiveCommand and bind sharedCanExecuteSource source to button's interactable and onClick and register async action to command. + /// + public static IDisposable BindToOnClick(this UnityEngine.UI.Button button, IReactiveProperty sharedCanExecuteSource, Func> asyncOnClick) + { + return sharedCanExecuteSource.ToAsyncReactiveCommand().BindToOnClick(button, asyncOnClick); + } +#endif + +#endif + } +} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs.meta new file mode 100644 index 0000000..10b2694 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 939b249fde5252f45a4404e7648931ed +timeCreated: 1462927720 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveDictionary.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveDictionary.cs new file mode 100644 index 0000000..4b928e3 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveDictionary.cs @@ -0,0 +1,520 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace UniRx +{ + public struct DictionaryAddEvent : IEquatable> + { + public TKey Key { get; private set; } + public TValue Value { get; private set; } + + public DictionaryAddEvent(TKey key, TValue value) + : this() + { + Key = key; + Value = value; + } + + public override string ToString() + { + return string.Format("Key:{0} Value:{1}", Key, Value); + } + + public override int GetHashCode() + { + return EqualityComparer.Default.GetHashCode(Key) ^ EqualityComparer.Default.GetHashCode(Value) << 2; + } + + public bool Equals(DictionaryAddEvent other) + { + return EqualityComparer.Default.Equals(Key, other.Key) && EqualityComparer.Default.Equals(Value, other.Value); + } + } + + public struct DictionaryRemoveEvent : IEquatable> + { + public TKey Key { get; private set; } + public TValue Value { get; private set; } + + public DictionaryRemoveEvent(TKey key, TValue value) + : this() + { + Key = key; + Value = value; + } + + public override string ToString() + { + return string.Format("Key:{0} Value:{1}", Key, Value); + } + + public override int GetHashCode() + { + return EqualityComparer.Default.GetHashCode(Key) ^ EqualityComparer.Default.GetHashCode(Value) << 2; + } + + public bool Equals(DictionaryRemoveEvent other) + { + return EqualityComparer.Default.Equals(Key, other.Key) && EqualityComparer.Default.Equals(Value, other.Value); + } + } + + public struct DictionaryReplaceEvent : IEquatable> + { + public TKey Key { get; private set; } + public TValue OldValue { get; private set; } + public TValue NewValue { get; private set; } + + public DictionaryReplaceEvent(TKey key, TValue oldValue, TValue newValue) + : this() + { + Key = key; + OldValue = oldValue; + NewValue = newValue; + } + + public override string ToString() + { + return string.Format("Key:{0} OldValue:{1} NewValue:{2}", Key, OldValue, NewValue); + } + + public override int GetHashCode() + { + return EqualityComparer.Default.GetHashCode(Key) ^ EqualityComparer.Default.GetHashCode(OldValue) << 2 ^ EqualityComparer.Default.GetHashCode(NewValue) >> 2; + } + + public bool Equals(DictionaryReplaceEvent other) + { + return EqualityComparer.Default.Equals(Key, other.Key) && EqualityComparer.Default.Equals(OldValue, other.OldValue) && EqualityComparer.Default.Equals(NewValue, other.NewValue); + } + } + + // IReadOnlyDictionary is from .NET 4.5 + public interface IReadOnlyReactiveDictionary : IEnumerable> + { + int Count { get; } + TValue this[TKey index] { get; } + bool ContainsKey(TKey key); + bool TryGetValue(TKey key, out TValue value); + + IObservable> ObserveAdd(); + IObservable ObserveCountChanged(bool notifyCurrentCount = false); + IObservable> ObserveRemove(); + IObservable> ObserveReplace(); + IObservable ObserveReset(); + } + + public interface IReactiveDictionary : IReadOnlyReactiveDictionary, IDictionary + { + } + + [Serializable] + public class ReactiveDictionary : IReactiveDictionary, IDictionary, IEnumerable, ICollection>, IEnumerable>, IDictionary, IDisposable +#if !UNITY_METRO + , ISerializable, IDeserializationCallback +#endif + { + [NonSerialized] + bool isDisposed = false; + +#if !UniRxLibrary + [UnityEngine.SerializeField] +#endif + readonly Dictionary inner; + + public ReactiveDictionary() + { + inner = new Dictionary(); + } + + public ReactiveDictionary(IEqualityComparer comparer) + { + inner = new Dictionary(comparer); + } + + public ReactiveDictionary(Dictionary innerDictionary) + { + inner = innerDictionary; + } + + public TValue this[TKey key] + { + get + { + return inner[key]; + } + + set + { + TValue oldValue; + if (TryGetValue(key, out oldValue)) + { + inner[key] = value; + if (dictionaryReplace != null) dictionaryReplace.OnNext(new DictionaryReplaceEvent(key, oldValue, value)); + } + else + { + inner[key] = value; + if (dictionaryAdd != null) dictionaryAdd.OnNext(new DictionaryAddEvent(key, value)); + if (countChanged != null) countChanged.OnNext(Count); + } + } + } + + public int Count + { + get + { + return inner.Count; + } + } + + public Dictionary.KeyCollection Keys + { + get + { + return inner.Keys; + } + } + + public Dictionary.ValueCollection Values + { + get + { + return inner.Values; + } + } + + public void Add(TKey key, TValue value) + { + inner.Add(key, value); + + if (dictionaryAdd != null) dictionaryAdd.OnNext(new DictionaryAddEvent(key, value)); + if (countChanged != null) countChanged.OnNext(Count); + } + + public void Clear() + { + var beforeCount = Count; + inner.Clear(); + + if (collectionReset != null) collectionReset.OnNext(Unit.Default); + if (beforeCount > 0) + { + if (countChanged != null) countChanged.OnNext(Count); + } + } + + public bool Remove(TKey key) + { + TValue oldValue; + if (inner.TryGetValue(key, out oldValue)) + { + var isSuccessRemove = inner.Remove(key); + if (isSuccessRemove) + { + if (dictionaryRemove != null) dictionaryRemove.OnNext(new DictionaryRemoveEvent(key, oldValue)); + if (countChanged != null) countChanged.OnNext(Count); + } + return isSuccessRemove; + } + else + { + return false; + } + } + + public bool ContainsKey(TKey key) + { + return inner.ContainsKey(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + return inner.TryGetValue(key, out value); + } + + public Dictionary.Enumerator GetEnumerator() + { + return inner.GetEnumerator(); + } + + void DisposeSubject(ref Subject subject) + { + if (subject != null) + { + try + { + subject.OnCompleted(); + } + finally + { + subject.Dispose(); + subject = null; + } + } + } + + #region IDisposable Support + + private bool disposedValue = false; + + protected virtual void Dispose(bool disposing) + { + if (!disposedValue) + { + if (disposing) + { + DisposeSubject(ref countChanged); + DisposeSubject(ref collectionReset); + DisposeSubject(ref dictionaryAdd); + DisposeSubject(ref dictionaryRemove); + DisposeSubject(ref dictionaryReplace); + } + + disposedValue = true; + } + } + + public void Dispose() + { + Dispose(true); + } + + #endregion + + + #region Observe + + [NonSerialized] + Subject countChanged = null; + public IObservable ObserveCountChanged(bool notifyCurrentCount = false) + { + if (isDisposed) return Observable.Empty(); + + var subject = countChanged ?? (countChanged = new Subject()); + if (notifyCurrentCount) + { + return subject.StartWith(() => this.Count); + } + else + { + return subject; + } + } + + [NonSerialized] + Subject collectionReset = null; + public IObservable ObserveReset() + { + if (isDisposed) return Observable.Empty(); + return collectionReset ?? (collectionReset = new Subject()); + } + + [NonSerialized] + Subject> dictionaryAdd = null; + public IObservable> ObserveAdd() + { + if (isDisposed) return Observable.Empty>(); + return dictionaryAdd ?? (dictionaryAdd = new Subject>()); + } + + [NonSerialized] + Subject> dictionaryRemove = null; + public IObservable> ObserveRemove() + { + if (isDisposed) return Observable.Empty>(); + return dictionaryRemove ?? (dictionaryRemove = new Subject>()); + } + + [NonSerialized] + Subject> dictionaryReplace = null; + public IObservable> ObserveReplace() + { + if (isDisposed) return Observable.Empty>(); + return dictionaryReplace ?? (dictionaryReplace = new Subject>()); + } + + #endregion + + #region implement explicit + + object IDictionary.this[object key] + { + get + { + return this[(TKey)key]; + } + + set + { + this[(TKey)key] = (TValue)value; + } + } + + + bool IDictionary.IsFixedSize + { + get + { + return ((IDictionary)inner).IsFixedSize; + } + } + + bool IDictionary.IsReadOnly + { + get + { + return ((IDictionary)inner).IsReadOnly; + } + } + + bool ICollection.IsSynchronized + { + get + { + return ((IDictionary)inner).IsSynchronized; + } + } + + ICollection IDictionary.Keys + { + get + { + return ((IDictionary)inner).Keys; + } + } + + object ICollection.SyncRoot + { + get + { + return ((IDictionary)inner).SyncRoot; + } + } + + ICollection IDictionary.Values + { + get + { + return ((IDictionary)inner).Values; + } + } + + + bool ICollection>.IsReadOnly + { + get + { + return ((ICollection>)inner).IsReadOnly; + } + } + + ICollection IDictionary.Keys + { + get + { + return inner.Keys; + } + } + + ICollection IDictionary.Values + { + get + { + return inner.Values; + } + } + + void IDictionary.Add(object key, object value) + { + Add((TKey)key, (TValue)value); + } + + bool IDictionary.Contains(object key) + { + return ((IDictionary)inner).Contains(key); + } + + void ICollection.CopyTo(Array array, int index) + { + ((IDictionary)inner).CopyTo(array, index); + } + +#if !UNITY_METRO + + public void GetObjectData(SerializationInfo info, StreamingContext context) + { + ((ISerializable)inner).GetObjectData(info, context); + } + + public void OnDeserialization(object sender) + { + ((IDeserializationCallback)inner).OnDeserialization(sender); + } + +#endif + + void IDictionary.Remove(object key) + { + Remove((TKey)key); + } + + void ICollection>.Add(KeyValuePair item) + { + Add((TKey)item.Key, (TValue)item.Value); + } + + bool ICollection>.Contains(KeyValuePair item) + { + return ((ICollection>)inner).Contains(item); + } + + void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) + { + ((ICollection>)inner).CopyTo(array, arrayIndex); + } + + IEnumerator> IEnumerable>.GetEnumerator() + { + return ((ICollection>)inner).GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return inner.GetEnumerator(); + } + + bool ICollection>.Remove(KeyValuePair item) + { + TValue v; + if (TryGetValue(item.Key, out v)) + { + if (EqualityComparer.Default.Equals(v, item.Value)) + { + Remove(item.Key); + return true; + } + } + + return false; + } + + IDictionaryEnumerator IDictionary.GetEnumerator() + { + return ((IDictionary)inner).GetEnumerator(); + } + + #endregion + } + + public static partial class ReactiveDictionaryExtensions + { + public static ReactiveDictionary ToReactiveDictionary(this Dictionary dictionary) + { + return new ReactiveDictionary(dictionary); + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveDictionary.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveDictionary.cs.meta new file mode 100644 index 0000000..011f925 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveDictionary.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 12cd1079b0fe33f429f9f174c1f849af +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs new file mode 100644 index 0000000..d67a81e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs @@ -0,0 +1,610 @@ +#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member +#endif + +using System; +using System.Collections.Generic; +using System.Threading; +using UniRx.InternalUtil; +#if !UniRxLibrary +using UnityEngine; +#endif +#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) +using System.Threading.Tasks; +#endif + +namespace UniRx +{ + public interface IReadOnlyReactiveProperty : IObservable + { + T Value { get; } + bool HasValue { get; } + } + + public interface IReactiveProperty : IReadOnlyReactiveProperty + { + new T Value { get; set; } + } + + internal interface IObserverLinkedList + { + void UnsubscribeNode(ObserverNode node); + } + + internal sealed class ObserverNode : IObserver, IDisposable + { + readonly IObserver observer; + IObserverLinkedList list; + + public ObserverNode Previous { get; internal set; } + public ObserverNode Next { get; internal set; } + + public ObserverNode(IObserverLinkedList list, IObserver observer) + { + this.list = list; + this.observer = observer; + } + + public void OnNext(T value) + { + observer.OnNext(value); + } + + public void OnError(Exception error) + { + observer.OnError(error); + } + + public void OnCompleted() + { + observer.OnCompleted(); + } + + public void Dispose() + { + var sourceList = Interlocked.Exchange(ref list, null); + if (sourceList != null) + { + sourceList.UnsubscribeNode(this); + sourceList = null; + } + } + } + + /// + /// Lightweight property broker. + /// + [Serializable] + public class ReactiveProperty : IReactiveProperty, IDisposable, IOptimizedObservable, IObserverLinkedList + { +#if !UniRxLibrary + static readonly IEqualityComparer defaultEqualityComparer = UnityEqualityComparer.GetDefault(); +#else + static readonly IEqualityComparer defaultEqualityComparer = EqualityComparer.Default; +#endif + +#if !UniRxLibrary + [SerializeField] +#endif + T value = default(T); + + [NonSerialized] + ObserverNode root; + + [NonSerialized] + ObserverNode last; + + [NonSerialized] + bool isDisposed = false; + + protected virtual IEqualityComparer EqualityComparer + { + get + { + return defaultEqualityComparer; + } + } + + public T Value + { + get + { + return value; + } + set + { + if (!EqualityComparer.Equals(this.value, value)) + { + SetValue(value); + if (isDisposed) + return; + + RaiseOnNext(ref value); + } + } + } + + // always true, allows empty constructor 'can' publish value on subscribe. + // because sometimes value is deserialized from UnityEngine. + public bool HasValue + { + get + { + return true; + } + } + + public ReactiveProperty() + : this(default(T)) + { + } + + public ReactiveProperty(T initialValue) + { + SetValue(initialValue); + } + + void RaiseOnNext(ref T value) + { + var node = root; + while (node != null) + { + node.OnNext(value); + node = node.Next; + } + } + + protected virtual void SetValue(T value) + { + this.value = value; + } + + public void SetValueAndForceNotify(T value) + { + SetValue(value); + if (isDisposed) + return; + + RaiseOnNext(ref value); + } + + public IDisposable Subscribe(IObserver observer) + { + if (isDisposed) + { + observer.OnCompleted(); + return Disposable.Empty; + } + + // raise latest value on subscribe + observer.OnNext(value); + + // subscribe node, node as subscription. + var next = new ObserverNode(this, observer); + if (root == null) + { + root = last = next; + } + else + { + last.Next = next; + next.Previous = last; + last = next; + } + return next; + } + + void IObserverLinkedList.UnsubscribeNode(ObserverNode node) + { + if (node == root) + { + root = node.Next; + } + if (node == last) + { + last = node.Previous; + } + + if (node.Previous != null) + { + node.Previous.Next = node.Next; + } + if (node.Next != null) + { + node.Next.Previous = node.Previous; + } + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (isDisposed) return; + + var node = root; + root = last = null; + isDisposed = true; + + while (node != null) + { + node.OnCompleted(); + node = node.Next; + } + } + + public override string ToString() + { + return (value == null) ? "(null)" : value.ToString(); + } + + public bool IsRequiredSubscribeOnCurrentThread() + { + return false; + } + } + + /// + /// Lightweight property broker. + /// + public class ReadOnlyReactiveProperty : IReadOnlyReactiveProperty, IDisposable, IOptimizedObservable, IObserverLinkedList, IObserver + { +#if !UniRxLibrary + static readonly IEqualityComparer defaultEqualityComparer = UnityEqualityComparer.GetDefault(); +#else + static readonly IEqualityComparer defaultEqualityComparer = EqualityComparer.Default; +#endif + + readonly bool distinctUntilChanged = true; + bool canPublishValueOnSubscribe = false; + bool isDisposed = false; + bool isSourceCompleted = false; + + T latestValue = default(T); + Exception lastException = null; + IDisposable sourceConnection = null; + + ObserverNode root; + ObserverNode last; + + public T Value + { + get + { + return latestValue; + } + } + + public bool HasValue + { + get + { + return canPublishValueOnSubscribe; + } + } + + protected virtual IEqualityComparer EqualityComparer + { + get + { + return defaultEqualityComparer; + } + } + + public ReadOnlyReactiveProperty(IObservable source) + { + this.sourceConnection = source.Subscribe(this); + } + + public ReadOnlyReactiveProperty(IObservable source, bool distinctUntilChanged) + { + this.distinctUntilChanged = distinctUntilChanged; + this.sourceConnection = source.Subscribe(this); + } + + public ReadOnlyReactiveProperty(IObservable source, T initialValue) + { + this.latestValue = initialValue; + this.canPublishValueOnSubscribe = true; + this.sourceConnection = source.Subscribe(this); + } + + public ReadOnlyReactiveProperty(IObservable source, T initialValue, bool distinctUntilChanged) + { + this.distinctUntilChanged = distinctUntilChanged; + this.latestValue = initialValue; + this.canPublishValueOnSubscribe = true; + this.sourceConnection = source.Subscribe(this); + } + + public IDisposable Subscribe(IObserver observer) + { + if (lastException != null) + { + observer.OnError(lastException); + return Disposable.Empty; + } + + if (isSourceCompleted) + { + if (canPublishValueOnSubscribe) + { + observer.OnNext(latestValue); + observer.OnCompleted(); + return Disposable.Empty; + } + else + { + observer.OnCompleted(); + return Disposable.Empty; + } + } + + if (isDisposed) + { + observer.OnCompleted(); + return Disposable.Empty; + } + + if (canPublishValueOnSubscribe) + { + observer.OnNext(latestValue); + } + + // subscribe node, node as subscription. + var next = new ObserverNode(this, observer); + if (root == null) + { + root = last = next; + } + else + { + last.Next = next; + next.Previous = last; + last = next; + } + + return next; + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (isDisposed) return; + sourceConnection.Dispose(); + + var node = root; + root = last = null; + isDisposed = true; + + while (node != null) + { + node.OnCompleted(); + node = node.Next; + } + } + + void IObserverLinkedList.UnsubscribeNode(ObserverNode node) + { + if (node == root) + { + root = node.Next; + } + if (node == last) + { + last = node.Previous; + } + + if (node.Previous != null) + { + node.Previous.Next = node.Next; + } + if (node.Next != null) + { + node.Next.Previous = node.Previous; + } + } + + void IObserver.OnNext(T value) + { + if (isDisposed) return; + + if (canPublishValueOnSubscribe) + { + if (distinctUntilChanged && EqualityComparer.Equals(this.latestValue, value)) + { + return; + } + } + + canPublishValueOnSubscribe = true; + + // SetValue + this.latestValue = value; + + // call source.OnNext + var node = root; + while (node != null) + { + node.OnNext(value); + node = node.Next; + } + } + + void IObserver.OnError(Exception error) + { + lastException = error; + + // call source.OnError + var node = root; + while (node != null) + { + node.OnError(error); + node = node.Next; + } + + root = last = null; + } + + void IObserver.OnCompleted() + { + isSourceCompleted = true; + root = last = null; + } + + public override string ToString() + { + return (latestValue == null) ? "(null)" : latestValue.ToString(); + } + + public bool IsRequiredSubscribeOnCurrentThread() + { + return false; + } + } + + /// + /// Extension methods of ReactiveProperty<T> + /// + public static class ReactivePropertyExtensions + { + public static IReadOnlyReactiveProperty ToReactiveProperty(this IObservable source) + { + return new ReadOnlyReactiveProperty(source); + } + + public static IReadOnlyReactiveProperty ToReactiveProperty(this IObservable source, T initialValue) + { + return new ReadOnlyReactiveProperty(source, initialValue); + } + + public static ReadOnlyReactiveProperty ToReadOnlyReactiveProperty(this IObservable source) + { + return new ReadOnlyReactiveProperty(source); + } + +#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) + + static readonly Action Callback = CancelCallback; + + static void CancelCallback(object state) + { + var tuple = (Tuple)state; + tuple.Item2.Dispose(); + tuple.Item1.TrySetCanceled(); + } + + public static Task WaitUntilValueChangedAsync(this IReadOnlyReactiveProperty source, CancellationToken cancellationToken = default(CancellationToken)) + { + var tcs = new CancellableTaskCompletionSource(); + + var disposable = new SingleAssignmentDisposable(); + if (source.HasValue) + { + // Skip first value + var isFirstValue = true; + disposable.Disposable = source.Subscribe(x => + { + if (isFirstValue) + { + isFirstValue = false; + return; + } + else + { + disposable.Dispose(); // finish subscription. + tcs.TrySetResult(x); + } + }, ex => tcs.TrySetException(ex), () => tcs.TrySetCanceled()); + } + else + { + disposable.Disposable = source.Subscribe(x => + { + disposable.Dispose(); // finish subscription. + tcs.TrySetResult(x); + }, ex => tcs.TrySetException(ex), () => tcs.TrySetCanceled()); + } + + cancellationToken.Register(Callback, Tuple.Create(tcs, disposable.Disposable), false); + + return tcs.Task; + } + + public static System.Runtime.CompilerServices.TaskAwaiter GetAwaiter(this IReadOnlyReactiveProperty source) + { + return source.WaitUntilValueChangedAsync(CancellationToken.None).GetAwaiter(); + } + +#endif + + /// + /// Create ReadOnlyReactiveProperty with distinctUntilChanged: false. + /// + public static ReadOnlyReactiveProperty ToSequentialReadOnlyReactiveProperty(this IObservable source) + { + return new ReadOnlyReactiveProperty(source, distinctUntilChanged: false); + } + + public static ReadOnlyReactiveProperty ToReadOnlyReactiveProperty(this IObservable source, T initialValue) + { + return new ReadOnlyReactiveProperty(source, initialValue); + } + + /// + /// Create ReadOnlyReactiveProperty with distinctUntilChanged: false. + /// + public static ReadOnlyReactiveProperty ToSequentialReadOnlyReactiveProperty(this IObservable source, T initialValue) + { + return new ReadOnlyReactiveProperty(source, initialValue, distinctUntilChanged: false); + } + + public static IObservable SkipLatestValueOnSubscribe(this IReadOnlyReactiveProperty source) + { + return source.HasValue ? source.Skip(1) : source; + } + + // for multiple toggle or etc.. + + /// + /// Lastest values of each sequence are all true. + /// + public static IObservable CombineLatestValuesAreAllTrue(this IEnumerable> sources) + { + return sources.CombineLatest().Select(xs => + { + foreach (var item in xs) + { + if (item == false) + return false; + } + return true; + }); + } + + + /// + /// Lastest values of each sequence are all false. + /// + public static IObservable CombineLatestValuesAreAllFalse(this IEnumerable> sources) + { + return sources.CombineLatest().Select(xs => + { + foreach (var item in xs) + { + if (item == true) + return false; + } + return true; + }); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs.meta new file mode 100644 index 0000000..7819654 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 88e12aa895fef434fbe3ea0cc8f57301 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ScenePlaybackDetector.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ScenePlaybackDetector.cs new file mode 100644 index 0000000..ba1b4ab --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ScenePlaybackDetector.cs @@ -0,0 +1,84 @@ +#if UNITY_EDITOR + +using UnityEditor; +using UnityEditor.Callbacks; +using UnityEngine; + +namespace UniRx +{ + [InitializeOnLoad] + public class ScenePlaybackDetector + { + private static bool _isPlaying = false; + + private static bool AboutToStartScene + { + get + { + return EditorPrefs.GetBool("AboutToStartScene"); + } + set + { + EditorPrefs.SetBool("AboutToStartScene", value); + } + } + + public static bool IsPlaying + { + get + { + return _isPlaying; + } + set + { + if (_isPlaying != value) + { + _isPlaying = value; + } + } + } + + // This callback is notified after scripts have been reloaded. + [DidReloadScripts] + public static void OnDidReloadScripts() + { + // Filter DidReloadScripts callbacks to the moment where playmodeState transitions into isPlaying. + if (AboutToStartScene) + { + IsPlaying = true; + } + } + + // InitializeOnLoad ensures that this constructor is called when the Unity Editor is started. + static ScenePlaybackDetector() + { +#if UNITY_2017_2_OR_NEWER + EditorApplication.playModeStateChanged += e => +#else + EditorApplication.playmodeStateChanged += () => +#endif + { + // Before scene start: isPlayingOrWillChangePlaymode = false; isPlaying = false + // Pressed Playback button: isPlayingOrWillChangePlaymode = true; isPlaying = false + // Playing: isPlayingOrWillChangePlaymode = false; isPlaying = true + // Pressed stop button: isPlayingOrWillChangePlaymode = true; isPlaying = true + if (EditorApplication.isPlayingOrWillChangePlaymode && !EditorApplication.isPlaying) + { + AboutToStartScene = true; + } + else + { + AboutToStartScene = false; + } + + // Detect when playback is stopped. + if (!EditorApplication.isPlaying) + { + IsPlaying = false; + } + }; + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ScenePlaybackDetector.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ScenePlaybackDetector.cs.meta new file mode 100644 index 0000000..f090f98 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ScenePlaybackDetector.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8d380d86e2ef6674c83ca983a1604273 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit.meta new file mode 100644 index 0000000..5dd2d30 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d81a6aff24e70b2458ac5fd7c48c63b6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit/ObjectPool.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit/ObjectPool.cs new file mode 100644 index 0000000..52e91bc --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit/ObjectPool.cs @@ -0,0 +1,474 @@ +#if UNITY_5_3_OR_NEWER + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading; + +namespace UniRx.Toolkit +{ + /// + /// Bass class of ObjectPool. + /// + public abstract class ObjectPool : IDisposable + where T : UnityEngine.Component + { + bool isDisposed = false; + Queue q; + + /// + /// Limit of instace count. + /// + protected int MaxPoolCount + { + get + { + return int.MaxValue; + } + } + + /// + /// Create instance when needed. + /// + protected abstract T CreateInstance(); + + /// + /// Called before return to pool, useful for set active object(it is default behavior). + /// + protected virtual void OnBeforeRent(T instance) + { + instance.gameObject.SetActive(true); + } + + /// + /// Called before return to pool, useful for set inactive object(it is default behavior). + /// + protected virtual void OnBeforeReturn(T instance) + { + instance.gameObject.SetActive(false); + } + + /// + /// Called when clear or disposed, useful for destroy instance or other finalize method. + /// + protected virtual void OnClear(T instance) + { + if (instance == null) return; + + var go = instance.gameObject; + if (go == null) return; + UnityEngine.Object.Destroy(go); + } + + /// + /// Current pooled object count. + /// + public int Count + { + get + { + if (q == null) return 0; + return q.Count; + } + } + + /// + /// Get instance from pool. + /// + public T Rent() + { + if (isDisposed) throw new ObjectDisposedException("ObjectPool was already disposed."); + if (q == null) q = new Queue(); + + var instance = (q.Count > 0) + ? q.Dequeue() + : CreateInstance(); + + OnBeforeRent(instance); + return instance; + } + + /// + /// Return instance to pool. + /// + public void Return(T instance) + { + if (isDisposed) throw new ObjectDisposedException("ObjectPool was already disposed."); + if (instance == null) throw new ArgumentNullException("instance"); + + if (q == null) q = new Queue(); + + if ((q.Count + 1) == MaxPoolCount) + { + throw new InvalidOperationException("Reached Max PoolSize"); + } + + OnBeforeReturn(instance); + q.Enqueue(instance); + } + + /// + /// Clear pool. + /// + public void Clear(bool callOnBeforeRent = false) + { + if (q == null) return; + while (q.Count != 0) + { + var instance = q.Dequeue(); + if (callOnBeforeRent) + { + OnBeforeRent(instance); + } + OnClear(instance); + } + } + + /// + /// Trim pool instances. + /// + /// 0.0f = clear all ~ 1.0f = live all. + /// Min pool count. + /// If true, call OnBeforeRent before OnClear. + public void Shrink(float instanceCountRatio, int minSize, bool callOnBeforeRent = false) + { + if (q == null) return; + + if (instanceCountRatio <= 0) instanceCountRatio = 0; + if (instanceCountRatio >= 1.0f) instanceCountRatio = 1.0f; + + var size = (int)(q.Count * instanceCountRatio); + size = Math.Max(minSize, size); + + while (q.Count > size) + { + var instance = q.Dequeue(); + if (callOnBeforeRent) + { + OnBeforeRent(instance); + } + OnClear(instance); + } + } + + /// + /// If needs shrink pool frequently, start check timer. + /// + /// Interval of call Shrink. + /// 0.0f = clearAll ~ 1.0f = live all. + /// Min pool count. + /// If true, call OnBeforeRent before OnClear. + public IDisposable StartShrinkTimer(TimeSpan checkInterval, float instanceCountRatio, int minSize, bool callOnBeforeRent = false) + { + return Observable.Interval(checkInterval) + .TakeWhile(_ => !isDisposed) + .Subscribe(_ => + { + Shrink(instanceCountRatio, minSize, callOnBeforeRent); + }); + } + + /// + /// Fill pool before rent operation. + /// + /// Pool instance count. + /// Create count per frame. + public IObservable PreloadAsync(int preloadCount, int threshold) + { + if (q == null) q = new Queue(preloadCount); + + return Observable.FromMicroCoroutine((observer, cancel) => PreloadCore(preloadCount, threshold, observer, cancel)); + } + + IEnumerator PreloadCore(int preloadCount, int threshold, IObserver observer, CancellationToken cancellationToken) + { + while (Count < preloadCount && !cancellationToken.IsCancellationRequested) + { + var requireCount = preloadCount - Count; + if (requireCount <= 0) break; + + var createCount = Math.Min(requireCount, threshold); + + for (int i = 0; i < createCount; i++) + { + try + { + var instance = CreateInstance(); + Return(instance); + } + catch (Exception ex) + { + observer.OnError(ex); + yield break; + } + } + yield return null; // next frame. + } + + observer.OnNext(Unit.Default); + observer.OnCompleted(); + } + + #region IDisposable Support + + protected virtual void Dispose(bool disposing) + { + if (!isDisposed) + { + if (disposing) + { + Clear(false); + } + + isDisposed = true; + } + } + + public void Dispose() + { + Dispose(true); + } + + #endregion + } + + /// + /// Bass class of ObjectPool. If needs asynchronous initialization, use this instead of standard ObjectPool. + /// + public abstract class AsyncObjectPool : IDisposable + where T : UnityEngine.Component + { + bool isDisposed = false; + Queue q; + + /// + /// Limit of instace count. + /// + protected int MaxPoolCount + { + get + { + return int.MaxValue; + } + } + + /// + /// Create instance when needed. + /// + protected abstract IObservable CreateInstanceAsync(); + + /// + /// Called before return to pool, useful for set active object(it is default behavior). + /// + protected virtual void OnBeforeRent(T instance) + { + instance.gameObject.SetActive(true); + } + + /// + /// Called before return to pool, useful for set inactive object(it is default behavior). + /// + protected virtual void OnBeforeReturn(T instance) + { + instance.gameObject.SetActive(false); + } + + /// + /// Called when clear or disposed, useful for destroy instance or other finalize method. + /// + protected virtual void OnClear(T instance) + { + if (instance == null) return; + + var go = instance.gameObject; + if (go == null) return; + UnityEngine.Object.Destroy(go); + } + + /// + /// Current pooled object count. + /// + public int Count + { + get + { + if (q == null) return 0; + return q.Count; + } + } + + /// + /// Get instance from pool. + /// + public IObservable RentAsync() + { + if (isDisposed) throw new ObjectDisposedException("ObjectPool was already disposed."); + if (q == null) q = new Queue(); + + if (q.Count > 0) + { + var instance = q.Dequeue(); + OnBeforeRent(instance); + return Observable.Return(instance); + } + else + { + var instance = CreateInstanceAsync(); + return instance.Do(x => OnBeforeRent(x)); + } + } + + /// + /// Return instance to pool. + /// + public void Return(T instance) + { + if (isDisposed) throw new ObjectDisposedException("ObjectPool was already disposed."); + if (instance == null) throw new ArgumentNullException("instance"); + + if (q == null) q = new Queue(); + + if ((q.Count + 1) == MaxPoolCount) + { + throw new InvalidOperationException("Reached Max PoolSize"); + } + + OnBeforeReturn(instance); + q.Enqueue(instance); + } + + /// + /// Trim pool instances. + /// + /// 0.0f = clear all ~ 1.0f = live all. + /// Min pool count. + /// If true, call OnBeforeRent before OnClear. + public void Shrink(float instanceCountRatio, int minSize, bool callOnBeforeRent = false) + { + if (q == null) return; + + if (instanceCountRatio <= 0) instanceCountRatio = 0; + if (instanceCountRatio >= 1.0f) instanceCountRatio = 1.0f; + + var size = (int)(q.Count * instanceCountRatio); + size = Math.Max(minSize, size); + + while (q.Count > size) + { + var instance = q.Dequeue(); + if (callOnBeforeRent) + { + OnBeforeRent(instance); + } + OnClear(instance); + } + } + + /// + /// If needs shrink pool frequently, start check timer. + /// + /// Interval of call Shrink. + /// 0.0f = clearAll ~ 1.0f = live all. + /// Min pool count. + /// If true, call OnBeforeRent before OnClear. + public IDisposable StartShrinkTimer(TimeSpan checkInterval, float instanceCountRatio, int minSize, bool callOnBeforeRent = false) + { + return Observable.Interval(checkInterval) + .TakeWhile(_ => !isDisposed) + .Subscribe(_ => + { + Shrink(instanceCountRatio, minSize, callOnBeforeRent); + }); + } + + /// + /// Clear pool. + /// + public void Clear(bool callOnBeforeRent = false) + { + if (q == null) return; + while (q.Count != 0) + { + var instance = q.Dequeue(); + if (callOnBeforeRent) + { + OnBeforeRent(instance); + } + OnClear(instance); + } + } + + /// + /// Fill pool before rent operation. + /// + /// Pool instance count. + /// Create count per frame. + public IObservable PreloadAsync(int preloadCount, int threshold) + { + if (q == null) q = new Queue(preloadCount); + + return Observable.FromMicroCoroutine((observer, cancel) => PreloadCore(preloadCount, threshold, observer, cancel)); + } + + IEnumerator PreloadCore(int preloadCount, int threshold, IObserver observer, CancellationToken cancellationToken) + { + while (Count < preloadCount && !cancellationToken.IsCancellationRequested) + { + var requireCount = preloadCount - Count; + if (requireCount <= 0) break; + + var createCount = Math.Min(requireCount, threshold); + + var loaders = new IObservable[createCount]; + for (int i = 0; i < createCount; i++) + { + var instanceFuture = CreateInstanceAsync(); + loaders[i] = instanceFuture.ForEachAsync(x => Return(x)); + } + + var awaiter = Observable.WhenAll(loaders).ToYieldInstruction(false, cancellationToken); + while (!(awaiter.HasResult || awaiter.IsCanceled || awaiter.HasError)) + { + yield return null; + } + + if (awaiter.HasError) + { + observer.OnError(awaiter.Error); + yield break; + } + else if (awaiter.IsCanceled) + { + yield break; // end. + } + } + + observer.OnNext(Unit.Default); + observer.OnCompleted(); + } + + #region IDisposable Support + + protected virtual void Dispose(bool disposing) + { + if (!isDisposed) + { + if (disposing) + { + Clear(false); + } + + isDisposed = true; + } + } + + public void Dispose() + { + Dispose(true); + } + + #endregion + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit/ObjectPool.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit/ObjectPool.cs.meta new file mode 100644 index 0000000..fbf8a1e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit/ObjectPool.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f4980e1e001c7e94fab3250ba284dc91 +timeCreated: 1468655394 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers.meta new file mode 100644 index 0000000..0f42ffc --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ad5942c30eb6054419be5af9b72fd698 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs new file mode 100644 index 0000000..4628d03 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs @@ -0,0 +1,49 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableAnimatorTrigger : ObservableTriggerBase + { + Subject onAnimatorIK; + + /// Callback for setting up animation IK (inverse kinematics). + void OnAnimatorIK(int layerIndex) + { + if (onAnimatorIK != null) onAnimatorIK.OnNext(layerIndex); + } + + /// Callback for setting up animation IK (inverse kinematics). + public IObservable OnAnimatorIKAsObservable() + { + return onAnimatorIK ?? (onAnimatorIK = new Subject()); + } + + Subject onAnimatorMove; + + /// Callback for processing animation movements for modifying root motion. + void OnAnimatorMove() + { + if (onAnimatorMove != null) onAnimatorMove.OnNext(Unit.Default); + } + + /// Callback for processing animation movements for modifying root motion. + public IObservable OnAnimatorMoveAsObservable() + { + return onAnimatorMove ?? (onAnimatorMove = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onAnimatorIK != null) + { + onAnimatorIK.OnCompleted(); + } + if (onAnimatorMove != null) + { + onAnimatorMove.OnCompleted(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs.meta new file mode 100644 index 0000000..8aff60f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e03f9257cc6667f4082439aa77d6f01e +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs new file mode 100644 index 0000000..fefc213 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableBeginDragTrigger : ObservableTriggerBase, IEventSystemHandler, IBeginDragHandler + { + Subject onBeginDrag; + + void IBeginDragHandler.OnBeginDrag(PointerEventData eventData) + { + if (onBeginDrag != null) onBeginDrag.OnNext(eventData); + } + + public IObservable OnBeginDragAsObservable() + { + return onBeginDrag ?? (onBeginDrag = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onBeginDrag != null) + { + onBeginDrag.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs.meta new file mode 100644 index 0000000..2ec62c4 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3a81a9b6bec6b4f4fba7e0047cd989f6 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs new file mode 100644 index 0000000..dac84da --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableCancelTrigger : ObservableTriggerBase, IEventSystemHandler, ICancelHandler + { + Subject onCancel; + + void ICancelHandler.OnCancel(BaseEventData eventData) + { + if (onCancel != null) onCancel.OnNext(eventData); + } + + public IObservable OnCancelAsObservable() + { + return onCancel ?? (onCancel = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onCancel != null) + { + onCancel.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs.meta new file mode 100644 index 0000000..9f3b842 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4c0a9070b7cc23746b2c0e2db3ec16cd +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCanvasGroupChangedTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCanvasGroupChangedTrigger.cs new file mode 100644 index 0000000..74b6b04 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCanvasGroupChangedTrigger.cs @@ -0,0 +1,36 @@ +// after uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableCanvasGroupChangedTrigger : ObservableTriggerBase + { + Subject onCanvasGroupChanged; + + // Callback that is sent if the canvas group is changed + void OnCanvasGroupChanged() + { + if (onCanvasGroupChanged != null) onCanvasGroupChanged.OnNext(Unit.Default); + } + + /// Callback that is sent if the canvas group is changed. + public IObservable OnCanvasGroupChangedAsObservable() + { + return onCanvasGroupChanged ?? (onCanvasGroupChanged = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onCanvasGroupChanged != null) + { + onCanvasGroupChanged.OnCompleted(); + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCanvasGroupChangedTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCanvasGroupChangedTrigger.cs.meta new file mode 100644 index 0000000..a023c40 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCanvasGroupChangedTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 54095d3e740f7714085d0568207cbfe0 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs new file mode 100644 index 0000000..e4936f5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs @@ -0,0 +1,67 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableCollision2DTrigger : ObservableTriggerBase + { + Subject onCollisionEnter2D; + + /// Sent when an incoming collider makes contact with this object's collider (2D physics only). + void OnCollisionEnter2D(Collision2D coll) + { + if (onCollisionEnter2D != null) onCollisionEnter2D.OnNext(coll); + } + + /// Sent when an incoming collider makes contact with this object's collider (2D physics only). + public IObservable OnCollisionEnter2DAsObservable() + { + return onCollisionEnter2D ?? (onCollisionEnter2D = new Subject()); + } + + Subject onCollisionExit2D; + + /// Sent when a collider on another object stops touching this object's collider (2D physics only). + void OnCollisionExit2D(Collision2D coll) + { + if (onCollisionExit2D != null) onCollisionExit2D.OnNext(coll); + } + + /// Sent when a collider on another object stops touching this object's collider (2D physics only). + public IObservable OnCollisionExit2DAsObservable() + { + return onCollisionExit2D ?? (onCollisionExit2D = new Subject()); + } + + Subject onCollisionStay2D; + + /// Sent each frame where a collider on another object is touching this object's collider (2D physics only). + void OnCollisionStay2D(Collision2D coll) + { + if (onCollisionStay2D != null) onCollisionStay2D.OnNext(coll); + } + + /// Sent each frame where a collider on another object is touching this object's collider (2D physics only). + public IObservable OnCollisionStay2DAsObservable() + { + return onCollisionStay2D ?? (onCollisionStay2D = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onCollisionEnter2D != null) + { + onCollisionEnter2D.OnCompleted(); + } + if (onCollisionExit2D != null) + { + onCollisionExit2D.OnCompleted(); + } + if (onCollisionStay2D != null) + { + onCollisionStay2D.OnCompleted(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs.meta new file mode 100644 index 0000000..40ddc3e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1be7847b61f30f24daa5762db87a5b19 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs new file mode 100644 index 0000000..db7dd5e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs @@ -0,0 +1,67 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableCollisionTrigger : ObservableTriggerBase + { + Subject onCollisionEnter; + + /// OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider. + void OnCollisionEnter(Collision collision) + { + if (onCollisionEnter != null) onCollisionEnter.OnNext(collision); + } + + /// OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider. + public IObservable OnCollisionEnterAsObservable() + { + return onCollisionEnter ?? (onCollisionEnter = new Subject()); + } + + Subject onCollisionExit; + + /// OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider. + void OnCollisionExit(Collision collisionInfo) + { + if (onCollisionExit != null) onCollisionExit.OnNext(collisionInfo); + } + + /// OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider. + public IObservable OnCollisionExitAsObservable() + { + return onCollisionExit ?? (onCollisionExit = new Subject()); + } + + Subject onCollisionStay; + + /// OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider. + void OnCollisionStay(Collision collisionInfo) + { + if (onCollisionStay != null) onCollisionStay.OnNext(collisionInfo); + } + + /// OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider. + public IObservable OnCollisionStayAsObservable() + { + return onCollisionStay ?? (onCollisionStay = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onCollisionEnter != null) + { + onCollisionEnter.OnCompleted(); + } + if (onCollisionExit != null) + { + onCollisionExit.OnCompleted(); + } + if (onCollisionStay != null) + { + onCollisionStay.OnCompleted(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs.meta new file mode 100644 index 0000000..09399cc --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 10b917196cbfcf74898ce1686e205d04 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs new file mode 100644 index 0000000..91465c1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableDeselectTrigger : ObservableTriggerBase, IEventSystemHandler, IDeselectHandler + { + Subject onDeselect; + + void IDeselectHandler.OnDeselect(BaseEventData eventData) + { + if (onDeselect != null) onDeselect.OnNext(eventData); + } + + public IObservable OnDeselectAsObservable() + { + return onDeselect ?? (onDeselect = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onDeselect != null) + { + onDeselect.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs.meta new file mode 100644 index 0000000..91bdae0 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9fe6f69c4d869c04e8a1924aab1d3694 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDestroyTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDestroyTrigger.cs new file mode 100644 index 0000000..3eceb9d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDestroyTrigger.cs @@ -0,0 +1,67 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableDestroyTrigger : MonoBehaviour + { + bool calledDestroy = false; + Subject onDestroy; + CompositeDisposable disposablesOnDestroy; + + [Obsolete("Internal Use.")] + internal bool IsMonitoredActivate { get; set; } + + public bool IsActivated { get; private set; } + + /// + /// Check called OnDestroy. + /// This property does not guarantees GameObject was destroyed, + /// when gameObject is deactive, does not raise OnDestroy. + /// + public bool IsCalledOnDestroy { get { return calledDestroy; } } + + void Awake() + { + IsActivated = true; + } + + /// This function is called when the MonoBehaviour will be destroyed. + void OnDestroy() + { + if (!calledDestroy) + { + calledDestroy = true; + if (disposablesOnDestroy != null) disposablesOnDestroy.Dispose(); + if (onDestroy != null) { onDestroy.OnNext(Unit.Default); onDestroy.OnCompleted(); } + } + } + + /// This function is called when the MonoBehaviour will be destroyed. + public IObservable OnDestroyAsObservable() + { + if (this == null) return Observable.Return(Unit.Default); + if (calledDestroy) return Observable.Return(Unit.Default); + return onDestroy ?? (onDestroy = new Subject()); + } + + /// Invoke OnDestroy, this method is used on internal. + public void ForceRaiseOnDestroy() + { + OnDestroy(); + } + + public void AddDisposableOnDestroy(IDisposable disposable) + { + if (calledDestroy) + { + disposable.Dispose(); + return; + } + + if (disposablesOnDestroy == null) disposablesOnDestroy = new CompositeDisposable(); + disposablesOnDestroy.Add(disposable); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDestroyTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDestroyTrigger.cs.meta new file mode 100644 index 0000000..68d8b53 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDestroyTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cb219b23cdf4b314f94a27bca3cc8012 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs new file mode 100644 index 0000000..6dff39f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableDragTrigger : ObservableTriggerBase, IEventSystemHandler, IDragHandler + { + Subject onDrag; + + void IDragHandler.OnDrag(PointerEventData eventData) + { + if (onDrag != null) onDrag.OnNext(eventData); + } + + public IObservable OnDragAsObservable() + { + return onDrag ?? (onDrag = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onDrag != null) + { + onDrag.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs.meta new file mode 100644 index 0000000..ba30a30 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 79db090dc9e4db245821e8b89b0e208e +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs new file mode 100644 index 0000000..7d26345 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableDropTrigger : ObservableTriggerBase, IEventSystemHandler, IDropHandler + { + Subject onDrop; + + void IDropHandler.OnDrop(PointerEventData eventData) + { + if (onDrop != null) onDrop.OnNext(eventData); + } + + public IObservable OnDropAsObservable() + { + return onDrop ?? (onDrop = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onDrop != null) + { + onDrop.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs.meta new file mode 100644 index 0000000..1288eb8 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f2ffa8b5af3474446a310bb6aa0b180a +timeCreated: 1455373902 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEnableTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEnableTrigger.cs new file mode 100644 index 0000000..47df63e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEnableTrigger.cs @@ -0,0 +1,49 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableEnableTrigger : ObservableTriggerBase + { + Subject onEnable; + + /// This function is called when the object becomes enabled and active. + void OnEnable() + { + if (onEnable != null) onEnable.OnNext(Unit.Default); + } + + /// This function is called when the object becomes enabled and active. + public IObservable OnEnableAsObservable() + { + return onEnable ?? (onEnable = new Subject()); + } + + Subject onDisable; + + /// This function is called when the behaviour becomes disabled () or inactive. + void OnDisable() + { + if (onDisable != null) onDisable.OnNext(Unit.Default); + } + + /// This function is called when the behaviour becomes disabled () or inactive. + public IObservable OnDisableAsObservable() + { + return onDisable ?? (onDisable = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onEnable != null) + { + onEnable.OnCompleted(); + } + if (onDisable != null) + { + onDisable.OnCompleted(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEnableTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEnableTrigger.cs.meta new file mode 100644 index 0000000..969370b --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEnableTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0d9c7eb607af1fd4aa0e15f52cc0543b +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs new file mode 100644 index 0000000..8d68135 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableEndDragTrigger : ObservableTriggerBase, IEventSystemHandler, IEndDragHandler + { + Subject onEndDrag; + + void IEndDragHandler.OnEndDrag(PointerEventData eventData) + { + if (onEndDrag != null) onEndDrag.OnNext(eventData); + } + + public IObservable OnEndDragAsObservable() + { + return onEndDrag ?? (onEndDrag = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onEndDrag != null) + { + onEndDrag.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs.meta new file mode 100644 index 0000000..e55cd9d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b8ce8424f238d6842bd8b09c0cca1ac4 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs new file mode 100644 index 0000000..3c73eb1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs @@ -0,0 +1,359 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableEventTrigger : ObservableTriggerBase, IEventSystemHandler, IPointerEnterHandler, IPointerExitHandler, IPointerDownHandler, IPointerUpHandler, IPointerClickHandler, IBeginDragHandler, IInitializePotentialDragHandler, IDragHandler, IEndDragHandler, IDropHandler, IScrollHandler, IUpdateSelectedHandler, ISelectHandler, IDeselectHandler, IMoveHandler, ISubmitHandler, ICancelHandler + { + #region IDeselectHandler + + Subject onDeselect; + + void IDeselectHandler.OnDeselect(BaseEventData eventData) + { + if (onDeselect != null) onDeselect.OnNext(eventData); + } + + public IObservable OnDeselectAsObservable() + { + return onDeselect ?? (onDeselect = new Subject()); + } + + #endregion + + #region IMoveHandler + + Subject onMove; + + void IMoveHandler.OnMove(AxisEventData eventData) + { + if (onMove != null) onMove.OnNext(eventData); + } + + public IObservable OnMoveAsObservable() + { + return onMove ?? (onMove = new Subject()); + } + + #endregion + + #region IPointerDownHandler + + Subject onPointerDown; + + void IPointerDownHandler.OnPointerDown(PointerEventData eventData) + { + if (onPointerDown != null) onPointerDown.OnNext(eventData); + } + + public IObservable OnPointerDownAsObservable() + { + return onPointerDown ?? (onPointerDown = new Subject()); + } + + #endregion + + #region IPointerEnterHandler + + Subject onPointerEnter; + + void IPointerEnterHandler.OnPointerEnter(PointerEventData eventData) + { + if (onPointerEnter != null) onPointerEnter.OnNext(eventData); + } + + public IObservable OnPointerEnterAsObservable() + { + return onPointerEnter ?? (onPointerEnter = new Subject()); + } + + #endregion + + #region IPointerExitHandler + + Subject onPointerExit; + + void IPointerExitHandler.OnPointerExit(PointerEventData eventData) + { + if (onPointerExit != null) onPointerExit.OnNext(eventData); + } + + public IObservable OnPointerExitAsObservable() + { + return onPointerExit ?? (onPointerExit = new Subject()); + } + + #endregion + + #region IPointerUpHandler + + Subject onPointerUp; + + void IPointerUpHandler.OnPointerUp(PointerEventData eventData) + { + if (onPointerUp != null) onPointerUp.OnNext(eventData); + } + + public IObservable OnPointerUpAsObservable() + { + return onPointerUp ?? (onPointerUp = new Subject()); + } + + #endregion + + #region ISelectHandler + + Subject onSelect; + + void ISelectHandler.OnSelect(BaseEventData eventData) + { + if (onSelect != null) onSelect.OnNext(eventData); + } + + public IObservable OnSelectAsObservable() + { + return onSelect ?? (onSelect = new Subject()); + } + + #endregion + + #region IPointerClickHandler + + Subject onPointerClick; + + void IPointerClickHandler.OnPointerClick(PointerEventData eventData) + { + if (onPointerClick != null) onPointerClick.OnNext(eventData); + } + + public IObservable OnPointerClickAsObservable() + { + return onPointerClick ?? (onPointerClick = new Subject()); + } + + #endregion + + #region ISubmitHandler + + Subject onSubmit; + + void ISubmitHandler.OnSubmit(BaseEventData eventData) + { + if (onSubmit != null) onSubmit.OnNext(eventData); + } + + public IObservable OnSubmitAsObservable() + { + return onSubmit ?? (onSubmit = new Subject()); + } + + #endregion + + #region IDragHandler + + Subject onDrag; + + void IDragHandler.OnDrag(PointerEventData eventData) + { + if (onDrag != null) onDrag.OnNext(eventData); + } + + public IObservable OnDragAsObservable() + { + return onDrag ?? (onDrag = new Subject()); + } + + #endregion + + #region IBeginDragHandler + + Subject onBeginDrag; + + void IBeginDragHandler.OnBeginDrag(PointerEventData eventData) + { + if (onBeginDrag != null) onBeginDrag.OnNext(eventData); + } + + public IObservable OnBeginDragAsObservable() + { + return onBeginDrag ?? (onBeginDrag = new Subject()); + } + + #endregion + + #region IEndDragHandler + + Subject onEndDrag; + + void IEndDragHandler.OnEndDrag(PointerEventData eventData) + { + if (onEndDrag != null) onEndDrag.OnNext(eventData); + } + + public IObservable OnEndDragAsObservable() + { + return onEndDrag ?? (onEndDrag = new Subject()); + } + + #endregion + + #region IDropHandler + + Subject onDrop; + + void IDropHandler.OnDrop(PointerEventData eventData) + { + if (onDrop != null) onDrop.OnNext(eventData); + } + + public IObservable OnDropAsObservable() + { + return onDrop ?? (onDrop = new Subject()); + } + + #endregion + + #region IUpdateSelectedHandler + + Subject onUpdateSelected; + + void IUpdateSelectedHandler.OnUpdateSelected(BaseEventData eventData) + { + if (onUpdateSelected != null) onUpdateSelected.OnNext(eventData); + } + + public IObservable OnUpdateSelectedAsObservable() + { + return onUpdateSelected ?? (onUpdateSelected = new Subject()); + } + + #endregion + + #region IInitializePotentialDragHandler + + Subject onInitializePotentialDrag; + + void IInitializePotentialDragHandler.OnInitializePotentialDrag(PointerEventData eventData) + { + if (onInitializePotentialDrag != null) onInitializePotentialDrag.OnNext(eventData); + } + + public IObservable OnInitializePotentialDragAsObservable() + { + return onInitializePotentialDrag ?? (onInitializePotentialDrag = new Subject()); + } + + #endregion + + #region ICancelHandler + + Subject onCancel; + + void ICancelHandler.OnCancel(BaseEventData eventData) + { + if (onCancel != null) onCancel.OnNext(eventData); + } + + public IObservable OnCancelAsObservable() + { + return onCancel ?? (onCancel = new Subject()); + } + + #endregion + + #region IScrollHandler + + Subject onScroll; + + void IScrollHandler.OnScroll(PointerEventData eventData) + { + if (onScroll != null) onScroll.OnNext(eventData); + } + + public IObservable OnScrollAsObservable() + { + return onScroll ?? (onScroll = new Subject()); + } + + #endregion + + protected override void RaiseOnCompletedOnDestroy() + { + if (onDeselect != null) + { + onDeselect.OnCompleted(); + } + if (onMove != null) + { + onMove.OnCompleted(); + } + if (onPointerDown != null) + { + onPointerDown.OnCompleted(); + } + if (onPointerEnter != null) + { + onPointerEnter.OnCompleted(); + } + if (onPointerExit != null) + { + onPointerExit.OnCompleted(); + } + if (onPointerUp != null) + { + onPointerUp.OnCompleted(); + } + if (onSelect != null) + { + onSelect.OnCompleted(); + } + if (onPointerClick != null) + { + onPointerClick.OnCompleted(); + } + if (onSubmit != null) + { + onSubmit.OnCompleted(); + } + if (onDrag != null) + { + onDrag.OnCompleted(); + } + if (onBeginDrag != null) + { + onBeginDrag.OnCompleted(); + } + if (onEndDrag != null) + { + onEndDrag.OnCompleted(); + } + if (onDrop != null) + { + onDrop.OnCompleted(); + } + if (onUpdateSelected != null) + { + onUpdateSelected.OnCompleted(); + } + if (onInitializePotentialDrag != null) + { + onInitializePotentialDrag.OnCompleted(); + } + if (onCancel != null) + { + onCancel.OnCompleted(); + } + if (onScroll != null) + { + onScroll.OnCompleted(); + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs.meta new file mode 100644 index 0000000..cc19548 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 48e93426b16d5454c89e8d47ccded1c5 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableFixedUpdateTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableFixedUpdateTrigger.cs new file mode 100644 index 0000000..897170c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableFixedUpdateTrigger.cs @@ -0,0 +1,31 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableFixedUpdateTrigger : ObservableTriggerBase + { + Subject fixedUpdate; + + /// This function is called every fixed framerate frame, if the MonoBehaviour is enabled. + void FixedUpdate() + { + if (fixedUpdate != null) fixedUpdate.OnNext(Unit.Default); + } + + /// This function is called every fixed framerate frame, if the MonoBehaviour is enabled. + public IObservable FixedUpdateAsObservable() + { + return fixedUpdate ?? (fixedUpdate = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (fixedUpdate != null) + { + fixedUpdate.OnCompleted(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableFixedUpdateTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableFixedUpdateTrigger.cs.meta new file mode 100644 index 0000000..aabc769 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableFixedUpdateTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d525c42c11d945f4398061ed8f84e5f4 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs new file mode 100644 index 0000000..06db037 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableInitializePotentialDragTrigger : ObservableTriggerBase, IEventSystemHandler, IInitializePotentialDragHandler + { + Subject onInitializePotentialDrag; + + void IInitializePotentialDragHandler.OnInitializePotentialDrag(PointerEventData eventData) + { + if (onInitializePotentialDrag != null) onInitializePotentialDrag.OnNext(eventData); + } + + public IObservable OnInitializePotentialDragAsObservable() + { + return onInitializePotentialDrag ?? (onInitializePotentialDrag = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onInitializePotentialDrag != null) + { + onInitializePotentialDrag.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs.meta new file mode 100644 index 0000000..a14ffba --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3f3148a9e1b8b21409f54d2b0c2c81de +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs new file mode 100644 index 0000000..8e4c39f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs @@ -0,0 +1,47 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableJointTrigger : ObservableTriggerBase + { + Subject onJointBreak; + + void OnJointBreak(float breakForce) + { + if (onJointBreak != null) onJointBreak.OnNext(breakForce); + } + + public IObservable OnJointBreakAsObservable() + { + return onJointBreak ?? (onJointBreak = new Subject()); + } + + + Subject onJointBreak2D; + + void OnJointBreak2D(Joint2D brokenJoint) + { + if (onJointBreak2D != null) onJointBreak2D.OnNext(brokenJoint); + } + + public IObservable OnJointBreak2DAsObservable() + { + return onJointBreak2D ?? (onJointBreak2D = new Subject()); + } + + + protected override void RaiseOnCompletedOnDestroy() + { + if (onJointBreak != null) + { + onJointBreak.OnCompleted(); + } + if (onJointBreak2D != null) + { + onJointBreak2D.OnCompleted(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs.meta new file mode 100644 index 0000000..ed27131 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 79b758631951cbc42b40ea87072e1ab3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableLateUpdateTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableLateUpdateTrigger.cs new file mode 100644 index 0000000..21c61c7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableLateUpdateTrigger.cs @@ -0,0 +1,31 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableLateUpdateTrigger : ObservableTriggerBase + { + Subject lateUpdate; + + /// LateUpdate is called every frame, if the Behaviour is enabled. + void LateUpdate() + { + if (lateUpdate != null) lateUpdate.OnNext(Unit.Default); + } + + /// LateUpdate is called every frame, if the Behaviour is enabled. + public IObservable LateUpdateAsObservable() + { + return lateUpdate ?? (lateUpdate = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (lateUpdate != null) + { + lateUpdate.OnCompleted(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableLateUpdateTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableLateUpdateTrigger.cs.meta new file mode 100644 index 0000000..a62624a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableLateUpdateTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 176ace24965d0c744bc61c8aad8b3fc7 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMouseTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMouseTrigger.cs new file mode 100644 index 0000000..89108b8 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMouseTrigger.cs @@ -0,0 +1,143 @@ +#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) + +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableMouseTrigger : ObservableTriggerBase + { + Subject onMouseDown; + + /// OnMouseDown is called when the user has pressed the mouse button while over the GUIElement or Collider. + void OnMouseDown() + { + if (onMouseDown != null) onMouseDown.OnNext(Unit.Default); + } + + /// OnMouseDown is called when the user has pressed the mouse button while over the GUIElement or Collider. + public IObservable OnMouseDownAsObservable() + { + return onMouseDown ?? (onMouseDown = new Subject()); + } + + Subject onMouseDrag; + + /// OnMouseDrag is called when the user has clicked on a GUIElement or Collider and is still holding down the mouse. + void OnMouseDrag() + { + if (onMouseDrag != null) onMouseDrag.OnNext(Unit.Default); + } + + /// OnMouseDrag is called when the user has clicked on a GUIElement or Collider and is still holding down the mouse. + public IObservable OnMouseDragAsObservable() + { + return onMouseDrag ?? (onMouseDrag = new Subject()); + } + + Subject onMouseEnter; + + /// OnMouseEnter is called when the mouse entered the GUIElement or Collider. + void OnMouseEnter() + { + if (onMouseEnter != null) onMouseEnter.OnNext(Unit.Default); + } + + /// OnMouseEnter is called when the mouse entered the GUIElement or Collider. + public IObservable OnMouseEnterAsObservable() + { + return onMouseEnter ?? (onMouseEnter = new Subject()); + } + + Subject onMouseExit; + + /// OnMouseExit is called when the mouse is not any longer over the GUIElement or Collider. + void OnMouseExit() + { + if (onMouseExit != null) onMouseExit.OnNext(Unit.Default); + } + + /// OnMouseExit is called when the mouse is not any longer over the GUIElement or Collider. + public IObservable OnMouseExitAsObservable() + { + return onMouseExit ?? (onMouseExit = new Subject()); + } + + Subject onMouseOver; + + /// OnMouseOver is called every frame while the mouse is over the GUIElement or Collider. + void OnMouseOver() + { + if (onMouseOver != null) onMouseOver.OnNext(Unit.Default); + } + + /// OnMouseOver is called every frame while the mouse is over the GUIElement or Collider. + public IObservable OnMouseOverAsObservable() + { + return onMouseOver ?? (onMouseOver = new Subject()); + } + + Subject onMouseUp; + + /// OnMouseUp is called when the user has released the mouse button. + void OnMouseUp() + { + if (onMouseUp != null) onMouseUp.OnNext(Unit.Default); + } + + /// OnMouseUp is called when the user has released the mouse button. + public IObservable OnMouseUpAsObservable() + { + return onMouseUp ?? (onMouseUp = new Subject()); + } + + Subject onMouseUpAsButton; + + /// OnMouseUpAsButton is only called when the mouse is released over the same GUIElement or Collider as it was pressed. + void OnMouseUpAsButton() + { + if (onMouseUpAsButton != null) onMouseUpAsButton.OnNext(Unit.Default); + } + + /// OnMouseUpAsButton is only called when the mouse is released over the same GUIElement or Collider as it was pressed. + public IObservable OnMouseUpAsButtonAsObservable() + { + return onMouseUpAsButton ?? (onMouseUpAsButton = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onMouseDown != null) + { + onMouseDown.OnCompleted(); + } + if (onMouseDrag != null) + { + onMouseDrag.OnCompleted(); + } + if (onMouseEnter != null) + { + onMouseEnter.OnCompleted(); + } + if (onMouseExit != null) + { + onMouseExit.OnCompleted(); + } + if (onMouseOver != null) + { + onMouseOver.OnCompleted(); + } + if (onMouseUp != null) + { + onMouseUp.OnCompleted(); + } + if (onMouseUpAsButton != null) + { + onMouseUpAsButton.OnCompleted(); + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMouseTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMouseTrigger.cs.meta new file mode 100644 index 0000000..9611b63 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMouseTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c5f30958c5509bc4f9c14ea261a1567c +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs new file mode 100644 index 0000000..bd05d14 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableMoveTrigger : ObservableTriggerBase, IEventSystemHandler, IMoveHandler + { + Subject onMove; + + void IMoveHandler.OnMove(AxisEventData eventData) + { + if (onMove != null) onMove.OnNext(eventData); + } + + public IObservable OnMoveAsObservable() + { + return onMove ?? (onMove = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onMove != null) + { + onMove.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs.meta new file mode 100644 index 0000000..1964275 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3e1feec0f10dcea4d9c779a81a0ee3dc +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableParticleTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableParticleTrigger.cs new file mode 100644 index 0000000..f8acc26 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableParticleTrigger.cs @@ -0,0 +1,56 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableParticleTrigger : ObservableTriggerBase + { + Subject onParticleCollision; +#if UNITY_5_4_OR_NEWER + Subject onParticleTrigger; +#endif + + /// OnParticleCollision is called when a particle hits a collider. + void OnParticleCollision(GameObject other) + { + if (onParticleCollision != null) onParticleCollision.OnNext(other); + } + + /// OnParticleCollision is called when a particle hits a collider. + public IObservable OnParticleCollisionAsObservable() + { + return onParticleCollision ?? (onParticleCollision = new Subject()); + } + +#if UNITY_5_4_OR_NEWER + + /// OnParticleTrigger is called when any particles in a particle system meet the conditions in the trigger module. + void OnParticleTrigger() + { + if (onParticleTrigger != null) onParticleTrigger.OnNext(Unit.Default); + } + + /// OnParticleTrigger is called when any particles in a particle system meet the conditions in the trigger module. + public IObservable OnParticleTriggerAsObservable() + { + return onParticleTrigger ?? (onParticleTrigger = new Subject()); + } + +#endif + + protected override void RaiseOnCompletedOnDestroy() + { + if (onParticleCollision != null) + { + onParticleCollision.OnCompleted(); + } +#if UNITY_5_4_OR_NEWER + if (onParticleTrigger != null) + { + onParticleTrigger.OnCompleted(); + } +#endif + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableParticleTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableParticleTrigger.cs.meta new file mode 100644 index 0000000..184d0fe --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableParticleTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9e6a20494274d5045a1b36a770ea76b4 +timeCreated: 1468669952 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs new file mode 100644 index 0000000..1cac1d9 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservablePointerClickTrigger : ObservableTriggerBase, IEventSystemHandler, IPointerClickHandler + { + Subject onPointerClick; + + void IPointerClickHandler.OnPointerClick(PointerEventData eventData) + { + if (onPointerClick != null) onPointerClick.OnNext(eventData); + } + + public IObservable OnPointerClickAsObservable() + { + return onPointerClick ?? (onPointerClick = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onPointerClick != null) + { + onPointerClick.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs.meta new file mode 100644 index 0000000..b6d86b7 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: aa69c313aba23f945b760e79c45083ad +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs new file mode 100644 index 0000000..4ff2dff --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservablePointerDownTrigger : ObservableTriggerBase, IEventSystemHandler, IPointerDownHandler + { + Subject onPointerDown; + + void IPointerDownHandler.OnPointerDown(PointerEventData eventData) + { + if (onPointerDown != null) onPointerDown.OnNext(eventData); + } + + public IObservable OnPointerDownAsObservable() + { + return onPointerDown ?? (onPointerDown = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onPointerDown != null) + { + onPointerDown.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs.meta new file mode 100644 index 0000000..8ca694a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c7ae5b5965df2344d99ef7792521b937 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs new file mode 100644 index 0000000..615a83c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservablePointerEnterTrigger : ObservableTriggerBase, IEventSystemHandler, IPointerEnterHandler + { + Subject onPointerEnter; + + void IPointerEnterHandler.OnPointerEnter(PointerEventData eventData) + { + if (onPointerEnter != null) onPointerEnter.OnNext(eventData); + } + + public IObservable OnPointerEnterAsObservable() + { + return onPointerEnter ?? (onPointerEnter = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onPointerEnter != null) + { + onPointerEnter.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs.meta new file mode 100644 index 0000000..655ddb2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3468b3db8d419c745b12124f6432696b +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs new file mode 100644 index 0000000..90d9045 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservablePointerExitTrigger : ObservableTriggerBase, IEventSystemHandler, IPointerExitHandler + { + Subject onPointerExit; + + void IPointerExitHandler.OnPointerExit(PointerEventData eventData) + { + if (onPointerExit != null) onPointerExit.OnNext(eventData); + } + + public IObservable OnPointerExitAsObservable() + { + return onPointerExit ?? (onPointerExit = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onPointerExit != null) + { + onPointerExit.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs.meta new file mode 100644 index 0000000..5365e5b --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9643e74593988274bbed9adf40384e48 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs new file mode 100644 index 0000000..877e63a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservablePointerUpTrigger : ObservableTriggerBase, IEventSystemHandler, IPointerUpHandler + { + Subject onPointerUp; + + void IPointerUpHandler.OnPointerUp(PointerEventData eventData) + { + if (onPointerUp != null) onPointerUp.OnNext(eventData); + } + + public IObservable OnPointerUpAsObservable() + { + return onPointerUp ?? (onPointerUp = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onPointerUp != null) + { + onPointerUp.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs.meta new file mode 100644 index 0000000..ed50e6c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 41b0031b2e409894aacafa49d8583617 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableRectTransformTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableRectTransformTrigger.cs new file mode 100644 index 0000000..063015c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableRectTransformTrigger.cs @@ -0,0 +1,55 @@ +// after uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableRectTransformTrigger : ObservableTriggerBase + { + Subject onRectTransformDimensionsChange; + + // Callback that is sent if an associated RectTransform has it's dimensions changed + void OnRectTransformDimensionsChange() + { + if (onRectTransformDimensionsChange != null) onRectTransformDimensionsChange.OnNext(Unit.Default); + } + + /// Callback that is sent if an associated RectTransform has it's dimensions changed. + public IObservable OnRectTransformDimensionsChangeAsObservable() + { + return onRectTransformDimensionsChange ?? (onRectTransformDimensionsChange = new Subject()); + } + + Subject onRectTransformRemoved; + + // Callback that is sent if an associated RectTransform is removed + void OnRectTransformRemoved() + { + if (onRectTransformRemoved != null) onRectTransformRemoved.OnNext(Unit.Default); + } + + /// Callback that is sent if an associated RectTransform is removed. + public IObservable OnRectTransformRemovedAsObservable() + { + return onRectTransformRemoved ?? (onRectTransformRemoved = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onRectTransformDimensionsChange != null) + { + onRectTransformDimensionsChange.OnCompleted(); + } + if (onRectTransformRemoved != null) + { + onRectTransformRemoved.OnCompleted(); + } + } + + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableRectTransformTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableRectTransformTrigger.cs.meta new file mode 100644 index 0000000..2cd2e43 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableRectTransformTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 20b97bcdd98f27346851c3a690ec7faf +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs new file mode 100644 index 0000000..dd60ffd --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableScrollTrigger : ObservableTriggerBase, IEventSystemHandler, IScrollHandler + { + Subject onScroll; + + void IScrollHandler.OnScroll(PointerEventData eventData) + { + if (onScroll != null) onScroll.OnNext(eventData); + } + + public IObservable OnScrollAsObservable() + { + return onScroll ?? (onScroll = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onScroll != null) + { + onScroll.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs.meta new file mode 100644 index 0000000..67afed9 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2231ec04e488f7443ae7acf609ac5f00 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs new file mode 100644 index 0000000..d80579b --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableSelectTrigger : ObservableTriggerBase, IEventSystemHandler, ISelectHandler + { + Subject onSelect; + + void ISelectHandler.OnSelect(BaseEventData eventData) + { + if (onSelect != null) onSelect.OnNext(eventData); + } + + public IObservable OnSelectAsObservable() + { + return onSelect ?? (onSelect = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onSelect != null) + { + onSelect.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs.meta new file mode 100644 index 0000000..3230e07 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1e4cb287d3ab8274885ed05748f26329 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs new file mode 100644 index 0000000..cd38afe --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs @@ -0,0 +1,143 @@ +// over Unity5 added StateMachineBehaviour +#if !(UNITY_4_7 || UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4_0_1 || UNITY_4_0 || UNITY_3_5 || UNITY_3_4 || UNITY_3_3 || UNITY_3_2 || UNITY_3_1 || UNITY_3_0_0 || UNITY_3_0 || UNITY_2_6_1 || UNITY_2_6) + +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableStateMachineTrigger : StateMachineBehaviour + { + public class OnStateInfo + { + public Animator Animator { get; private set; } + public AnimatorStateInfo StateInfo { get; private set; } + public int LayerIndex { get; private set; } + + public OnStateInfo(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) + { + Animator = animator; + StateInfo = stateInfo; + LayerIndex = layerIndex; + } + } + + public class OnStateMachineInfo + { + public Animator Animator { get; private set; } + public int StateMachinePathHash { get; private set; } + + public OnStateMachineInfo(Animator animator, int stateMachinePathHash) + { + Animator = animator; + StateMachinePathHash = stateMachinePathHash; + } + } + + // OnStateExit + + Subject onStateExit; + + public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) + { + if (onStateExit != null) onStateExit.OnNext(new OnStateInfo(animator, stateInfo, layerIndex)); + } + + public IObservable OnStateExitAsObservable() + { + return onStateExit ?? (onStateExit = new Subject()); + } + + // OnStateEnter + + Subject onStateEnter; + + public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) + { + if (onStateEnter != null) onStateEnter.OnNext(new OnStateInfo(animator, stateInfo, layerIndex)); + } + + public IObservable OnStateEnterAsObservable() + { + return onStateEnter ?? (onStateEnter = new Subject()); + } + + // OnStateIK + + Subject onStateIK; + + public override void OnStateIK(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) + { + if(onStateIK !=null) onStateIK.OnNext(new OnStateInfo(animator, stateInfo, layerIndex)); + } + + public IObservable OnStateIKAsObservable() + { + return onStateIK ?? (onStateIK = new Subject()); + } + + // Does not implments OnStateMove. + // ObservableStateMachine Trigger makes stop animating. + // By defining OnAnimatorMove, you are signifying that you want to intercept the movement of the root object and apply it yourself. + // http://fogbugz.unity3d.com/default.asp?700990_9jqaim4ev33i8e9h + + //// OnStateMove + + //Subject onStateMove; + + //public override void OnStateMove(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) + //{ + // if (onStateMove != null) onStateMove.OnNext(new OnStateInfo(animator, stateInfo, layerIndex)); + //} + + //public IObservable OnStateMoveAsObservable() + //{ + // return onStateMove ?? (onStateMove = new Subject()); + //} + + // OnStateUpdate + + Subject onStateUpdate; + + public override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) + { + if (onStateUpdate != null) onStateUpdate.OnNext(new OnStateInfo(animator, stateInfo, layerIndex)); + } + + public IObservable OnStateUpdateAsObservable() + { + return onStateUpdate ?? (onStateUpdate = new Subject()); + } + + // OnStateMachineEnter + + Subject onStateMachineEnter; + + public override void OnStateMachineEnter(Animator animator, int stateMachinePathHash) + { + if (onStateMachineEnter != null) onStateMachineEnter.OnNext(new OnStateMachineInfo(animator, stateMachinePathHash)); + } + + public IObservable OnStateMachineEnterAsObservable() + { + return onStateMachineEnter ?? (onStateMachineEnter = new Subject()); + } + + // OnStateMachineExit + + Subject onStateMachineExit; + + public override void OnStateMachineExit(Animator animator, int stateMachinePathHash) + { + if (onStateMachineExit != null) onStateMachineExit.OnNext(new OnStateMachineInfo(animator, stateMachinePathHash)); + } + + public IObservable OnStateMachineExitAsObservable() + { + return onStateMachineExit ?? (onStateMachineExit = new Subject()); + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs.meta new file mode 100644 index 0000000..48921b1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1e29959e46c7ea7409560769cde085ae +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs new file mode 100644 index 0000000..8c3d6dd --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableSubmitTrigger : ObservableTriggerBase, IEventSystemHandler, ISubmitHandler + { + Subject onSubmit; + + void ISubmitHandler.OnSubmit(BaseEventData eventData) + { + if (onSubmit != null) onSubmit.OnNext(eventData); + } + + public IObservable OnSubmitAsObservable() + { + return onSubmit ?? (onSubmit = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onSubmit != null) + { + onSubmit.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs.meta new file mode 100644 index 0000000..fb7cc88 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 655296fedabd6004ab699ab9749e369c +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTransformChangedTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTransformChangedTrigger.cs new file mode 100644 index 0000000..c560241 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTransformChangedTrigger.cs @@ -0,0 +1,72 @@ +// after uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableTransformChangedTrigger : ObservableTriggerBase + { + Subject onBeforeTransformParentChanged; + + // Callback sent to the graphic before a Transform parent change occurs + void OnBeforeTransformParentChanged() + { + if (onBeforeTransformParentChanged != null) onBeforeTransformParentChanged.OnNext(Unit.Default); + } + + /// Callback sent to the graphic before a Transform parent change occurs. + public IObservable OnBeforeTransformParentChangedAsObservable() + { + return onBeforeTransformParentChanged ?? (onBeforeTransformParentChanged = new Subject()); + } + + Subject onTransformParentChanged; + + // This function is called when the parent property of the transform of the GameObject has changed + void OnTransformParentChanged() + { + if (onTransformParentChanged != null) onTransformParentChanged.OnNext(Unit.Default); + } + + /// This function is called when the parent property of the transform of the GameObject has changed. + public IObservable OnTransformParentChangedAsObservable() + { + return onTransformParentChanged ?? (onTransformParentChanged = new Subject()); + } + + Subject onTransformChildrenChanged; + + // This function is called when the list of children of the transform of the GameObject has changed + void OnTransformChildrenChanged() + { + if (onTransformChildrenChanged != null) onTransformChildrenChanged.OnNext(Unit.Default); + } + + /// This function is called when the list of children of the transform of the GameObject has changed. + public IObservable OnTransformChildrenChangedAsObservable() + { + return onTransformChildrenChanged ?? (onTransformChildrenChanged = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onBeforeTransformParentChanged != null) + { + onBeforeTransformParentChanged.OnCompleted(); + } + if (onTransformParentChanged != null) + { + onTransformParentChanged.OnCompleted(); + } + if (onTransformChildrenChanged != null) + { + onTransformChildrenChanged.OnCompleted(); + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTransformChangedTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTransformChangedTrigger.cs.meta new file mode 100644 index 0000000..27fbaa5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTransformChangedTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 835e244a602942c4c84a09c9bdedf229 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs new file mode 100644 index 0000000..565a40d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs @@ -0,0 +1,67 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableTrigger2DTrigger : ObservableTriggerBase + { + Subject onTriggerEnter2D; + + /// Sent when another object enters a trigger collider attached to this object (2D physics only). + void OnTriggerEnter2D(Collider2D other) + { + if (onTriggerEnter2D != null) onTriggerEnter2D.OnNext(other); + } + + /// Sent when another object enters a trigger collider attached to this object (2D physics only). + public IObservable OnTriggerEnter2DAsObservable() + { + return onTriggerEnter2D ?? (onTriggerEnter2D = new Subject()); + } + + Subject onTriggerExit2D; + + /// Sent when another object leaves a trigger collider attached to this object (2D physics only). + void OnTriggerExit2D(Collider2D other) + { + if (onTriggerExit2D != null) onTriggerExit2D.OnNext(other); + } + + /// Sent when another object leaves a trigger collider attached to this object (2D physics only). + public IObservable OnTriggerExit2DAsObservable() + { + return onTriggerExit2D ?? (onTriggerExit2D = new Subject()); + } + + Subject onTriggerStay2D; + + /// Sent each frame where another object is within a trigger collider attached to this object (2D physics only). + void OnTriggerStay2D(Collider2D other) + { + if (onTriggerStay2D != null) onTriggerStay2D.OnNext(other); + } + + /// Sent each frame where another object is within a trigger collider attached to this object (2D physics only). + public IObservable OnTriggerStay2DAsObservable() + { + return onTriggerStay2D ?? (onTriggerStay2D = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onTriggerEnter2D != null) + { + onTriggerEnter2D.OnCompleted(); + } + if (onTriggerExit2D != null) + { + onTriggerExit2D.OnCompleted(); + } + if (onTriggerStay2D != null) + { + onTriggerStay2D.OnCompleted(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs.meta new file mode 100644 index 0000000..38a7ee3 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1aad3129752ef804999a880a7b2d72ef +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerBase.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerBase.cs new file mode 100644 index 0000000..ddda78f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerBase.cs @@ -0,0 +1,65 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + public abstract class ObservableTriggerBase : MonoBehaviour + { + bool calledAwake = false; + Subject awake; + + /// Awake is called when the script instance is being loaded. + void Awake() + { + calledAwake = true; + if (awake != null) { awake.OnNext(Unit.Default); awake.OnCompleted(); } + } + + /// Awake is called when the script instance is being loaded. + public IObservable AwakeAsObservable() + { + if (calledAwake) return Observable.Return(Unit.Default); + return awake ?? (awake = new Subject()); + } + + bool calledStart = false; + Subject start; + + /// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time. + void Start() + { + calledStart = true; + if (start != null) { start.OnNext(Unit.Default); start.OnCompleted(); } + } + + /// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time. + public IObservable StartAsObservable() + { + if (calledStart) return Observable.Return(Unit.Default); + return start ?? (start = new Subject()); + } + + + bool calledDestroy = false; + Subject onDestroy; + + /// This function is called when the MonoBehaviour will be destroyed. + void OnDestroy() + { + calledDestroy = true; + if (onDestroy != null) { onDestroy.OnNext(Unit.Default); onDestroy.OnCompleted(); } + + RaiseOnCompletedOnDestroy(); + } + + /// This function is called when the MonoBehaviour will be destroyed. + public IObservable OnDestroyAsObservable() + { + if (this == null) return Observable.Return(Unit.Default); + if (calledDestroy) return Observable.Return(Unit.Default); + return onDestroy ?? (onDestroy = new Subject()); + } + + protected abstract void RaiseOnCompletedOnDestroy(); + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerBase.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerBase.cs.meta new file mode 100644 index 0000000..00d1d1a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerBase.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 850bc951297608e4fb0722795c21ed16 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs new file mode 100644 index 0000000..1c90e2e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs @@ -0,0 +1,461 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +using UnityEngine.EventSystems; +#endif + +namespace UniRx.Triggers +{ + // for Component + public static partial class ObservableTriggerExtensions + { + #region ObservableAnimatorTrigger + + /// Callback for setting up animation IK (inverse kinematics). + public static IObservable OnAnimatorIKAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnAnimatorIKAsObservable(); + } + + /// Callback for processing animation movements for modifying root motion. + public static IObservable OnAnimatorMoveAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnAnimatorMoveAsObservable(); + } + + #endregion + + #region ObservableCollision2DTrigger + + /// Sent when an incoming collider makes contact with this object's collider (2D physics only). + public static IObservable OnCollisionEnter2DAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnCollisionEnter2DAsObservable(); + } + + + /// Sent when a collider on another object stops touching this object's collider (2D physics only). + public static IObservable OnCollisionExit2DAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnCollisionExit2DAsObservable(); + } + + /// Sent each frame where a collider on another object is touching this object's collider (2D physics only). + public static IObservable OnCollisionStay2DAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnCollisionStay2DAsObservable(); + } + + #endregion + + #region ObservableCollisionTrigger + + /// OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider. + public static IObservable OnCollisionEnterAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnCollisionEnterAsObservable(); + } + + + /// OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider. + public static IObservable OnCollisionExitAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnCollisionExitAsObservable(); + } + + /// OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider. + public static IObservable OnCollisionStayAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnCollisionStayAsObservable(); + } + + #endregion + + #region ObservableDestroyTrigger + + /// This function is called when the MonoBehaviour will be destroyed. + public static IObservable OnDestroyAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Return(Unit.Default); // send destroy message + return GetOrAddComponent(component.gameObject).OnDestroyAsObservable(); + } + + #endregion + + + #region ObservableEnableTrigger + + /// This function is called when the object becomes enabled and active. + public static IObservable OnEnableAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnEnableAsObservable(); + } + + /// This function is called when the behaviour becomes disabled () or inactive. + public static IObservable OnDisableAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnDisableAsObservable(); + } + + #endregion + + #region ObservableFixedUpdateTrigger + + /// This function is called every fixed framerate frame, if the MonoBehaviour is enabled. + public static IObservable FixedUpdateAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).FixedUpdateAsObservable(); + } + + #endregion + + #region ObservableLateUpdateTrigger + + /// LateUpdate is called every frame, if the Behaviour is enabled. + public static IObservable LateUpdateAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).LateUpdateAsObservable(); + } + + #endregion + +#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) + + #region ObservableMouseTrigger + + /// OnMouseDown is called when the user has pressed the mouse button while over the GUIElement or Collider. + public static IObservable OnMouseDownAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnMouseDownAsObservable(); + } + + /// OnMouseDrag is called when the user has clicked on a GUIElement or Collider and is still holding down the mouse. + public static IObservable OnMouseDragAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnMouseDragAsObservable(); + } + + /// OnMouseEnter is called when the mouse entered the GUIElement or Collider. + public static IObservable OnMouseEnterAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnMouseEnterAsObservable(); + } + + /// OnMouseExit is called when the mouse is not any longer over the GUIElement or Collider. + public static IObservable OnMouseExitAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnMouseExitAsObservable(); + } + + /// OnMouseOver is called every frame while the mouse is over the GUIElement or Collider. + public static IObservable OnMouseOverAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnMouseOverAsObservable(); + } + + /// OnMouseUp is called when the user has released the mouse button. + public static IObservable OnMouseUpAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnMouseUpAsObservable(); + } + + /// OnMouseUpAsButton is only called when the mouse is released over the same GUIElement or Collider as it was pressed. + public static IObservable OnMouseUpAsButtonAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnMouseUpAsButtonAsObservable(); + } + + #endregion + +#endif + + #region ObservableTrigger2DTrigger + + /// Sent when another object enters a trigger collider attached to this object (2D physics only). + public static IObservable OnTriggerEnter2DAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnTriggerEnter2DAsObservable(); + } + + + /// Sent when another object leaves a trigger collider attached to this object (2D physics only). + public static IObservable OnTriggerExit2DAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnTriggerExit2DAsObservable(); + } + + /// Sent each frame where another object is within a trigger collider attached to this object (2D physics only). + public static IObservable OnTriggerStay2DAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnTriggerStay2DAsObservable(); + } + + #endregion + + #region ObservableTriggerTrigger + + /// OnTriggerEnter is called when the Collider other enters the trigger. + public static IObservable OnTriggerEnterAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnTriggerEnterAsObservable(); + } + + + /// OnTriggerExit is called when the Collider other has stopped touching the trigger. + public static IObservable OnTriggerExitAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnTriggerExitAsObservable(); + } + + /// OnTriggerStay is called once per frame for every Collider other that is touching the trigger. + public static IObservable OnTriggerStayAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnTriggerStayAsObservable(); + } + + #endregion + + #region ObservableUpdateTrigger + + /// Update is called every frame, if the MonoBehaviour is enabled. + public static IObservable UpdateAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).UpdateAsObservable(); + } + + #endregion + + #region ObservableVisibleTrigger + + /// OnBecameInvisible is called when the renderer is no longer visible by any camera. + public static IObservable OnBecameInvisibleAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnBecameInvisibleAsObservable(); + } + + /// OnBecameVisible is called when the renderer became visible by any camera. + public static IObservable OnBecameVisibleAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnBecameVisibleAsObservable(); + } + + #endregion + +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + + #region ObservableTransformChangedTrigger + + /// Callback sent to the graphic before a Transform parent change occurs. + public static IObservable OnBeforeTransformParentChangedAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnBeforeTransformParentChangedAsObservable(); + } + + /// This function is called when the parent property of the transform of the GameObject has changed. + public static IObservable OnTransformParentChangedAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnTransformParentChangedAsObservable(); + } + + /// This function is called when the list of children of the transform of the GameObject has changed. + public static IObservable OnTransformChildrenChangedAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnTransformChildrenChangedAsObservable(); + } + + #endregion + + #region ObservableCanvasGroupChangedTrigger + + /// Callback that is sent if the canvas group is changed. + public static IObservable OnCanvasGroupChangedAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnCanvasGroupChangedAsObservable(); + } + + #endregion + + #region ObservableRectTransformTrigger + + /// Callback that is sent if an associated RectTransform has it's dimensions changed. + public static IObservable OnRectTransformDimensionsChangeAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnRectTransformDimensionsChangeAsObservable(); + } + + /// Callback that is sent if an associated RectTransform is removed. + public static IObservable OnRectTransformRemovedAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnRectTransformRemovedAsObservable(); + } + + #endregion + + // uGUI + + #region ObservableEventTrigger classes + + public static IObservable OnDeselectAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnDeselectAsObservable(); + } + + public static IObservable OnMoveAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnMoveAsObservable(); + } + + public static IObservable OnPointerDownAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnPointerDownAsObservable(); + } + + public static IObservable OnPointerEnterAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnPointerEnterAsObservable(); + } + + public static IObservable OnPointerExitAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnPointerExitAsObservable(); + } + + public static IObservable OnPointerUpAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnPointerUpAsObservable(); + } + + public static IObservable OnSelectAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnSelectAsObservable(); + } + + public static IObservable OnPointerClickAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnPointerClickAsObservable(); + } + + public static IObservable OnSubmitAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnSubmitAsObservable(); + } + + public static IObservable OnDragAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnDragAsObservable(); + } + + public static IObservable OnBeginDragAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnBeginDragAsObservable(); + } + + public static IObservable OnEndDragAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnEndDragAsObservable(); + } + + public static IObservable OnDropAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnDropAsObservable(); + } + + public static IObservable OnUpdateSelectedAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnUpdateSelectedAsObservable(); + } + + public static IObservable OnInitializePotentialDragAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnInitializePotentialDragAsObservable(); + } + + public static IObservable OnCancelAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnCancelAsObservable(); + } + + public static IObservable OnScrollAsObservable(this UIBehaviour component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnScrollAsObservable(); + } + + #endregion + +#endif + + #region ObservableParticleTrigger + + /// OnParticleCollision is called when a particle hits a collider. + public static IObservable OnParticleCollisionAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnParticleCollisionAsObservable(); + } + +#if UNITY_5_4_OR_NEWER + + /// OnParticleTrigger is called when any particles in a particle system meet the conditions in the trigger module. + public static IObservable OnParticleTriggerAsObservable(this Component component) + { + if (component == null || component.gameObject == null) return Observable.Empty(); + return GetOrAddComponent(component.gameObject).OnParticleTriggerAsObservable(); + } + +#endif + + #endregion + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs.meta new file mode 100644 index 0000000..ded96f4 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d10150b3ca6f3924baae5bce4343f6c4 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs new file mode 100644 index 0000000..fd2009f --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs @@ -0,0 +1,361 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + // for GameObject + public static partial class ObservableTriggerExtensions + { + #region ObservableAnimatorTrigger + + /// Callback for setting up animation IK (inverse kinematics). + public static IObservable OnAnimatorIKAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnAnimatorIKAsObservable(); + } + + /// Callback for processing animation movements for modifying root motion. + public static IObservable OnAnimatorMoveAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnAnimatorMoveAsObservable(); + } + + #endregion + + #region ObservableCollision2DTrigger + + /// Sent when an incoming collider makes contact with this object's collider (2D physics only). + public static IObservable OnCollisionEnter2DAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnCollisionEnter2DAsObservable(); + } + + + /// Sent when a collider on another object stops touching this object's collider (2D physics only). + public static IObservable OnCollisionExit2DAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnCollisionExit2DAsObservable(); + } + + /// Sent each frame where a collider on another object is touching this object's collider (2D physics only). + public static IObservable OnCollisionStay2DAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnCollisionStay2DAsObservable(); + } + + #endregion + + #region ObservableCollisionTrigger + + /// OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider. + public static IObservable OnCollisionEnterAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnCollisionEnterAsObservable(); + } + + + /// OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider. + public static IObservable OnCollisionExitAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnCollisionExitAsObservable(); + } + + /// OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider. + public static IObservable OnCollisionStayAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnCollisionStayAsObservable(); + } + + #endregion + + #region ObservableDestroyTrigger + + /// This function is called when the MonoBehaviour will be destroyed. + public static IObservable OnDestroyAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Return(Unit.Default); // send destroy message + return GetOrAddComponent(gameObject).OnDestroyAsObservable(); + } + + #endregion + + + #region ObservableEnableTrigger + + /// This function is called when the object becomes enabled and active. + public static IObservable OnEnableAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnEnableAsObservable(); + } + + /// This function is called when the behaviour becomes disabled () or inactive. + public static IObservable OnDisableAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnDisableAsObservable(); + } + + #endregion + + #region ObservableFixedUpdateTrigger + + /// This function is called every fixed framerate frame, if the MonoBehaviour is enabled. + public static IObservable FixedUpdateAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).FixedUpdateAsObservable(); + } + + #endregion + + #region ObservableLateUpdateTrigger + + /// LateUpdate is called every frame, if the Behaviour is enabled. + public static IObservable LateUpdateAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).LateUpdateAsObservable(); + } + + #endregion + +#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) + + #region ObservableMouseTrigger + + /// OnMouseDown is called when the user has pressed the mouse button while over the GUIElement or Collider. + public static IObservable OnMouseDownAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnMouseDownAsObservable(); + } + + /// OnMouseDrag is called when the user has clicked on a GUIElement or Collider and is still holding down the mouse. + public static IObservable OnMouseDragAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnMouseDragAsObservable(); + } + + /// OnMouseEnter is called when the mouse entered the GUIElement or Collider. + public static IObservable OnMouseEnterAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnMouseEnterAsObservable(); + } + + /// OnMouseExit is called when the mouse is not any longer over the GUIElement or Collider. + public static IObservable OnMouseExitAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnMouseExitAsObservable(); + } + + /// OnMouseOver is called every frame while the mouse is over the GUIElement or Collider. + public static IObservable OnMouseOverAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnMouseOverAsObservable(); + } + + /// OnMouseUp is called when the user has released the mouse button. + public static IObservable OnMouseUpAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnMouseUpAsObservable(); + } + + /// OnMouseUpAsButton is only called when the mouse is released over the same GUIElement or Collider as it was pressed. + public static IObservable OnMouseUpAsButtonAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnMouseUpAsButtonAsObservable(); + } + + #endregion + +#endif + + #region ObservableTrigger2DTrigger + + /// Sent when another object enters a trigger collider attached to this object (2D physics only). + public static IObservable OnTriggerEnter2DAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnTriggerEnter2DAsObservable(); + } + + + /// Sent when another object leaves a trigger collider attached to this object (2D physics only). + public static IObservable OnTriggerExit2DAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnTriggerExit2DAsObservable(); + } + + /// Sent each frame where another object is within a trigger collider attached to this object (2D physics only). + public static IObservable OnTriggerStay2DAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnTriggerStay2DAsObservable(); + } + + #endregion + + #region ObservableTriggerTrigger + + /// OnTriggerEnter is called when the Collider other enters the trigger. + public static IObservable OnTriggerEnterAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnTriggerEnterAsObservable(); + } + + + /// OnTriggerExit is called when the Collider other has stopped touching the trigger. + public static IObservable OnTriggerExitAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnTriggerExitAsObservable(); + } + + /// OnTriggerStay is called once per frame for every Collider other that is touching the trigger. + public static IObservable OnTriggerStayAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnTriggerStayAsObservable(); + } + + #endregion + + #region ObservableUpdateTrigger + + /// Update is called every frame, if the MonoBehaviour is enabled. + public static IObservable UpdateAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).UpdateAsObservable(); + } + + #endregion + + #region ObservableVisibleTrigger + + /// OnBecameInvisible is called when the renderer is no longer visible by any camera. + public static IObservable OnBecameInvisibleAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnBecameInvisibleAsObservable(); + } + + /// OnBecameVisible is called when the renderer became visible by any camera. + public static IObservable OnBecameVisibleAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnBecameVisibleAsObservable(); + } + + #endregion + +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + + #region ObservableTransformChangedTrigger + + /// Callback sent to the graphic before a Transform parent change occurs. + public static IObservable OnBeforeTransformParentChangedAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnBeforeTransformParentChangedAsObservable(); + } + + /// This function is called when the parent property of the transform of the GameObject has changed. + public static IObservable OnTransformParentChangedAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnTransformParentChangedAsObservable(); + } + + /// This function is called when the list of children of the transform of the GameObject has changed. + public static IObservable OnTransformChildrenChangedAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnTransformChildrenChangedAsObservable(); + } + + #endregion + + #region ObservableCanvasGroupChangedTrigger + + /// Callback that is sent if the canvas group is changed. + public static IObservable OnCanvasGroupChangedAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnCanvasGroupChangedAsObservable(); + } + + #endregion + + #region ObservableRectTransformTrigger + + /// Callback that is sent if an associated RectTransform has it's dimensions changed. + public static IObservable OnRectTransformDimensionsChangeAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnRectTransformDimensionsChangeAsObservable(); + } + + /// Callback that is sent if an associated RectTransform is removed. + public static IObservable OnRectTransformRemovedAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnRectTransformRemovedAsObservable(); + } + + #endregion +#endif + + #region ObservableParticleTrigger + + /// OnParticleCollision is called when a particle hits a collider. + public static IObservable OnParticleCollisionAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnParticleCollisionAsObservable(); + } + +#if UNITY_5_4_OR_NEWER + + /// OnParticleTrigger is called when any particles in a particle system meet the conditions in the trigger module. + public static IObservable OnParticleTriggerAsObservable(this GameObject gameObject) + { + if (gameObject == null) return Observable.Empty(); + return GetOrAddComponent(gameObject).OnParticleTriggerAsObservable(); + } + +#endif + + #endregion + + + static T GetOrAddComponent(GameObject gameObject) + where T : Component + { + var component = gameObject.GetComponent(); + if (component == null) + { + component = gameObject.AddComponent(); + } + + return component; + } + } +} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs.meta new file mode 100644 index 0000000..830b73d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3ee4df960144b9042874516111cf2d6c +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs new file mode 100644 index 0000000..aa4ddea --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs @@ -0,0 +1,67 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableTriggerTrigger : ObservableTriggerBase + { + Subject onTriggerEnter; + + /// OnTriggerEnter is called when the Collider other enters the trigger. + void OnTriggerEnter(Collider other) + { + if (onTriggerEnter != null) onTriggerEnter.OnNext(other); + } + + /// OnTriggerEnter is called when the Collider other enters the trigger. + public IObservable OnTriggerEnterAsObservable() + { + return onTriggerEnter ?? (onTriggerEnter = new Subject()); + } + + Subject onTriggerExit; + + /// OnTriggerExit is called when the Collider other has stopped touching the trigger. + void OnTriggerExit(Collider other) + { + if (onTriggerExit != null) onTriggerExit.OnNext(other); + } + + /// OnTriggerExit is called when the Collider other has stopped touching the trigger. + public IObservable OnTriggerExitAsObservable() + { + return onTriggerExit ?? (onTriggerExit = new Subject()); + } + + Subject onTriggerStay; + + /// OnTriggerStay is called once per frame for every Collider other that is touching the trigger. + void OnTriggerStay(Collider other) + { + if (onTriggerStay != null) onTriggerStay.OnNext(other); + } + + /// OnTriggerStay is called once per frame for every Collider other that is touching the trigger. + public IObservable OnTriggerStayAsObservable() + { + return onTriggerStay ?? (onTriggerStay = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onTriggerEnter != null) + { + onTriggerEnter.OnCompleted(); + } + if (onTriggerExit != null) + { + onTriggerExit.OnCompleted(); + } + if (onTriggerStay != null) + { + onTriggerStay.OnCompleted(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs.meta new file mode 100644 index 0000000..b5dd3fe --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cadcfd987fed8a044b75709fc19ad0f7 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs new file mode 100644 index 0000000..bc9b624 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs @@ -0,0 +1,36 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; // require keep for Windows Universal App +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableUpdateSelectedTrigger : ObservableTriggerBase, IEventSystemHandler, IUpdateSelectedHandler + { + Subject onUpdateSelected; + + void IUpdateSelectedHandler.OnUpdateSelected(BaseEventData eventData) + { + if (onUpdateSelected != null) onUpdateSelected.OnNext(eventData); + } + + public IObservable OnUpdateSelectedAsObservable() + { + return onUpdateSelected ?? (onUpdateSelected = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onUpdateSelected != null) + { + onUpdateSelected.OnCompleted(); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs.meta new file mode 100644 index 0000000..1f3c83c --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4d207a04db328fd4d970c1457530deb3 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateTrigger.cs new file mode 100644 index 0000000..cbafdba --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateTrigger.cs @@ -0,0 +1,31 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableUpdateTrigger : ObservableTriggerBase + { + Subject update; + + /// Update is called every frame, if the MonoBehaviour is enabled. + void Update() + { + if (update != null) update.OnNext(Unit.Default); + } + + /// Update is called every frame, if the MonoBehaviour is enabled. + public IObservable UpdateAsObservable() + { + return update ?? (update = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (update != null) + { + update.OnCompleted(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateTrigger.cs.meta new file mode 100644 index 0000000..3a2de1a --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ceb5e5014f40d6948815a7be8b174ff2 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableVisibleTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableVisibleTrigger.cs new file mode 100644 index 0000000..f9e5b45 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableVisibleTrigger.cs @@ -0,0 +1,49 @@ +using System; // require keep for Windows Universal App +using UnityEngine; + +namespace UniRx.Triggers +{ + [DisallowMultipleComponent] + public class ObservableVisibleTrigger : ObservableTriggerBase + { + Subject onBecameInvisible; + + /// OnBecameInvisible is called when the renderer is no longer visible by any camera. + void OnBecameInvisible() + { + if (onBecameInvisible != null) onBecameInvisible.OnNext(Unit.Default); + } + + /// OnBecameInvisible is called when the renderer is no longer visible by any camera. + public IObservable OnBecameInvisibleAsObservable() + { + return onBecameInvisible ?? (onBecameInvisible = new Subject()); + } + + Subject onBecameVisible; + + /// OnBecameVisible is called when the renderer became visible by any camera. + void OnBecameVisible() + { + if (onBecameVisible != null) onBecameVisible.OnNext(Unit.Default); + } + + /// OnBecameVisible is called when the renderer became visible by any camera. + public IObservable OnBecameVisibleAsObservable() + { + return onBecameVisible ?? (onBecameVisible = new Subject()); + } + + protected override void RaiseOnCompletedOnDestroy() + { + if (onBecameInvisible != null) + { + onBecameInvisible.OnCompleted(); + } + if (onBecameVisible != null) + { + onBecameVisible.OnCompleted(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableVisibleTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableVisibleTrigger.cs.meta new file mode 100644 index 0000000..9bff2e2 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableVisibleTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 03515121745b2d74c8782ce92eb2a1a0 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityEventExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityEventExtensions.cs new file mode 100644 index 0000000..1476f4d --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityEventExtensions.cs @@ -0,0 +1,58 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; +using System.Collections.Generic; +using System.Text; +using UnityEngine.Events; + +namespace UniRx +{ + public static partial class UnityEventExtensions + { + public static IObservable AsObservable(this UnityEngine.Events.UnityEvent unityEvent) + { + return Observable.FromEvent(h => new UnityAction(h), h => unityEvent.AddListener(h), h => unityEvent.RemoveListener(h)); + } + + public static IObservable AsObservable(this UnityEngine.Events.UnityEvent unityEvent) + { + return Observable.FromEvent, T>(h => new UnityAction(h), h => unityEvent.AddListener(h), h => unityEvent.RemoveListener(h)); + } + + public static IObservable> AsObservable(this UnityEngine.Events.UnityEvent unityEvent) + { + return Observable.FromEvent, Tuple>(h => + { + return new UnityAction((t0, t1) => + { + h(Tuple.Create(t0, t1)); + }); + }, h => unityEvent.AddListener(h), h => unityEvent.RemoveListener(h)); + } + + public static IObservable> AsObservable(this UnityEngine.Events.UnityEvent unityEvent) + { + return Observable.FromEvent, Tuple>(h => + { + return new UnityAction((t0, t1, t2) => + { + h(Tuple.Create(t0, t1, t2)); + }); + }, h => unityEvent.AddListener(h), h => unityEvent.RemoveListener(h)); + } + + public static IObservable> AsObservable(this UnityEngine.Events.UnityEvent unityEvent) + { + return Observable.FromEvent, Tuple>(h => + { + return new UnityAction((t0, t1, t2, t3) => + { + h(Tuple.Create(t0, t1, t2, t3)); + }); + }, h => unityEvent.AddListener(h), h => unityEvent.RemoveListener(h)); + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityEventExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityEventExtensions.cs.meta new file mode 100644 index 0000000..ffe6ade --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityEventExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e3c4861cc04ac524484d0730a3a5bd4a +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs new file mode 100644 index 0000000..3e5ef21 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs @@ -0,0 +1,44 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; +using UnityEngine.Events; +using UnityEngine.UI; + +namespace UniRx +{ + public static partial class UnityGraphicExtensions + { + public static IObservable DirtyLayoutCallbackAsObservable(this Graphic graphic) + { + return Observable.Create(observer => + { + UnityAction registerHandler = () => observer.OnNext(Unit.Default); + graphic.RegisterDirtyLayoutCallback(registerHandler); + return Disposable.Create(() => graphic.UnregisterDirtyLayoutCallback(registerHandler)); + }); + } + + public static IObservable DirtyMaterialCallbackAsObservable(this Graphic graphic) + { + return Observable.Create(observer => + { + UnityAction registerHandler = () => observer.OnNext(Unit.Default); + graphic.RegisterDirtyMaterialCallback(registerHandler); + return Disposable.Create(() => graphic.UnregisterDirtyMaterialCallback(registerHandler)); + }); + } + + public static IObservable DirtyVerticesCallbackAsObservable(this Graphic graphic) + { + return Observable.Create(observer => + { + UnityAction registerHandler = () => observer.OnNext(Unit.Default); + graphic.RegisterDirtyVerticesCallback(registerHandler); + return Disposable.Create(() => graphic.UnregisterDirtyVerticesCallback(registerHandler)); + }); + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs.meta new file mode 100644 index 0000000..e52e1b3 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 99be646df339108498ebb70efa1b7bd4 +timeCreated: 1455373900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs new file mode 100644 index 0000000..8a02cb1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs @@ -0,0 +1,123 @@ +// for uGUI(from 4.6) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) + +using System; +using UnityEngine; +using UnityEngine.UI; + +namespace UniRx +{ + public static partial class UnityUIComponentExtensions + { + public static IDisposable SubscribeToText(this IObservable source, Text text) + { + return source.SubscribeWithState(text, (x, t) => t.text = x); + } + + public static IDisposable SubscribeToText(this IObservable source, Text text) + { + return source.SubscribeWithState(text, (x, t) => t.text = x.ToString()); + } + + public static IDisposable SubscribeToText(this IObservable source, Text text, Func selector) + { + return source.SubscribeWithState2(text, selector, (x, t, s) => t.text = s(x)); + } + + public static IDisposable SubscribeToInteractable(this IObservable source, Selectable selectable) + { + return source.SubscribeWithState(selectable, (x, s) => s.interactable = x); + } + + /// Observe onClick event. + public static IObservable OnClickAsObservable(this Button button) + { + return button.onClick.AsObservable(); + } + + /// Observe onValueChanged with current `isOn` value on subscribe. + public static IObservable OnValueChangedAsObservable(this Toggle toggle) + { + // Optimized Defer + StartWith + return Observable.CreateWithState(toggle, (t, observer) => + { + observer.OnNext(t.isOn); + return t.onValueChanged.AsObservable().Subscribe(observer); + }); + } + + /// Observe onValueChanged with current `value` on subscribe. + public static IObservable OnValueChangedAsObservable(this Scrollbar scrollbar) + { + return Observable.CreateWithState(scrollbar, (s, observer) => + { + observer.OnNext(s.value); + return s.onValueChanged.AsObservable().Subscribe(observer); + }); + } + + /// Observe onValueChanged with current `normalizedPosition` value on subscribe. + public static IObservable OnValueChangedAsObservable(this ScrollRect scrollRect) + { + return Observable.CreateWithState(scrollRect, (s, observer) => + { + observer.OnNext(s.normalizedPosition); + return s.onValueChanged.AsObservable().Subscribe(observer); + }); + } + + /// Observe onValueChanged with current `value` on subscribe. + public static IObservable OnValueChangedAsObservable(this Slider slider) + { + return Observable.CreateWithState(slider, (s, observer) => + { + observer.OnNext(s.value); + return s.onValueChanged.AsObservable().Subscribe(observer); + }); + } + + /// Observe onEndEdit(Submit) event. + public static IObservable OnEndEditAsObservable(this InputField inputField) + { + return inputField.onEndEdit.AsObservable(); + } + +#if (UNITY_4_6 || UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2) + /// Observe onValueChange with current `text` value on subscribe. + public static IObservable OnValueChangeAsObservable(this InputField inputField) + { + return Observable.CreateWithState(inputField, (i, observer) => + { + observer.OnNext(i.text); + return i.onValueChange.AsObservable().Subscribe(observer); + }); + } +#else + /// Observe onValueChanged with current `text` value on subscribe. + public static IObservable OnValueChangedAsObservable(this InputField inputField) + { + return Observable.CreateWithState(inputField, (i, observer) => + { + observer.OnNext(i.text); + return i.onValueChanged.AsObservable().Subscribe(observer); + }); + } +#endif + +#if UNITY_5_3_OR_NEWER + + /// Observe onValueChanged with current `value` on subscribe. + public static IObservable OnValueChangedAsObservable(this Dropdown dropdown) + { + return Observable.CreateWithState(dropdown, (d, observer) => + { + observer.OnNext(d.value); + return d.onValueChanged.AsObservable().Subscribe(observer); + }); + } + +#endif + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs.meta new file mode 100644 index 0000000..30075fd --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7645084659bc779448e384456805d251 +timeCreated: 1455373899 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/YieldInstructionCache.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/YieldInstructionCache.cs new file mode 100644 index 0000000..60d3a5e --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/YieldInstructionCache.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace UniRx +{ + internal static class YieldInstructionCache + { + public static readonly WaitForEndOfFrame WaitForEndOfFrame = new WaitForEndOfFrame(); + public static readonly WaitForFixedUpdate WaitForFixedUpdate = new WaitForFixedUpdate(); + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/YieldInstructionCache.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/YieldInstructionCache.cs.meta new file mode 100644 index 0000000..9fac1b1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/YieldInstructionCache.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2493deaccf35b0542800b0851771e665 +timeCreated: 1455373897 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge.meta b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge.meta new file mode 100644 index 0000000..281baf1 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d12796f0864f41a43b88605f6d00d017 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/Thread.cs b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/Thread.cs new file mode 100644 index 0000000..376d5f5 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/Thread.cs @@ -0,0 +1,26 @@ +#if UNITY_METRO + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; + +namespace UniRx +{ + public static class Thread + { + public static void Sleep(TimeSpan wait) + { + new System.Threading.ManualResetEvent(false).WaitOne(wait); + } + + public static void Sleep(int ms) + { + new System.Threading.ManualResetEvent(false).WaitOne(ms); + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/Thread.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/Thread.cs.meta new file mode 100644 index 0000000..a46af85 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/Thread.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bf1175d5dd9b5904d898eb4c9dd7e0c5 +timeCreated: 1455373901 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/ThreadPoolScheduler_UnityWinRT.cs b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/ThreadPoolScheduler_UnityWinRT.cs new file mode 100644 index 0000000..cdbd1d9 --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/ThreadPoolScheduler_UnityWinRT.cs @@ -0,0 +1,100 @@ +#if UNITY_METRO + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; + +#if NETFX_CORE +using System.Threading.Tasks; +#endif + +namespace UniRx +{ + public static partial class Scheduler + { + public static readonly IScheduler ThreadPool = new ThreadPoolScheduler(); + + class ThreadPoolScheduler : IScheduler + { + public DateTimeOffset Now + { + get { return Scheduler.Now; } + } + + public IDisposable Schedule(Action action) + { + var d = new BooleanDisposable(); +#if NETFX_CORE + + Task.Run(()=> + { + if (!d.IsDisposed) + { + action(); + } + }); + +#else + Action act = () => + { + if (!d.IsDisposed) + { + action(); + } + }; + + act.BeginInvoke(ar => act.EndInvoke(ar), null); + +#endif + + return d; + } + + public IDisposable Schedule(TimeSpan dueTime, Action action) + { + var wait = Scheduler.Normalize(dueTime); + + var d = new BooleanDisposable(); + +#if NETFX_CORE + + Task.Run(()=> + { + if (!d.IsDisposed) + { + if (wait.Ticks > 0) + { + Thread.Sleep(wait); + } + action(); + } + }); + +#else + + Action act = () => + { + if (!d.IsDisposed) + { + if (wait.Ticks > 0) + { + Thread.Sleep(wait); + } + action(); + } + }; + + act.BeginInvoke(ar => act.EndInvoke(ar), null); + +#endif + + return d; + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/ThreadPoolScheduler_UnityWinRT.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/ThreadPoolScheduler_UnityWinRT.cs.meta new file mode 100644 index 0000000..dfa8aab --- /dev/null +++ b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/ThreadPoolScheduler_UnityWinRT.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2c36c9256c17bbb40854ef9b9e4d51c7 +timeCreated: 1455373898 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask.meta b/Assets/Plugins/UniTask.meta new file mode 100644 index 0000000..0d77e1b --- /dev/null +++ b/Assets/Plugins/UniTask.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 978d72d01e05f6248a839ce3c23dea47 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Editor.meta b/Assets/Plugins/UniTask/Editor.meta new file mode 100644 index 0000000..f6bb5d8 --- /dev/null +++ b/Assets/Plugins/UniTask/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1eaecbfd29eb8df478ec473b6e585ec7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Editor/SplitterGUILayout.cs b/Assets/Plugins/UniTask/Editor/SplitterGUILayout.cs new file mode 100644 index 0000000..4189133 --- /dev/null +++ b/Assets/Plugins/UniTask/Editor/SplitterGUILayout.cs @@ -0,0 +1,62 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Linq; +using System.Reflection; +using UnityEditor; +using UnityEngine; + +namespace Cysharp.Threading.Tasks.Editor +{ + // reflection call of UnityEditor.SplitterGUILayout + internal static class SplitterGUILayout + { + static BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static; + + static Lazy splitterStateType = new Lazy(() => + { + var type = typeof(EditorWindow).Assembly.GetTypes().First(x => x.FullName == "UnityEditor.SplitterState"); + return type; + }); + + static Lazy splitterStateCtor = new Lazy(() => + { + var type = splitterStateType.Value; + return type.GetConstructor(flags, null, new Type[] { typeof(float[]), typeof(int[]), typeof(int[]) }, null); + }); + + static Lazy splitterGUILayoutType = new Lazy(() => + { + var type = typeof(EditorWindow).Assembly.GetTypes().First(x => x.FullName == "UnityEditor.SplitterGUILayout"); + return type; + }); + + static Lazy beginVerticalSplit = new Lazy(() => + { + var type = splitterGUILayoutType.Value; + return type.GetMethod("BeginVerticalSplit", flags, null, new Type[] { splitterStateType.Value, typeof(GUILayoutOption[]) }, null); + }); + + static Lazy endVerticalSplit = new Lazy(() => + { + var type = splitterGUILayoutType.Value; + return type.GetMethod("EndVerticalSplit", flags, null, Type.EmptyTypes, null); + }); + + public static object CreateSplitterState(float[] relativeSizes, int[] minSizes, int[] maxSizes) + { + return splitterStateCtor.Value.Invoke(new object[] { relativeSizes, minSizes, maxSizes }); + } + + public static void BeginVerticalSplit(object splitterState, params GUILayoutOption[] options) + { + beginVerticalSplit.Value.Invoke(null, new object[] { splitterState, options }); + } + + public static void EndVerticalSplit() + { + endVerticalSplit.Value.Invoke(null, Type.EmptyTypes); + } + } +} + diff --git a/Assets/Plugins/UniTask/Editor/SplitterGUILayout.cs.meta b/Assets/Plugins/UniTask/Editor/SplitterGUILayout.cs.meta new file mode 100644 index 0000000..4d718f4 --- /dev/null +++ b/Assets/Plugins/UniTask/Editor/SplitterGUILayout.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 40ef2e46f900131419e869398a8d3c9d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Editor/UniTask.Editor.asmdef b/Assets/Plugins/UniTask/Editor/UniTask.Editor.asmdef new file mode 100644 index 0000000..c618c6a --- /dev/null +++ b/Assets/Plugins/UniTask/Editor/UniTask.Editor.asmdef @@ -0,0 +1,17 @@ +{ + "name": "UniTask.Editor", + "references": [ + "UniTask" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": false, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Editor/UniTask.Editor.asmdef.meta b/Assets/Plugins/UniTask/Editor/UniTask.Editor.asmdef.meta new file mode 100644 index 0000000..821b87b --- /dev/null +++ b/Assets/Plugins/UniTask/Editor/UniTask.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4129704b5a1a13841ba16f230bf24a57 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Editor/UniTaskTrackerTreeView.cs b/Assets/Plugins/UniTask/Editor/UniTaskTrackerTreeView.cs new file mode 100644 index 0000000..e7b6269 --- /dev/null +++ b/Assets/Plugins/UniTask/Editor/UniTaskTrackerTreeView.cs @@ -0,0 +1,182 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using UnityEngine; +using UnityEditor; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System; +using UnityEditor.IMGUI.Controls; +using Cysharp.Threading.Tasks.Internal; +using System.Text; +using System.Text.RegularExpressions; + +namespace Cysharp.Threading.Tasks.Editor +{ + public class UniTaskTrackerViewItem : TreeViewItem + { + static Regex removeHref = new Regex("(.+)", RegexOptions.Compiled); + + public string TaskType { get; set; } + public string Elapsed { get; set; } + public string Status { get; set; } + + string position; + public string Position + { + get { return position; } + set + { + position = value; + PositionFirstLine = GetFirstLine(position); + } + } + + public string PositionFirstLine { get; private set; } + + static string GetFirstLine(string str) + { + var sb = new StringBuilder(); + for (int i = 0; i < str.Length; i++) + { + if (str[i] == '\r' || str[i] == '\n') + { + break; + } + sb.Append(str[i]); + } + + return removeHref.Replace(sb.ToString(), "$1"); + } + + public UniTaskTrackerViewItem(int id) : base(id) + { + + } + } + + public class UniTaskTrackerTreeView : TreeView + { + const string sortedColumnIndexStateKey = "UniTaskTrackerTreeView_sortedColumnIndex"; + + public IReadOnlyList CurrentBindingItems; + + public UniTaskTrackerTreeView() + : this(new TreeViewState(), new MultiColumnHeader(new MultiColumnHeaderState(new[] + { + new MultiColumnHeaderState.Column() { headerContent = new GUIContent("TaskType"), width = 20}, + new MultiColumnHeaderState.Column() { headerContent = new GUIContent("Elapsed"), width = 10}, + new MultiColumnHeaderState.Column() { headerContent = new GUIContent("Status"), width = 10}, + new MultiColumnHeaderState.Column() { headerContent = new GUIContent("Position")}, + }))) + { + } + + UniTaskTrackerTreeView(TreeViewState state, MultiColumnHeader header) + : base(state, header) + { + rowHeight = 20; + showAlternatingRowBackgrounds = true; + showBorder = true; + header.sortingChanged += Header_sortingChanged; + + header.ResizeToFit(); + Reload(); + + header.sortedColumnIndex = SessionState.GetInt(sortedColumnIndexStateKey, 1); + } + + public void ReloadAndSort() + { + var currentSelected = this.state.selectedIDs; + Reload(); + Header_sortingChanged(this.multiColumnHeader); + this.state.selectedIDs = currentSelected; + } + + private void Header_sortingChanged(MultiColumnHeader multiColumnHeader) + { + SessionState.SetInt(sortedColumnIndexStateKey, multiColumnHeader.sortedColumnIndex); + var index = multiColumnHeader.sortedColumnIndex; + var ascending = multiColumnHeader.IsSortedAscending(multiColumnHeader.sortedColumnIndex); + + var items = rootItem.children.Cast(); + + IOrderedEnumerable orderedEnumerable; + switch (index) + { + case 0: + orderedEnumerable = ascending ? items.OrderBy(item => item.TaskType) : items.OrderByDescending(item => item.TaskType); + break; + case 1: + orderedEnumerable = ascending ? items.OrderBy(item => double.Parse(item.Elapsed)) : items.OrderByDescending(item => double.Parse(item.Elapsed)); + break; + case 2: + orderedEnumerable = ascending ? items.OrderBy(item => item.Status) : items.OrderByDescending(item => item.Elapsed); + break; + case 3: + orderedEnumerable = ascending ? items.OrderBy(item => item.Position) : items.OrderByDescending(item => item.PositionFirstLine); + break; + default: + throw new ArgumentOutOfRangeException(nameof(index), index, null); + } + + CurrentBindingItems = rootItem.children = orderedEnumerable.Cast().ToList(); + BuildRows(rootItem); + } + + protected override TreeViewItem BuildRoot() + { + var root = new TreeViewItem { depth = -1 }; + + var children = new List(); + + TaskTracker.ForEachActiveTask((trackingId, awaiterType, status, created, stackTrace) => + { + children.Add(new UniTaskTrackerViewItem(trackingId) { TaskType = awaiterType, Status = status.ToString(), Elapsed = (DateTime.UtcNow - created).TotalSeconds.ToString("00.00"), Position = stackTrace }); + }); + + CurrentBindingItems = children; + root.children = CurrentBindingItems as List; + return root; + } + + protected override bool CanMultiSelect(TreeViewItem item) + { + return false; + } + + protected override void RowGUI(RowGUIArgs args) + { + var item = args.item as UniTaskTrackerViewItem; + + for (var visibleColumnIndex = 0; visibleColumnIndex < args.GetNumVisibleColumns(); visibleColumnIndex++) + { + var rect = args.GetCellRect(visibleColumnIndex); + var columnIndex = args.GetColumn(visibleColumnIndex); + + var labelStyle = args.selected ? EditorStyles.whiteLabel : EditorStyles.label; + labelStyle.alignment = TextAnchor.MiddleLeft; + switch (columnIndex) + { + case 0: + EditorGUI.LabelField(rect, item.TaskType, labelStyle); + break; + case 1: + EditorGUI.LabelField(rect, item.Elapsed, labelStyle); + break; + case 2: + EditorGUI.LabelField(rect, item.Status, labelStyle); + break; + case 3: + EditorGUI.LabelField(rect, item.PositionFirstLine, labelStyle); + break; + default: + throw new ArgumentOutOfRangeException(nameof(columnIndex), columnIndex, null); + } + } + } + } + +} + diff --git a/Assets/Plugins/UniTask/Editor/UniTaskTrackerTreeView.cs.meta b/Assets/Plugins/UniTask/Editor/UniTaskTrackerTreeView.cs.meta new file mode 100644 index 0000000..9b34d7b --- /dev/null +++ b/Assets/Plugins/UniTask/Editor/UniTaskTrackerTreeView.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 52e2d973a2156674e8c1c9433ed031f7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Editor/UniTaskTrackerWindow.cs b/Assets/Plugins/UniTask/Editor/UniTaskTrackerWindow.cs new file mode 100644 index 0000000..242ac6d --- /dev/null +++ b/Assets/Plugins/UniTask/Editor/UniTaskTrackerWindow.cs @@ -0,0 +1,209 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using UnityEngine; +using UnityEditor; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System; +using UnityEditor.IMGUI.Controls; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks.Editor +{ + public class UniTaskTrackerWindow : EditorWindow + { + static int interval; + + static UniTaskTrackerWindow window; + + [MenuItem("Window/UniTask Tracker")] + public static void OpenWindow() + { + if (window != null) + { + window.Close(); + } + + // will called OnEnable(singleton instance will be set). + GetWindow("UniTask Tracker").Show(); + } + + static readonly GUILayoutOption[] EmptyLayoutOption = new GUILayoutOption[0]; + + UniTaskTrackerTreeView treeView; + object splitterState; + + void OnEnable() + { + window = this; // set singleton. + splitterState = SplitterGUILayout.CreateSplitterState(new float[] { 75f, 25f }, new int[] { 32, 32 }, null); + treeView = new UniTaskTrackerTreeView(); + TaskTracker.EditorEnableState.EnableAutoReload = EditorPrefs.GetBool(TaskTracker.EnableAutoReloadKey, false); + TaskTracker.EditorEnableState.EnableTracking = EditorPrefs.GetBool(TaskTracker.EnableTrackingKey, false); + TaskTracker.EditorEnableState.EnableStackTrace = EditorPrefs.GetBool(TaskTracker.EnableStackTraceKey, false); + } + + void OnGUI() + { + // Head + RenderHeadPanel(); + + // Splittable + SplitterGUILayout.BeginVerticalSplit(this.splitterState, EmptyLayoutOption); + { + // Column Tabble + RenderTable(); + + // StackTrace details + RenderDetailsPanel(); + } + SplitterGUILayout.EndVerticalSplit(); + } + + #region HeadPanel + + public static bool EnableAutoReload => TaskTracker.EditorEnableState.EnableAutoReload; + public static bool EnableTracking => TaskTracker.EditorEnableState.EnableTracking; + public static bool EnableStackTrace => TaskTracker.EditorEnableState.EnableStackTrace; + static readonly GUIContent EnableAutoReloadHeadContent = EditorGUIUtility.TrTextContent("Enable AutoReload", "Reload automatically.", (Texture)null); + static readonly GUIContent ReloadHeadContent = EditorGUIUtility.TrTextContent("Reload", "Reload View.", (Texture)null); + static readonly GUIContent GCHeadContent = EditorGUIUtility.TrTextContent("GC.Collect", "Invoke GC.Collect.", (Texture)null); + static readonly GUIContent EnableTrackingHeadContent = EditorGUIUtility.TrTextContent("Enable Tracking", "Start to track async/await UniTask. Performance impact: low", (Texture)null); + static readonly GUIContent EnableStackTraceHeadContent = EditorGUIUtility.TrTextContent("Enable StackTrace", "Capture StackTrace when task is started. Performance impact: high", (Texture)null); + + // [Enable Tracking] | [Enable StackTrace] + void RenderHeadPanel() + { + EditorGUILayout.BeginVertical(EmptyLayoutOption); + EditorGUILayout.BeginHorizontal(EditorStyles.toolbar, EmptyLayoutOption); + + if (GUILayout.Toggle(EnableAutoReload, EnableAutoReloadHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption) != EnableAutoReload) + { + TaskTracker.EditorEnableState.EnableAutoReload = !EnableAutoReload; + } + + if (GUILayout.Toggle(EnableTracking, EnableTrackingHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption) != EnableTracking) + { + TaskTracker.EditorEnableState.EnableTracking = !EnableTracking; + } + + if (GUILayout.Toggle(EnableStackTrace, EnableStackTraceHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption) != EnableStackTrace) + { + TaskTracker.EditorEnableState.EnableStackTrace = !EnableStackTrace; + } + + GUILayout.FlexibleSpace(); + + if (GUILayout.Button(ReloadHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption)) + { + TaskTracker.CheckAndResetDirty(); + treeView.ReloadAndSort(); + Repaint(); + } + + if (GUILayout.Button(GCHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption)) + { + GC.Collect(0); + } + + EditorGUILayout.EndHorizontal(); + EditorGUILayout.EndVertical(); + } + + #endregion + + #region TableColumn + + Vector2 tableScroll; + GUIStyle tableListStyle; + + void RenderTable() + { + if (tableListStyle == null) + { + tableListStyle = new GUIStyle("CN Box"); + tableListStyle.margin.top = 0; + tableListStyle.padding.left = 3; + } + + EditorGUILayout.BeginVertical(tableListStyle, EmptyLayoutOption); + + this.tableScroll = EditorGUILayout.BeginScrollView(this.tableScroll, new GUILayoutOption[] + { + GUILayout.ExpandWidth(true), + GUILayout.MaxWidth(2000f) + }); + var controlRect = EditorGUILayout.GetControlRect(new GUILayoutOption[] + { + GUILayout.ExpandHeight(true), + GUILayout.ExpandWidth(true) + }); + + + treeView?.OnGUI(controlRect); + + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); + } + + private void Update() + { + if (EnableAutoReload) + { + if (interval++ % 120 == 0) + { + if (TaskTracker.CheckAndResetDirty()) + { + treeView.ReloadAndSort(); + Repaint(); + } + } + } + } + + #endregion + + #region Details + + static GUIStyle detailsStyle; + Vector2 detailsScroll; + + void RenderDetailsPanel() + { + if (detailsStyle == null) + { + detailsStyle = new GUIStyle("CN Message"); + detailsStyle.wordWrap = false; + detailsStyle.stretchHeight = true; + detailsStyle.margin.right = 15; + } + + string message = ""; + var selected = treeView.state.selectedIDs; + if (selected.Count > 0) + { + var first = selected[0]; + var item = treeView.CurrentBindingItems.FirstOrDefault(x => x.id == first) as UniTaskTrackerViewItem; + if (item != null) + { + message = item.Position; + } + } + + detailsScroll = EditorGUILayout.BeginScrollView(this.detailsScroll, EmptyLayoutOption); + var vector = detailsStyle.CalcSize(new GUIContent(message)); + EditorGUILayout.SelectableLabel(message, detailsStyle, new GUILayoutOption[] + { + GUILayout.ExpandHeight(true), + GUILayout.ExpandWidth(true), + GUILayout.MinWidth(vector.x), + GUILayout.MinHeight(vector.y) + }); + EditorGUILayout.EndScrollView(); + } + + #endregion + } +} + diff --git a/Assets/Plugins/UniTask/Editor/UniTaskTrackerWindow.cs.meta b/Assets/Plugins/UniTask/Editor/UniTaskTrackerWindow.cs.meta new file mode 100644 index 0000000..ba1b704 --- /dev/null +++ b/Assets/Plugins/UniTask/Editor/UniTaskTrackerWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5bee3e3860e37484aa3b861bf76d129f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime.meta b/Assets/Plugins/UniTask/Runtime.meta new file mode 100644 index 0000000..18c717c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ffd723e4ed947044389956235b11e810 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/AsyncLazy.cs b/Assets/Plugins/UniTask/Runtime/AsyncLazy.cs new file mode 100644 index 0000000..51bfadc --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/AsyncLazy.cs @@ -0,0 +1,245 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + public class AsyncLazy + { + static Action continuation = SetCompletionSource; + + Func taskFactory; + UniTaskCompletionSource completionSource; + UniTask.Awaiter awaiter; + + object syncLock; + bool initialized; + + public AsyncLazy(Func taskFactory) + { + this.taskFactory = taskFactory; + this.completionSource = new UniTaskCompletionSource(); + this.syncLock = new object(); + this.initialized = false; + } + + internal AsyncLazy(UniTask task) + { + this.taskFactory = null; + this.completionSource = new UniTaskCompletionSource(); + this.syncLock = null; + this.initialized = true; + + var awaiter = task.GetAwaiter(); + if (awaiter.IsCompleted) + { + SetCompletionSource(awaiter); + } + else + { + this.awaiter = awaiter; + awaiter.SourceOnCompleted(continuation, this); + } + } + + public UniTask Task + { + get + { + EnsureInitialized(); + return completionSource.Task; + } + } + + + public UniTask.Awaiter GetAwaiter() => Task.GetAwaiter(); + + void EnsureInitialized() + { + if (Volatile.Read(ref initialized)) + { + return; + } + + EnsureInitializedCore(); + } + + void EnsureInitializedCore() + { + lock (syncLock) + { + if (!Volatile.Read(ref initialized)) + { + var f = Interlocked.Exchange(ref taskFactory, null); + if (f != null) + { + var task = f(); + var awaiter = task.GetAwaiter(); + if (awaiter.IsCompleted) + { + SetCompletionSource(awaiter); + } + else + { + this.awaiter = awaiter; + awaiter.SourceOnCompleted(continuation, this); + } + + Volatile.Write(ref initialized, true); + } + } + } + } + + void SetCompletionSource(in UniTask.Awaiter awaiter) + { + try + { + awaiter.GetResult(); + completionSource.TrySetResult(); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + static void SetCompletionSource(object state) + { + var self = (AsyncLazy)state; + try + { + self.awaiter.GetResult(); + self.completionSource.TrySetResult(); + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + } + finally + { + self.awaiter = default; + } + } + } + + public class AsyncLazy + { + static Action continuation = SetCompletionSource; + + Func> taskFactory; + UniTaskCompletionSource completionSource; + UniTask.Awaiter awaiter; + + object syncLock; + bool initialized; + + public AsyncLazy(Func> taskFactory) + { + this.taskFactory = taskFactory; + this.completionSource = new UniTaskCompletionSource(); + this.syncLock = new object(); + this.initialized = false; + } + + internal AsyncLazy(UniTask task) + { + this.taskFactory = null; + this.completionSource = new UniTaskCompletionSource(); + this.syncLock = null; + this.initialized = true; + + var awaiter = task.GetAwaiter(); + if (awaiter.IsCompleted) + { + SetCompletionSource(awaiter); + } + else + { + this.awaiter = awaiter; + awaiter.SourceOnCompleted(continuation, this); + } + } + + public UniTask Task + { + get + { + EnsureInitialized(); + return completionSource.Task; + } + } + + + public UniTask.Awaiter GetAwaiter() => Task.GetAwaiter(); + + void EnsureInitialized() + { + if (Volatile.Read(ref initialized)) + { + return; + } + + EnsureInitializedCore(); + } + + void EnsureInitializedCore() + { + lock (syncLock) + { + if (!Volatile.Read(ref initialized)) + { + var f = Interlocked.Exchange(ref taskFactory, null); + if (f != null) + { + var task = f(); + var awaiter = task.GetAwaiter(); + if (awaiter.IsCompleted) + { + SetCompletionSource(awaiter); + } + else + { + this.awaiter = awaiter; + awaiter.SourceOnCompleted(continuation, this); + } + + Volatile.Write(ref initialized, true); + } + } + } + } + + void SetCompletionSource(in UniTask.Awaiter awaiter) + { + try + { + var result = awaiter.GetResult(); + completionSource.TrySetResult(result); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + static void SetCompletionSource(object state) + { + var self = (AsyncLazy)state; + try + { + var result = self.awaiter.GetResult(); + self.completionSource.TrySetResult(result); + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + } + finally + { + self.awaiter = default; + } + } + } +} diff --git a/Assets/Plugins/UniTask/Runtime/AsyncLazy.cs.meta b/Assets/Plugins/UniTask/Runtime/AsyncLazy.cs.meta new file mode 100644 index 0000000..554d162 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/AsyncLazy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 01d1404ca421466419a7db7340ff5e77 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/AsyncReactiveProperty.cs b/Assets/Plugins/UniTask/Runtime/AsyncReactiveProperty.cs new file mode 100644 index 0000000..a08844d --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/AsyncReactiveProperty.cs @@ -0,0 +1,644 @@ +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + public interface IReadOnlyAsyncReactiveProperty : IUniTaskAsyncEnumerable + { + T Value { get; } + IUniTaskAsyncEnumerable WithoutCurrent(); + UniTask WaitAsync(CancellationToken cancellationToken = default); + } + + public interface IAsyncReactiveProperty : IReadOnlyAsyncReactiveProperty + { + new T Value { get; set; } + } + + [Serializable] + public class AsyncReactiveProperty : IAsyncReactiveProperty, IDisposable + { + TriggerEvent triggerEvent; + +#if UNITY_2018_3_OR_NEWER + [UnityEngine.SerializeField] +#endif + T latestValue; + + public T Value + { + get + { + return latestValue; + } + set + { + this.latestValue = value; + triggerEvent.SetResult(value); + } + } + + public AsyncReactiveProperty(T value) + { + this.latestValue = value; + this.triggerEvent = default; + } + + public IUniTaskAsyncEnumerable WithoutCurrent() + { + return new WithoutCurrentEnumerable(this); + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken) + { + return new Enumerator(this, cancellationToken, true); + } + + public void Dispose() + { + triggerEvent.SetCompleted(); + } + + public static implicit operator T(AsyncReactiveProperty value) + { + return value.Value; + } + + public override string ToString() + { + if (isValueType) return latestValue.ToString(); + return latestValue?.ToString(); + } + + public UniTask WaitAsync(CancellationToken cancellationToken = default) + { + return new UniTask(WaitAsyncSource.Create(this, cancellationToken, out var token), token); + } + + static bool isValueType; + + static AsyncReactiveProperty() + { + isValueType = typeof(T).IsValueType; + } + + sealed class WaitAsyncSource : IUniTaskSource, ITriggerHandler, ITaskPoolNode + { + static Action cancellationCallback = CancellationCallback; + + static TaskPool pool; + WaitAsyncSource nextNode; + ref WaitAsyncSource ITaskPoolNode.NextNode => ref nextNode; + + static WaitAsyncSource() + { + TaskPool.RegisterSizeGetter(typeof(WaitAsyncSource), () => pool.Size); + } + + AsyncReactiveProperty parent; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + UniTaskCompletionSourceCore core; + + WaitAsyncSource() + { + } + + public static IUniTaskSource Create(AsyncReactiveProperty parent, CancellationToken cancellationToken, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new WaitAsyncSource(); + } + + result.parent = parent; + result.cancellationToken = cancellationToken; + + if (cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(cancellationCallback, result); + } + + result.parent.triggerEvent.Add(result); + + TaskTracker.TrackActiveTask(result, 3); + + token = result.core.Version; + return result; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + cancellationTokenRegistration.Dispose(); + cancellationTokenRegistration = default; + parent.triggerEvent.Remove(this); + parent = null; + cancellationToken = default; + return pool.TryPush(this); + } + + static void CancellationCallback(object state) + { + var self = (WaitAsyncSource)state; + self.OnCanceled(self.cancellationToken); + } + + // IUniTaskSource + + public T GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { + TryReturn(); + } + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + // ITriggerHandler + + ITriggerHandler ITriggerHandler.Prev { get; set; } + ITriggerHandler ITriggerHandler.Next { get; set; } + + public void OnCanceled(CancellationToken cancellationToken) + { + core.TrySetCanceled(cancellationToken); + } + + public void OnCompleted() + { + // Complete as Cancel. + core.TrySetCanceled(CancellationToken.None); + } + + public void OnError(Exception ex) + { + core.TrySetException(ex); + } + + public void OnNext(T value) + { + core.TrySetResult(value); + } + } + + sealed class WithoutCurrentEnumerable : IUniTaskAsyncEnumerable + { + readonly AsyncReactiveProperty parent; + + public WithoutCurrentEnumerable(AsyncReactiveProperty parent) + { + this.parent = parent; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new Enumerator(parent, cancellationToken, false); + } + } + + sealed class Enumerator : MoveNextSource, IUniTaskAsyncEnumerator, ITriggerHandler + { + static Action cancellationCallback = CancellationCallback; + + readonly AsyncReactiveProperty parent; + readonly CancellationToken cancellationToken; + readonly CancellationTokenRegistration cancellationTokenRegistration; + T value; + bool isDisposed; + bool firstCall; + + public Enumerator(AsyncReactiveProperty parent, CancellationToken cancellationToken, bool publishCurrentValue) + { + this.parent = parent; + this.cancellationToken = cancellationToken; + this.firstCall = publishCurrentValue; + + parent.triggerEvent.Add(this); + TaskTracker.TrackActiveTask(this, 3); + + if (cancellationToken.CanBeCanceled) + { + cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(cancellationCallback, this); + } + } + + public T Current => value; + + ITriggerHandler ITriggerHandler.Prev { get; set; } + ITriggerHandler ITriggerHandler.Next { get; set; } + + public UniTask MoveNextAsync() + { + // raise latest value on first call. + if (firstCall) + { + firstCall = false; + value = parent.Value; + return CompletedTasks.True; + } + + completionSource.Reset(); + return new UniTask(this, completionSource.Version); + } + + public UniTask DisposeAsync() + { + if (!isDisposed) + { + isDisposed = true; + TaskTracker.RemoveTracking(this); + completionSource.TrySetCanceled(cancellationToken); + parent.triggerEvent.Remove(this); + } + return default; + } + + public void OnNext(T value) + { + this.value = value; + completionSource.TrySetResult(true); + } + + public void OnCanceled(CancellationToken cancellationToken) + { + DisposeAsync().Forget(); + } + + public void OnCompleted() + { + completionSource.TrySetResult(false); + } + + public void OnError(Exception ex) + { + completionSource.TrySetException(ex); + } + + static void CancellationCallback(object state) + { + var self = (Enumerator)state; + self.DisposeAsync().Forget(); + } + } + } + + public class ReadOnlyAsyncReactiveProperty : IReadOnlyAsyncReactiveProperty, IDisposable + { + TriggerEvent triggerEvent; + + T latestValue; + IUniTaskAsyncEnumerator enumerator; + + public T Value + { + get + { + return latestValue; + } + } + + public ReadOnlyAsyncReactiveProperty(T initialValue, IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + latestValue = initialValue; + ConsumeEnumerator(source, cancellationToken).Forget(); + } + + public ReadOnlyAsyncReactiveProperty(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + ConsumeEnumerator(source, cancellationToken).Forget(); + } + + async UniTaskVoid ConsumeEnumerator(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + enumerator = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await enumerator.MoveNextAsync()) + { + var value = enumerator.Current; + this.latestValue = value; + triggerEvent.SetResult(value); + } + } + finally + { + await enumerator.DisposeAsync(); + enumerator = null; + } + } + + public IUniTaskAsyncEnumerable WithoutCurrent() + { + return new WithoutCurrentEnumerable(this); + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken) + { + return new Enumerator(this, cancellationToken, true); + } + + public void Dispose() + { + if (enumerator != null) + { + enumerator.DisposeAsync().Forget(); + } + + triggerEvent.SetCompleted(); + } + + public static implicit operator T(ReadOnlyAsyncReactiveProperty value) + { + return value.Value; + } + + public override string ToString() + { + if (isValueType) return latestValue.ToString(); + return latestValue?.ToString(); + } + + public UniTask WaitAsync(CancellationToken cancellationToken = default) + { + return new UniTask(WaitAsyncSource.Create(this, cancellationToken, out var token), token); + } + + static bool isValueType; + + static ReadOnlyAsyncReactiveProperty() + { + isValueType = typeof(T).IsValueType; + } + + sealed class WaitAsyncSource : IUniTaskSource, ITriggerHandler, ITaskPoolNode + { + static Action cancellationCallback = CancellationCallback; + + static TaskPool pool; + WaitAsyncSource nextNode; + ref WaitAsyncSource ITaskPoolNode.NextNode => ref nextNode; + + static WaitAsyncSource() + { + TaskPool.RegisterSizeGetter(typeof(WaitAsyncSource), () => pool.Size); + } + + ReadOnlyAsyncReactiveProperty parent; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + UniTaskCompletionSourceCore core; + + WaitAsyncSource() + { + } + + public static IUniTaskSource Create(ReadOnlyAsyncReactiveProperty parent, CancellationToken cancellationToken, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new WaitAsyncSource(); + } + + result.parent = parent; + result.cancellationToken = cancellationToken; + + if (cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(cancellationCallback, result); + } + + result.parent.triggerEvent.Add(result); + + TaskTracker.TrackActiveTask(result, 3); + + token = result.core.Version; + return result; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + cancellationTokenRegistration.Dispose(); + cancellationTokenRegistration = default; + parent.triggerEvent.Remove(this); + parent = null; + cancellationToken = default; + return pool.TryPush(this); + } + + static void CancellationCallback(object state) + { + var self = (WaitAsyncSource)state; + self.OnCanceled(self.cancellationToken); + } + + // IUniTaskSource + + public T GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { + TryReturn(); + } + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + // ITriggerHandler + + ITriggerHandler ITriggerHandler.Prev { get; set; } + ITriggerHandler ITriggerHandler.Next { get; set; } + + public void OnCanceled(CancellationToken cancellationToken) + { + core.TrySetCanceled(cancellationToken); + } + + public void OnCompleted() + { + // Complete as Cancel. + core.TrySetCanceled(CancellationToken.None); + } + + public void OnError(Exception ex) + { + core.TrySetException(ex); + } + + public void OnNext(T value) + { + core.TrySetResult(value); + } + } + + sealed class WithoutCurrentEnumerable : IUniTaskAsyncEnumerable + { + readonly ReadOnlyAsyncReactiveProperty parent; + + public WithoutCurrentEnumerable(ReadOnlyAsyncReactiveProperty parent) + { + this.parent = parent; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new Enumerator(parent, cancellationToken, false); + } + } + + sealed class Enumerator : MoveNextSource, IUniTaskAsyncEnumerator, ITriggerHandler + { + static Action cancellationCallback = CancellationCallback; + + readonly ReadOnlyAsyncReactiveProperty parent; + readonly CancellationToken cancellationToken; + readonly CancellationTokenRegistration cancellationTokenRegistration; + T value; + bool isDisposed; + bool firstCall; + + public Enumerator(ReadOnlyAsyncReactiveProperty parent, CancellationToken cancellationToken, bool publishCurrentValue) + { + this.parent = parent; + this.cancellationToken = cancellationToken; + this.firstCall = publishCurrentValue; + + parent.triggerEvent.Add(this); + TaskTracker.TrackActiveTask(this, 3); + + if (cancellationToken.CanBeCanceled) + { + cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(cancellationCallback, this); + } + } + + public T Current => value; + ITriggerHandler ITriggerHandler.Prev { get; set; } + ITriggerHandler ITriggerHandler.Next { get; set; } + + public UniTask MoveNextAsync() + { + // raise latest value on first call. + if (firstCall) + { + firstCall = false; + value = parent.Value; + return CompletedTasks.True; + } + + completionSource.Reset(); + return new UniTask(this, completionSource.Version); + } + + public UniTask DisposeAsync() + { + if (!isDisposed) + { + isDisposed = true; + TaskTracker.RemoveTracking(this); + completionSource.TrySetCanceled(cancellationToken); + parent.triggerEvent.Remove(this); + } + return default; + } + + public void OnNext(T value) + { + this.value = value; + completionSource.TrySetResult(true); + } + + public void OnCanceled(CancellationToken cancellationToken) + { + DisposeAsync().Forget(); + } + + public void OnCompleted() + { + completionSource.TrySetResult(false); + } + + public void OnError(Exception ex) + { + completionSource.TrySetException(ex); + } + + static void CancellationCallback(object state) + { + var self = (Enumerator)state; + self.DisposeAsync().Forget(); + } + } + } + + public static class StateExtensions + { + public static ReadOnlyAsyncReactiveProperty ToReadOnlyAsyncReactiveProperty(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + return new ReadOnlyAsyncReactiveProperty(source, cancellationToken); + } + + public static ReadOnlyAsyncReactiveProperty ToReadOnlyAsyncReactiveProperty(this IUniTaskAsyncEnumerable source, T initialValue, CancellationToken cancellationToken) + { + return new ReadOnlyAsyncReactiveProperty(initialValue, source, cancellationToken); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/AsyncReactiveProperty.cs.meta b/Assets/Plugins/UniTask/Runtime/AsyncReactiveProperty.cs.meta new file mode 100644 index 0000000..d64e3cf --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/AsyncReactiveProperty.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8ef320b87f537ee4fb2282e765dc6166 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/AsyncUnit.cs b/Assets/Plugins/UniTask/Runtime/AsyncUnit.cs new file mode 100644 index 0000000..1d4bc74 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/AsyncUnit.cs @@ -0,0 +1,26 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or + +using System; + +namespace Cysharp.Threading.Tasks +{ + public readonly struct AsyncUnit : IEquatable + { + public static readonly AsyncUnit Default = new AsyncUnit(); + + public override int GetHashCode() + { + return 0; + } + + public bool Equals(AsyncUnit other) + { + return true; + } + + public override string ToString() + { + return "()"; + } + } +} diff --git a/Assets/Plugins/UniTask/Runtime/AsyncUnit.cs.meta b/Assets/Plugins/UniTask/Runtime/AsyncUnit.cs.meta new file mode 100644 index 0000000..e0ee132 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/AsyncUnit.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4f95ac245430d304bb5128d13b6becc8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/CancellationTokenEqualityComparer.cs b/Assets/Plugins/UniTask/Runtime/CancellationTokenEqualityComparer.cs new file mode 100644 index 0000000..42e9445 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CancellationTokenEqualityComparer.cs @@ -0,0 +1,23 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + public class CancellationTokenEqualityComparer : IEqualityComparer + { + public static readonly IEqualityComparer Default = new CancellationTokenEqualityComparer(); + + public bool Equals(CancellationToken x, CancellationToken y) + { + return x.Equals(y); + } + + public int GetHashCode(CancellationToken obj) + { + return obj.GetHashCode(); + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/CancellationTokenEqualityComparer.cs.meta b/Assets/Plugins/UniTask/Runtime/CancellationTokenEqualityComparer.cs.meta new file mode 100644 index 0000000..a4fe3fd --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CancellationTokenEqualityComparer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7d739f510b125b74fa7290ac4335e46e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/CancellationTokenExtensions.cs b/Assets/Plugins/UniTask/Runtime/CancellationTokenExtensions.cs new file mode 100644 index 0000000..3f3a532 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CancellationTokenExtensions.cs @@ -0,0 +1,182 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Runtime.CompilerServices; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + public static class CancellationTokenExtensions + { + static readonly Action cancellationTokenCallback = Callback; + static readonly Action disposeCallback = DisposeCallback; + + public static CancellationToken ToCancellationToken(this UniTask task) + { + var cts = new CancellationTokenSource(); + ToCancellationTokenCore(task, cts).Forget(); + return cts.Token; + } + + public static CancellationToken ToCancellationToken(this UniTask task, CancellationToken linkToken) + { + if (linkToken.IsCancellationRequested) + { + return linkToken; + } + + if (!linkToken.CanBeCanceled) + { + return ToCancellationToken(task); + } + + var cts = CancellationTokenSource.CreateLinkedTokenSource(linkToken); + ToCancellationTokenCore(task, cts).Forget(); + + return cts.Token; + } + + public static CancellationToken ToCancellationToken(this UniTask task) + { + return ToCancellationToken(task.AsUniTask()); + } + + public static CancellationToken ToCancellationToken(this UniTask task, CancellationToken linkToken) + { + return ToCancellationToken(task.AsUniTask(), linkToken); + } + + static async UniTaskVoid ToCancellationTokenCore(UniTask task, CancellationTokenSource cts) + { + try + { + await task; + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + cts.Cancel(); + cts.Dispose(); + } + + public static (UniTask, CancellationTokenRegistration) ToUniTask(this CancellationToken cancellationToken) + { + if (cancellationToken.IsCancellationRequested) + { + return (UniTask.FromCanceled(cancellationToken), default(CancellationTokenRegistration)); + } + + var promise = new UniTaskCompletionSource(); + return (promise.Task, cancellationToken.RegisterWithoutCaptureExecutionContext(cancellationTokenCallback, promise)); + } + + static void Callback(object state) + { + var promise = (UniTaskCompletionSource)state; + promise.TrySetResult(); + } + + public static CancellationTokenAwaitable WaitUntilCanceled(this CancellationToken cancellationToken) + { + return new CancellationTokenAwaitable(cancellationToken); + } + + public static CancellationTokenRegistration RegisterWithoutCaptureExecutionContext(this CancellationToken cancellationToken, Action callback) + { + var restoreFlow = false; + if (!ExecutionContext.IsFlowSuppressed()) + { + ExecutionContext.SuppressFlow(); + restoreFlow = true; + } + + try + { + return cancellationToken.Register(callback, false); + } + finally + { + if (restoreFlow) + { + ExecutionContext.RestoreFlow(); + } + } + } + + public static CancellationTokenRegistration RegisterWithoutCaptureExecutionContext(this CancellationToken cancellationToken, Action callback, object state) + { + var restoreFlow = false; + if (!ExecutionContext.IsFlowSuppressed()) + { + ExecutionContext.SuppressFlow(); + restoreFlow = true; + } + + try + { + return cancellationToken.Register(callback, state, false); + } + finally + { + if (restoreFlow) + { + ExecutionContext.RestoreFlow(); + } + } + } + + public static CancellationTokenRegistration AddTo(this IDisposable disposable, CancellationToken cancellationToken) + { + return cancellationToken.RegisterWithoutCaptureExecutionContext(disposeCallback, disposable); + } + + static void DisposeCallback(object state) + { + var d = (IDisposable)state; + d.Dispose(); + } + } + + public struct CancellationTokenAwaitable + { + CancellationToken cancellationToken; + + public CancellationTokenAwaitable(CancellationToken cancellationToken) + { + this.cancellationToken = cancellationToken; + } + + public Awaiter GetAwaiter() + { + return new Awaiter(cancellationToken); + } + + public struct Awaiter : ICriticalNotifyCompletion + { + CancellationToken cancellationToken; + + public Awaiter(CancellationToken cancellationToken) + { + this.cancellationToken = cancellationToken; + } + + public bool IsCompleted => !cancellationToken.CanBeCanceled || cancellationToken.IsCancellationRequested; + + public void GetResult() + { + } + + public void OnCompleted(Action continuation) + { + UnsafeOnCompleted(continuation); + } + + public void UnsafeOnCompleted(Action continuation) + { + cancellationToken.RegisterWithoutCaptureExecutionContext(continuation); + } + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/CancellationTokenExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/CancellationTokenExtensions.cs.meta new file mode 100644 index 0000000..28a6958 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CancellationTokenExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4be7209f04146bd45ac5ee775a5f7c26 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/CancellationTokenSourceExtensions.cs b/Assets/Plugins/UniTask/Runtime/CancellationTokenSourceExtensions.cs new file mode 100644 index 0000000..c519944 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CancellationTokenSourceExtensions.cs @@ -0,0 +1,44 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System.Threading; +using UnityEngine; +using Cysharp.Threading.Tasks.Triggers; +using System; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks +{ + + public static partial class CancellationTokenSourceExtensions + { + readonly static Action CancelCancellationTokenSourceStateDelegate = new Action(CancelCancellationTokenSourceState); + + static void CancelCancellationTokenSourceState(object state) + { + var cts = (CancellationTokenSource)state; + cts.Cancel(); + } + + public static IDisposable CancelAfterSlim(this CancellationTokenSource cts, int millisecondsDelay, DelayType delayType = DelayType.DeltaTime, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update) + { + return CancelAfterSlim(cts, TimeSpan.FromMilliseconds(millisecondsDelay), delayType, delayTiming); + } + + public static IDisposable CancelAfterSlim(this CancellationTokenSource cts, TimeSpan delayTimeSpan, DelayType delayType = DelayType.DeltaTime, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update) + { + return PlayerLoopTimer.StartNew(delayTimeSpan, false, delayType, delayTiming, cts.Token, CancelCancellationTokenSourceStateDelegate, cts); + } + + public static void RegisterRaiseCancelOnDestroy(this CancellationTokenSource cts, Component component) + { + RegisterRaiseCancelOnDestroy(cts, component.gameObject); + } + + public static void RegisterRaiseCancelOnDestroy(this CancellationTokenSource cts, GameObject gameObject) + { + var trigger = gameObject.GetAsyncDestroyTrigger(); + trigger.CancellationToken.RegisterWithoutCaptureExecutionContext(CancelCancellationTokenSourceStateDelegate, cts); + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/CancellationTokenSourceExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/CancellationTokenSourceExtensions.cs.meta new file mode 100644 index 0000000..fd09fe4 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CancellationTokenSourceExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 22d85d07f1e70ab42a7a4c25bd65e661 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Channel.cs b/Assets/Plugins/UniTask/Runtime/Channel.cs new file mode 100644 index 0000000..5a484fd --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Channel.cs @@ -0,0 +1,450 @@ +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + public static class Channel + { + public static Channel CreateSingleConsumerUnbounded() + { + return new SingleConsumerUnboundedChannel(); + } + } + + public abstract class Channel + { + public ChannelReader Reader { get; protected set; } + public ChannelWriter Writer { get; protected set; } + + public static implicit operator ChannelReader(Channel channel) => channel.Reader; + public static implicit operator ChannelWriter(Channel channel) => channel.Writer; + } + + public abstract class Channel : Channel + { + } + + public abstract class ChannelReader + { + public abstract bool TryRead(out T item); + public abstract UniTask WaitToReadAsync(CancellationToken cancellationToken = default(CancellationToken)); + + public abstract UniTask Completion { get; } + + public virtual UniTask ReadAsync(CancellationToken cancellationToken = default(CancellationToken)) + { + if (this.TryRead(out var item)) + { + return UniTask.FromResult(item); + } + + return ReadAsyncCore(cancellationToken); + } + + async UniTask ReadAsyncCore(CancellationToken cancellationToken = default(CancellationToken)) + { + if (await WaitToReadAsync(cancellationToken)) + { + if (TryRead(out var item)) + { + return item; + } + } + + throw new ChannelClosedException(); + } + + public abstract IUniTaskAsyncEnumerable ReadAllAsync(CancellationToken cancellationToken = default(CancellationToken)); + } + + public abstract class ChannelWriter + { + public abstract bool TryWrite(T item); + public abstract bool TryComplete(Exception error = null); + + public void Complete(Exception error = null) + { + if (!TryComplete(error)) + { + throw new ChannelClosedException(); + } + } + } + + public partial class ChannelClosedException : InvalidOperationException + { + public ChannelClosedException() : + base("Channel is already closed.") + { } + + public ChannelClosedException(string message) : base(message) { } + + public ChannelClosedException(Exception innerException) : + base("Channel is already closed", innerException) + { } + + public ChannelClosedException(string message, Exception innerException) : base(message, innerException) { } + } + + internal class SingleConsumerUnboundedChannel : Channel + { + readonly Queue items; + readonly SingleConsumerUnboundedChannelReader readerSource; + UniTaskCompletionSource completedTaskSource; + UniTask completedTask; + + Exception completionError; + bool closed; + + public SingleConsumerUnboundedChannel() + { + items = new Queue(); + Writer = new SingleConsumerUnboundedChannelWriter(this); + readerSource = new SingleConsumerUnboundedChannelReader(this); + Reader = readerSource; + } + + sealed class SingleConsumerUnboundedChannelWriter : ChannelWriter + { + readonly SingleConsumerUnboundedChannel parent; + + public SingleConsumerUnboundedChannelWriter(SingleConsumerUnboundedChannel parent) + { + this.parent = parent; + } + + public override bool TryWrite(T item) + { + bool waiting; + lock (parent.items) + { + if (parent.closed) return false; + + parent.items.Enqueue(item); + waiting = parent.readerSource.isWaiting; + } + + if (waiting) + { + parent.readerSource.SingalContinuation(); + } + + return true; + } + + public override bool TryComplete(Exception error = null) + { + bool waiting; + lock (parent.items) + { + if (parent.closed) return false; + parent.closed = true; + waiting = parent.readerSource.isWaiting; + + if (parent.items.Count == 0) + { + if (error == null) + { + if (parent.completedTaskSource != null) + { + parent.completedTaskSource.TrySetResult(); + } + else + { + parent.completedTask = UniTask.CompletedTask; + } + } + else + { + if (parent.completedTaskSource != null) + { + parent.completedTaskSource.TrySetException(error); + } + else + { + parent.completedTask = UniTask.FromException(error); + } + } + + if (waiting) + { + parent.readerSource.SingalCompleted(error); + } + } + + parent.completionError = error; + } + + return true; + } + } + + sealed class SingleConsumerUnboundedChannelReader : ChannelReader, IUniTaskSource + { + readonly Action CancellationCallbackDelegate = CancellationCallback; + readonly SingleConsumerUnboundedChannel parent; + + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + UniTaskCompletionSourceCore core; + internal bool isWaiting; + + public SingleConsumerUnboundedChannelReader(SingleConsumerUnboundedChannel parent) + { + this.parent = parent; + + TaskTracker.TrackActiveTask(this, 4); + } + + public override UniTask Completion + { + get + { + if (parent.completedTaskSource != null) return parent.completedTaskSource.Task; + + if (parent.closed) + { + return parent.completedTask; + } + + parent.completedTaskSource = new UniTaskCompletionSource(); + return parent.completedTaskSource.Task; + } + } + + public override bool TryRead(out T item) + { + lock (parent.items) + { + if (parent.items.Count != 0) + { + item = parent.items.Dequeue(); + + // complete when all value was consumed. + if (parent.closed && parent.items.Count == 0) + { + if (parent.completionError != null) + { + if (parent.completedTaskSource != null) + { + parent.completedTaskSource.TrySetException(parent.completionError); + } + else + { + parent.completedTask = UniTask.FromException(parent.completionError); + } + } + else + { + if (parent.completedTaskSource != null) + { + parent.completedTaskSource.TrySetResult(); + } + else + { + parent.completedTask = UniTask.CompletedTask; + } + } + } + } + else + { + item = default; + return false; + } + } + + return true; + } + + public override UniTask WaitToReadAsync(CancellationToken cancellationToken) + { + if (cancellationToken.IsCancellationRequested) + { + return UniTask.FromCanceled(cancellationToken); + } + + lock (parent.items) + { + if (parent.items.Count != 0) + { + return CompletedTasks.True; + } + + if (parent.closed) + { + if (parent.completionError == null) + { + return CompletedTasks.False; + } + else + { + return UniTask.FromException(parent.completionError); + } + } + + cancellationTokenRegistration.Dispose(); + + core.Reset(); + isWaiting = true; + + this.cancellationToken = cancellationToken; + if (this.cancellationToken.CanBeCanceled) + { + cancellationTokenRegistration = this.cancellationToken.RegisterWithoutCaptureExecutionContext(CancellationCallbackDelegate, this); + } + + return new UniTask(this, core.Version); + } + } + + public void SingalContinuation() + { + core.TrySetResult(true); + } + + public void SingalCancellation(CancellationToken cancellationToken) + { + TaskTracker.RemoveTracking(this); + core.TrySetCanceled(cancellationToken); + } + + public void SingalCompleted(Exception error) + { + if (error != null) + { + TaskTracker.RemoveTracking(this); + core.TrySetException(error); + } + else + { + TaskTracker.RemoveTracking(this); + core.TrySetResult(false); + } + } + + public override IUniTaskAsyncEnumerable ReadAllAsync(CancellationToken cancellationToken = default) + { + return new ReadAllAsyncEnumerable(this, cancellationToken); + } + + bool IUniTaskSource.GetResult(short token) + { + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + core.GetResult(token); + } + + UniTaskStatus IUniTaskSource.GetStatus(short token) + { + return core.GetStatus(token); + } + + void IUniTaskSource.OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + UniTaskStatus IUniTaskSource.UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + static void CancellationCallback(object state) + { + var self = (SingleConsumerUnboundedChannelReader)state; + self.SingalCancellation(self.cancellationToken); + } + + sealed class ReadAllAsyncEnumerable : IUniTaskAsyncEnumerable, IUniTaskAsyncEnumerator + { + readonly Action CancellationCallback1Delegate = CancellationCallback1; + readonly Action CancellationCallback2Delegate = CancellationCallback2; + + readonly SingleConsumerUnboundedChannelReader parent; + CancellationToken cancellationToken1; + CancellationToken cancellationToken2; + CancellationTokenRegistration cancellationTokenRegistration1; + CancellationTokenRegistration cancellationTokenRegistration2; + + T current; + bool cacheValue; + bool running; + + public ReadAllAsyncEnumerable(SingleConsumerUnboundedChannelReader parent, CancellationToken cancellationToken) + { + this.parent = parent; + this.cancellationToken1 = cancellationToken; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + if (running) + { + throw new InvalidOperationException("Enumerator is already running, does not allow call GetAsyncEnumerator twice."); + } + + if (this.cancellationToken1 != cancellationToken) + { + this.cancellationToken2 = cancellationToken; + } + + if (this.cancellationToken1.CanBeCanceled) + { + this.cancellationTokenRegistration1 = this.cancellationToken1.RegisterWithoutCaptureExecutionContext(CancellationCallback1Delegate, this); + } + + if (this.cancellationToken2.CanBeCanceled) + { + this.cancellationTokenRegistration2 = this.cancellationToken2.RegisterWithoutCaptureExecutionContext(CancellationCallback2Delegate, this); + } + + running = true; + return this; + } + + public T Current + { + get + { + if (cacheValue) + { + return current; + } + parent.TryRead(out current); + return current; + } + } + + public UniTask MoveNextAsync() + { + cacheValue = false; + return parent.WaitToReadAsync(CancellationToken.None); // ok to use None, registered in ctor. + } + + public UniTask DisposeAsync() + { + cancellationTokenRegistration1.Dispose(); + cancellationTokenRegistration2.Dispose(); + return default; + } + + static void CancellationCallback1(object state) + { + var self = (ReadAllAsyncEnumerable)state; + self.parent.SingalCancellation(self.cancellationToken1); + } + + static void CancellationCallback2(object state) + { + var self = (ReadAllAsyncEnumerable)state; + self.parent.SingalCancellation(self.cancellationToken2); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Channel.cs.meta b/Assets/Plugins/UniTask/Runtime/Channel.cs.meta new file mode 100644 index 0000000..32edb9c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Channel.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5ceb3107bbdd1f14eb39091273798360 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/CompilerServices.meta b/Assets/Plugins/UniTask/Runtime/CompilerServices.meta new file mode 100644 index 0000000..5842dcd --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CompilerServices.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a88d50c6f1590947b1b6856a7d96a9b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs b/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs new file mode 100644 index 0000000..700fc33 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs @@ -0,0 +1,17 @@ + +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member +#pragma warning disable CS0436 + +namespace System.Runtime.CompilerServices +{ + internal sealed class AsyncMethodBuilderAttribute : Attribute + { + public Type BuilderType { get; } + + public AsyncMethodBuilderAttribute(Type builderType) + { + BuilderType = builderType; + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs.meta b/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs.meta new file mode 100644 index 0000000..19961df --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 02ce354d37b10454e8376062f7cbe57a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskMethodBuilder.cs b/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskMethodBuilder.cs new file mode 100644 index 0000000..1aa990d --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskMethodBuilder.cs @@ -0,0 +1,269 @@ + +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security; + +namespace Cysharp.Threading.Tasks.CompilerServices +{ + [StructLayout(LayoutKind.Auto)] + public struct AsyncUniTaskMethodBuilder + { + IStateMachineRunnerPromise runnerPromise; + Exception ex; + + // 1. Static Create method. + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static AsyncUniTaskMethodBuilder Create() + { + return default; + } + + // 2. TaskLike Task property. + public UniTask Task + { + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + if (runnerPromise != null) + { + return runnerPromise.Task; + } + else if (ex != null) + { + return UniTask.FromException(ex); + } + else + { + return UniTask.CompletedTask; + } + } + } + + // 3. SetException + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetException(Exception exception) + { + if (runnerPromise == null) + { + ex = exception; + } + else + { + runnerPromise.SetException(exception); + } + } + + // 4. SetResult + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetResult() + { + if (runnerPromise != null) + { + runnerPromise.SetResult(); + } + } + + // 5. AwaitOnCompleted + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) + where TAwaiter : INotifyCompletion + where TStateMachine : IAsyncStateMachine + { + if (runnerPromise == null) + { + AsyncUniTask.SetStateMachine(ref stateMachine, ref runnerPromise); + } + + awaiter.OnCompleted(runnerPromise.MoveNext); + } + + // 6. AwaitUnsafeOnCompleted + [DebuggerHidden] + [SecuritySafeCritical] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) + where TAwaiter : ICriticalNotifyCompletion + where TStateMachine : IAsyncStateMachine + { + if (runnerPromise == null) + { + AsyncUniTask.SetStateMachine(ref stateMachine, ref runnerPromise); + } + + awaiter.UnsafeOnCompleted(runnerPromise.MoveNext); + } + + // 7. Start + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Start(ref TStateMachine stateMachine) + where TStateMachine : IAsyncStateMachine + { + stateMachine.MoveNext(); + } + + // 8. SetStateMachine + [DebuggerHidden] + public void SetStateMachine(IAsyncStateMachine stateMachine) + { + // don't use boxed stateMachine. + } + +#if DEBUG || !UNITY_2018_3_OR_NEWER + // Important for IDE debugger. + object debuggingId; + private object ObjectIdForDebugger + { + get + { + if (debuggingId == null) + { + debuggingId = new object(); + } + return debuggingId; + } + } +#endif + } + + [StructLayout(LayoutKind.Auto)] + public struct AsyncUniTaskMethodBuilder + { + IStateMachineRunnerPromise runnerPromise; + Exception ex; + T result; + + // 1. Static Create method. + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static AsyncUniTaskMethodBuilder Create() + { + return default; + } + + // 2. TaskLike Task property. + public UniTask Task + { + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + if (runnerPromise != null) + { + return runnerPromise.Task; + } + else if (ex != null) + { + return UniTask.FromException(ex); + } + else + { + return UniTask.FromResult(result); + } + } + } + + // 3. SetException + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetException(Exception exception) + { + if (runnerPromise == null) + { + ex = exception; + } + else + { + runnerPromise.SetException(exception); + } + } + + // 4. SetResult + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetResult(T result) + { + if (runnerPromise == null) + { + this.result = result; + } + else + { + runnerPromise.SetResult(result); + } + } + + // 5. AwaitOnCompleted + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) + where TAwaiter : INotifyCompletion + where TStateMachine : IAsyncStateMachine + { + if (runnerPromise == null) + { + AsyncUniTask.SetStateMachine(ref stateMachine, ref runnerPromise); + } + + awaiter.OnCompleted(runnerPromise.MoveNext); + } + + // 6. AwaitUnsafeOnCompleted + [DebuggerHidden] + [SecuritySafeCritical] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) + where TAwaiter : ICriticalNotifyCompletion + where TStateMachine : IAsyncStateMachine + { + if (runnerPromise == null) + { + AsyncUniTask.SetStateMachine(ref stateMachine, ref runnerPromise); + } + + awaiter.UnsafeOnCompleted(runnerPromise.MoveNext); + } + + // 7. Start + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Start(ref TStateMachine stateMachine) + where TStateMachine : IAsyncStateMachine + { + stateMachine.MoveNext(); + } + + // 8. SetStateMachine + [DebuggerHidden] + public void SetStateMachine(IAsyncStateMachine stateMachine) + { + // don't use boxed stateMachine. + } + +#if DEBUG || !UNITY_2018_3_OR_NEWER + // Important for IDE debugger. + object debuggingId; + private object ObjectIdForDebugger + { + get + { + if (debuggingId == null) + { + debuggingId = new object(); + } + return debuggingId; + } + } +#endif + + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskMethodBuilder.cs.meta b/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskMethodBuilder.cs.meta new file mode 100644 index 0000000..ad43cfc --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskMethodBuilder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 68d72a45afdec574ebc26e7de2c38330 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs b/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs new file mode 100644 index 0000000..82e91f3 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs @@ -0,0 +1,137 @@ + +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security; + +namespace Cysharp.Threading.Tasks.CompilerServices +{ + [StructLayout(LayoutKind.Auto)] + public struct AsyncUniTaskVoidMethodBuilder + { + IStateMachineRunner runner; + + // 1. Static Create method. + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static AsyncUniTaskVoidMethodBuilder Create() + { + return default; + } + + // 2. TaskLike Task property(void) + public UniTaskVoid Task + { + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return default; + } + } + + // 3. SetException + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetException(Exception exception) + { + // runner is finished, return first. + if (runner != null) + { +#if ENABLE_IL2CPP + // workaround for IL2CPP bug. + PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, runner.ReturnAction); +#else + runner.Return(); +#endif + runner = null; + } + + UniTaskScheduler.PublishUnobservedTaskException(exception); + } + + // 4. SetResult + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetResult() + { + // runner is finished, return. + if (runner != null) + { +#if ENABLE_IL2CPP + // workaround for IL2CPP bug. + PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, runner.ReturnAction); +#else + runner.Return(); +#endif + runner = null; + } + } + + // 5. AwaitOnCompleted + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) + where TAwaiter : INotifyCompletion + where TStateMachine : IAsyncStateMachine + { + if (runner == null) + { + AsyncUniTaskVoid.SetStateMachine(ref stateMachine, ref runner); + } + + awaiter.OnCompleted(runner.MoveNext); + } + + // 6. AwaitUnsafeOnCompleted + [DebuggerHidden] + [SecuritySafeCritical] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) + where TAwaiter : ICriticalNotifyCompletion + where TStateMachine : IAsyncStateMachine + { + if (runner == null) + { + AsyncUniTaskVoid.SetStateMachine(ref stateMachine, ref runner); + } + + awaiter.UnsafeOnCompleted(runner.MoveNext); + } + + // 7. Start + [DebuggerHidden] + public void Start(ref TStateMachine stateMachine) + where TStateMachine : IAsyncStateMachine + { + stateMachine.MoveNext(); + } + + // 8. SetStateMachine + [DebuggerHidden] + public void SetStateMachine(IAsyncStateMachine stateMachine) + { + // don't use boxed stateMachine. + } + +#if DEBUG || !UNITY_2018_3_OR_NEWER + // Important for IDE debugger. + object debuggingId; + private object ObjectIdForDebugger + { + get + { + if (debuggingId == null) + { + debuggingId = new object(); + } + return debuggingId; + } + } +#endif + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs.meta b/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs.meta new file mode 100644 index 0000000..9bcc50e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e891aaac17b933a47a9d7fa3b8e1226f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs b/Assets/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs new file mode 100644 index 0000000..1cffece --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs @@ -0,0 +1,380 @@ +#pragma warning disable CS1591 + +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Linq; +using System.Diagnostics; +using System.Runtime.CompilerServices; + +namespace Cysharp.Threading.Tasks.CompilerServices +{ + // #ENABLE_IL2CPP in this file is to avoid bug of IL2CPP VM. + // Issue is tracked on https://issuetracker.unity3d.com/issues/il2cpp-incorrect-results-when-calling-a-method-from-outside-class-in-a-struct + // but currently it is labeled `Won't Fix`. + + internal interface IStateMachineRunner + { + Action MoveNext { get; } + void Return(); + +#if ENABLE_IL2CPP + Action ReturnAction { get; } +#endif + } + + internal interface IStateMachineRunnerPromise : IUniTaskSource + { + Action MoveNext { get; } + UniTask Task { get; } + void SetResult(); + void SetException(Exception exception); + } + + internal interface IStateMachineRunnerPromise : IUniTaskSource + { + Action MoveNext { get; } + UniTask Task { get; } + void SetResult(T result); + void SetException(Exception exception); + } + + internal static class StateMachineUtility + { + // Get AsyncStateMachine internal state to check IL2CPP bug + public static int GetState(IAsyncStateMachine stateMachine) + { + var info = stateMachine.GetType().GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance) + .First(x => x.Name.EndsWith("__state")); + return (int)info.GetValue(stateMachine); + } + } + + internal sealed class AsyncUniTaskVoid : IStateMachineRunner, ITaskPoolNode>, IUniTaskSource + where TStateMachine : IAsyncStateMachine + { + static TaskPool> pool; + +#if ENABLE_IL2CPP + public Action ReturnAction { get; } +#endif + + TStateMachine stateMachine; + + public Action MoveNext { get; } + + public AsyncUniTaskVoid() + { + MoveNext = Run; +#if ENABLE_IL2CPP + ReturnAction = Return; +#endif + } + + public static void SetStateMachine(ref TStateMachine stateMachine, ref IStateMachineRunner runnerFieldRef) + { + if (!pool.TryPop(out var result)) + { + result = new AsyncUniTaskVoid(); + } + TaskTracker.TrackActiveTask(result, 3); + + runnerFieldRef = result; // set runner before copied. + result.stateMachine = stateMachine; // copy struct StateMachine(in release build). + } + + static AsyncUniTaskVoid() + { + TaskPool.RegisterSizeGetter(typeof(AsyncUniTaskVoid), () => pool.Size); + } + + AsyncUniTaskVoid nextNode; + public ref AsyncUniTaskVoid NextNode => ref nextNode; + + public void Return() + { + TaskTracker.RemoveTracking(this); + stateMachine = default; + pool.TryPush(this); + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + void Run() + { + stateMachine.MoveNext(); + } + + // dummy interface implementation for TaskTracker. + + UniTaskStatus IUniTaskSource.GetStatus(short token) + { + return UniTaskStatus.Pending; + } + + UniTaskStatus IUniTaskSource.UnsafeGetStatus() + { + return UniTaskStatus.Pending; + } + + void IUniTaskSource.OnCompleted(Action continuation, object state, short token) + { + } + + void IUniTaskSource.GetResult(short token) + { + } + } + + internal sealed class AsyncUniTask : IStateMachineRunnerPromise, IUniTaskSource, ITaskPoolNode> + where TStateMachine : IAsyncStateMachine + { + static TaskPool> pool; + +#if ENABLE_IL2CPP + readonly Action returnDelegate; +#endif + public Action MoveNext { get; } + + TStateMachine stateMachine; + UniTaskCompletionSourceCore core; + + AsyncUniTask() + { + MoveNext = Run; +#if ENABLE_IL2CPP + returnDelegate = Return; +#endif + } + + public static void SetStateMachine(ref TStateMachine stateMachine, ref IStateMachineRunnerPromise runnerPromiseFieldRef) + { + if (!pool.TryPop(out var result)) + { + result = new AsyncUniTask(); + } + TaskTracker.TrackActiveTask(result, 3); + + runnerPromiseFieldRef = result; // set runner before copied. + result.stateMachine = stateMachine; // copy struct StateMachine(in release build). + } + + AsyncUniTask nextNode; + public ref AsyncUniTask NextNode => ref nextNode; + + static AsyncUniTask() + { + TaskPool.RegisterSizeGetter(typeof(AsyncUniTask), () => pool.Size); + } + + void Return() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + stateMachine = default; + pool.TryPush(this); + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + stateMachine = default; + return pool.TryPush(this); + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + void Run() + { + stateMachine.MoveNext(); + } + + public UniTask Task + { + [DebuggerHidden] + get + { + return new UniTask(this, core.Version); + } + } + + [DebuggerHidden] + public void SetResult() + { + core.TrySetResult(AsyncUnit.Default); + } + + [DebuggerHidden] + public void SetException(Exception exception) + { + core.TrySetException(exception); + } + + [DebuggerHidden] + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { +#if ENABLE_IL2CPP + // workaround for IL2CPP bug. + PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, returnDelegate); +#else + TryReturn(); +#endif + } + } + + [DebuggerHidden] + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + [DebuggerHidden] + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + [DebuggerHidden] + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + internal sealed class AsyncUniTask : IStateMachineRunnerPromise, IUniTaskSource, ITaskPoolNode> + where TStateMachine : IAsyncStateMachine + { + static TaskPool> pool; + +#if ENABLE_IL2CPP + readonly Action returnDelegate; +#endif + + public Action MoveNext { get; } + + TStateMachine stateMachine; + UniTaskCompletionSourceCore core; + + AsyncUniTask() + { + MoveNext = Run; +#if ENABLE_IL2CPP + returnDelegate = Return; +#endif + } + + public static void SetStateMachine(ref TStateMachine stateMachine, ref IStateMachineRunnerPromise runnerPromiseFieldRef) + { + if (!pool.TryPop(out var result)) + { + result = new AsyncUniTask(); + } + TaskTracker.TrackActiveTask(result, 3); + + runnerPromiseFieldRef = result; // set runner before copied. + result.stateMachine = stateMachine; // copy struct StateMachine(in release build). + } + + AsyncUniTask nextNode; + public ref AsyncUniTask NextNode => ref nextNode; + + static AsyncUniTask() + { + TaskPool.RegisterSizeGetter(typeof(AsyncUniTask), () => pool.Size); + } + + void Return() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + stateMachine = default; + pool.TryPush(this); + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + stateMachine = default; + return pool.TryPush(this); + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + void Run() + { + // UnityEngine.Debug.Log($"MoveNext State:" + StateMachineUtility.GetState(stateMachine)); + stateMachine.MoveNext(); + } + + public UniTask Task + { + [DebuggerHidden] + get + { + return new UniTask(this, core.Version); + } + } + + [DebuggerHidden] + public void SetResult(T result) + { + core.TrySetResult(result); + } + + [DebuggerHidden] + public void SetException(Exception exception) + { + core.TrySetException(exception); + } + + [DebuggerHidden] + public T GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { +#if ENABLE_IL2CPP + // workaround for IL2CPP bug. + PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, returnDelegate); +#else + TryReturn(); +#endif + } + } + + [DebuggerHidden] + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + [DebuggerHidden] + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + [DebuggerHidden] + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + [DebuggerHidden] + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs.meta b/Assets/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs.meta new file mode 100644 index 0000000..2cb82e0 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 98649642833cabf44a9dc060ce4c84a1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/EnumerableAsyncExtensions.cs b/Assets/Plugins/UniTask/Runtime/EnumerableAsyncExtensions.cs new file mode 100644 index 0000000..004e763 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/EnumerableAsyncExtensions.cs @@ -0,0 +1,34 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Collections.Generic; + +namespace Cysharp.Threading.Tasks +{ + public static class EnumerableAsyncExtensions + { + // overload resolver - .Select(async x => { }) : IEnumerable> + + public static IEnumerable Select(this IEnumerable source, Func selector) + { + return System.Linq.Enumerable.Select(source, selector); + } + + public static IEnumerable> Select(this IEnumerable source, Func> selector) + { + return System.Linq.Enumerable.Select(source, selector); + } + + public static IEnumerable Select(this IEnumerable source, Func selector) + { + return System.Linq.Enumerable.Select(source, selector); + } + + public static IEnumerable> Select(this IEnumerable source, Func> selector) + { + return System.Linq.Enumerable.Select(source, selector); + } + } +} + + diff --git a/Assets/Plugins/UniTask/Runtime/EnumerableAsyncExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/EnumerableAsyncExtensions.cs.meta new file mode 100644 index 0000000..d2e4930 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/EnumerableAsyncExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ff50260d74bd54c4b92cf99895549445 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/EnumeratorAsyncExtensions.cs b/Assets/Plugins/UniTask/Runtime/EnumeratorAsyncExtensions.cs new file mode 100644 index 0000000..785bbc2 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/EnumeratorAsyncExtensions.cs @@ -0,0 +1,287 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Collections; +using System.Reflection; +using System.Runtime.ExceptionServices; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; +using UnityEngine; + +namespace Cysharp.Threading.Tasks +{ + public static class EnumeratorAsyncExtensions + { + public static UniTask.Awaiter GetAwaiter(this T enumerator) + where T : IEnumerator + { + var e = (IEnumerator)enumerator; + Error.ThrowArgumentNullException(e, nameof(enumerator)); + return new UniTask(EnumeratorPromise.Create(e, PlayerLoopTiming.Update, CancellationToken.None, out var token), token).GetAwaiter(); + } + + public static UniTask WithCancellation(this IEnumerator enumerator, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(enumerator, nameof(enumerator)); + return new UniTask(EnumeratorPromise.Create(enumerator, PlayerLoopTiming.Update, cancellationToken, out var token), token); + } + + public static UniTask ToUniTask(this IEnumerator enumerator, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken)) + { + Error.ThrowArgumentNullException(enumerator, nameof(enumerator)); + return new UniTask(EnumeratorPromise.Create(enumerator, timing, cancellationToken, out var token), token); + } + + public static UniTask ToUniTask(this IEnumerator enumerator, MonoBehaviour coroutineRunner) + { + var source = AutoResetUniTaskCompletionSource.Create(); + coroutineRunner.StartCoroutine(Core(enumerator, coroutineRunner, source)); + return source.Task; + } + + static IEnumerator Core(IEnumerator inner, MonoBehaviour coroutineRunner, AutoResetUniTaskCompletionSource source) + { + yield return coroutineRunner.StartCoroutine(inner); + source.TrySetResult(); + } + + sealed class EnumeratorPromise : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + EnumeratorPromise nextNode; + public ref EnumeratorPromise NextNode => ref nextNode; + + static EnumeratorPromise() + { + TaskPool.RegisterSizeGetter(typeof(EnumeratorPromise), () => pool.Size); + } + + IEnumerator innerEnumerator; + CancellationToken cancellationToken; + int initialFrame; + bool loopRunning; + bool calledGetResult; + + UniTaskCompletionSourceCore core; + + EnumeratorPromise() + { + } + + public static IUniTaskSource Create(IEnumerator innerEnumerator, PlayerLoopTiming timing, CancellationToken cancellationToken, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new EnumeratorPromise(); + } + TaskTracker.TrackActiveTask(result, 3); + + result.innerEnumerator = ConsumeEnumerator(innerEnumerator); + result.cancellationToken = cancellationToken; + result.loopRunning = true; + result.calledGetResult = false; + result.initialFrame = -1; + + token = result.core.Version; + + // run immediately. + if (result.MoveNext()) + { + PlayerLoopHelper.AddAction(timing, result); + } + + return result; + } + + public void GetResult(short token) + { + try + { + calledGetResult = true; + core.GetResult(token); + } + finally + { + if (!loopRunning) + { + TryReturn(); + } + } + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (calledGetResult) + { + loopRunning = false; + TryReturn(); + return false; + } + + if (innerEnumerator == null) // invalid status, returned but loop running? + { + return false; + } + + if (cancellationToken.IsCancellationRequested) + { + loopRunning = false; + core.TrySetCanceled(cancellationToken); + return false; + } + + if (initialFrame == -1) + { + // Time can not touch in threadpool. + if (PlayerLoopHelper.IsMainThread) + { + initialFrame = Time.frameCount; + } + } + else if (initialFrame == Time.frameCount) + { + return true; // already executed in first frame, skip. + } + + try + { + if (innerEnumerator.MoveNext()) + { + return true; + } + } + catch (Exception ex) + { + loopRunning = false; + core.TrySetException(ex); + return false; + } + + loopRunning = false; + core.TrySetResult(null); + return false; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + innerEnumerator = default; + cancellationToken = default; + + return pool.TryPush(this); + } + + // Unwrap YieldInstructions + + static IEnumerator ConsumeEnumerator(IEnumerator enumerator) + { + while (enumerator.MoveNext()) + { + var current = enumerator.Current; + if (current == null) + { + yield return null; + } + else if (current is CustomYieldInstruction cyi) + { + // WWW, WaitForSecondsRealtime + while (cyi.keepWaiting) + { + yield return null; + } + } + else if (current is YieldInstruction) + { + IEnumerator innerCoroutine = null; + switch (current) + { + case AsyncOperation ao: + innerCoroutine = UnwrapWaitAsyncOperation(ao); + break; + case WaitForSeconds wfs: + innerCoroutine = UnwrapWaitForSeconds(wfs); + break; + } + if (innerCoroutine != null) + { + while (innerCoroutine.MoveNext()) + { + yield return null; + } + } + else + { + goto WARN; + } + } + else if (current is IEnumerator e3) + { + var e4 = ConsumeEnumerator(e3); + while (e4.MoveNext()) + { + yield return null; + } + } + else + { + goto WARN; + } + + continue; + + WARN: + // WaitForEndOfFrame, WaitForFixedUpdate, others. + UnityEngine.Debug.LogWarning($"yield {current.GetType().Name} is not supported on await IEnumerator or IEnumerator.ToUniTask(), please use ToUniTask(MonoBehaviour coroutineRunner) instead."); + yield return null; + } + } + + static readonly FieldInfo waitForSeconds_Seconds = typeof(WaitForSeconds).GetField("m_Seconds", BindingFlags.Instance | BindingFlags.GetField | BindingFlags.NonPublic); + + static IEnumerator UnwrapWaitForSeconds(WaitForSeconds waitForSeconds) + { + var second = (float)waitForSeconds_Seconds.GetValue(waitForSeconds); + var elapsed = 0.0f; + while (true) + { + yield return null; + + elapsed += Time.deltaTime; + if (elapsed >= second) + { + break; + } + }; + } + + static IEnumerator UnwrapWaitAsyncOperation(AsyncOperation asyncOperation) + { + while (!asyncOperation.isDone) + { + yield return null; + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/EnumeratorAsyncExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/EnumeratorAsyncExtensions.cs.meta new file mode 100644 index 0000000..a07b336 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/EnumeratorAsyncExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bc661232f11e4a741af54ba1c175d5ee +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/ExceptionExtensions.cs b/Assets/Plugins/UniTask/Runtime/ExceptionExtensions.cs new file mode 100644 index 0000000..e411898 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/ExceptionExtensions.cs @@ -0,0 +1,14 @@ + +using System; + +namespace Cysharp.Threading.Tasks +{ + public static class ExceptionExtensions + { + public static bool IsOperationCanceledException(this Exception exception) + { + return exception is OperationCanceledException; + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/ExceptionExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/ExceptionExtensions.cs.meta new file mode 100644 index 0000000..9833001 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/ExceptionExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 930800098504c0d46958ce23a0495202 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/External.meta b/Assets/Plugins/UniTask/Runtime/External.meta new file mode 100644 index 0000000..32c793c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 82597550b7b2e724cb652fbe44ab3a09 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/External/Addressables.meta b/Assets/Plugins/UniTask/Runtime/External/Addressables.meta new file mode 100644 index 0000000..7930da1 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/Addressables.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e63786df53723b24d86fbe2634a44503 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/External/Addressables/AddressablesAsyncExtensions.cs b/Assets/Plugins/UniTask/Runtime/External/Addressables/AddressablesAsyncExtensions.cs new file mode 100644 index 0000000..ee1a9e6 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/Addressables/AddressablesAsyncExtensions.cs @@ -0,0 +1,473 @@ +// asmdef Version Defines, enabled when com.unity.addressables is imported. + +#if UNITASK_ADDRESSABLE_SUPPORT + +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Runtime.CompilerServices; +using System.Runtime.ExceptionServices; +using System.Threading; +using UnityEngine.AddressableAssets; +using UnityEngine.ResourceManagement.AsyncOperations; + +namespace Cysharp.Threading.Tasks +{ + public static class AddressablesAsyncExtensions + { +#region AsyncOperationHandle + + public static UniTask.Awaiter GetAwaiter(this AsyncOperationHandle handle) + { + return ToUniTask(handle).GetAwaiter(); + } + + public static UniTask WithCancellation(this AsyncOperationHandle handle, CancellationToken cancellationToken, bool cancelImmediately = false, bool autoReleaseWhenCanceled = false) + { + return ToUniTask(handle, cancellationToken: cancellationToken, cancelImmediately: cancelImmediately, autoReleaseWhenCanceled: autoReleaseWhenCanceled); + } + + public static UniTask ToUniTask(this AsyncOperationHandle handle, IProgress progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false, bool autoReleaseWhenCanceled = false) + { + if (cancellationToken.IsCancellationRequested) return UniTask.FromCanceled(cancellationToken); + + if (!handle.IsValid()) + { + // autoReleaseHandle:true handle is invalid(immediately internal handle == null) so return completed. + return UniTask.CompletedTask; + } + + if (handle.IsDone) + { + if (handle.Status == AsyncOperationStatus.Failed) + { + return UniTask.FromException(handle.OperationException); + } + return UniTask.CompletedTask; + } + + return new UniTask(AsyncOperationHandleConfiguredSource.Create(handle, timing, progress, cancellationToken, cancelImmediately, autoReleaseWhenCanceled, out var token), token); + } + + public struct AsyncOperationHandleAwaiter : ICriticalNotifyCompletion + { + AsyncOperationHandle handle; + Action continuationAction; + + public AsyncOperationHandleAwaiter(AsyncOperationHandle handle) + { + this.handle = handle; + this.continuationAction = null; + } + + public bool IsCompleted => handle.IsDone; + + public void GetResult() + { + if (continuationAction != null) + { + handle.Completed -= continuationAction; + continuationAction = null; + } + + if (handle.Status == AsyncOperationStatus.Failed) + { + var e = handle.OperationException; + handle = default; + ExceptionDispatchInfo.Capture(e).Throw(); + } + + var result = handle.Result; + handle = default; + } + + public void OnCompleted(Action continuation) + { + UnsafeOnCompleted(continuation); + } + + public void UnsafeOnCompleted(Action continuation) + { + Error.ThrowWhenContinuationIsAlreadyRegistered(continuationAction); + continuationAction = PooledDelegate.Create(continuation); + handle.Completed += continuationAction; + } + } + + sealed class AsyncOperationHandleConfiguredSource : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + AsyncOperationHandleConfiguredSource nextNode; + public ref AsyncOperationHandleConfiguredSource NextNode => ref nextNode; + + static AsyncOperationHandleConfiguredSource() + { + TaskPool.RegisterSizeGetter(typeof(AsyncOperationHandleConfiguredSource), () => pool.Size); + } + + readonly Action completedCallback; + AsyncOperationHandle handle; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + IProgress progress; + bool autoReleaseWhenCanceled; + bool cancelImmediately; + bool completed; + + UniTaskCompletionSourceCore core; + + AsyncOperationHandleConfiguredSource() + { + completedCallback = HandleCompleted; + } + + public static IUniTaskSource Create(AsyncOperationHandle handle, PlayerLoopTiming timing, IProgress progress, CancellationToken cancellationToken, bool cancelImmediately, bool autoReleaseWhenCanceled, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new AsyncOperationHandleConfiguredSource(); + } + + result.handle = handle; + result.progress = progress; + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + result.autoReleaseWhenCanceled = autoReleaseWhenCanceled; + result.completed = false; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (AsyncOperationHandleConfiguredSource)state; + if (promise.autoReleaseWhenCanceled && promise.handle.IsValid()) + { + Addressables.Release(promise.handle); + } + promise.core.TrySetCanceled(promise.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + handle.Completed += result.completedCallback; + + token = result.core.Version; + return result; + } + + void HandleCompleted(AsyncOperationHandle _) + { + if (handle.IsValid()) + { + handle.Completed -= completedCallback; + } + + if (completed) + { + return; + } + + completed = true; + if (cancellationToken.IsCancellationRequested) + { + if (autoReleaseWhenCanceled && handle.IsValid()) + { + Addressables.Release(handle); + } + core.TrySetCanceled(cancellationToken); + } + else if (handle.Status == AsyncOperationStatus.Failed) + { + core.TrySetException(handle.OperationException); + } + else + { + core.TrySetResult(AsyncUnit.Default); + } + } + + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (completed) + { + return false; + } + + if (cancellationToken.IsCancellationRequested) + { + completed = true; + if (autoReleaseWhenCanceled && handle.IsValid()) + { + Addressables.Release(handle); + } + core.TrySetCanceled(cancellationToken); + return false; + } + + if (progress != null && handle.IsValid()) + { + progress.Report(handle.PercentComplete); + } + + return true; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + handle = default; + progress = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + return pool.TryPush(this); + } + } + +#endregion + +#region AsyncOperationHandle_T + + public static UniTask.Awaiter GetAwaiter(this AsyncOperationHandle handle) + { + return ToUniTask(handle).GetAwaiter(); + } + + public static UniTask WithCancellation(this AsyncOperationHandle handle, CancellationToken cancellationToken, bool cancelImmediately = false, bool autoReleaseWhenCanceled = false) + { + return ToUniTask(handle, cancellationToken: cancellationToken, cancelImmediately: cancelImmediately, autoReleaseWhenCanceled: autoReleaseWhenCanceled); + } + + public static UniTask ToUniTask(this AsyncOperationHandle handle, IProgress progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false, bool autoReleaseWhenCanceled = false) + { + if (cancellationToken.IsCancellationRequested) return UniTask.FromCanceled(cancellationToken); + + if (!handle.IsValid()) + { + throw new Exception("Attempting to use an invalid operation handle"); + } + + if (handle.IsDone) + { + if (handle.Status == AsyncOperationStatus.Failed) + { + return UniTask.FromException(handle.OperationException); + } + return UniTask.FromResult(handle.Result); + } + + return new UniTask(AsyncOperationHandleConfiguredSource.Create(handle, timing, progress, cancellationToken, cancelImmediately, autoReleaseWhenCanceled, out var token), token); + } + + sealed class AsyncOperationHandleConfiguredSource : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode> + { + static TaskPool> pool; + AsyncOperationHandleConfiguredSource nextNode; + public ref AsyncOperationHandleConfiguredSource NextNode => ref nextNode; + + static AsyncOperationHandleConfiguredSource() + { + TaskPool.RegisterSizeGetter(typeof(AsyncOperationHandleConfiguredSource), () => pool.Size); + } + + readonly Action> completedCallback; + AsyncOperationHandle handle; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + IProgress progress; + bool autoReleaseWhenCanceled; + bool cancelImmediately; + bool completed; + + UniTaskCompletionSourceCore core; + + AsyncOperationHandleConfiguredSource() + { + completedCallback = HandleCompleted; + } + + public static IUniTaskSource Create(AsyncOperationHandle handle, PlayerLoopTiming timing, IProgress progress, CancellationToken cancellationToken, bool cancelImmediately, bool autoReleaseWhenCanceled, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new AsyncOperationHandleConfiguredSource(); + } + + result.handle = handle; + result.cancellationToken = cancellationToken; + result.completed = false; + result.progress = progress; + result.autoReleaseWhenCanceled = autoReleaseWhenCanceled; + result.cancelImmediately = cancelImmediately; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (AsyncOperationHandleConfiguredSource)state; + if (promise.autoReleaseWhenCanceled && promise.handle.IsValid()) + { + Addressables.Release(promise.handle); + } + promise.core.TrySetCanceled(promise.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + handle.Completed += result.completedCallback; + + token = result.core.Version; + return result; + } + + void HandleCompleted(AsyncOperationHandle argHandle) + { + if (handle.IsValid()) + { + handle.Completed -= completedCallback; + } + + if (completed) + { + return; + } + completed = true; + if (cancellationToken.IsCancellationRequested) + { + if (autoReleaseWhenCanceled && handle.IsValid()) + { + Addressables.Release(handle); + } + core.TrySetCanceled(cancellationToken); + } + else if (argHandle.Status == AsyncOperationStatus.Failed) + { + core.TrySetException(argHandle.OperationException); + } + else + { + core.TrySetResult(argHandle.Result); + } + } + + public T GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + TryReturn(); + } + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (completed) + { + return false; + } + + if (cancellationToken.IsCancellationRequested) + { + completed = true; + if (autoReleaseWhenCanceled && handle.IsValid()) + { + Addressables.Release(handle); + } + core.TrySetCanceled(cancellationToken); + return false; + } + + if (progress != null && handle.IsValid()) + { + progress.Report(handle.PercentComplete); + } + + return true; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + handle = default; + progress = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + return pool.TryPush(this); + } + } + +#endregion + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/External/Addressables/AddressablesAsyncExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/External/Addressables/AddressablesAsyncExtensions.cs.meta new file mode 100644 index 0000000..6927930 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/Addressables/AddressablesAsyncExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3dc6441f9094f354b931dc3c79fb99e5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/External/Addressables/UniTask.Addressables.asmdef b/Assets/Plugins/UniTask/Runtime/External/Addressables/UniTask.Addressables.asmdef new file mode 100644 index 0000000..faed8ec --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/Addressables/UniTask.Addressables.asmdef @@ -0,0 +1,28 @@ +{ + "name": "UniTask.Addressables", + "references": [ + "UniTask", + "Unity.ResourceManager", + "Unity.Addressables" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [ + { + "name": "com.unity.addressables", + "expression": "", + "define": "UNITASK_ADDRESSABLE_SUPPORT" + }, + { + "name": "com.unity.addressables.cn", + "expression": "", + "define": "UNITASK_ADDRESSABLE_SUPPORT" + } + ], + "noEngineReferences": false +} diff --git a/Assets/Plugins/UniTask/Runtime/External/Addressables/UniTask.Addressables.asmdef.meta b/Assets/Plugins/UniTask/Runtime/External/Addressables/UniTask.Addressables.asmdef.meta new file mode 100644 index 0000000..b0178c4 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/Addressables/UniTask.Addressables.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 593a5b492d29ac6448b1ebf7f035ef33 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/External/DOTween.meta b/Assets/Plugins/UniTask/Runtime/External/DOTween.meta new file mode 100644 index 0000000..7abcacd --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/DOTween.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e3e7132b4ee39f6419dcf91687f225bf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/External/DOTween/DOTweenAsyncExtensions.cs b/Assets/Plugins/UniTask/Runtime/External/DOTween/DOTweenAsyncExtensions.cs new file mode 100644 index 0000000..ba78367 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/DOTween/DOTweenAsyncExtensions.cs @@ -0,0 +1,436 @@ +// asmdef Version Defines, enabled when com.demigiant.dotween is imported. + +#if UNITASK_DOTWEEN_SUPPORT + +using Cysharp.Threading.Tasks.Internal; +using DG.Tweening; +using System; +using System.Collections.Concurrent; +using System.Runtime.CompilerServices; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + public enum TweenCancelBehaviour + { + Kill, + KillWithCompleteCallback, + Complete, + CompleteWithSequenceCallback, + CancelAwait, + + // AndCancelAwait + KillAndCancelAwait, + KillWithCompleteCallbackAndCancelAwait, + CompleteAndCancelAwait, + CompleteWithSequenceCallbackAndCancelAwait + } + + public static class DOTweenAsyncExtensions + { + enum CallbackType + { + Kill, + Complete, + Pause, + Play, + Rewind, + StepComplete + } + + public static TweenAwaiter GetAwaiter(this Tween tween) + { + return new TweenAwaiter(tween); + } + + public static UniTask WithCancellation(this Tween tween, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(tween, nameof(tween)); + + if (!tween.IsActive()) return UniTask.CompletedTask; + return new UniTask(TweenConfiguredSource.Create(tween, TweenCancelBehaviour.Kill, cancellationToken, CallbackType.Kill, out var token), token); + } + + public static UniTask ToUniTask(this Tween tween, TweenCancelBehaviour tweenCancelBehaviour = TweenCancelBehaviour.Kill, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(tween, nameof(tween)); + + if (!tween.IsActive()) return UniTask.CompletedTask; + return new UniTask(TweenConfiguredSource.Create(tween, tweenCancelBehaviour, cancellationToken, CallbackType.Kill, out var token), token); + } + + public static UniTask AwaitForComplete(this Tween tween, TweenCancelBehaviour tweenCancelBehaviour = TweenCancelBehaviour.Kill, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(tween, nameof(tween)); + + if (!tween.IsActive()) return UniTask.CompletedTask; + return new UniTask(TweenConfiguredSource.Create(tween, tweenCancelBehaviour, cancellationToken, CallbackType.Complete, out var token), token); + } + + public static UniTask AwaitForPause(this Tween tween, TweenCancelBehaviour tweenCancelBehaviour = TweenCancelBehaviour.Kill, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(tween, nameof(tween)); + + if (!tween.IsActive()) return UniTask.CompletedTask; + return new UniTask(TweenConfiguredSource.Create(tween, tweenCancelBehaviour, cancellationToken, CallbackType.Pause, out var token), token); + } + + public static UniTask AwaitForPlay(this Tween tween, TweenCancelBehaviour tweenCancelBehaviour = TweenCancelBehaviour.Kill, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(tween, nameof(tween)); + + if (!tween.IsActive()) return UniTask.CompletedTask; + return new UniTask(TweenConfiguredSource.Create(tween, tweenCancelBehaviour, cancellationToken, CallbackType.Play, out var token), token); + } + + public static UniTask AwaitForRewind(this Tween tween, TweenCancelBehaviour tweenCancelBehaviour = TweenCancelBehaviour.Kill, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(tween, nameof(tween)); + + if (!tween.IsActive()) return UniTask.CompletedTask; + return new UniTask(TweenConfiguredSource.Create(tween, tweenCancelBehaviour, cancellationToken, CallbackType.Rewind, out var token), token); + } + + public static UniTask AwaitForStepComplete(this Tween tween, TweenCancelBehaviour tweenCancelBehaviour = TweenCancelBehaviour.Kill, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(tween, nameof(tween)); + + if (!tween.IsActive()) return UniTask.CompletedTask; + return new UniTask(TweenConfiguredSource.Create(tween, tweenCancelBehaviour, cancellationToken, CallbackType.StepComplete, out var token), token); + } + + public struct TweenAwaiter : ICriticalNotifyCompletion + { + readonly Tween tween; + + // killed(non active) as completed. + public bool IsCompleted => !tween.IsActive(); + + public TweenAwaiter(Tween tween) + { + this.tween = tween; + } + + public TweenAwaiter GetAwaiter() + { + return this; + } + + public void GetResult() + { + } + + public void OnCompleted(System.Action continuation) + { + UnsafeOnCompleted(continuation); + } + + public void UnsafeOnCompleted(System.Action continuation) + { + // onKill is called after OnCompleted, both Complete(false/true) and Kill(false/true). + tween.onKill = PooledTweenCallback.Create(continuation); + } + } + + sealed class TweenConfiguredSource : IUniTaskSource, ITaskPoolNode + { + static TaskPool pool; + TweenConfiguredSource nextNode; + public ref TweenConfiguredSource NextNode => ref nextNode; + + static TweenConfiguredSource() + { + TaskPool.RegisterSizeGetter(typeof(TweenConfiguredSource), () => pool.Size); + } + + readonly TweenCallback onCompleteCallbackDelegate; + + Tween tween; + TweenCancelBehaviour cancelBehaviour; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationRegistration; + CallbackType callbackType; + bool canceled; + + TweenCallback originalCompleteAction; + UniTaskCompletionSourceCore core; + + TweenConfiguredSource() + { + onCompleteCallbackDelegate = OnCompleteCallbackDelegate; + } + + public static IUniTaskSource Create(Tween tween, TweenCancelBehaviour cancelBehaviour, CancellationToken cancellationToken, CallbackType callbackType, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + DoCancelBeforeCreate(tween, cancelBehaviour); + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new TweenConfiguredSource(); + } + + result.tween = tween; + result.cancelBehaviour = cancelBehaviour; + result.cancellationToken = cancellationToken; + result.callbackType = callbackType; + result.canceled = false; + + switch (callbackType) + { + case CallbackType.Kill: + result.originalCompleteAction = tween.onKill; + tween.onKill = result.onCompleteCallbackDelegate; + break; + case CallbackType.Complete: + result.originalCompleteAction = tween.onComplete; + tween.onComplete = result.onCompleteCallbackDelegate; + break; + case CallbackType.Pause: + result.originalCompleteAction = tween.onPause; + tween.onPause = result.onCompleteCallbackDelegate; + break; + case CallbackType.Play: + result.originalCompleteAction = tween.onPlay; + tween.onPlay = result.onCompleteCallbackDelegate; + break; + case CallbackType.Rewind: + result.originalCompleteAction = tween.onRewind; + tween.onRewind = result.onCompleteCallbackDelegate; + break; + case CallbackType.StepComplete: + result.originalCompleteAction = tween.onStepComplete; + tween.onStepComplete = result.onCompleteCallbackDelegate; + break; + default: + break; + } + + if (result.originalCompleteAction == result.onCompleteCallbackDelegate) + { + result.originalCompleteAction = null; + } + + if (cancellationToken.CanBeCanceled) + { + result.cancellationRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(x => + { + var source = (TweenConfiguredSource)x; + switch (source.cancelBehaviour) + { + case TweenCancelBehaviour.Kill: + default: + source.tween.Kill(false); + break; + case TweenCancelBehaviour.KillAndCancelAwait: + source.canceled = true; + source.tween.Kill(false); + break; + case TweenCancelBehaviour.KillWithCompleteCallback: + source.tween.Kill(true); + break; + case TweenCancelBehaviour.KillWithCompleteCallbackAndCancelAwait: + source.canceled = true; + source.tween.Kill(true); + break; + case TweenCancelBehaviour.Complete: + source.tween.Complete(false); + break; + case TweenCancelBehaviour.CompleteAndCancelAwait: + source.canceled = true; + source.tween.Complete(false); + break; + case TweenCancelBehaviour.CompleteWithSequenceCallback: + source.tween.Complete(true); + break; + case TweenCancelBehaviour.CompleteWithSequenceCallbackAndCancelAwait: + source.canceled = true; + source.tween.Complete(true); + break; + case TweenCancelBehaviour.CancelAwait: + source.RestoreOriginalCallback(); + source.core.TrySetCanceled(source.cancellationToken); + break; + } + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + token = result.core.Version; + return result; + } + + void OnCompleteCallbackDelegate() + { + if (cancellationToken.IsCancellationRequested) + { + if (this.cancelBehaviour == TweenCancelBehaviour.KillAndCancelAwait + || this.cancelBehaviour == TweenCancelBehaviour.KillWithCompleteCallbackAndCancelAwait + || this.cancelBehaviour == TweenCancelBehaviour.CompleteAndCancelAwait + || this.cancelBehaviour == TweenCancelBehaviour.CompleteWithSequenceCallbackAndCancelAwait + || this.cancelBehaviour == TweenCancelBehaviour.CancelAwait) + { + canceled = true; + } + } + if (canceled) + { + core.TrySetCanceled(cancellationToken); + } + else + { + originalCompleteAction?.Invoke(); + core.TrySetResult(AsyncUnit.Default); + } + } + + static void DoCancelBeforeCreate(Tween tween, TweenCancelBehaviour tweenCancelBehaviour) + { + + switch (tweenCancelBehaviour) + { + case TweenCancelBehaviour.Kill: + default: + tween.Kill(false); + break; + case TweenCancelBehaviour.KillAndCancelAwait: + tween.Kill(false); + break; + case TweenCancelBehaviour.KillWithCompleteCallback: + tween.Kill(true); + break; + case TweenCancelBehaviour.KillWithCompleteCallbackAndCancelAwait: + tween.Kill(true); + break; + case TweenCancelBehaviour.Complete: + tween.Complete(false); + break; + case TweenCancelBehaviour.CompleteAndCancelAwait: + tween.Complete(false); + break; + case TweenCancelBehaviour.CompleteWithSequenceCallback: + tween.Complete(true); + break; + case TweenCancelBehaviour.CompleteWithSequenceCallbackAndCancelAwait: + tween.Complete(true); + break; + case TweenCancelBehaviour.CancelAwait: + break; + } + } + + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + TryReturn(); + } + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + cancellationRegistration.Dispose(); + + RestoreOriginalCallback(); + + tween = default; + cancellationToken = default; + originalCompleteAction = default; + return pool.TryPush(this); + } + + void RestoreOriginalCallback() + { + switch (callbackType) + { + case CallbackType.Kill: + tween.onKill = originalCompleteAction; + break; + case CallbackType.Complete: + tween.onComplete = originalCompleteAction; + break; + case CallbackType.Pause: + tween.onPause = originalCompleteAction; + break; + case CallbackType.Play: + tween.onPlay = originalCompleteAction; + break; + case CallbackType.Rewind: + tween.onRewind = originalCompleteAction; + break; + case CallbackType.StepComplete: + tween.onStepComplete = originalCompleteAction; + break; + default: + break; + } + } + } + } + + sealed class PooledTweenCallback + { + static readonly ConcurrentQueue pool = new ConcurrentQueue(); + + readonly TweenCallback runDelegate; + + Action continuation; + + + PooledTweenCallback() + { + runDelegate = Run; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TweenCallback Create(Action continuation) + { + if (!pool.TryDequeue(out var item)) + { + item = new PooledTweenCallback(); + } + + item.continuation = continuation; + return item.runDelegate; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + void Run() + { + var call = continuation; + continuation = null; + if (call != null) + { + pool.Enqueue(this); + call.Invoke(); + } + } + } +} + +#endif diff --git a/Assets/Plugins/UniTask/Runtime/External/DOTween/DOTweenAsyncExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/External/DOTween/DOTweenAsyncExtensions.cs.meta new file mode 100644 index 0000000..63131b0 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/DOTween/DOTweenAsyncExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1f448d5bc5b232e4f98d89d5d1832e8e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/External/DOTween/UniTask.DOTween.asmdef b/Assets/Plugins/UniTask/Runtime/External/DOTween/UniTask.DOTween.asmdef new file mode 100644 index 0000000..7bdb2b6 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/DOTween/UniTask.DOTween.asmdef @@ -0,0 +1,22 @@ +{ + "name": "UniTask.DOTween", + "references": [ + "UniTask", + "DOTween.Modules" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [ + { + "name": "com.demigiant.dotween", + "expression": "", + "define": "UNITASK_DOTWEEN_SUPPORT" + } + ], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/External/DOTween/UniTask.DOTween.asmdef.meta b/Assets/Plugins/UniTask/Runtime/External/DOTween/UniTask.DOTween.asmdef.meta new file mode 100644 index 0000000..427fe29 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/DOTween/UniTask.DOTween.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 029c1c1b674aaae47a6841a0b89ad80e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/External/TextMeshPro.meta b/Assets/Plugins/UniTask/Runtime/External/TextMeshPro.meta new file mode 100644 index 0000000..211ef9e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/TextMeshPro.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a6e673897e18a81439da4c1082e3c95e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/TextMeshProAsyncExtensions.InputField.cs b/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/TextMeshProAsyncExtensions.InputField.cs new file mode 100644 index 0000000..22f081c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/TextMeshProAsyncExtensions.InputField.cs @@ -0,0 +1,224 @@ +#if UNITASK_TEXTMESHPRO_SUPPORT + +using System; +using System.Threading; +using TMPro; + +namespace Cysharp.Threading.Tasks +{ + public static partial class TextMeshProAsyncExtensions + { + public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this TMP_InputField inputField) + { + return new AsyncUnityEventHandler(inputField.onValueChanged, inputField.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(inputField.onValueChanged, cancellationToken, false); + } + + public static UniTask OnValueChangedAsync(this TMP_InputField inputField) + { + return new AsyncUnityEventHandler(inputField.onValueChanged, inputField.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask OnValueChangedAsync(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(inputField.onValueChanged, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnValueChangedAsAsyncEnumerable(this TMP_InputField inputField) + { + return new UnityEventHandlerAsyncEnumerable(inputField.onValueChanged, inputField.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable OnValueChangedAsAsyncEnumerable(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(inputField.onValueChanged, cancellationToken); + } + + public static IAsyncEndEditEventHandler GetAsyncEndEditEventHandler(this TMP_InputField inputField) + { + return new AsyncUnityEventHandler(inputField.onEndEdit, inputField.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncEndEditEventHandler GetAsyncEndEditEventHandler(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(inputField.onEndEdit, cancellationToken, false); + } + + public static UniTask OnEndEditAsync(this TMP_InputField inputField) + { + return new AsyncUnityEventHandler(inputField.onEndEdit, inputField.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask OnEndEditAsync(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(inputField.onEndEdit, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnEndEditAsAsyncEnumerable(this TMP_InputField inputField) + { + return new UnityEventHandlerAsyncEnumerable(inputField.onEndEdit, inputField.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable OnEndEditAsAsyncEnumerable(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(inputField.onEndEdit, cancellationToken); + } + + public static IAsyncEndTextSelectionEventHandler<(string, int, int)> GetAsyncEndTextSelectionEventHandler(this TMP_InputField inputField) + { + return new AsyncUnityEventHandler<(string, int, int)>(new TextSelectionEventConverter(inputField.onEndTextSelection), inputField.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncEndTextSelectionEventHandler<(string, int, int)> GetAsyncEndTextSelectionEventHandler(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler<(string, int, int)>(new TextSelectionEventConverter(inputField.onEndTextSelection), cancellationToken, false); + } + + public static UniTask<(string, int, int)> OnEndTextSelectionAsync(this TMP_InputField inputField) + { + return new AsyncUnityEventHandler<(string, int, int)>(new TextSelectionEventConverter(inputField.onEndTextSelection), inputField.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask<(string, int, int)> OnEndTextSelectionAsync(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler<(string, int, int)>(new TextSelectionEventConverter(inputField.onEndTextSelection), cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable<(string, int, int)> OnEndTextSelectionAsAsyncEnumerable(this TMP_InputField inputField) + { + return new UnityEventHandlerAsyncEnumerable<(string, int, int)>(new TextSelectionEventConverter(inputField.onEndTextSelection), inputField.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable<(string, int, int)> OnEndTextSelectionAsAsyncEnumerable(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable<(string, int, int)>(new TextSelectionEventConverter(inputField.onEndTextSelection), cancellationToken); + } + + public static IAsyncTextSelectionEventHandler<(string, int, int)> GetAsyncTextSelectionEventHandler(this TMP_InputField inputField) + { + return new AsyncUnityEventHandler<(string, int, int)>(new TextSelectionEventConverter(inputField.onTextSelection), inputField.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncTextSelectionEventHandler<(string, int, int)> GetAsyncTextSelectionEventHandler(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler<(string, int, int)>(new TextSelectionEventConverter(inputField.onTextSelection), cancellationToken, false); + } + + public static UniTask<(string, int, int)> OnTextSelectionAsync(this TMP_InputField inputField) + { + return new AsyncUnityEventHandler<(string, int, int)>(new TextSelectionEventConverter(inputField.onTextSelection), inputField.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask<(string, int, int)> OnTextSelectionAsync(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler<(string, int, int)>(new TextSelectionEventConverter(inputField.onTextSelection), cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable<(string, int, int)> OnTextSelectionAsAsyncEnumerable(this TMP_InputField inputField) + { + return new UnityEventHandlerAsyncEnumerable<(string, int, int)>(new TextSelectionEventConverter(inputField.onTextSelection), inputField.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable<(string, int, int)> OnTextSelectionAsAsyncEnumerable(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable<(string, int, int)>(new TextSelectionEventConverter(inputField.onTextSelection), cancellationToken); + } + + public static IAsyncDeselectEventHandler GetAsyncDeselectEventHandler(this TMP_InputField inputField) + { + return new AsyncUnityEventHandler(inputField.onDeselect, inputField.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncDeselectEventHandler GetAsyncDeselectEventHandler(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(inputField.onDeselect, cancellationToken, false); + } + + public static UniTask OnDeselectAsync(this TMP_InputField inputField) + { + return new AsyncUnityEventHandler(inputField.onDeselect, inputField.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask OnDeselectAsync(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(inputField.onDeselect, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnDeselectAsAsyncEnumerable(this TMP_InputField inputField) + { + return new UnityEventHandlerAsyncEnumerable(inputField.onDeselect, inputField.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable OnDeselectAsAsyncEnumerable(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(inputField.onDeselect, cancellationToken); + } + + public static IAsyncSelectEventHandler GetAsyncSelectEventHandler(this TMP_InputField inputField) + { + return new AsyncUnityEventHandler(inputField.onSelect, inputField.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncSelectEventHandler GetAsyncSelectEventHandler(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(inputField.onSelect, cancellationToken, false); + } + + public static UniTask OnSelectAsync(this TMP_InputField inputField) + { + return new AsyncUnityEventHandler(inputField.onSelect, inputField.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask OnSelectAsync(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(inputField.onSelect, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnSelectAsAsyncEnumerable(this TMP_InputField inputField) + { + return new UnityEventHandlerAsyncEnumerable(inputField.onSelect, inputField.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable OnSelectAsAsyncEnumerable(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(inputField.onSelect, cancellationToken); + } + + public static IAsyncSubmitEventHandler GetAsyncSubmitEventHandler(this TMP_InputField inputField) + { + return new AsyncUnityEventHandler(inputField.onSubmit, inputField.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncSubmitEventHandler GetAsyncSubmitEventHandler(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(inputField.onSubmit, cancellationToken, false); + } + + public static UniTask OnSubmitAsync(this TMP_InputField inputField) + { + return new AsyncUnityEventHandler(inputField.onSubmit, inputField.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask OnSubmitAsync(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(inputField.onSubmit, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnSubmitAsAsyncEnumerable(this TMP_InputField inputField) + { + return new UnityEventHandlerAsyncEnumerable(inputField.onSubmit, inputField.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable OnSubmitAsAsyncEnumerable(this TMP_InputField inputField, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(inputField.onSubmit, cancellationToken); + } + + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/TextMeshProAsyncExtensions.InputField.cs.meta b/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/TextMeshProAsyncExtensions.InputField.cs.meta new file mode 100644 index 0000000..2e39d2e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/TextMeshProAsyncExtensions.InputField.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 79f4f2475e0b2c44e97ed1dee760627b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/TextMeshProAsyncExtensions.cs b/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/TextMeshProAsyncExtensions.cs new file mode 100644 index 0000000..362aa83 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/TextMeshProAsyncExtensions.cs @@ -0,0 +1,130 @@ +#if UNITASK_TEXTMESHPRO_SUPPORT + +using System; +using System.Threading; +using TMPro; +using UnityEngine.Events; + +namespace Cysharp.Threading.Tasks +{ + public static partial class TextMeshProAsyncExtensions + { + // -> Text + public static void BindTo(this IUniTaskAsyncEnumerable source, TMP_Text text, bool rebindOnError = true) + { + BindToCore(source, text, text.GetCancellationTokenOnDestroy(), rebindOnError).Forget(); + } + + public static void BindTo(this IUniTaskAsyncEnumerable source, TMP_Text text, CancellationToken cancellationToken, bool rebindOnError = true) + { + BindToCore(source, text, cancellationToken, rebindOnError).Forget(); + } + + static async UniTaskVoid BindToCore(IUniTaskAsyncEnumerable source, TMP_Text text, CancellationToken cancellationToken, bool rebindOnError) + { + var repeat = false; + BIND_AGAIN: + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (true) + { + bool moveNext; + try + { + moveNext = await e.MoveNextAsync(); + repeat = false; + } + catch (Exception ex) + { + if (ex is OperationCanceledException) return; + + if (rebindOnError && !repeat) + { + repeat = true; + goto BIND_AGAIN; + } + else + { + throw; + } + } + + if (!moveNext) return; + + text.text = e.Current; + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + // -> Text + + public static void BindTo(this IUniTaskAsyncEnumerable source, TMP_Text text, bool rebindOnError = true) + { + BindToCore(source, text, text.GetCancellationTokenOnDestroy(), rebindOnError).Forget(); + } + + public static void BindTo(this IUniTaskAsyncEnumerable source, TMP_Text text, CancellationToken cancellationToken, bool rebindOnError = true) + { + BindToCore(source, text, cancellationToken, rebindOnError).Forget(); + } + + public static void BindTo(this AsyncReactiveProperty source, TMP_Text text, bool rebindOnError = true) + { + BindToCore(source, text, text.GetCancellationTokenOnDestroy(), rebindOnError).Forget(); + } + + static async UniTaskVoid BindToCore(IUniTaskAsyncEnumerable source, TMP_Text text, CancellationToken cancellationToken, bool rebindOnError) + { + var repeat = false; + BIND_AGAIN: + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (true) + { + bool moveNext; + try + { + moveNext = await e.MoveNextAsync(); + repeat = false; + } + catch (Exception ex) + { + if (ex is OperationCanceledException) return; + + if (rebindOnError && !repeat) + { + repeat = true; + goto BIND_AGAIN; + } + else + { + throw; + } + } + + if (!moveNext) return; + + text.text = e.Current.ToString(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/TextMeshProAsyncExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/TextMeshProAsyncExtensions.cs.meta new file mode 100644 index 0000000..752d125 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/TextMeshProAsyncExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b6ba480edafb67d4e91bb10feb64fae5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/UniTask.TextMeshPro.asmdef b/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/UniTask.TextMeshPro.asmdef new file mode 100644 index 0000000..6bb01d7 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/UniTask.TextMeshPro.asmdef @@ -0,0 +1,22 @@ +{ + "name": "UniTask.TextMeshPro", + "references": [ + "UniTask", + "Unity.TextMeshPro" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [ + { + "name": "com.unity.textmeshpro", + "expression": "", + "define": "UNITASK_TEXTMESHPRO_SUPPORT" + } + ], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/UniTask.TextMeshPro.asmdef.meta b/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/UniTask.TextMeshPro.asmdef.meta new file mode 100644 index 0000000..4b59831 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/External/TextMeshPro/UniTask.TextMeshPro.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dc47925d1a5fa2946bdd37746b2b5d48 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/IUniTaskAsyncEnumerable.cs b/Assets/Plugins/UniTask/Runtime/IUniTaskAsyncEnumerable.cs new file mode 100644 index 0000000..847d430 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/IUniTaskAsyncEnumerable.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + public interface IUniTaskAsyncEnumerable + { + IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default); + } + + public interface IUniTaskAsyncEnumerator : IUniTaskAsyncDisposable + { + T Current { get; } + UniTask MoveNextAsync(); + } + + public interface IUniTaskAsyncDisposable + { + UniTask DisposeAsync(); + } + + public interface IUniTaskOrderedAsyncEnumerable : IUniTaskAsyncEnumerable + { + IUniTaskOrderedAsyncEnumerable CreateOrderedEnumerable(Func keySelector, IComparer comparer, bool descending); + IUniTaskOrderedAsyncEnumerable CreateOrderedEnumerable(Func> keySelector, IComparer comparer, bool descending); + IUniTaskOrderedAsyncEnumerable CreateOrderedEnumerable(Func> keySelector, IComparer comparer, bool descending); + } + + public interface IConnectableUniTaskAsyncEnumerable : IUniTaskAsyncEnumerable + { + IDisposable Connect(); + } + + // don't use AsyncGrouping. + //public interface IUniTaskAsyncGrouping : IUniTaskAsyncEnumerable + //{ + // TKey Key { get; } + //} + + public static class UniTaskAsyncEnumerableExtensions + { + public static UniTaskCancelableAsyncEnumerable WithCancellation(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + return new UniTaskCancelableAsyncEnumerable(source, cancellationToken); + } + } + + [StructLayout(LayoutKind.Auto)] + public readonly struct UniTaskCancelableAsyncEnumerable + { + private readonly IUniTaskAsyncEnumerable enumerable; + private readonly CancellationToken cancellationToken; + + internal UniTaskCancelableAsyncEnumerable(IUniTaskAsyncEnumerable enumerable, CancellationToken cancellationToken) + { + this.enumerable = enumerable; + this.cancellationToken = cancellationToken; + } + + public Enumerator GetAsyncEnumerator() + { + return new Enumerator(enumerable.GetAsyncEnumerator(cancellationToken)); + } + + [StructLayout(LayoutKind.Auto)] + public readonly struct Enumerator + { + private readonly IUniTaskAsyncEnumerator enumerator; + + internal Enumerator(IUniTaskAsyncEnumerator enumerator) + { + this.enumerator = enumerator; + } + + public T Current => enumerator.Current; + + public UniTask MoveNextAsync() + { + return enumerator.MoveNextAsync(); + } + + + public UniTask DisposeAsync() + { + return enumerator.DisposeAsync(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/IUniTaskAsyncEnumerable.cs.meta b/Assets/Plugins/UniTask/Runtime/IUniTaskAsyncEnumerable.cs.meta new file mode 100644 index 0000000..12f0fe5 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/IUniTaskAsyncEnumerable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b20cf9f02ac585948a4372fa4ee06504 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/IUniTaskSource.cs b/Assets/Plugins/UniTask/Runtime/IUniTaskSource.cs new file mode 100644 index 0000000..ad758f1 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/IUniTaskSource.cs @@ -0,0 +1,127 @@ +#pragma warning disable CS1591 +#pragma warning disable CS0108 + +#if (UNITASK_NETCORE && !NETSTANDARD2_0) || UNITY_2022_3_OR_NEWER +#define SUPPORT_VALUETASK +#endif + +using System; +using System.Runtime.CompilerServices; + +namespace Cysharp.Threading.Tasks +{ + public enum UniTaskStatus + { + /// The operation has not yet completed. + Pending = 0, + /// The operation completed successfully. + Succeeded = 1, + /// The operation completed with an error. + Faulted = 2, + /// The operation completed due to cancellation. + Canceled = 3 + } + + // similar as IValueTaskSource + public interface IUniTaskSource +#if SUPPORT_VALUETASK + : System.Threading.Tasks.Sources.IValueTaskSource +#endif + { + UniTaskStatus GetStatus(short token); + void OnCompleted(Action continuation, object state, short token); + void GetResult(short token); + + UniTaskStatus UnsafeGetStatus(); // only for debug use. + +#if SUPPORT_VALUETASK + + System.Threading.Tasks.Sources.ValueTaskSourceStatus System.Threading.Tasks.Sources.IValueTaskSource.GetStatus(short token) + { + return (System.Threading.Tasks.Sources.ValueTaskSourceStatus)(int)((IUniTaskSource)this).GetStatus(token); + } + + void System.Threading.Tasks.Sources.IValueTaskSource.GetResult(short token) + { + ((IUniTaskSource)this).GetResult(token); + } + + void System.Threading.Tasks.Sources.IValueTaskSource.OnCompleted(Action continuation, object state, short token, System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags flags) + { + // ignore flags, always none. + ((IUniTaskSource)this).OnCompleted(continuation, state, token); + } + +#endif + } + + public interface IUniTaskSource : IUniTaskSource +#if SUPPORT_VALUETASK + , System.Threading.Tasks.Sources.IValueTaskSource +#endif + { + new T GetResult(short token); + +#if SUPPORT_VALUETASK + + new public UniTaskStatus GetStatus(short token) + { + return ((IUniTaskSource)this).GetStatus(token); + } + + new public void OnCompleted(Action continuation, object state, short token) + { + ((IUniTaskSource)this).OnCompleted(continuation, state, token); + } + + System.Threading.Tasks.Sources.ValueTaskSourceStatus System.Threading.Tasks.Sources.IValueTaskSource.GetStatus(short token) + { + return (System.Threading.Tasks.Sources.ValueTaskSourceStatus)(int)((IUniTaskSource)this).GetStatus(token); + } + + T System.Threading.Tasks.Sources.IValueTaskSource.GetResult(short token) + { + return ((IUniTaskSource)this).GetResult(token); + } + + void System.Threading.Tasks.Sources.IValueTaskSource.OnCompleted(Action continuation, object state, short token, System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags flags) + { + // ignore flags, always none. + ((IUniTaskSource)this).OnCompleted(continuation, state, token); + } + +#endif + } + + public static class UniTaskStatusExtensions + { + /// status != Pending. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsCompleted(this UniTaskStatus status) + { + return status != UniTaskStatus.Pending; + } + + /// status == Succeeded. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsCompletedSuccessfully(this UniTaskStatus status) + { + return status == UniTaskStatus.Succeeded; + } + + /// status == Canceled. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsCanceled(this UniTaskStatus status) + { + return status == UniTaskStatus.Canceled; + } + + /// status == Faulted. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsFaulted(this UniTaskStatus status) + { + return status == UniTaskStatus.Faulted; + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/IUniTaskSource.cs.meta b/Assets/Plugins/UniTask/Runtime/IUniTaskSource.cs.meta new file mode 100644 index 0000000..b225d1c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/IUniTaskSource.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3e4d023d8404ab742b5e808c98097c3c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal.meta b/Assets/Plugins/UniTask/Runtime/Internal.meta new file mode 100644 index 0000000..9e1585b --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aaa65e72c0bfc9842acfd2af1f7dfd3f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/ArrayPool.cs b/Assets/Plugins/UniTask/Runtime/Internal/ArrayPool.cs new file mode 100644 index 0000000..e1d9d3b --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/ArrayPool.cs @@ -0,0 +1,150 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Internal +{ + // Same interface as System.Buffers.ArrayPool but only provides Shared. + + internal sealed class ArrayPool + { + // Same size as System.Buffers.DefaultArrayPool + const int DefaultMaxNumberOfArraysPerBucket = 50; + + static readonly T[] EmptyArray = new T[0]; + + public static readonly ArrayPool Shared = new ArrayPool(); + + readonly MinimumQueue[] buckets; + readonly SpinLock[] locks; + + ArrayPool() + { + // see: GetQueueIndex + buckets = new MinimumQueue[18]; + locks = new SpinLock[18]; + for (int i = 0; i < buckets.Length; i++) + { + buckets[i] = new MinimumQueue(4); + locks[i] = new SpinLock(false); + } + } + + public T[] Rent(int minimumLength) + { + if (minimumLength < 0) + { + throw new ArgumentOutOfRangeException("minimumLength"); + } + else if (minimumLength == 0) + { + return EmptyArray; + } + + var size = CalculateSize(minimumLength); + var index = GetQueueIndex(size); + if (index != -1) + { + var q = buckets[index]; + var lockTaken = false; + try + { + locks[index].Enter(ref lockTaken); + + if (q.Count != 0) + { + return q.Dequeue(); + } + } + finally + { + if (lockTaken) locks[index].Exit(false); + } + } + + return new T[size]; + } + + public void Return(T[] array, bool clearArray = false) + { + if (array == null || array.Length == 0) + { + return; + } + + var index = GetQueueIndex(array.Length); + if (index != -1) + { + if (clearArray) + { + Array.Clear(array, 0, array.Length); + } + + var q = buckets[index]; + var lockTaken = false; + + try + { + locks[index].Enter(ref lockTaken); + + if (q.Count > DefaultMaxNumberOfArraysPerBucket) + { + return; + } + + q.Enqueue(array); + } + finally + { + if (lockTaken) locks[index].Exit(false); + } + } + } + + static int CalculateSize(int size) + { + size--; + size |= size >> 1; + size |= size >> 2; + size |= size >> 4; + size |= size >> 8; + size |= size >> 16; + size += 1; + + if (size < 8) + { + size = 8; + } + + return size; + } + + static int GetQueueIndex(int size) + { + switch (size) + { + case 8: return 0; + case 16: return 1; + case 32: return 2; + case 64: return 3; + case 128: return 4; + case 256: return 5; + case 512: return 6; + case 1024: return 7; + case 2048: return 8; + case 4096: return 9; + case 8192: return 10; + case 16384: return 11; + case 32768: return 12; + case 65536: return 13; + case 131072: return 14; + case 262144: return 15; + case 524288: return 16; + case 1048576: return 17; // max array length + default: + return -1; + } + } + } +} diff --git a/Assets/Plugins/UniTask/Runtime/Internal/ArrayPool.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/ArrayPool.cs.meta new file mode 100644 index 0000000..693816c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/ArrayPool.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f83ebad81fb89fb4882331616ca6d248 +timeCreated: 1532361008 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/ArrayPoolUtil.cs b/Assets/Plugins/UniTask/Runtime/Internal/ArrayPoolUtil.cs new file mode 100644 index 0000000..016901d --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/ArrayPoolUtil.cs @@ -0,0 +1,115 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Cysharp.Threading.Tasks.Internal +{ + internal static class ArrayPoolUtil + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void EnsureCapacity(ref T[] array, int index, ArrayPool pool) + { + if (array.Length <= index) + { + EnsureCapacityCore(ref array, index, pool); + } + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static void EnsureCapacityCore(ref T[] array, int index, ArrayPool pool) + { + if (array.Length <= index) + { + var newSize = array.Length * 2; + var newArray = pool.Rent((index < newSize) ? newSize : (index * 2)); + Array.Copy(array, 0, newArray, 0, array.Length); + + pool.Return(array, clearArray: !RuntimeHelpersAbstraction.IsWellKnownNoReferenceContainsType()); + + array = newArray; + } + } + + public static RentArray Materialize(IEnumerable source) + { + if (source is T[] array) + { + return new RentArray(array, array.Length, null); + } + + var defaultCount = 32; + if (source is ICollection coll) + { + if (coll.Count == 0) + { + return new RentArray(Array.Empty(), 0, null); + } + + defaultCount = coll.Count; + var pool = ArrayPool.Shared; + var buffer = pool.Rent(defaultCount); + coll.CopyTo(buffer, 0); + return new RentArray(buffer, coll.Count, pool); + } + else if (source is IReadOnlyCollection rcoll) + { + defaultCount = rcoll.Count; + } + + if (defaultCount == 0) + { + return new RentArray(Array.Empty(), 0, null); + } + + { + var pool = ArrayPool.Shared; + + var index = 0; + var buffer = pool.Rent(defaultCount); + foreach (var item in source) + { + EnsureCapacity(ref buffer, index, pool); + buffer[index++] = item; + } + + return new RentArray(buffer, index, pool); + } + } + + public struct RentArray : IDisposable + { + public readonly T[] Array; + public readonly int Length; + ArrayPool pool; + + public RentArray(T[] array, int length, ArrayPool pool) + { + this.Array = array; + this.Length = length; + this.pool = pool; + } + + public void Dispose() + { + DisposeManually(!RuntimeHelpersAbstraction.IsWellKnownNoReferenceContainsType()); + } + + public void DisposeManually(bool clearArray) + { + if (pool != null) + { + if (clearArray) + { + System.Array.Clear(Array, 0, Length); + } + + pool.Return(Array, clearArray: false); + pool = null; + } + } + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/Internal/ArrayPoolUtil.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/ArrayPoolUtil.cs.meta new file mode 100644 index 0000000..e06ec65 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/ArrayPoolUtil.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 424cc208fb61d4e448b08fcfa0eee25e +timeCreated: 1532361007 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/ArrayUtil.cs b/Assets/Plugins/UniTask/Runtime/Internal/ArrayUtil.cs new file mode 100644 index 0000000..fc7a808 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/ArrayUtil.cs @@ -0,0 +1,73 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Cysharp.Threading.Tasks.Internal +{ + internal static class ArrayUtil + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EnsureCapacity(ref T[] array, int index) + { + if (array.Length <= index) + { + EnsureCore(ref array, index); + } + } + + // rare case, no inlining. + [MethodImpl(MethodImplOptions.NoInlining)] + static void EnsureCore(ref T[] array, int index) + { + var newSize = array.Length * 2; + var newArray = new T[(index < newSize) ? newSize : (index * 2)]; + Array.Copy(array, 0, newArray, 0, array.Length); + + array = newArray; + } + + /// + /// Optimizing utility to avoid .ToArray() that creates buffer copy(cut to just size). + /// + public static (T[] array, int length) Materialize(IEnumerable source) + { + if (source is T[] array) + { + return (array, array.Length); + } + + var defaultCount = 4; + if (source is ICollection coll) + { + defaultCount = coll.Count; + var buffer = new T[defaultCount]; + coll.CopyTo(buffer, 0); + return (buffer, defaultCount); + } + else if (source is IReadOnlyCollection rcoll) + { + defaultCount = rcoll.Count; + } + + if (defaultCount == 0) + { + return (Array.Empty(), 0); + } + + { + var index = 0; + var buffer = new T[defaultCount]; + foreach (var item in source) + { + EnsureCapacity(ref buffer, index); + buffer[index++] = item; + } + + return (buffer, index); + } + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/Internal/ArrayUtil.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/ArrayUtil.cs.meta new file mode 100644 index 0000000..645fc4e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/ArrayUtil.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 23146a82ec99f2542a87971c8d3d7988 +timeCreated: 1532361007 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs b/Assets/Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs new file mode 100644 index 0000000..a311126 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs @@ -0,0 +1,225 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Internal +{ + internal sealed class ContinuationQueue + { + const int MaxArrayLength = 0X7FEFFFFF; + const int InitialSize = 16; + + readonly PlayerLoopTiming timing; + + SpinLock gate = new SpinLock(false); + bool dequing = false; + + int actionListCount = 0; + Action[] actionList = new Action[InitialSize]; + + int waitingListCount = 0; + Action[] waitingList = new Action[InitialSize]; + + public ContinuationQueue(PlayerLoopTiming timing) + { + this.timing = timing; + } + + public void Enqueue(Action continuation) + { + bool lockTaken = false; + try + { + gate.Enter(ref lockTaken); + + if (dequing) + { + // Ensure Capacity + if (waitingList.Length == waitingListCount) + { + var newLength = waitingListCount * 2; + if ((uint)newLength > MaxArrayLength) newLength = MaxArrayLength; + + var newArray = new Action[newLength]; + Array.Copy(waitingList, newArray, waitingListCount); + waitingList = newArray; + } + waitingList[waitingListCount] = continuation; + waitingListCount++; + } + else + { + // Ensure Capacity + if (actionList.Length == actionListCount) + { + var newLength = actionListCount * 2; + if ((uint)newLength > MaxArrayLength) newLength = MaxArrayLength; + + var newArray = new Action[newLength]; + Array.Copy(actionList, newArray, actionListCount); + actionList = newArray; + } + actionList[actionListCount] = continuation; + actionListCount++; + } + } + finally + { + if (lockTaken) gate.Exit(false); + } + } + + public int Clear() + { + var rest = actionListCount + waitingListCount; + + actionListCount = 0; + actionList = new Action[InitialSize]; + + waitingListCount = 0; + waitingList = new Action[InitialSize]; + + return rest; + } + + // delegate entrypoint. + public void Run() + { + // for debugging, create named stacktrace. +#if DEBUG + switch (timing) + { + case PlayerLoopTiming.Initialization: + Initialization(); + break; + case PlayerLoopTiming.LastInitialization: + LastInitialization(); + break; + case PlayerLoopTiming.EarlyUpdate: + EarlyUpdate(); + break; + case PlayerLoopTiming.LastEarlyUpdate: + LastEarlyUpdate(); + break; + case PlayerLoopTiming.FixedUpdate: + FixedUpdate(); + break; + case PlayerLoopTiming.LastFixedUpdate: + LastFixedUpdate(); + break; + case PlayerLoopTiming.PreUpdate: + PreUpdate(); + break; + case PlayerLoopTiming.LastPreUpdate: + LastPreUpdate(); + break; + case PlayerLoopTiming.Update: + Update(); + break; + case PlayerLoopTiming.LastUpdate: + LastUpdate(); + break; + case PlayerLoopTiming.PreLateUpdate: + PreLateUpdate(); + break; + case PlayerLoopTiming.LastPreLateUpdate: + LastPreLateUpdate(); + break; + case PlayerLoopTiming.PostLateUpdate: + PostLateUpdate(); + break; + case PlayerLoopTiming.LastPostLateUpdate: + LastPostLateUpdate(); + break; +#if UNITY_2020_2_OR_NEWER + case PlayerLoopTiming.TimeUpdate: + TimeUpdate(); + break; + case PlayerLoopTiming.LastTimeUpdate: + LastTimeUpdate(); + break; +#endif + default: + break; + } +#else + RunCore(); +#endif + } + + void Initialization() => RunCore(); + void LastInitialization() => RunCore(); + void EarlyUpdate() => RunCore(); + void LastEarlyUpdate() => RunCore(); + void FixedUpdate() => RunCore(); + void LastFixedUpdate() => RunCore(); + void PreUpdate() => RunCore(); + void LastPreUpdate() => RunCore(); + void Update() => RunCore(); + void LastUpdate() => RunCore(); + void PreLateUpdate() => RunCore(); + void LastPreLateUpdate() => RunCore(); + void PostLateUpdate() => RunCore(); + void LastPostLateUpdate() => RunCore(); +#if UNITY_2020_2_OR_NEWER + void TimeUpdate() => RunCore(); + void LastTimeUpdate() => RunCore(); +#endif + + [System.Diagnostics.DebuggerHidden] + void RunCore() + { + { + bool lockTaken = false; + try + { + gate.Enter(ref lockTaken); + if (actionListCount == 0) return; + dequing = true; + } + finally + { + if (lockTaken) gate.Exit(false); + } + } + + for (int i = 0; i < actionListCount; i++) + { + + var action = actionList[i]; + actionList[i] = null; + try + { + action(); + } + catch (Exception ex) + { + UnityEngine.Debug.LogException(ex); + } + } + + { + bool lockTaken = false; + try + { + gate.Enter(ref lockTaken); + dequing = false; + + var swapTempActionList = actionList; + + actionListCount = waitingListCount; + actionList = waitingList; + + waitingListCount = 0; + waitingList = swapTempActionList; + } + finally + { + if (lockTaken) gate.Exit(false); + } + } + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs.meta new file mode 100644 index 0000000..b04e541 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f66c32454e50f2546b17deadc80a4c77 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/DiagnosticsExtensions.cs b/Assets/Plugins/UniTask/Runtime/Internal/DiagnosticsExtensions.cs new file mode 100644 index 0000000..77d998f --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/DiagnosticsExtensions.cs @@ -0,0 +1,249 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Security; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using UnityEngine; + +namespace Cysharp.Threading.Tasks.Internal +{ + internal static class DiagnosticsExtensions + { + static bool displayFilenames = true; + + static readonly Regex typeBeautifyRegex = new Regex("`.+$", RegexOptions.Compiled); + + static readonly Dictionary builtInTypeNames = new Dictionary + { + { typeof(void), "void" }, + { typeof(bool), "bool" }, + { typeof(byte), "byte" }, + { typeof(char), "char" }, + { typeof(decimal), "decimal" }, + { typeof(double), "double" }, + { typeof(float), "float" }, + { typeof(int), "int" }, + { typeof(long), "long" }, + { typeof(object), "object" }, + { typeof(sbyte), "sbyte" }, + { typeof(short), "short" }, + { typeof(string), "string" }, + { typeof(uint), "uint" }, + { typeof(ulong), "ulong" }, + { typeof(ushort), "ushort" }, + { typeof(Task), "Task" }, + { typeof(UniTask), "UniTask" }, + { typeof(UniTaskVoid), "UniTaskVoid" } + }; + + public static string CleanupAsyncStackTrace(this StackTrace stackTrace) + { + if (stackTrace == null) return ""; + + var sb = new StringBuilder(); + for (int i = 0; i < stackTrace.FrameCount; i++) + { + var sf = stackTrace.GetFrame(i); + + var mb = sf.GetMethod(); + + if (IgnoreLine(mb)) continue; + if (IsAsync(mb)) + { + sb.Append("async "); + TryResolveStateMachineMethod(ref mb, out var decType); + } + + // return type + if (mb is MethodInfo mi) + { + sb.Append(BeautifyType(mi.ReturnType, false)); + sb.Append(" "); + } + + // method name + sb.Append(BeautifyType(mb.DeclaringType, false)); + if (!mb.IsConstructor) + { + sb.Append("."); + } + sb.Append(mb.Name); + if (mb.IsGenericMethod) + { + sb.Append("<"); + foreach (var item in mb.GetGenericArguments()) + { + sb.Append(BeautifyType(item, true)); + } + sb.Append(">"); + } + + // parameter + sb.Append("("); + sb.Append(string.Join(", ", mb.GetParameters().Select(p => BeautifyType(p.ParameterType, true) + " " + p.Name))); + sb.Append(")"); + + // file name + if (displayFilenames && (sf.GetILOffset() != -1)) + { + String fileName = null; + + try + { + fileName = sf.GetFileName(); + } + catch (NotSupportedException) + { + displayFilenames = false; + } + catch (SecurityException) + { + displayFilenames = false; + } + + if (fileName != null) + { + sb.Append(' '); + sb.AppendFormat(CultureInfo.InvariantCulture, "(at {0})", AppendHyperLink(fileName, sf.GetFileLineNumber().ToString())); + } + } + + sb.AppendLine(); + } + return sb.ToString(); + } + + + static bool IsAsync(MethodBase methodInfo) + { + var declareType = methodInfo.DeclaringType; + return typeof(IAsyncStateMachine).IsAssignableFrom(declareType); + } + + // code from Ben.Demystifier/EnhancedStackTrace.Frame.cs + static bool TryResolveStateMachineMethod(ref MethodBase method, out Type declaringType) + { + declaringType = method.DeclaringType; + + var parentType = declaringType.DeclaringType; + if (parentType == null) + { + return false; + } + + var methods = parentType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance | BindingFlags.DeclaredOnly); + if (methods == null) + { + return false; + } + + foreach (var candidateMethod in methods) + { + var attributes = candidateMethod.GetCustomAttributes(false); + if (attributes == null) + { + continue; + } + + foreach (var asma in attributes) + { + if (asma.StateMachineType == declaringType) + { + method = candidateMethod; + declaringType = candidateMethod.DeclaringType; + // Mark the iterator as changed; so it gets the + annotation of the original method + // async statemachines resolve directly to their builder methods so aren't marked as changed + return asma is IteratorStateMachineAttribute; + } + } + } + + return false; + } + + static string BeautifyType(Type t, bool shortName) + { + if (builtInTypeNames.TryGetValue(t, out var builtin)) + { + return builtin; + } + if (t.IsGenericParameter) return t.Name; + if (t.IsArray) return BeautifyType(t.GetElementType(), shortName) + "[]"; + if (t.FullName?.StartsWith("System.ValueTuple") ?? false) + { + return "(" + string.Join(", ", t.GetGenericArguments().Select(x => BeautifyType(x, true))) + ")"; + } + if (!t.IsGenericType) return shortName ? t.Name : t.FullName.Replace("Cysharp.Threading.Tasks.Triggers.", "").Replace("Cysharp.Threading.Tasks.Internal.", "").Replace("Cysharp.Threading.Tasks.", "") ?? t.Name; + + var innerFormat = string.Join(", ", t.GetGenericArguments().Select(x => BeautifyType(x, true))); + + var genericType = t.GetGenericTypeDefinition().FullName; + if (genericType == "System.Threading.Tasks.Task`1") + { + genericType = "Task"; + } + + return typeBeautifyRegex.Replace(genericType, "").Replace("Cysharp.Threading.Tasks.Triggers.", "").Replace("Cysharp.Threading.Tasks.Internal.", "").Replace("Cysharp.Threading.Tasks.", "") + "<" + innerFormat + ">"; + } + + static bool IgnoreLine(MethodBase methodInfo) + { + var declareType = methodInfo.DeclaringType.FullName; + if (declareType == "System.Threading.ExecutionContext") + { + return true; + } + else if (declareType.StartsWith("System.Runtime.CompilerServices")) + { + return true; + } + else if (declareType.StartsWith("Cysharp.Threading.Tasks.CompilerServices")) + { + return true; + } + else if (declareType == "System.Threading.Tasks.AwaitTaskContinuation") + { + return true; + } + else if (declareType.StartsWith("System.Threading.Tasks.Task")) + { + return true; + } + else if (declareType.StartsWith("Cysharp.Threading.Tasks.UniTaskCompletionSourceCore")) + { + return true; + } + else if (declareType.StartsWith("Cysharp.Threading.Tasks.AwaiterActions")) + { + return true; + } + + return false; + } + + static string AppendHyperLink(string path, string line) + { + var fi = new FileInfo(path); + if (fi.Directory == null) + { + return fi.Name; + } + else + { + var fname = fi.FullName.Replace(Path.DirectorySeparatorChar, '/').Replace(PlayerLoopHelper.ApplicationDataPath, ""); + var withAssetsPath = "Assets/" + fname; + return "" + withAssetsPath + ":" + line + ""; + } + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/Internal/DiagnosticsExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/DiagnosticsExtensions.cs.meta new file mode 100644 index 0000000..6c1f06c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/DiagnosticsExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f80fb1c9ed4c99447be1b0a47a8d980b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/Error.cs b/Assets/Plugins/UniTask/Runtime/Internal/Error.cs new file mode 100644 index 0000000..9664491 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/Error.cs @@ -0,0 +1,79 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Runtime.CompilerServices; + +namespace Cysharp.Threading.Tasks.Internal +{ + internal static class Error + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ThrowArgumentNullException(T value, string paramName) + where T : class + { + if (value == null) ThrowArgumentNullExceptionCore(paramName); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static void ThrowArgumentNullExceptionCore(string paramName) + { + throw new ArgumentNullException(paramName); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Exception ArgumentOutOfRange(string paramName) + { + return new ArgumentOutOfRangeException(paramName); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Exception NoElements() + { + return new InvalidOperationException("Source sequence doesn't contain any elements."); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Exception MoreThanOneElement() + { + return new InvalidOperationException("Source sequence contains more than one element."); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + public static void ThrowArgumentException(string message) + { + throw new ArgumentException(message); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + public static void ThrowNotYetCompleted() + { + throw new InvalidOperationException("Not yet completed."); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + public static T ThrowNotYetCompleted() + { + throw new InvalidOperationException("Not yet completed."); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ThrowWhenContinuationIsAlreadyRegistered(T continuationField) + where T : class + { + if (continuationField != null) ThrowInvalidOperationExceptionCore("continuation is already registered."); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static void ThrowInvalidOperationExceptionCore(string message) + { + throw new InvalidOperationException(message); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + public static void ThrowOperationCanceledException() + { + throw new OperationCanceledException(); + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/Internal/Error.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/Error.cs.meta new file mode 100644 index 0000000..2e5d219 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/Error.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5f39f495294d4604b8082202faf98554 +timeCreated: 1532361007 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/MinimumQueue.cs b/Assets/Plugins/UniTask/Runtime/Internal/MinimumQueue.cs new file mode 100644 index 0000000..a6b567a --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/MinimumQueue.cs @@ -0,0 +1,112 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Runtime.CompilerServices; + +namespace Cysharp.Threading.Tasks.Internal +{ + // optimized version of Standard Queue. + internal class MinimumQueue + { + const int MinimumGrow = 4; + const int GrowFactor = 200; + + T[] array; + int head; + int tail; + int size; + + public MinimumQueue(int capacity) + { + if (capacity < 0) throw new ArgumentOutOfRangeException("capacity"); + array = new T[capacity]; + head = tail = size = 0; + } + + public int Count + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return size; } + } + + public T Peek() + { + if (size == 0) ThrowForEmptyQueue(); + return array[head]; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Enqueue(T item) + { + if (size == array.Length) + { + Grow(); + } + + array[tail] = item; + MoveNext(ref tail); + size++; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public T Dequeue() + { + if (size == 0) ThrowForEmptyQueue(); + + int head = this.head; + T[] array = this.array; + T removed = array[head]; + array[head] = default(T); + MoveNext(ref this.head); + size--; + return removed; + } + + void Grow() + { + int newcapacity = (int)((long)array.Length * (long)GrowFactor / 100); + if (newcapacity < array.Length + MinimumGrow) + { + newcapacity = array.Length + MinimumGrow; + } + SetCapacity(newcapacity); + } + + void SetCapacity(int capacity) + { + T[] newarray = new T[capacity]; + if (size > 0) + { + if (head < tail) + { + Array.Copy(array, head, newarray, 0, size); + } + else + { + Array.Copy(array, head, newarray, 0, array.Length - head); + Array.Copy(array, 0, newarray, array.Length - head, tail); + } + } + + array = newarray; + head = 0; + tail = (size == capacity) ? 0 : size; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + void MoveNext(ref int index) + { + int tmp = index + 1; + if (tmp == array.Length) + { + tmp = 0; + } + index = tmp; + } + + void ThrowForEmptyQueue() + { + throw new InvalidOperationException("EmptyQueue"); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Internal/MinimumQueue.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/MinimumQueue.cs.meta new file mode 100644 index 0000000..dc06736 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/MinimumQueue.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7d63add489ccc99498114d79702b904d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs b/Assets/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs new file mode 100644 index 0000000..43625ab --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs @@ -0,0 +1,260 @@ + +using System; +using UnityEngine; + +namespace Cysharp.Threading.Tasks.Internal +{ + internal sealed class PlayerLoopRunner + { + const int InitialSize = 16; + + readonly PlayerLoopTiming timing; + readonly object runningAndQueueLock = new object(); + readonly object arrayLock = new object(); + readonly Action unhandledExceptionCallback; + + int tail = 0; + bool running = false; + IPlayerLoopItem[] loopItems = new IPlayerLoopItem[InitialSize]; + MinimumQueue waitQueue = new MinimumQueue(InitialSize); + + + + public PlayerLoopRunner(PlayerLoopTiming timing) + { + this.unhandledExceptionCallback = ex => Debug.LogException(ex); + this.timing = timing; + } + + public void AddAction(IPlayerLoopItem item) + { + lock (runningAndQueueLock) + { + if (running) + { + waitQueue.Enqueue(item); + return; + } + } + + lock (arrayLock) + { + // Ensure Capacity + if (loopItems.Length == tail) + { + Array.Resize(ref loopItems, checked(tail * 2)); + } + loopItems[tail++] = item; + } + } + + public int Clear() + { + lock (arrayLock) + { + var rest = 0; + + for (var index = 0; index < loopItems.Length; index++) + { + if (loopItems[index] != null) + { + rest++; + } + + loopItems[index] = null; + } + + tail = 0; + return rest; + } + } + + // delegate entrypoint. + public void Run() + { + // for debugging, create named stacktrace. +#if DEBUG + switch (timing) + { + case PlayerLoopTiming.Initialization: + Initialization(); + break; + case PlayerLoopTiming.LastInitialization: + LastInitialization(); + break; + case PlayerLoopTiming.EarlyUpdate: + EarlyUpdate(); + break; + case PlayerLoopTiming.LastEarlyUpdate: + LastEarlyUpdate(); + break; + case PlayerLoopTiming.FixedUpdate: + FixedUpdate(); + break; + case PlayerLoopTiming.LastFixedUpdate: + LastFixedUpdate(); + break; + case PlayerLoopTiming.PreUpdate: + PreUpdate(); + break; + case PlayerLoopTiming.LastPreUpdate: + LastPreUpdate(); + break; + case PlayerLoopTiming.Update: + Update(); + break; + case PlayerLoopTiming.LastUpdate: + LastUpdate(); + break; + case PlayerLoopTiming.PreLateUpdate: + PreLateUpdate(); + break; + case PlayerLoopTiming.LastPreLateUpdate: + LastPreLateUpdate(); + break; + case PlayerLoopTiming.PostLateUpdate: + PostLateUpdate(); + break; + case PlayerLoopTiming.LastPostLateUpdate: + LastPostLateUpdate(); + break; +#if UNITY_2020_2_OR_NEWER + case PlayerLoopTiming.TimeUpdate: + TimeUpdate(); + break; + case PlayerLoopTiming.LastTimeUpdate: + LastTimeUpdate(); + break; +#endif + default: + break; + } +#else + RunCore(); +#endif + } + + void Initialization() => RunCore(); + void LastInitialization() => RunCore(); + void EarlyUpdate() => RunCore(); + void LastEarlyUpdate() => RunCore(); + void FixedUpdate() => RunCore(); + void LastFixedUpdate() => RunCore(); + void PreUpdate() => RunCore(); + void LastPreUpdate() => RunCore(); + void Update() => RunCore(); + void LastUpdate() => RunCore(); + void PreLateUpdate() => RunCore(); + void LastPreLateUpdate() => RunCore(); + void PostLateUpdate() => RunCore(); + void LastPostLateUpdate() => RunCore(); +#if UNITY_2020_2_OR_NEWER + void TimeUpdate() => RunCore(); + void LastTimeUpdate() => RunCore(); +#endif + + [System.Diagnostics.DebuggerHidden] + void RunCore() + { + lock (runningAndQueueLock) + { + running = true; + } + + lock (arrayLock) + { + var j = tail - 1; + + for (int i = 0; i < loopItems.Length; i++) + { + var action = loopItems[i]; + if (action != null) + { + try + { + if (!action.MoveNext()) + { + loopItems[i] = null; + } + else + { + continue; // next i + } + } + catch (Exception ex) + { + loopItems[i] = null; + try + { + unhandledExceptionCallback(ex); + } + catch { } + } + } + + // find null, loop from tail + while (i < j) + { + var fromTail = loopItems[j]; + if (fromTail != null) + { + try + { + if (!fromTail.MoveNext()) + { + loopItems[j] = null; + j--; + continue; // next j + } + else + { + // swap + loopItems[i] = fromTail; + loopItems[j] = null; + j--; + goto NEXT_LOOP; // next i + } + } + catch (Exception ex) + { + loopItems[j] = null; + j--; + try + { + unhandledExceptionCallback(ex); + } + catch { } + continue; // next j + } + } + else + { + j--; + } + } + + tail = i; // loop end + break; // LOOP END + + NEXT_LOOP: + continue; + } + + + lock (runningAndQueueLock) + { + running = false; + while (waitQueue.Count != 0) + { + if (loopItems.Length == tail) + { + Array.Resize(ref loopItems, checked(tail * 2)); + } + loopItems[tail++] = waitQueue.Dequeue(); + } + } + } + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs.meta new file mode 100644 index 0000000..603dbc9 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 340c6d420bb4f484aa8683415ea92571 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/PooledDelegate.cs b/Assets/Plugins/UniTask/Runtime/Internal/PooledDelegate.cs new file mode 100644 index 0000000..518244f --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/PooledDelegate.cs @@ -0,0 +1,50 @@ +using System; +using System.Runtime.CompilerServices; + +namespace Cysharp.Threading.Tasks.Internal +{ + internal sealed class PooledDelegate : ITaskPoolNode> + { + static TaskPool> pool; + + PooledDelegate nextNode; + public ref PooledDelegate NextNode => ref nextNode; + + static PooledDelegate() + { + TaskPool.RegisterSizeGetter(typeof(PooledDelegate), () => pool.Size); + } + + readonly Action runDelegate; + Action continuation; + + PooledDelegate() + { + runDelegate = Run; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Action Create(Action continuation) + { + if (!pool.TryPop(out var item)) + { + item = new PooledDelegate(); + } + + item.continuation = continuation; + return item.runDelegate; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + void Run(T _) + { + var call = continuation; + continuation = null; + if (call != null) + { + pool.TryPush(this); + call.Invoke(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Internal/PooledDelegate.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/PooledDelegate.cs.meta new file mode 100644 index 0000000..7f92aff --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/PooledDelegate.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8932579438742fa40b010edd412dbfba +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/RuntimeHelpersAbstraction.cs b/Assets/Plugins/UniTask/Runtime/Internal/RuntimeHelpersAbstraction.cs new file mode 100644 index 0000000..cbabdab --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/RuntimeHelpersAbstraction.cs @@ -0,0 +1,64 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +#if UNITY_2018_3_OR_NEWER +using UnityEngine; +#endif + +namespace Cysharp.Threading.Tasks.Internal +{ + internal static class RuntimeHelpersAbstraction + { + // If we can use RuntimeHelpers.IsReferenceOrContainsReferences(.NET Core 2.0), use it. + public static bool IsWellKnownNoReferenceContainsType() + { + return WellKnownNoReferenceContainsType.IsWellKnownType; + } + + static bool WellKnownNoReferenceContainsTypeInitialize(Type t) + { + // The primitive types are Boolean, Byte, SByte, Int16, UInt16, Int32, UInt32, Int64, UInt64, IntPtr, UIntPtr, Char, Double, and Single. + if (t.IsPrimitive) return true; + + if (t.IsEnum) return true; + if (t == typeof(DateTime)) return true; + if (t == typeof(DateTimeOffset)) return true; + if (t == typeof(Guid)) return true; + if (t == typeof(decimal)) return true; + + // unwrap nullable + if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Nullable<>)) + { + return WellKnownNoReferenceContainsTypeInitialize(t.GetGenericArguments()[0]); + } + +#if UNITY_2018_3_OR_NEWER + + // or add other wellknown types(Vector, etc...) here + if (t == typeof(Vector2)) return true; + if (t == typeof(Vector3)) return true; + if (t == typeof(Vector4)) return true; + if (t == typeof(Color)) return true; + if (t == typeof(Rect)) return true; + if (t == typeof(Bounds)) return true; + if (t == typeof(Quaternion)) return true; + if (t == typeof(Vector2Int)) return true; + if (t == typeof(Vector3Int)) return true; + +#endif + + return false; + } + + static class WellKnownNoReferenceContainsType + { + public static readonly bool IsWellKnownType; + + static WellKnownNoReferenceContainsType() + { + IsWellKnownType = WellKnownNoReferenceContainsTypeInitialize(typeof(T)); + } + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/Internal/RuntimeHelpersAbstraction.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/RuntimeHelpersAbstraction.cs.meta new file mode 100644 index 0000000..4254391 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/RuntimeHelpersAbstraction.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 94975e4d4e0c0ea4ba787d3872ce9bb4 +timeCreated: 1532361007 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/StatePool.cs b/Assets/Plugins/UniTask/Runtime/Internal/StatePool.cs new file mode 100644 index 0000000..e1d40bd --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/StatePool.cs @@ -0,0 +1,153 @@ +using System; +using System.Collections.Concurrent; +using System.Runtime.CompilerServices; + +namespace Cysharp.Threading.Tasks.Internal +{ + internal static class StateTuple + { + public static StateTuple Create(T1 item1) + { + return StatePool.Create(item1); + } + + public static StateTuple Create(T1 item1, T2 item2) + { + return StatePool.Create(item1, item2); + } + + public static StateTuple Create(T1 item1, T2 item2, T3 item3) + { + return StatePool.Create(item1, item2, item3); + } + } + + internal class StateTuple : IDisposable + { + public T1 Item1; + + public void Deconstruct(out T1 item1) + { + item1 = this.Item1; + } + + public void Dispose() + { + StatePool.Return(this); + } + } + + internal static class StatePool + { + static readonly ConcurrentQueue> queue = new ConcurrentQueue>(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static StateTuple Create(T1 item1) + { + if (queue.TryDequeue(out var value)) + { + value.Item1 = item1; + return value; + } + + return new StateTuple { Item1 = item1 }; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Return(StateTuple tuple) + { + tuple.Item1 = default; + queue.Enqueue(tuple); + } + } + + internal class StateTuple : IDisposable + { + public T1 Item1; + public T2 Item2; + + public void Deconstruct(out T1 item1, out T2 item2) + { + item1 = this.Item1; + item2 = this.Item2; + } + + public void Dispose() + { + StatePool.Return(this); + } + } + + internal static class StatePool + { + static readonly ConcurrentQueue> queue = new ConcurrentQueue>(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static StateTuple Create(T1 item1, T2 item2) + { + if (queue.TryDequeue(out var value)) + { + value.Item1 = item1; + value.Item2 = item2; + return value; + } + + return new StateTuple { Item1 = item1, Item2 = item2 }; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Return(StateTuple tuple) + { + tuple.Item1 = default; + tuple.Item2 = default; + queue.Enqueue(tuple); + } + } + + internal class StateTuple : IDisposable + { + public T1 Item1; + public T2 Item2; + public T3 Item3; + + public void Deconstruct(out T1 item1, out T2 item2, out T3 item3) + { + item1 = this.Item1; + item2 = this.Item2; + item3 = this.Item3; + } + + public void Dispose() + { + StatePool.Return(this); + } + } + + internal static class StatePool + { + static readonly ConcurrentQueue> queue = new ConcurrentQueue>(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static StateTuple Create(T1 item1, T2 item2, T3 item3) + { + if (queue.TryDequeue(out var value)) + { + value.Item1 = item1; + value.Item2 = item2; + value.Item3 = item3; + return value; + } + + return new StateTuple { Item1 = item1, Item2 = item2, Item3 = item3 }; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Return(StateTuple tuple) + { + tuple.Item1 = default; + tuple.Item2 = default; + tuple.Item3 = default; + queue.Enqueue(tuple); + } + } +} diff --git a/Assets/Plugins/UniTask/Runtime/Internal/StatePool.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/StatePool.cs.meta new file mode 100644 index 0000000..6779aa1 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/StatePool.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 60cdf0bcaea36b444a7ae7263ae7598f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/TaskTracker.cs b/Assets/Plugins/UniTask/Runtime/Internal/TaskTracker.cs new file mode 100644 index 0000000..c163e22 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/TaskTracker.cs @@ -0,0 +1,178 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Text; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks +{ + // public for add user custom. + + public static class TaskTracker + { +#if UNITY_EDITOR + + static int trackingId = 0; + + public const string EnableAutoReloadKey = "UniTaskTrackerWindow_EnableAutoReloadKey"; + public const string EnableTrackingKey = "UniTaskTrackerWindow_EnableTrackingKey"; + public const string EnableStackTraceKey = "UniTaskTrackerWindow_EnableStackTraceKey"; + + public static class EditorEnableState + { + static bool enableAutoReload; + public static bool EnableAutoReload + { + get { return enableAutoReload; } + set + { + enableAutoReload = value; + UnityEditor.EditorPrefs.SetBool(EnableAutoReloadKey, value); + } + } + + static bool enableTracking; + public static bool EnableTracking + { + get { return enableTracking; } + set + { + enableTracking = value; + UnityEditor.EditorPrefs.SetBool(EnableTrackingKey, value); + } + } + + static bool enableStackTrace; + public static bool EnableStackTrace + { + get { return enableStackTrace; } + set + { + enableStackTrace = value; + UnityEditor.EditorPrefs.SetBool(EnableStackTraceKey, value); + } + } + } + +#endif + + + static List> listPool = new List>(); + + static readonly WeakDictionary tracking = new WeakDictionary(); + + [Conditional("UNITY_EDITOR")] + public static void TrackActiveTask(IUniTaskSource task, int skipFrame) + { +#if UNITY_EDITOR + dirty = true; + if (!EditorEnableState.EnableTracking) return; + var stackTrace = EditorEnableState.EnableStackTrace ? new StackTrace(skipFrame, true).CleanupAsyncStackTrace() : ""; + + string typeName; + if (EditorEnableState.EnableStackTrace) + { + var sb = new StringBuilder(); + TypeBeautify(task.GetType(), sb); + typeName = sb.ToString(); + } + else + { + typeName = task.GetType().Name; + } + tracking.TryAdd(task, (typeName, Interlocked.Increment(ref trackingId), DateTime.UtcNow, stackTrace)); +#endif + } + + [Conditional("UNITY_EDITOR")] + public static void RemoveTracking(IUniTaskSource task) + { +#if UNITY_EDITOR + dirty = true; + if (!EditorEnableState.EnableTracking) return; + var success = tracking.TryRemove(task); +#endif + } + + static bool dirty; + + public static bool CheckAndResetDirty() + { + var current = dirty; + dirty = false; + return current; + } + + /// (trackingId, awaiterType, awaiterStatus, createdTime, stackTrace) + public static void ForEachActiveTask(Action action) + { + lock (listPool) + { + var count = tracking.ToList(ref listPool, clear: false); + try + { + for (int i = 0; i < count; i++) + { + action(listPool[i].Value.trackingId, listPool[i].Value.formattedType, listPool[i].Key.UnsafeGetStatus(), listPool[i].Value.addTime, listPool[i].Value.stackTrace); + listPool[i] = default; + } + } + catch + { + listPool.Clear(); + throw; + } + } + } + + static void TypeBeautify(Type type, StringBuilder sb) + { + if (type.IsNested) + { + // TypeBeautify(type.DeclaringType, sb); + sb.Append(type.DeclaringType.Name.ToString()); + sb.Append("."); + } + + if (type.IsGenericType) + { + var genericsStart = type.Name.IndexOf("`"); + if (genericsStart != -1) + { + sb.Append(type.Name.Substring(0, genericsStart)); + } + else + { + sb.Append(type.Name); + } + sb.Append("<"); + var first = true; + foreach (var item in type.GetGenericArguments()) + { + if (!first) + { + sb.Append(", "); + } + first = false; + TypeBeautify(item, sb); + } + sb.Append(">"); + } + else + { + sb.Append(type.Name); + } + } + + //static string RemoveUniTaskNamespace(string str) + //{ + // return str.Replace("Cysharp.Threading.Tasks.CompilerServices", "") + // .Replace("Cysharp.Threading.Tasks.Linq", "") + // .Replace("Cysharp.Threading.Tasks", ""); + //} + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/Internal/TaskTracker.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/TaskTracker.cs.meta new file mode 100644 index 0000000..5563bf7 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/TaskTracker.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a203c73eb4ccdbb44bddfd82d38fdda9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/UnityEqualityComparer.cs b/Assets/Plugins/UniTask/Runtime/Internal/UnityEqualityComparer.cs new file mode 100644 index 0000000..906f3b6 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/UnityEqualityComparer.cs @@ -0,0 +1,267 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace Cysharp.Threading.Tasks.Internal +{ + internal static class UnityEqualityComparer + { + public static readonly IEqualityComparer Vector2 = new Vector2EqualityComparer(); + public static readonly IEqualityComparer Vector3 = new Vector3EqualityComparer(); + public static readonly IEqualityComparer Vector4 = new Vector4EqualityComparer(); + public static readonly IEqualityComparer Color = new ColorEqualityComparer(); + public static readonly IEqualityComparer Color32 = new Color32EqualityComparer(); + public static readonly IEqualityComparer Rect = new RectEqualityComparer(); + public static readonly IEqualityComparer Bounds = new BoundsEqualityComparer(); + public static readonly IEqualityComparer Quaternion = new QuaternionEqualityComparer(); + + static readonly RuntimeTypeHandle vector2Type = typeof(Vector2).TypeHandle; + static readonly RuntimeTypeHandle vector3Type = typeof(Vector3).TypeHandle; + static readonly RuntimeTypeHandle vector4Type = typeof(Vector4).TypeHandle; + static readonly RuntimeTypeHandle colorType = typeof(Color).TypeHandle; + static readonly RuntimeTypeHandle color32Type = typeof(Color32).TypeHandle; + static readonly RuntimeTypeHandle rectType = typeof(Rect).TypeHandle; + static readonly RuntimeTypeHandle boundsType = typeof(Bounds).TypeHandle; + static readonly RuntimeTypeHandle quaternionType = typeof(Quaternion).TypeHandle; + +#if UNITY_2017_2_OR_NEWER + + public static readonly IEqualityComparer Vector2Int = new Vector2IntEqualityComparer(); + public static readonly IEqualityComparer Vector3Int = new Vector3IntEqualityComparer(); + public static readonly IEqualityComparer RangeInt = new RangeIntEqualityComparer(); + public static readonly IEqualityComparer RectInt = new RectIntEqualityComparer(); + public static readonly IEqualityComparer BoundsInt = new BoundsIntEqualityComparer(); + + static readonly RuntimeTypeHandle vector2IntType = typeof(Vector2Int).TypeHandle; + static readonly RuntimeTypeHandle vector3IntType = typeof(Vector3Int).TypeHandle; + static readonly RuntimeTypeHandle rangeIntType = typeof(RangeInt).TypeHandle; + static readonly RuntimeTypeHandle rectIntType = typeof(RectInt).TypeHandle; + static readonly RuntimeTypeHandle boundsIntType = typeof(BoundsInt).TypeHandle; + +#endif + + static class Cache + { + public static readonly IEqualityComparer Comparer; + + static Cache() + { + var comparer = GetDefaultHelper(typeof(T)); + if (comparer == null) + { + Comparer = EqualityComparer.Default; + } + else + { + Comparer = (IEqualityComparer)comparer; + } + } + } + + public static IEqualityComparer GetDefault() + { + return Cache.Comparer; + } + + static object GetDefaultHelper(Type type) + { + var t = type.TypeHandle; + + if (t.Equals(vector2Type)) return (object)UnityEqualityComparer.Vector2; + if (t.Equals(vector3Type)) return (object)UnityEqualityComparer.Vector3; + if (t.Equals(vector4Type)) return (object)UnityEqualityComparer.Vector4; + if (t.Equals(colorType)) return (object)UnityEqualityComparer.Color; + if (t.Equals(color32Type)) return (object)UnityEqualityComparer.Color32; + if (t.Equals(rectType)) return (object)UnityEqualityComparer.Rect; + if (t.Equals(boundsType)) return (object)UnityEqualityComparer.Bounds; + if (t.Equals(quaternionType)) return (object)UnityEqualityComparer.Quaternion; + +#if UNITY_2017_2_OR_NEWER + + if (t.Equals(vector2IntType)) return (object)UnityEqualityComparer.Vector2Int; + if (t.Equals(vector3IntType)) return (object)UnityEqualityComparer.Vector3Int; + if (t.Equals(rangeIntType)) return (object)UnityEqualityComparer.RangeInt; + if (t.Equals(rectIntType)) return (object)UnityEqualityComparer.RectInt; + if (t.Equals(boundsIntType)) return (object)UnityEqualityComparer.BoundsInt; +#endif + + return null; + } + + sealed class Vector2EqualityComparer : IEqualityComparer + { + public bool Equals(Vector2 self, Vector2 vector) + { + return self.x.Equals(vector.x) && self.y.Equals(vector.y); + } + + public int GetHashCode(Vector2 obj) + { + return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2; + } + } + + sealed class Vector3EqualityComparer : IEqualityComparer + { + public bool Equals(Vector3 self, Vector3 vector) + { + return self.x.Equals(vector.x) && self.y.Equals(vector.y) && self.z.Equals(vector.z); + } + + public int GetHashCode(Vector3 obj) + { + return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2 ^ obj.z.GetHashCode() >> 2; + } + } + + sealed class Vector4EqualityComparer : IEqualityComparer + { + public bool Equals(Vector4 self, Vector4 vector) + { + return self.x.Equals(vector.x) && self.y.Equals(vector.y) && self.z.Equals(vector.z) && self.w.Equals(vector.w); + } + + public int GetHashCode(Vector4 obj) + { + return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2 ^ obj.z.GetHashCode() >> 2 ^ obj.w.GetHashCode() >> 1; + } + } + + sealed class ColorEqualityComparer : IEqualityComparer + { + public bool Equals(Color self, Color other) + { + return self.r.Equals(other.r) && self.g.Equals(other.g) && self.b.Equals(other.b) && self.a.Equals(other.a); + } + + public int GetHashCode(Color obj) + { + return obj.r.GetHashCode() ^ obj.g.GetHashCode() << 2 ^ obj.b.GetHashCode() >> 2 ^ obj.a.GetHashCode() >> 1; + } + } + + sealed class RectEqualityComparer : IEqualityComparer + { + public bool Equals(Rect self, Rect other) + { + return self.x.Equals(other.x) && self.width.Equals(other.width) && self.y.Equals(other.y) && self.height.Equals(other.height); + } + + public int GetHashCode(Rect obj) + { + return obj.x.GetHashCode() ^ obj.width.GetHashCode() << 2 ^ obj.y.GetHashCode() >> 2 ^ obj.height.GetHashCode() >> 1; + } + } + + sealed class BoundsEqualityComparer : IEqualityComparer + { + public bool Equals(Bounds self, Bounds vector) + { + return self.center.Equals(vector.center) && self.extents.Equals(vector.extents); + } + + public int GetHashCode(Bounds obj) + { + return obj.center.GetHashCode() ^ obj.extents.GetHashCode() << 2; + } + } + + sealed class QuaternionEqualityComparer : IEqualityComparer + { + public bool Equals(Quaternion self, Quaternion vector) + { + return self.x.Equals(vector.x) && self.y.Equals(vector.y) && self.z.Equals(vector.z) && self.w.Equals(vector.w); + } + + public int GetHashCode(Quaternion obj) + { + return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2 ^ obj.z.GetHashCode() >> 2 ^ obj.w.GetHashCode() >> 1; + } + } + + sealed class Color32EqualityComparer : IEqualityComparer + { + public bool Equals(Color32 self, Color32 vector) + { + return self.a.Equals(vector.a) && self.r.Equals(vector.r) && self.g.Equals(vector.g) && self.b.Equals(vector.b); + } + + public int GetHashCode(Color32 obj) + { + return obj.a.GetHashCode() ^ obj.r.GetHashCode() << 2 ^ obj.g.GetHashCode() >> 2 ^ obj.b.GetHashCode() >> 1; + } + } + +#if UNITY_2017_2_OR_NEWER + + sealed class Vector2IntEqualityComparer : IEqualityComparer + { + public bool Equals(Vector2Int self, Vector2Int vector) + { + return self.x.Equals(vector.x) && self.y.Equals(vector.y); + } + + public int GetHashCode(Vector2Int obj) + { + return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2; + } + } + + sealed class Vector3IntEqualityComparer : IEqualityComparer + { + public static readonly Vector3IntEqualityComparer Default = new Vector3IntEqualityComparer(); + + public bool Equals(Vector3Int self, Vector3Int vector) + { + return self.x.Equals(vector.x) && self.y.Equals(vector.y) && self.z.Equals(vector.z); + } + + public int GetHashCode(Vector3Int obj) + { + return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2 ^ obj.z.GetHashCode() >> 2; + } + } + + sealed class RangeIntEqualityComparer : IEqualityComparer + { + public bool Equals(RangeInt self, RangeInt vector) + { + return self.start.Equals(vector.start) && self.length.Equals(vector.length); + } + + public int GetHashCode(RangeInt obj) + { + return obj.start.GetHashCode() ^ obj.length.GetHashCode() << 2; + } + } + + sealed class RectIntEqualityComparer : IEqualityComparer + { + public bool Equals(RectInt self, RectInt other) + { + return self.x.Equals(other.x) && self.width.Equals(other.width) && self.y.Equals(other.y) && self.height.Equals(other.height); + } + + public int GetHashCode(RectInt obj) + { + return obj.x.GetHashCode() ^ obj.width.GetHashCode() << 2 ^ obj.y.GetHashCode() >> 2 ^ obj.height.GetHashCode() >> 1; + } + } + + sealed class BoundsIntEqualityComparer : IEqualityComparer + { + public bool Equals(BoundsInt self, BoundsInt vector) + { + return Vector3IntEqualityComparer.Default.Equals(self.position, vector.position) + && Vector3IntEqualityComparer.Default.Equals(self.size, vector.size); + } + + public int GetHashCode(BoundsInt obj) + { + return Vector3IntEqualityComparer.Default.GetHashCode(obj.position) ^ Vector3IntEqualityComparer.Default.GetHashCode(obj.size) << 2; + } + } + +#endif + } +} diff --git a/Assets/Plugins/UniTask/Runtime/Internal/UnityEqualityComparer.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/UnityEqualityComparer.cs.meta new file mode 100644 index 0000000..79eb04f --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/UnityEqualityComparer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ebaaf14253c9cfb47b23283218ff9b67 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/UnityWebRequestExtensions.cs b/Assets/Plugins/UniTask/Runtime/Internal/UnityWebRequestExtensions.cs new file mode 100644 index 0000000..0da9f5a --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/UnityWebRequestExtensions.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine.Networking; + +namespace Cysharp.Threading.Tasks.Internal +{ +#if ENABLE_UNITYWEBREQUEST && (!UNITY_2019_1_OR_NEWER || UNITASK_WEBREQUEST_SUPPORT) + + internal static class UnityWebRequestResultExtensions + { + public static bool IsError(this UnityWebRequest unityWebRequest) + { +#if UNITY_2020_2_OR_NEWER + var result = unityWebRequest.result; + return (result == UnityWebRequest.Result.ConnectionError) + || (result == UnityWebRequest.Result.DataProcessingError) + || (result == UnityWebRequest.Result.ProtocolError); +#else + return unityWebRequest.isHttpError || unityWebRequest.isNetworkError; +#endif + } + } + +#endif +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Internal/UnityWebRequestExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/UnityWebRequestExtensions.cs.meta new file mode 100644 index 0000000..54bd2eb --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/UnityWebRequestExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 111ba0e639de1d7428af6c823ead4918 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/ValueStopwatch.cs b/Assets/Plugins/UniTask/Runtime/Internal/ValueStopwatch.cs new file mode 100644 index 0000000..d55d1f6 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/ValueStopwatch.cs @@ -0,0 +1,37 @@ +using System; +using System.Diagnostics; + +namespace Cysharp.Threading.Tasks.Internal +{ + internal readonly struct ValueStopwatch + { + static readonly double TimestampToTicks = TimeSpan.TicksPerSecond / (double)Stopwatch.Frequency; + + readonly long startTimestamp; + + public static ValueStopwatch StartNew() => new ValueStopwatch(Stopwatch.GetTimestamp()); + + ValueStopwatch(long startTimestamp) + { + this.startTimestamp = startTimestamp; + } + + public TimeSpan Elapsed => TimeSpan.FromTicks(this.ElapsedTicks); + + public bool IsInvalid => startTimestamp == 0; + + public long ElapsedTicks + { + get + { + if (startTimestamp == 0) + { + throw new InvalidOperationException("Detected invalid initialization(use 'default'), only to create from StartNew()."); + } + + var delta = Stopwatch.GetTimestamp() - startTimestamp; + return (long)(delta * TimestampToTicks); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Internal/ValueStopwatch.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/ValueStopwatch.cs.meta new file mode 100644 index 0000000..b7c6b09 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/ValueStopwatch.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f16fb466974ad034c8732c79c7fd67ea +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Internal/WeakDictionary.cs b/Assets/Plugins/UniTask/Runtime/Internal/WeakDictionary.cs new file mode 100644 index 0000000..3feaad8 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/WeakDictionary.cs @@ -0,0 +1,334 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Internal +{ + // Add, Remove, Enumerate with sweep. All operations are thread safe(in spinlock). + internal class WeakDictionary + where TKey : class + { + Entry[] buckets; + int size; + SpinLock gate; // mutable struct(not readonly) + + readonly float loadFactor; + readonly IEqualityComparer keyEqualityComparer; + + public WeakDictionary(int capacity = 4, float loadFactor = 0.75f, IEqualityComparer keyComparer = null) + { + var tableSize = CalculateCapacity(capacity, loadFactor); + this.buckets = new Entry[tableSize]; + this.loadFactor = loadFactor; + this.gate = new SpinLock(false); + this.keyEqualityComparer = keyComparer ?? EqualityComparer.Default; + } + + public bool TryAdd(TKey key, TValue value) + { + bool lockTaken = false; + try + { + gate.Enter(ref lockTaken); + return TryAddInternal(key, value); + } + finally + { + if (lockTaken) gate.Exit(false); + } + } + + public bool TryGetValue(TKey key, out TValue value) + { + bool lockTaken = false; + try + { + gate.Enter(ref lockTaken); + if (TryGetEntry(key, out _, out var entry)) + { + value = entry.Value; + return true; + } + + value = default(TValue); + return false; + } + finally + { + if (lockTaken) gate.Exit(false); + } + } + + public bool TryRemove(TKey key) + { + bool lockTaken = false; + try + { + gate.Enter(ref lockTaken); + if (TryGetEntry(key, out var hashIndex, out var entry)) + { + Remove(hashIndex, entry); + return true; + } + + return false; + } + finally + { + if (lockTaken) gate.Exit(false); + } + } + + bool TryAddInternal(TKey key, TValue value) + { + var nextCapacity = CalculateCapacity(size + 1, loadFactor); + + TRY_ADD_AGAIN: + if (buckets.Length < nextCapacity) + { + // rehash + var nextBucket = new Entry[nextCapacity]; + for (int i = 0; i < buckets.Length; i++) + { + var e = buckets[i]; + while (e != null) + { + AddToBuckets(nextBucket, key, e.Value, e.Hash); + e = e.Next; + } + } + + buckets = nextBucket; + goto TRY_ADD_AGAIN; + } + else + { + // add entry + var successAdd = AddToBuckets(buckets, key, value, keyEqualityComparer.GetHashCode(key)); + if (successAdd) size++; + return successAdd; + } + } + + bool AddToBuckets(Entry[] targetBuckets, TKey newKey, TValue value, int keyHash) + { + var h = keyHash; + var hashIndex = h & (targetBuckets.Length - 1); + + TRY_ADD_AGAIN: + if (targetBuckets[hashIndex] == null) + { + targetBuckets[hashIndex] = new Entry + { + Key = new WeakReference(newKey, false), + Value = value, + Hash = h + }; + + return true; + } + else + { + // add to last. + var entry = targetBuckets[hashIndex]; + while (entry != null) + { + if (entry.Key.TryGetTarget(out var target)) + { + if (keyEqualityComparer.Equals(newKey, target)) + { + return false; // duplicate + } + } + else + { + Remove(hashIndex, entry); + if (targetBuckets[hashIndex] == null) goto TRY_ADD_AGAIN; // add new entry + } + + if (entry.Next != null) + { + entry = entry.Next; + } + else + { + // found last + entry.Next = new Entry + { + Key = new WeakReference(newKey, false), + Value = value, + Hash = h + }; + entry.Next.Prev = entry; + } + } + + return false; + } + } + + bool TryGetEntry(TKey key, out int hashIndex, out Entry entry) + { + var table = buckets; + var hash = keyEqualityComparer.GetHashCode(key); + hashIndex = hash & table.Length - 1; + entry = table[hashIndex]; + + while (entry != null) + { + if (entry.Key.TryGetTarget(out var target)) + { + if (keyEqualityComparer.Equals(key, target)) + { + return true; + } + } + else + { + // sweap + Remove(hashIndex, entry); + } + + entry = entry.Next; + } + + return false; + } + + void Remove(int hashIndex, Entry entry) + { + if (entry.Prev == null && entry.Next == null) + { + buckets[hashIndex] = null; + } + else + { + if (entry.Prev == null) + { + buckets[hashIndex] = entry.Next; + } + if (entry.Prev != null) + { + entry.Prev.Next = entry.Next; + } + if (entry.Next != null) + { + entry.Next.Prev = entry.Prev; + } + } + size--; + } + + public List> ToList() + { + var list = new List>(size); + ToList(ref list, false); + return list; + } + + // avoid allocate everytime. + public int ToList(ref List> list, bool clear = true) + { + if (clear) + { + list.Clear(); + } + + var listIndex = 0; + + bool lockTaken = false; + try + { + for (int i = 0; i < buckets.Length; i++) + { + var entry = buckets[i]; + while (entry != null) + { + if (entry.Key.TryGetTarget(out var target)) + { + var item = new KeyValuePair(target, entry.Value); + if (listIndex < list.Count) + { + list[listIndex++] = item; + } + else + { + list.Add(item); + listIndex++; + } + } + else + { + // sweap + Remove(i, entry); + } + + entry = entry.Next; + } + } + } + finally + { + if (lockTaken) gate.Exit(false); + } + + return listIndex; + } + + static int CalculateCapacity(int collectionSize, float loadFactor) + { + var size = (int)(((float)collectionSize) / loadFactor); + + size--; + size |= size >> 1; + size |= size >> 2; + size |= size >> 4; + size |= size >> 8; + size |= size >> 16; + size += 1; + + if (size < 8) + { + size = 8; + } + return size; + } + + class Entry + { + public WeakReference Key; + public TValue Value; + public int Hash; + public Entry Prev; + public Entry Next; + + // debug only + public override string ToString() + { + if (Key.TryGetTarget(out var target)) + { + return target + "(" + Count() + ")"; + } + else + { + return "(Dead)"; + } + } + + int Count() + { + var count = 1; + var n = this; + while (n.Next != null) + { + count++; + n = n.Next; + } + return count; + } + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/Internal/WeakDictionary.cs.meta b/Assets/Plugins/UniTask/Runtime/Internal/WeakDictionary.cs.meta new file mode 100644 index 0000000..9dc1672 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Internal/WeakDictionary.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6c78563864409714593226af59bcb6f3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq.meta b/Assets/Plugins/UniTask/Runtime/Linq.meta new file mode 100644 index 0000000..b761905 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eeee2179b3da3624797cff22ea1c1704 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Aggregate.cs b/Assets/Plugins/UniTask/Runtime/Linq/Aggregate.cs new file mode 100644 index 0000000..78647ff --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Aggregate.cs @@ -0,0 +1,318 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask AggregateAsync(this IUniTaskAsyncEnumerable source, Func accumulator, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(accumulator, nameof(accumulator)); + + return Aggregate.AggregateAsync(source, accumulator, cancellationToken); + } + + public static UniTask AggregateAsync(this IUniTaskAsyncEnumerable source, TAccumulate seed, Func accumulator, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(accumulator, nameof(accumulator)); + + return Aggregate.AggregateAsync(source, seed, accumulator, cancellationToken); + } + + public static UniTask AggregateAsync(this IUniTaskAsyncEnumerable source, TAccumulate seed, Func accumulator, Func resultSelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(accumulator, nameof(accumulator)); + Error.ThrowArgumentNullException(accumulator, nameof(resultSelector)); + + return Aggregate.AggregateAsync(source, seed, accumulator, resultSelector, cancellationToken); + } + + public static UniTask AggregateAwaitAsync(this IUniTaskAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(accumulator, nameof(accumulator)); + + return Aggregate.AggregateAwaitAsync(source, accumulator, cancellationToken); + } + + public static UniTask AggregateAwaitAsync(this IUniTaskAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(accumulator, nameof(accumulator)); + + return Aggregate.AggregateAwaitAsync(source, seed, accumulator, cancellationToken); + } + + public static UniTask AggregateAwaitAsync(this IUniTaskAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(accumulator, nameof(accumulator)); + Error.ThrowArgumentNullException(accumulator, nameof(resultSelector)); + + return Aggregate.AggregateAwaitAsync(source, seed, accumulator, resultSelector, cancellationToken); + } + + public static UniTask AggregateAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(accumulator, nameof(accumulator)); + + return Aggregate.AggregateAwaitWithCancellationAsync(source, accumulator, cancellationToken); + } + + public static UniTask AggregateAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(accumulator, nameof(accumulator)); + + return Aggregate.AggregateAwaitWithCancellationAsync(source, seed, accumulator, cancellationToken); + } + + public static UniTask AggregateAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(accumulator, nameof(accumulator)); + Error.ThrowArgumentNullException(accumulator, nameof(resultSelector)); + + return Aggregate.AggregateAwaitWithCancellationAsync(source, seed, accumulator, resultSelector, cancellationToken); + } + } + + internal static class Aggregate + { + internal static async UniTask AggregateAsync(IUniTaskAsyncEnumerable source, Func accumulator, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TSource value; + if (await e.MoveNextAsync()) + { + value = e.Current; + } + else + { + throw Error.NoElements(); + } + + while (await e.MoveNextAsync()) + { + value = accumulator(value, e.Current); + } + return value; + + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal static async UniTask AggregateAsync(IUniTaskAsyncEnumerable source, TAccumulate seed, Func accumulator, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TAccumulate value = seed; + while (await e.MoveNextAsync()) + { + value = accumulator(value, e.Current); + } + return value; + + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal static async UniTask AggregateAsync(IUniTaskAsyncEnumerable source, TAccumulate seed, Func accumulator, Func resultSelector, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TAccumulate value = seed; + while (await e.MoveNextAsync()) + { + value = accumulator(value, e.Current); + } + return resultSelector(value); + + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + // with async + + internal static async UniTask AggregateAwaitAsync(IUniTaskAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TSource value; + if (await e.MoveNextAsync()) + { + value = e.Current; + } + else + { + throw Error.NoElements(); + } + + while (await e.MoveNextAsync()) + { + value = await accumulator(value, e.Current); + } + return value; + + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal static async UniTask AggregateAwaitAsync(IUniTaskAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TAccumulate value = seed; + while (await e.MoveNextAsync()) + { + value = await accumulator(value, e.Current); + } + return value; + + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal static async UniTask AggregateAwaitAsync(IUniTaskAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TAccumulate value = seed; + while (await e.MoveNextAsync()) + { + value = await accumulator(value, e.Current); + } + return await resultSelector(value); + + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + + // with cancellation + + internal static async UniTask AggregateAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TSource value; + if (await e.MoveNextAsync()) + { + value = e.Current; + } + else + { + throw Error.NoElements(); + } + + while (await e.MoveNextAsync()) + { + value = await accumulator(value, e.Current, cancellationToken); + } + return value; + + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal static async UniTask AggregateAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TAccumulate value = seed; + while (await e.MoveNextAsync()) + { + value = await accumulator(value, e.Current, cancellationToken); + } + return value; + + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal static async UniTask AggregateAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TAccumulate value = seed; + while (await e.MoveNextAsync()) + { + value = await accumulator(value, e.Current, cancellationToken); + } + return await resultSelector(value, cancellationToken); + + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Aggregate.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Aggregate.cs.meta new file mode 100644 index 0000000..837df4a --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Aggregate.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5dc68c05a4228c643937f6ebd185bcca +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/All.cs b/Assets/Plugins/UniTask/Runtime/Linq/All.cs new file mode 100644 index 0000000..5d6d5f0 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/All.cs @@ -0,0 +1,108 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask AllAsync(this IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return All.AllAsync(source, predicate, cancellationToken); + } + + public static UniTask AllAwaitAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return All.AllAwaitAsync(source, predicate, cancellationToken); + } + + public static UniTask AllAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return All.AllAwaitWithCancellationAsync(source, predicate, cancellationToken); + } + } + + internal static class All + { + internal static async UniTask AllAsync(IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + if (!predicate(e.Current)) + { + return false; + } + } + + return true; + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal static async UniTask AllAwaitAsync(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + if (!await predicate(e.Current)) + { + return false; + } + } + + return true; + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal static async UniTask AllAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + if (!await predicate(e.Current, cancellationToken)) + { + return false; + } + } + + return true; + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/All.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/All.cs.meta new file mode 100644 index 0000000..d378ff0 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/All.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7271437e0033af2448b600ee248924dd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Any.cs b/Assets/Plugins/UniTask/Runtime/Linq/Any.cs new file mode 100644 index 0000000..2d43167 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Any.cs @@ -0,0 +1,136 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask AnyAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Any.AnyAsync(source, cancellationToken); + } + + public static UniTask AnyAsync(this IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return Any.AnyAsync(source, predicate, cancellationToken); + } + + public static UniTask AnyAwaitAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return Any.AnyAwaitAsync(source, predicate, cancellationToken); + } + + public static UniTask AnyAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return Any.AnyAwaitWithCancellationAsync(source, predicate, cancellationToken); + } + } + + internal static class Any + { + internal static async UniTask AnyAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + if (await e.MoveNextAsync()) + { + return true; + } + + return false; + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal static async UniTask AnyAsync(IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + if (predicate(e.Current)) + { + return true; + } + } + + return false; + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal static async UniTask AnyAwaitAsync(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + if (await predicate(e.Current)) + { + return true; + } + } + + return false; + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal static async UniTask AnyAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + if (await predicate(e.Current, cancellationToken)) + { + return true; + } + } + + return false; + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Any.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Any.cs.meta new file mode 100644 index 0000000..1070bcc --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Any.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e2b2e65745263994fbe34f3e0ec8eb12 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/AppendPrepend.cs b/Assets/Plugins/UniTask/Runtime/Linq/AppendPrepend.cs new file mode 100644 index 0000000..3935afd --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/AppendPrepend.cs @@ -0,0 +1,151 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Append(this IUniTaskAsyncEnumerable source, TSource element) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new AppendPrepend(source, element, true); + } + + public static IUniTaskAsyncEnumerable Prepend(this IUniTaskAsyncEnumerable source, TSource element) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new AppendPrepend(source, element, false); + } + } + + internal sealed class AppendPrepend : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly TSource element; + readonly bool append; // or prepend + + public AppendPrepend(IUniTaskAsyncEnumerable source, TSource element, bool append) + { + this.source = source; + this.element = element; + this.append = append; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _AppendPrepend(source, element, append, cancellationToken); + } + + sealed class _AppendPrepend : MoveNextSource, IUniTaskAsyncEnumerator + { + enum State : byte + { + None, + RequirePrepend, + RequireAppend, + Completed + } + + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable source; + readonly TSource element; + CancellationToken cancellationToken; + + State state; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + + public _AppendPrepend(IUniTaskAsyncEnumerable source, TSource element, bool append, CancellationToken cancellationToken) + { + this.source = source; + this.element = element; + this.state = append ? State.RequireAppend : State.RequirePrepend; + this.cancellationToken = cancellationToken; + + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (enumerator == null) + { + if (state == State.RequirePrepend) + { + Current = element; + state = State.None; + return CompletedTasks.True; + } + + enumerator = source.GetAsyncEnumerator(cancellationToken); + } + + if (state == State.Completed) + { + return CompletedTasks.False; + } + + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + + if (awaiter.IsCompleted) + { + MoveNextCoreDelegate(this); + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + + return new UniTask(this, completionSource.Version); + } + + static void MoveNextCore(object state) + { + var self = (_AppendPrepend)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + self.Current = self.enumerator.Current; + self.completionSource.TrySetResult(true); + } + else + { + if (self.state == State.RequireAppend) + { + self.state = State.Completed; + self.Current = self.element; + self.completionSource.TrySetResult(true); + } + else + { + self.state = State.Completed; + self.completionSource.TrySetResult(false); + } + } + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } + } + +} diff --git a/Assets/Plugins/UniTask/Runtime/Linq/AppendPrepend.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/AppendPrepend.cs.meta new file mode 100644 index 0000000..6d2ee04 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/AppendPrepend.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3268ec424b8055f45aa2a26d17c80468 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/AsUniTaskAsyncEnumerable.cs b/Assets/Plugins/UniTask/Runtime/Linq/AsUniTaskAsyncEnumerable.cs new file mode 100644 index 0000000..c00452e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/AsUniTaskAsyncEnumerable.cs @@ -0,0 +1,10 @@ +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable AsUniTaskAsyncEnumerable(this IUniTaskAsyncEnumerable source) + { + return source; + } + } +} diff --git a/Assets/Plugins/UniTask/Runtime/Linq/AsUniTaskAsyncEnumerable.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/AsUniTaskAsyncEnumerable.cs.meta new file mode 100644 index 0000000..90f6207 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/AsUniTaskAsyncEnumerable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 69866e262589ea643bbc62a1d696077a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/AsyncEnumeratorBase.cs b/Assets/Plugins/UniTask/Runtime/Linq/AsyncEnumeratorBase.cs new file mode 100644 index 0000000..e7f9968 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/AsyncEnumeratorBase.cs @@ -0,0 +1,356 @@ +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + // note: refactor all inherit class and should remove this. + // see Select and Where. + internal abstract class AsyncEnumeratorBase : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action moveNextCallbackDelegate = MoveNextCallBack; + + readonly IUniTaskAsyncEnumerable source; + protected CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter sourceMoveNext; + + public AsyncEnumeratorBase(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + this.source = source; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 4); + } + + // abstract + + /// + /// If return value is false, continue source.MoveNext. + /// + protected abstract bool TryMoveNextCore(bool sourceHasCurrent, out bool result); + + // Util + protected TSource SourceCurrent => enumerator.Current; + + // IUniTaskAsyncEnumerator + + public TResult Current { get; protected set; } + + public UniTask MoveNextAsync() + { + if (enumerator == null) + { + enumerator = source.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + if (!OnFirstIteration()) + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + protected virtual bool OnFirstIteration() + { + return false; + } + + protected void SourceMoveNext() + { + CONTINUE: + sourceMoveNext = enumerator.MoveNextAsync().GetAwaiter(); + if (sourceMoveNext.IsCompleted) + { + bool result = false; + try + { + if (!TryMoveNextCore(sourceMoveNext.GetResult(), out result)) + { + goto CONTINUE; + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + + if (cancellationToken.IsCancellationRequested) + { + completionSource.TrySetCanceled(cancellationToken); + } + else + { + completionSource.TrySetResult(result); + } + } + else + { + sourceMoveNext.SourceOnCompleted(moveNextCallbackDelegate, this); + } + } + + static void MoveNextCallBack(object state) + { + var self = (AsyncEnumeratorBase)state; + bool result; + try + { + if (!self.TryMoveNextCore(self.sourceMoveNext.GetResult(), out result)) + { + self.SourceMoveNext(); + return; + } + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + + if (self.cancellationToken.IsCancellationRequested) + { + self.completionSource.TrySetCanceled(self.cancellationToken); + } + else + { + self.completionSource.TrySetResult(result); + } + } + + // if require additional resource to dispose, override and call base.DisposeAsync. + public virtual UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } + + internal abstract class AsyncEnumeratorAwaitSelectorBase : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action moveNextCallbackDelegate = MoveNextCallBack; + static readonly Action setCurrentCallbackDelegate = SetCurrentCallBack; + + + readonly IUniTaskAsyncEnumerable source; + protected CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter sourceMoveNext; + + UniTask.Awaiter resultAwaiter; + + public AsyncEnumeratorAwaitSelectorBase(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + this.source = source; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 4); + } + + // abstract + + protected abstract UniTask TransformAsync(TSource sourceCurrent); + protected abstract bool TrySetCurrentCore(TAwait awaitResult, out bool terminateIteration); + + // Util + protected TSource SourceCurrent { get; private set; } + + protected (bool waitCallback, bool requireNextIteration) ActionCompleted(bool trySetCurrentResult, out bool moveNextResult) + { + if (trySetCurrentResult) + { + moveNextResult = true; + return (false, false); + } + else + { + moveNextResult = default; + return (false, true); + } + } + protected (bool waitCallback, bool requireNextIteration) WaitAwaitCallback(out bool moveNextResult) { moveNextResult = default; return (true, false); } + protected (bool waitCallback, bool requireNextIteration) IterateFinished(out bool moveNextResult) { moveNextResult = false; return (false, false); } + + // IUniTaskAsyncEnumerator + + public TResult Current { get; protected set; } + + public UniTask MoveNextAsync() + { + if (enumerator == null) + { + enumerator = source.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + SourceMoveNext(); + return new UniTask(this, completionSource.Version); + } + + protected void SourceMoveNext() + { + CONTINUE: + sourceMoveNext = enumerator.MoveNextAsync().GetAwaiter(); + if (sourceMoveNext.IsCompleted) + { + bool result = false; + try + { + (bool waitCallback, bool requireNextIteration) = TryMoveNextCore(sourceMoveNext.GetResult(), out result); + + if (waitCallback) + { + return; + } + + if (requireNextIteration) + { + goto CONTINUE; + } + else + { + completionSource.TrySetResult(result); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + } + else + { + sourceMoveNext.SourceOnCompleted(moveNextCallbackDelegate, this); + } + } + + (bool waitCallback, bool requireNextIteration) TryMoveNextCore(bool sourceHasCurrent, out bool result) + { + if (sourceHasCurrent) + { + SourceCurrent = enumerator.Current; + var task = TransformAsync(SourceCurrent); + if (UnwarapTask(task, out var taskResult)) + { + var currentResult = TrySetCurrentCore(taskResult, out var terminateIteration); + if (terminateIteration) + { + return IterateFinished(out result); + } + + return ActionCompleted(currentResult, out result); + } + else + { + return WaitAwaitCallback(out result); + } + } + + return IterateFinished(out result); + } + + protected bool UnwarapTask(UniTask taskResult, out TAwait result) + { + resultAwaiter = taskResult.GetAwaiter(); + + if (resultAwaiter.IsCompleted) + { + result = resultAwaiter.GetResult(); + return true; + } + else + { + resultAwaiter.SourceOnCompleted(setCurrentCallbackDelegate, this); + result = default; + return false; + } + } + + static void MoveNextCallBack(object state) + { + var self = (AsyncEnumeratorAwaitSelectorBase)state; + bool result = false; + try + { + (bool waitCallback, bool requireNextIteration) = self.TryMoveNextCore(self.sourceMoveNext.GetResult(), out result); + + if (waitCallback) + { + return; + } + + if (requireNextIteration) + { + self.SourceMoveNext(); + return; + } + else + { + self.completionSource.TrySetResult(result); + } + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + } + + static void SetCurrentCallBack(object state) + { + var self = (AsyncEnumeratorAwaitSelectorBase)state; + + bool doneSetCurrent; + bool terminateIteration; + try + { + var result = self.resultAwaiter.GetResult(); + doneSetCurrent = self.TrySetCurrentCore(result, out terminateIteration); + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + + if (self.cancellationToken.IsCancellationRequested) + { + self.completionSource.TrySetCanceled(self.cancellationToken); + } + else + { + if (doneSetCurrent) + { + self.completionSource.TrySetResult(true); + } + else + { + if (terminateIteration) + { + self.completionSource.TrySetResult(false); + } + else + { + self.SourceMoveNext(); + } + } + } + } + + // if require additional resource to dispose, override and call base.DisposeAsync. + public virtual UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/AsyncEnumeratorBase.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/AsyncEnumeratorBase.cs.meta new file mode 100644 index 0000000..a4e96dc --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/AsyncEnumeratorBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 01ba1d3b17e13fb4c95740131c7e6e19 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Average.cs b/Assets/Plugins/UniTask/Runtime/Linq/Average.cs new file mode 100644 index 0000000..b2ce42c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Average.cs @@ -0,0 +1,1524 @@ +using System; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Average.AverageAsync(source, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Average.AverageAsync(source, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Average.AverageAsync(source, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Average.AverageAsync(source, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Average.AverageAsync(source, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Average.AverageAsync(source, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Average.AverageAsync(source, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Average.AverageAsync(source, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Average.AverageAsync(source, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Average.AverageAsync(source, cancellationToken); + } + + public static UniTask AverageAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask AverageAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Average.AverageAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + } + + internal static class Average + { + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + long count = 0; + Int32 sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += e.Current; + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + long count = 0; + Int32 sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += selector(e.Current); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Int32 sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += await selector(e.Current); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Int32 sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += await selector(e.Current, cancellationToken); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + long count = 0; + Int64 sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += e.Current; + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + long count = 0; + Int64 sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += selector(e.Current); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Int64 sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += await selector(e.Current); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Int64 sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += await selector(e.Current, cancellationToken); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + long count = 0; + Single sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += e.Current; + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (float)(sum / count); + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + long count = 0; + Single sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += selector(e.Current); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (float)(sum / count); + } + + public static async UniTask AverageAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Single sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += await selector(e.Current); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (float)(sum / count); + } + + public static async UniTask AverageAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Single sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += await selector(e.Current, cancellationToken); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (float)(sum / count); + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + long count = 0; + Double sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += e.Current; + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + long count = 0; + Double sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += selector(e.Current); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Double sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += await selector(e.Current); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Double sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += await selector(e.Current, cancellationToken); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + long count = 0; + Decimal sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += e.Current; + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + long count = 0; + Decimal sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += selector(e.Current); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Decimal sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += await selector(e.Current); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Decimal sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked + { + sum += await selector(e.Current, cancellationToken); + count++; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + long count = 0; + Int32? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = e.Current; + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + long count = 0; + Int32? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = selector(e.Current); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Int32? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Int32? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current, cancellationToken); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + long count = 0; + Int64? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = e.Current; + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + long count = 0; + Int64? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = selector(e.Current); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Int64? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Int64? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current, cancellationToken); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (double)sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + long count = 0; + Single? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = e.Current; + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (float)(sum / count); + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + long count = 0; + Single? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = selector(e.Current); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (float)(sum / count); + } + + public static async UniTask AverageAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Single? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (float)(sum / count); + } + + public static async UniTask AverageAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Single? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current, cancellationToken); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return (float)(sum / count); + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + long count = 0; + Double? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = e.Current; + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + long count = 0; + Double? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = selector(e.Current); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Double? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Double? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current, cancellationToken); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + long count = 0; + Decimal? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = e.Current; + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + long count = 0; + Decimal? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = selector(e.Current); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Decimal? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + public static async UniTask AverageAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + long count = 0; + Decimal? sum = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current, cancellationToken); + if (v.HasValue) + { + checked + { + sum += v.Value; + count++; + } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum / count; + } + + } +} diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Average.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Average.cs.meta new file mode 100644 index 0000000..8f60dfc --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Average.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 58499f95012fb3c47bb7bcbc5862e562 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Buffer.cs b/Assets/Plugins/UniTask/Runtime/Linq/Buffer.cs new file mode 100644 index 0000000..be395b6 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Buffer.cs @@ -0,0 +1,345 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable> Buffer(this IUniTaskAsyncEnumerable source, Int32 count) + { + Error.ThrowArgumentNullException(source, nameof(source)); + if (count <= 0) throw Error.ArgumentOutOfRange(nameof(count)); + + return new Buffer(source, count); + } + + public static IUniTaskAsyncEnumerable> Buffer(this IUniTaskAsyncEnumerable source, Int32 count, Int32 skip) + { + Error.ThrowArgumentNullException(source, nameof(source)); + if (count <= 0) throw Error.ArgumentOutOfRange(nameof(count)); + if (skip <= 0) throw Error.ArgumentOutOfRange(nameof(skip)); + + return new BufferSkip(source, count, skip); + } + } + + internal sealed class Buffer : IUniTaskAsyncEnumerable> + { + readonly IUniTaskAsyncEnumerable source; + readonly int count; + + public Buffer(IUniTaskAsyncEnumerable source, int count) + { + this.source = source; + this.count = count; + } + + public IUniTaskAsyncEnumerator> GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Buffer(source, count, cancellationToken); + } + + sealed class _Buffer : MoveNextSource, IUniTaskAsyncEnumerator> + { + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable source; + readonly int count; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + bool continueNext; + + bool completed; + List buffer; + + public _Buffer(IUniTaskAsyncEnumerable source, int count, CancellationToken cancellationToken) + { + this.source = source; + this.count = count; + this.cancellationToken = cancellationToken; + + TaskTracker.TrackActiveTask(this, 3); + } + + public IList Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (enumerator == null) + { + enumerator = source.GetAsyncEnumerator(cancellationToken); + buffer = new List(count); + } + + completionSource.Reset(); + SourceMoveNext(); + return new UniTask(this, completionSource.Version); + } + + void SourceMoveNext() + { + if (completed) + { + if (buffer != null && buffer.Count > 0) + { + var ret = buffer; + buffer = null; + Current = ret; + completionSource.TrySetResult(true); + return; + } + else + { + completionSource.TrySetResult(false); + return; + } + } + + try + { + + LOOP: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + continueNext = true; + MoveNextCore(this); + if (continueNext) + { + continueNext = false; + goto LOOP; // avoid recursive + } + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + + static void MoveNextCore(object state) + { + var self = (_Buffer)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + self.buffer.Add(self.enumerator.Current); + + if (self.buffer.Count == self.count) + { + self.Current = self.buffer; + self.buffer = new List(self.count); + self.continueNext = false; + self.completionSource.TrySetResult(true); + return; + } + else + { + if (!self.continueNext) + { + self.SourceMoveNext(); + } + } + } + else + { + self.continueNext = false; + self.completed = true; + self.SourceMoveNext(); + } + } + else + { + self.continueNext = false; + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } + } + + internal sealed class BufferSkip : IUniTaskAsyncEnumerable> + { + readonly IUniTaskAsyncEnumerable source; + readonly int count; + readonly int skip; + + public BufferSkip(IUniTaskAsyncEnumerable source, int count, int skip) + { + this.source = source; + this.count = count; + this.skip = skip; + } + + public IUniTaskAsyncEnumerator> GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _BufferSkip(source, count, skip, cancellationToken); + } + + sealed class _BufferSkip : MoveNextSource, IUniTaskAsyncEnumerator> + { + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable source; + readonly int count; + readonly int skip; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + bool continueNext; + + bool completed; + Queue> buffers; + int index = 0; + + public _BufferSkip(IUniTaskAsyncEnumerable source, int count, int skip, CancellationToken cancellationToken) + { + this.source = source; + this.count = count; + this.skip = skip; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public IList Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (enumerator == null) + { + enumerator = source.GetAsyncEnumerator(cancellationToken); + buffers = new Queue>(); + } + + completionSource.Reset(); + SourceMoveNext(); + return new UniTask(this, completionSource.Version); + } + + void SourceMoveNext() + { + if (completed) + { + if (buffers.Count > 0) + { + Current = buffers.Dequeue(); + completionSource.TrySetResult(true); + return; + } + else + { + completionSource.TrySetResult(false); + return; + } + } + + try + { + + LOOP: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + continueNext = true; + MoveNextCore(this); + if (continueNext) + { + continueNext = false; + goto LOOP; // avoid recursive + } + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + + static void MoveNextCore(object state) + { + var self = (_BufferSkip)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + if (self.index++ % self.skip == 0) + { + self.buffers.Enqueue(new List(self.count)); + } + + var item = self.enumerator.Current; + foreach (var buffer in self.buffers) + { + buffer.Add(item); + } + + if (self.buffers.Count > 0 && self.buffers.Peek().Count == self.count) + { + self.Current = self.buffers.Dequeue(); + self.continueNext = false; + self.completionSource.TrySetResult(true); + return; + } + else + { + if (!self.continueNext) + { + self.SourceMoveNext(); + } + } + } + else + { + self.continueNext = false; + self.completed = true; + self.SourceMoveNext(); + } + } + else + { + self.continueNext = false; + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Buffer.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Buffer.cs.meta new file mode 100644 index 0000000..e7154e4 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Buffer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 951310243334a3148a7872977cb31c5c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Cast.cs b/Assets/Plugins/UniTask/Runtime/Linq/Cast.cs new file mode 100644 index 0000000..0a0c0f8 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Cast.cs @@ -0,0 +1,53 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Cast(this IUniTaskAsyncEnumerable source) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new Cast(source); + } + } + + internal sealed class Cast : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + + public Cast(IUniTaskAsyncEnumerable source) + { + this.source = source; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Cast(source, cancellationToken); + } + + class _Cast : AsyncEnumeratorBase + { + public _Cast(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + + : base(source, cancellationToken) + { + } + + protected override bool TryMoveNextCore(bool sourceHasCurrent, out bool result) + { + if (sourceHasCurrent) + { + Current = (TResult)SourceCurrent; + result = true; + return true; + } + + result = false; + return true; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Cast.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Cast.cs.meta new file mode 100644 index 0000000..913b043 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Cast.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: edebeae8b61352b428abe9ce8f3fc71a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/CombineLatest.cs b/Assets/Plugins/UniTask/Runtime/Linq/CombineLatest.cs new file mode 100644 index 0000000..92fb1da --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/CombineLatest.cs @@ -0,0 +1,11372 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable CombineLatest(this IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, Func resultSelector) + { + Error.ThrowArgumentNullException(source1, nameof(source1)); + Error.ThrowArgumentNullException(source2, nameof(source2)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new CombineLatest(source1, source2, resultSelector); + } + + public static IUniTaskAsyncEnumerable CombineLatest(this IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, Func resultSelector) + { + Error.ThrowArgumentNullException(source1, nameof(source1)); + Error.ThrowArgumentNullException(source2, nameof(source2)); + Error.ThrowArgumentNullException(source3, nameof(source3)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new CombineLatest(source1, source2, source3, resultSelector); + } + + public static IUniTaskAsyncEnumerable CombineLatest(this IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, Func resultSelector) + { + Error.ThrowArgumentNullException(source1, nameof(source1)); + Error.ThrowArgumentNullException(source2, nameof(source2)); + Error.ThrowArgumentNullException(source3, nameof(source3)); + Error.ThrowArgumentNullException(source4, nameof(source4)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new CombineLatest(source1, source2, source3, source4, resultSelector); + } + + public static IUniTaskAsyncEnumerable CombineLatest(this IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, Func resultSelector) + { + Error.ThrowArgumentNullException(source1, nameof(source1)); + Error.ThrowArgumentNullException(source2, nameof(source2)); + Error.ThrowArgumentNullException(source3, nameof(source3)); + Error.ThrowArgumentNullException(source4, nameof(source4)); + Error.ThrowArgumentNullException(source5, nameof(source5)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new CombineLatest(source1, source2, source3, source4, source5, resultSelector); + } + + public static IUniTaskAsyncEnumerable CombineLatest(this IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, Func resultSelector) + { + Error.ThrowArgumentNullException(source1, nameof(source1)); + Error.ThrowArgumentNullException(source2, nameof(source2)); + Error.ThrowArgumentNullException(source3, nameof(source3)); + Error.ThrowArgumentNullException(source4, nameof(source4)); + Error.ThrowArgumentNullException(source5, nameof(source5)); + Error.ThrowArgumentNullException(source6, nameof(source6)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new CombineLatest(source1, source2, source3, source4, source5, source6, resultSelector); + } + + public static IUniTaskAsyncEnumerable CombineLatest(this IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, Func resultSelector) + { + Error.ThrowArgumentNullException(source1, nameof(source1)); + Error.ThrowArgumentNullException(source2, nameof(source2)); + Error.ThrowArgumentNullException(source3, nameof(source3)); + Error.ThrowArgumentNullException(source4, nameof(source4)); + Error.ThrowArgumentNullException(source5, nameof(source5)); + Error.ThrowArgumentNullException(source6, nameof(source6)); + Error.ThrowArgumentNullException(source7, nameof(source7)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new CombineLatest(source1, source2, source3, source4, source5, source6, source7, resultSelector); + } + + public static IUniTaskAsyncEnumerable CombineLatest(this IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, Func resultSelector) + { + Error.ThrowArgumentNullException(source1, nameof(source1)); + Error.ThrowArgumentNullException(source2, nameof(source2)); + Error.ThrowArgumentNullException(source3, nameof(source3)); + Error.ThrowArgumentNullException(source4, nameof(source4)); + Error.ThrowArgumentNullException(source5, nameof(source5)); + Error.ThrowArgumentNullException(source6, nameof(source6)); + Error.ThrowArgumentNullException(source7, nameof(source7)); + Error.ThrowArgumentNullException(source8, nameof(source8)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, resultSelector); + } + + public static IUniTaskAsyncEnumerable CombineLatest(this IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, Func resultSelector) + { + Error.ThrowArgumentNullException(source1, nameof(source1)); + Error.ThrowArgumentNullException(source2, nameof(source2)); + Error.ThrowArgumentNullException(source3, nameof(source3)); + Error.ThrowArgumentNullException(source4, nameof(source4)); + Error.ThrowArgumentNullException(source5, nameof(source5)); + Error.ThrowArgumentNullException(source6, nameof(source6)); + Error.ThrowArgumentNullException(source7, nameof(source7)); + Error.ThrowArgumentNullException(source8, nameof(source8)); + Error.ThrowArgumentNullException(source9, nameof(source9)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, resultSelector); + } + + public static IUniTaskAsyncEnumerable CombineLatest(this IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, Func resultSelector) + { + Error.ThrowArgumentNullException(source1, nameof(source1)); + Error.ThrowArgumentNullException(source2, nameof(source2)); + Error.ThrowArgumentNullException(source3, nameof(source3)); + Error.ThrowArgumentNullException(source4, nameof(source4)); + Error.ThrowArgumentNullException(source5, nameof(source5)); + Error.ThrowArgumentNullException(source6, nameof(source6)); + Error.ThrowArgumentNullException(source7, nameof(source7)); + Error.ThrowArgumentNullException(source8, nameof(source8)); + Error.ThrowArgumentNullException(source9, nameof(source9)); + Error.ThrowArgumentNullException(source10, nameof(source10)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, resultSelector); + } + + public static IUniTaskAsyncEnumerable CombineLatest(this IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, Func resultSelector) + { + Error.ThrowArgumentNullException(source1, nameof(source1)); + Error.ThrowArgumentNullException(source2, nameof(source2)); + Error.ThrowArgumentNullException(source3, nameof(source3)); + Error.ThrowArgumentNullException(source4, nameof(source4)); + Error.ThrowArgumentNullException(source5, nameof(source5)); + Error.ThrowArgumentNullException(source6, nameof(source6)); + Error.ThrowArgumentNullException(source7, nameof(source7)); + Error.ThrowArgumentNullException(source8, nameof(source8)); + Error.ThrowArgumentNullException(source9, nameof(source9)); + Error.ThrowArgumentNullException(source10, nameof(source10)); + Error.ThrowArgumentNullException(source11, nameof(source11)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, resultSelector); + } + + public static IUniTaskAsyncEnumerable CombineLatest(this IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, IUniTaskAsyncEnumerable source12, Func resultSelector) + { + Error.ThrowArgumentNullException(source1, nameof(source1)); + Error.ThrowArgumentNullException(source2, nameof(source2)); + Error.ThrowArgumentNullException(source3, nameof(source3)); + Error.ThrowArgumentNullException(source4, nameof(source4)); + Error.ThrowArgumentNullException(source5, nameof(source5)); + Error.ThrowArgumentNullException(source6, nameof(source6)); + Error.ThrowArgumentNullException(source7, nameof(source7)); + Error.ThrowArgumentNullException(source8, nameof(source8)); + Error.ThrowArgumentNullException(source9, nameof(source9)); + Error.ThrowArgumentNullException(source10, nameof(source10)); + Error.ThrowArgumentNullException(source11, nameof(source11)); + Error.ThrowArgumentNullException(source12, nameof(source12)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, resultSelector); + } + + public static IUniTaskAsyncEnumerable CombineLatest(this IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, IUniTaskAsyncEnumerable source12, IUniTaskAsyncEnumerable source13, Func resultSelector) + { + Error.ThrowArgumentNullException(source1, nameof(source1)); + Error.ThrowArgumentNullException(source2, nameof(source2)); + Error.ThrowArgumentNullException(source3, nameof(source3)); + Error.ThrowArgumentNullException(source4, nameof(source4)); + Error.ThrowArgumentNullException(source5, nameof(source5)); + Error.ThrowArgumentNullException(source6, nameof(source6)); + Error.ThrowArgumentNullException(source7, nameof(source7)); + Error.ThrowArgumentNullException(source8, nameof(source8)); + Error.ThrowArgumentNullException(source9, nameof(source9)); + Error.ThrowArgumentNullException(source10, nameof(source10)); + Error.ThrowArgumentNullException(source11, nameof(source11)); + Error.ThrowArgumentNullException(source12, nameof(source12)); + Error.ThrowArgumentNullException(source13, nameof(source13)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, resultSelector); + } + + public static IUniTaskAsyncEnumerable CombineLatest(this IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, IUniTaskAsyncEnumerable source12, IUniTaskAsyncEnumerable source13, IUniTaskAsyncEnumerable source14, Func resultSelector) + { + Error.ThrowArgumentNullException(source1, nameof(source1)); + Error.ThrowArgumentNullException(source2, nameof(source2)); + Error.ThrowArgumentNullException(source3, nameof(source3)); + Error.ThrowArgumentNullException(source4, nameof(source4)); + Error.ThrowArgumentNullException(source5, nameof(source5)); + Error.ThrowArgumentNullException(source6, nameof(source6)); + Error.ThrowArgumentNullException(source7, nameof(source7)); + Error.ThrowArgumentNullException(source8, nameof(source8)); + Error.ThrowArgumentNullException(source9, nameof(source9)); + Error.ThrowArgumentNullException(source10, nameof(source10)); + Error.ThrowArgumentNullException(source11, nameof(source11)); + Error.ThrowArgumentNullException(source12, nameof(source12)); + Error.ThrowArgumentNullException(source13, nameof(source13)); + Error.ThrowArgumentNullException(source14, nameof(source14)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, resultSelector); + } + + public static IUniTaskAsyncEnumerable CombineLatest(this IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, IUniTaskAsyncEnumerable source12, IUniTaskAsyncEnumerable source13, IUniTaskAsyncEnumerable source14, IUniTaskAsyncEnumerable source15, Func resultSelector) + { + Error.ThrowArgumentNullException(source1, nameof(source1)); + Error.ThrowArgumentNullException(source2, nameof(source2)); + Error.ThrowArgumentNullException(source3, nameof(source3)); + Error.ThrowArgumentNullException(source4, nameof(source4)); + Error.ThrowArgumentNullException(source5, nameof(source5)); + Error.ThrowArgumentNullException(source6, nameof(source6)); + Error.ThrowArgumentNullException(source7, nameof(source7)); + Error.ThrowArgumentNullException(source8, nameof(source8)); + Error.ThrowArgumentNullException(source9, nameof(source9)); + Error.ThrowArgumentNullException(source10, nameof(source10)); + Error.ThrowArgumentNullException(source11, nameof(source11)); + Error.ThrowArgumentNullException(source12, nameof(source12)); + Error.ThrowArgumentNullException(source13, nameof(source13)); + Error.ThrowArgumentNullException(source14, nameof(source14)); + Error.ThrowArgumentNullException(source15, nameof(source15)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, resultSelector); + } + + } + + internal class CombineLatest : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + + readonly Func resultSelector; + + public CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, Func resultSelector) + { + this.source1 = source1; + this.source2 = source2; + + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _CombineLatest(source1, source2, resultSelector, cancellationToken); + } + + class _CombineLatest : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action Completed1Delegate = Completed1; + static readonly Action Completed2Delegate = Completed2; + const int CompleteCount = 2; + + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + + readonly Func resultSelector; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator1; + UniTask.Awaiter awaiter1; + bool hasCurrent1; + bool running1; + T1 current1; + + IUniTaskAsyncEnumerator enumerator2; + UniTask.Awaiter awaiter2; + bool hasCurrent2; + bool running2; + T2 current2; + + int completedCount; + bool syncRunning; + TResult result; + + public _CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, Func resultSelector, CancellationToken cancellationToken) + { + this.source1 = source1; + this.source2 = source2; + + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current => result; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + if (completedCount == CompleteCount) return CompletedTasks.False; + + if (enumerator1 == null) + { + enumerator1 = source1.GetAsyncEnumerator(cancellationToken); + enumerator2 = source2.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + + AGAIN: + syncRunning = true; + if (!running1) + { + running1 = true; + awaiter1 = enumerator1.MoveNextAsync().GetAwaiter(); + if (awaiter1.IsCompleted) + { + Completed1(this); + } + else + { + awaiter1.SourceOnCompleted(Completed1Delegate, this); + } + } + if (!running2) + { + running2 = true; + awaiter2 = enumerator2.MoveNextAsync().GetAwaiter(); + if (awaiter2.IsCompleted) + { + Completed2(this); + } + else + { + awaiter2.SourceOnCompleted(Completed2Delegate, this); + } + } + + if (!running1 || !running2) + { + goto AGAIN; + } + syncRunning = false; + + return new UniTask(this, completionSource.Version); + } + + static void Completed1(object state) + { + var self = (_CombineLatest)state; + self.running1 = false; + + try + { + if (self.awaiter1.GetResult()) + { + self.hasCurrent1 = true; + self.current1 = self.enumerator1.Current; + goto SUCCESS; + } + else + { + self.running1 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running1 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running1 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter1.SourceOnCompleted(Completed1Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed2(object state) + { + var self = (_CombineLatest)state; + self.running2 = false; + + try + { + if (self.awaiter2.GetResult()) + { + self.hasCurrent2 = true; + self.current2 = self.enumerator2.Current; + goto SUCCESS; + } + else + { + self.running2 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running2 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running2 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter2.SourceOnCompleted(Completed2Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + bool TrySetResult() + { + if (hasCurrent1 && hasCurrent2) + { + result = resultSelector(current1, current2); + completionSource.TrySetResult(true); + return true; + } + else + { + return false; + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator1 != null) + { + await enumerator1.DisposeAsync(); + } + if (enumerator2 != null) + { + await enumerator2.DisposeAsync(); + } + } + } + } + + internal class CombineLatest : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + + readonly Func resultSelector; + + public CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, Func resultSelector) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _CombineLatest(source1, source2, source3, resultSelector, cancellationToken); + } + + class _CombineLatest : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action Completed1Delegate = Completed1; + static readonly Action Completed2Delegate = Completed2; + static readonly Action Completed3Delegate = Completed3; + const int CompleteCount = 3; + + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + + readonly Func resultSelector; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator1; + UniTask.Awaiter awaiter1; + bool hasCurrent1; + bool running1; + T1 current1; + + IUniTaskAsyncEnumerator enumerator2; + UniTask.Awaiter awaiter2; + bool hasCurrent2; + bool running2; + T2 current2; + + IUniTaskAsyncEnumerator enumerator3; + UniTask.Awaiter awaiter3; + bool hasCurrent3; + bool running3; + T3 current3; + + int completedCount; + bool syncRunning; + TResult result; + + public _CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, Func resultSelector, CancellationToken cancellationToken) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current => result; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + if (completedCount == CompleteCount) return CompletedTasks.False; + + if (enumerator1 == null) + { + enumerator1 = source1.GetAsyncEnumerator(cancellationToken); + enumerator2 = source2.GetAsyncEnumerator(cancellationToken); + enumerator3 = source3.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + + AGAIN: + syncRunning = true; + if (!running1) + { + running1 = true; + awaiter1 = enumerator1.MoveNextAsync().GetAwaiter(); + if (awaiter1.IsCompleted) + { + Completed1(this); + } + else + { + awaiter1.SourceOnCompleted(Completed1Delegate, this); + } + } + if (!running2) + { + running2 = true; + awaiter2 = enumerator2.MoveNextAsync().GetAwaiter(); + if (awaiter2.IsCompleted) + { + Completed2(this); + } + else + { + awaiter2.SourceOnCompleted(Completed2Delegate, this); + } + } + if (!running3) + { + running3 = true; + awaiter3 = enumerator3.MoveNextAsync().GetAwaiter(); + if (awaiter3.IsCompleted) + { + Completed3(this); + } + else + { + awaiter3.SourceOnCompleted(Completed3Delegate, this); + } + } + + if (!running1 || !running2 || !running3) + { + goto AGAIN; + } + syncRunning = false; + + return new UniTask(this, completionSource.Version); + } + + static void Completed1(object state) + { + var self = (_CombineLatest)state; + self.running1 = false; + + try + { + if (self.awaiter1.GetResult()) + { + self.hasCurrent1 = true; + self.current1 = self.enumerator1.Current; + goto SUCCESS; + } + else + { + self.running1 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running1 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running1 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter1.SourceOnCompleted(Completed1Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed2(object state) + { + var self = (_CombineLatest)state; + self.running2 = false; + + try + { + if (self.awaiter2.GetResult()) + { + self.hasCurrent2 = true; + self.current2 = self.enumerator2.Current; + goto SUCCESS; + } + else + { + self.running2 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running2 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running2 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter2.SourceOnCompleted(Completed2Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed3(object state) + { + var self = (_CombineLatest)state; + self.running3 = false; + + try + { + if (self.awaiter3.GetResult()) + { + self.hasCurrent3 = true; + self.current3 = self.enumerator3.Current; + goto SUCCESS; + } + else + { + self.running3 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running3 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running3 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter3.SourceOnCompleted(Completed3Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + bool TrySetResult() + { + if (hasCurrent1 && hasCurrent2 && hasCurrent3) + { + result = resultSelector(current1, current2, current3); + completionSource.TrySetResult(true); + return true; + } + else + { + return false; + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator1 != null) + { + await enumerator1.DisposeAsync(); + } + if (enumerator2 != null) + { + await enumerator2.DisposeAsync(); + } + if (enumerator3 != null) + { + await enumerator3.DisposeAsync(); + } + } + } + } + + internal class CombineLatest : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + + readonly Func resultSelector; + + public CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, Func resultSelector) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _CombineLatest(source1, source2, source3, source4, resultSelector, cancellationToken); + } + + class _CombineLatest : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action Completed1Delegate = Completed1; + static readonly Action Completed2Delegate = Completed2; + static readonly Action Completed3Delegate = Completed3; + static readonly Action Completed4Delegate = Completed4; + const int CompleteCount = 4; + + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + + readonly Func resultSelector; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator1; + UniTask.Awaiter awaiter1; + bool hasCurrent1; + bool running1; + T1 current1; + + IUniTaskAsyncEnumerator enumerator2; + UniTask.Awaiter awaiter2; + bool hasCurrent2; + bool running2; + T2 current2; + + IUniTaskAsyncEnumerator enumerator3; + UniTask.Awaiter awaiter3; + bool hasCurrent3; + bool running3; + T3 current3; + + IUniTaskAsyncEnumerator enumerator4; + UniTask.Awaiter awaiter4; + bool hasCurrent4; + bool running4; + T4 current4; + + int completedCount; + bool syncRunning; + TResult result; + + public _CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, Func resultSelector, CancellationToken cancellationToken) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current => result; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + if (completedCount == CompleteCount) return CompletedTasks.False; + + if (enumerator1 == null) + { + enumerator1 = source1.GetAsyncEnumerator(cancellationToken); + enumerator2 = source2.GetAsyncEnumerator(cancellationToken); + enumerator3 = source3.GetAsyncEnumerator(cancellationToken); + enumerator4 = source4.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + + AGAIN: + syncRunning = true; + if (!running1) + { + running1 = true; + awaiter1 = enumerator1.MoveNextAsync().GetAwaiter(); + if (awaiter1.IsCompleted) + { + Completed1(this); + } + else + { + awaiter1.SourceOnCompleted(Completed1Delegate, this); + } + } + if (!running2) + { + running2 = true; + awaiter2 = enumerator2.MoveNextAsync().GetAwaiter(); + if (awaiter2.IsCompleted) + { + Completed2(this); + } + else + { + awaiter2.SourceOnCompleted(Completed2Delegate, this); + } + } + if (!running3) + { + running3 = true; + awaiter3 = enumerator3.MoveNextAsync().GetAwaiter(); + if (awaiter3.IsCompleted) + { + Completed3(this); + } + else + { + awaiter3.SourceOnCompleted(Completed3Delegate, this); + } + } + if (!running4) + { + running4 = true; + awaiter4 = enumerator4.MoveNextAsync().GetAwaiter(); + if (awaiter4.IsCompleted) + { + Completed4(this); + } + else + { + awaiter4.SourceOnCompleted(Completed4Delegate, this); + } + } + + if (!running1 || !running2 || !running3 || !running4) + { + goto AGAIN; + } + syncRunning = false; + + return new UniTask(this, completionSource.Version); + } + + static void Completed1(object state) + { + var self = (_CombineLatest)state; + self.running1 = false; + + try + { + if (self.awaiter1.GetResult()) + { + self.hasCurrent1 = true; + self.current1 = self.enumerator1.Current; + goto SUCCESS; + } + else + { + self.running1 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running1 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running1 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter1.SourceOnCompleted(Completed1Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed2(object state) + { + var self = (_CombineLatest)state; + self.running2 = false; + + try + { + if (self.awaiter2.GetResult()) + { + self.hasCurrent2 = true; + self.current2 = self.enumerator2.Current; + goto SUCCESS; + } + else + { + self.running2 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running2 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running2 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter2.SourceOnCompleted(Completed2Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed3(object state) + { + var self = (_CombineLatest)state; + self.running3 = false; + + try + { + if (self.awaiter3.GetResult()) + { + self.hasCurrent3 = true; + self.current3 = self.enumerator3.Current; + goto SUCCESS; + } + else + { + self.running3 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running3 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running3 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter3.SourceOnCompleted(Completed3Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed4(object state) + { + var self = (_CombineLatest)state; + self.running4 = false; + + try + { + if (self.awaiter4.GetResult()) + { + self.hasCurrent4 = true; + self.current4 = self.enumerator4.Current; + goto SUCCESS; + } + else + { + self.running4 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running4 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running4 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter4.SourceOnCompleted(Completed4Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + bool TrySetResult() + { + if (hasCurrent1 && hasCurrent2 && hasCurrent3 && hasCurrent4) + { + result = resultSelector(current1, current2, current3, current4); + completionSource.TrySetResult(true); + return true; + } + else + { + return false; + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator1 != null) + { + await enumerator1.DisposeAsync(); + } + if (enumerator2 != null) + { + await enumerator2.DisposeAsync(); + } + if (enumerator3 != null) + { + await enumerator3.DisposeAsync(); + } + if (enumerator4 != null) + { + await enumerator4.DisposeAsync(); + } + } + } + } + + internal class CombineLatest : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + + readonly Func resultSelector; + + public CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, Func resultSelector) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _CombineLatest(source1, source2, source3, source4, source5, resultSelector, cancellationToken); + } + + class _CombineLatest : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action Completed1Delegate = Completed1; + static readonly Action Completed2Delegate = Completed2; + static readonly Action Completed3Delegate = Completed3; + static readonly Action Completed4Delegate = Completed4; + static readonly Action Completed5Delegate = Completed5; + const int CompleteCount = 5; + + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + + readonly Func resultSelector; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator1; + UniTask.Awaiter awaiter1; + bool hasCurrent1; + bool running1; + T1 current1; + + IUniTaskAsyncEnumerator enumerator2; + UniTask.Awaiter awaiter2; + bool hasCurrent2; + bool running2; + T2 current2; + + IUniTaskAsyncEnumerator enumerator3; + UniTask.Awaiter awaiter3; + bool hasCurrent3; + bool running3; + T3 current3; + + IUniTaskAsyncEnumerator enumerator4; + UniTask.Awaiter awaiter4; + bool hasCurrent4; + bool running4; + T4 current4; + + IUniTaskAsyncEnumerator enumerator5; + UniTask.Awaiter awaiter5; + bool hasCurrent5; + bool running5; + T5 current5; + + int completedCount; + bool syncRunning; + TResult result; + + public _CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, Func resultSelector, CancellationToken cancellationToken) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current => result; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + if (completedCount == CompleteCount) return CompletedTasks.False; + + if (enumerator1 == null) + { + enumerator1 = source1.GetAsyncEnumerator(cancellationToken); + enumerator2 = source2.GetAsyncEnumerator(cancellationToken); + enumerator3 = source3.GetAsyncEnumerator(cancellationToken); + enumerator4 = source4.GetAsyncEnumerator(cancellationToken); + enumerator5 = source5.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + + AGAIN: + syncRunning = true; + if (!running1) + { + running1 = true; + awaiter1 = enumerator1.MoveNextAsync().GetAwaiter(); + if (awaiter1.IsCompleted) + { + Completed1(this); + } + else + { + awaiter1.SourceOnCompleted(Completed1Delegate, this); + } + } + if (!running2) + { + running2 = true; + awaiter2 = enumerator2.MoveNextAsync().GetAwaiter(); + if (awaiter2.IsCompleted) + { + Completed2(this); + } + else + { + awaiter2.SourceOnCompleted(Completed2Delegate, this); + } + } + if (!running3) + { + running3 = true; + awaiter3 = enumerator3.MoveNextAsync().GetAwaiter(); + if (awaiter3.IsCompleted) + { + Completed3(this); + } + else + { + awaiter3.SourceOnCompleted(Completed3Delegate, this); + } + } + if (!running4) + { + running4 = true; + awaiter4 = enumerator4.MoveNextAsync().GetAwaiter(); + if (awaiter4.IsCompleted) + { + Completed4(this); + } + else + { + awaiter4.SourceOnCompleted(Completed4Delegate, this); + } + } + if (!running5) + { + running5 = true; + awaiter5 = enumerator5.MoveNextAsync().GetAwaiter(); + if (awaiter5.IsCompleted) + { + Completed5(this); + } + else + { + awaiter5.SourceOnCompleted(Completed5Delegate, this); + } + } + + if (!running1 || !running2 || !running3 || !running4 || !running5) + { + goto AGAIN; + } + syncRunning = false; + + return new UniTask(this, completionSource.Version); + } + + static void Completed1(object state) + { + var self = (_CombineLatest)state; + self.running1 = false; + + try + { + if (self.awaiter1.GetResult()) + { + self.hasCurrent1 = true; + self.current1 = self.enumerator1.Current; + goto SUCCESS; + } + else + { + self.running1 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running1 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running1 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter1.SourceOnCompleted(Completed1Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed2(object state) + { + var self = (_CombineLatest)state; + self.running2 = false; + + try + { + if (self.awaiter2.GetResult()) + { + self.hasCurrent2 = true; + self.current2 = self.enumerator2.Current; + goto SUCCESS; + } + else + { + self.running2 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running2 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running2 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter2.SourceOnCompleted(Completed2Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed3(object state) + { + var self = (_CombineLatest)state; + self.running3 = false; + + try + { + if (self.awaiter3.GetResult()) + { + self.hasCurrent3 = true; + self.current3 = self.enumerator3.Current; + goto SUCCESS; + } + else + { + self.running3 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running3 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running3 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter3.SourceOnCompleted(Completed3Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed4(object state) + { + var self = (_CombineLatest)state; + self.running4 = false; + + try + { + if (self.awaiter4.GetResult()) + { + self.hasCurrent4 = true; + self.current4 = self.enumerator4.Current; + goto SUCCESS; + } + else + { + self.running4 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running4 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running4 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter4.SourceOnCompleted(Completed4Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed5(object state) + { + var self = (_CombineLatest)state; + self.running5 = false; + + try + { + if (self.awaiter5.GetResult()) + { + self.hasCurrent5 = true; + self.current5 = self.enumerator5.Current; + goto SUCCESS; + } + else + { + self.running5 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running5 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running5 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter5.SourceOnCompleted(Completed5Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + bool TrySetResult() + { + if (hasCurrent1 && hasCurrent2 && hasCurrent3 && hasCurrent4 && hasCurrent5) + { + result = resultSelector(current1, current2, current3, current4, current5); + completionSource.TrySetResult(true); + return true; + } + else + { + return false; + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator1 != null) + { + await enumerator1.DisposeAsync(); + } + if (enumerator2 != null) + { + await enumerator2.DisposeAsync(); + } + if (enumerator3 != null) + { + await enumerator3.DisposeAsync(); + } + if (enumerator4 != null) + { + await enumerator4.DisposeAsync(); + } + if (enumerator5 != null) + { + await enumerator5.DisposeAsync(); + } + } + } + } + + internal class CombineLatest : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + + readonly Func resultSelector; + + public CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, Func resultSelector) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _CombineLatest(source1, source2, source3, source4, source5, source6, resultSelector, cancellationToken); + } + + class _CombineLatest : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action Completed1Delegate = Completed1; + static readonly Action Completed2Delegate = Completed2; + static readonly Action Completed3Delegate = Completed3; + static readonly Action Completed4Delegate = Completed4; + static readonly Action Completed5Delegate = Completed5; + static readonly Action Completed6Delegate = Completed6; + const int CompleteCount = 6; + + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + + readonly Func resultSelector; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator1; + UniTask.Awaiter awaiter1; + bool hasCurrent1; + bool running1; + T1 current1; + + IUniTaskAsyncEnumerator enumerator2; + UniTask.Awaiter awaiter2; + bool hasCurrent2; + bool running2; + T2 current2; + + IUniTaskAsyncEnumerator enumerator3; + UniTask.Awaiter awaiter3; + bool hasCurrent3; + bool running3; + T3 current3; + + IUniTaskAsyncEnumerator enumerator4; + UniTask.Awaiter awaiter4; + bool hasCurrent4; + bool running4; + T4 current4; + + IUniTaskAsyncEnumerator enumerator5; + UniTask.Awaiter awaiter5; + bool hasCurrent5; + bool running5; + T5 current5; + + IUniTaskAsyncEnumerator enumerator6; + UniTask.Awaiter awaiter6; + bool hasCurrent6; + bool running6; + T6 current6; + + int completedCount; + bool syncRunning; + TResult result; + + public _CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, Func resultSelector, CancellationToken cancellationToken) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current => result; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + if (completedCount == CompleteCount) return CompletedTasks.False; + + if (enumerator1 == null) + { + enumerator1 = source1.GetAsyncEnumerator(cancellationToken); + enumerator2 = source2.GetAsyncEnumerator(cancellationToken); + enumerator3 = source3.GetAsyncEnumerator(cancellationToken); + enumerator4 = source4.GetAsyncEnumerator(cancellationToken); + enumerator5 = source5.GetAsyncEnumerator(cancellationToken); + enumerator6 = source6.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + + AGAIN: + syncRunning = true; + if (!running1) + { + running1 = true; + awaiter1 = enumerator1.MoveNextAsync().GetAwaiter(); + if (awaiter1.IsCompleted) + { + Completed1(this); + } + else + { + awaiter1.SourceOnCompleted(Completed1Delegate, this); + } + } + if (!running2) + { + running2 = true; + awaiter2 = enumerator2.MoveNextAsync().GetAwaiter(); + if (awaiter2.IsCompleted) + { + Completed2(this); + } + else + { + awaiter2.SourceOnCompleted(Completed2Delegate, this); + } + } + if (!running3) + { + running3 = true; + awaiter3 = enumerator3.MoveNextAsync().GetAwaiter(); + if (awaiter3.IsCompleted) + { + Completed3(this); + } + else + { + awaiter3.SourceOnCompleted(Completed3Delegate, this); + } + } + if (!running4) + { + running4 = true; + awaiter4 = enumerator4.MoveNextAsync().GetAwaiter(); + if (awaiter4.IsCompleted) + { + Completed4(this); + } + else + { + awaiter4.SourceOnCompleted(Completed4Delegate, this); + } + } + if (!running5) + { + running5 = true; + awaiter5 = enumerator5.MoveNextAsync().GetAwaiter(); + if (awaiter5.IsCompleted) + { + Completed5(this); + } + else + { + awaiter5.SourceOnCompleted(Completed5Delegate, this); + } + } + if (!running6) + { + running6 = true; + awaiter6 = enumerator6.MoveNextAsync().GetAwaiter(); + if (awaiter6.IsCompleted) + { + Completed6(this); + } + else + { + awaiter6.SourceOnCompleted(Completed6Delegate, this); + } + } + + if (!running1 || !running2 || !running3 || !running4 || !running5 || !running6) + { + goto AGAIN; + } + syncRunning = false; + + return new UniTask(this, completionSource.Version); + } + + static void Completed1(object state) + { + var self = (_CombineLatest)state; + self.running1 = false; + + try + { + if (self.awaiter1.GetResult()) + { + self.hasCurrent1 = true; + self.current1 = self.enumerator1.Current; + goto SUCCESS; + } + else + { + self.running1 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running1 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running1 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter1.SourceOnCompleted(Completed1Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed2(object state) + { + var self = (_CombineLatest)state; + self.running2 = false; + + try + { + if (self.awaiter2.GetResult()) + { + self.hasCurrent2 = true; + self.current2 = self.enumerator2.Current; + goto SUCCESS; + } + else + { + self.running2 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running2 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running2 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter2.SourceOnCompleted(Completed2Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed3(object state) + { + var self = (_CombineLatest)state; + self.running3 = false; + + try + { + if (self.awaiter3.GetResult()) + { + self.hasCurrent3 = true; + self.current3 = self.enumerator3.Current; + goto SUCCESS; + } + else + { + self.running3 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running3 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running3 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter3.SourceOnCompleted(Completed3Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed4(object state) + { + var self = (_CombineLatest)state; + self.running4 = false; + + try + { + if (self.awaiter4.GetResult()) + { + self.hasCurrent4 = true; + self.current4 = self.enumerator4.Current; + goto SUCCESS; + } + else + { + self.running4 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running4 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running4 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter4.SourceOnCompleted(Completed4Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed5(object state) + { + var self = (_CombineLatest)state; + self.running5 = false; + + try + { + if (self.awaiter5.GetResult()) + { + self.hasCurrent5 = true; + self.current5 = self.enumerator5.Current; + goto SUCCESS; + } + else + { + self.running5 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running5 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running5 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter5.SourceOnCompleted(Completed5Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed6(object state) + { + var self = (_CombineLatest)state; + self.running6 = false; + + try + { + if (self.awaiter6.GetResult()) + { + self.hasCurrent6 = true; + self.current6 = self.enumerator6.Current; + goto SUCCESS; + } + else + { + self.running6 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running6 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running6 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter6.SourceOnCompleted(Completed6Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + bool TrySetResult() + { + if (hasCurrent1 && hasCurrent2 && hasCurrent3 && hasCurrent4 && hasCurrent5 && hasCurrent6) + { + result = resultSelector(current1, current2, current3, current4, current5, current6); + completionSource.TrySetResult(true); + return true; + } + else + { + return false; + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator1 != null) + { + await enumerator1.DisposeAsync(); + } + if (enumerator2 != null) + { + await enumerator2.DisposeAsync(); + } + if (enumerator3 != null) + { + await enumerator3.DisposeAsync(); + } + if (enumerator4 != null) + { + await enumerator4.DisposeAsync(); + } + if (enumerator5 != null) + { + await enumerator5.DisposeAsync(); + } + if (enumerator6 != null) + { + await enumerator6.DisposeAsync(); + } + } + } + } + + internal class CombineLatest : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + + readonly Func resultSelector; + + public CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, Func resultSelector) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _CombineLatest(source1, source2, source3, source4, source5, source6, source7, resultSelector, cancellationToken); + } + + class _CombineLatest : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action Completed1Delegate = Completed1; + static readonly Action Completed2Delegate = Completed2; + static readonly Action Completed3Delegate = Completed3; + static readonly Action Completed4Delegate = Completed4; + static readonly Action Completed5Delegate = Completed5; + static readonly Action Completed6Delegate = Completed6; + static readonly Action Completed7Delegate = Completed7; + const int CompleteCount = 7; + + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + + readonly Func resultSelector; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator1; + UniTask.Awaiter awaiter1; + bool hasCurrent1; + bool running1; + T1 current1; + + IUniTaskAsyncEnumerator enumerator2; + UniTask.Awaiter awaiter2; + bool hasCurrent2; + bool running2; + T2 current2; + + IUniTaskAsyncEnumerator enumerator3; + UniTask.Awaiter awaiter3; + bool hasCurrent3; + bool running3; + T3 current3; + + IUniTaskAsyncEnumerator enumerator4; + UniTask.Awaiter awaiter4; + bool hasCurrent4; + bool running4; + T4 current4; + + IUniTaskAsyncEnumerator enumerator5; + UniTask.Awaiter awaiter5; + bool hasCurrent5; + bool running5; + T5 current5; + + IUniTaskAsyncEnumerator enumerator6; + UniTask.Awaiter awaiter6; + bool hasCurrent6; + bool running6; + T6 current6; + + IUniTaskAsyncEnumerator enumerator7; + UniTask.Awaiter awaiter7; + bool hasCurrent7; + bool running7; + T7 current7; + + int completedCount; + bool syncRunning; + TResult result; + + public _CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, Func resultSelector, CancellationToken cancellationToken) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current => result; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + if (completedCount == CompleteCount) return CompletedTasks.False; + + if (enumerator1 == null) + { + enumerator1 = source1.GetAsyncEnumerator(cancellationToken); + enumerator2 = source2.GetAsyncEnumerator(cancellationToken); + enumerator3 = source3.GetAsyncEnumerator(cancellationToken); + enumerator4 = source4.GetAsyncEnumerator(cancellationToken); + enumerator5 = source5.GetAsyncEnumerator(cancellationToken); + enumerator6 = source6.GetAsyncEnumerator(cancellationToken); + enumerator7 = source7.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + + AGAIN: + syncRunning = true; + if (!running1) + { + running1 = true; + awaiter1 = enumerator1.MoveNextAsync().GetAwaiter(); + if (awaiter1.IsCompleted) + { + Completed1(this); + } + else + { + awaiter1.SourceOnCompleted(Completed1Delegate, this); + } + } + if (!running2) + { + running2 = true; + awaiter2 = enumerator2.MoveNextAsync().GetAwaiter(); + if (awaiter2.IsCompleted) + { + Completed2(this); + } + else + { + awaiter2.SourceOnCompleted(Completed2Delegate, this); + } + } + if (!running3) + { + running3 = true; + awaiter3 = enumerator3.MoveNextAsync().GetAwaiter(); + if (awaiter3.IsCompleted) + { + Completed3(this); + } + else + { + awaiter3.SourceOnCompleted(Completed3Delegate, this); + } + } + if (!running4) + { + running4 = true; + awaiter4 = enumerator4.MoveNextAsync().GetAwaiter(); + if (awaiter4.IsCompleted) + { + Completed4(this); + } + else + { + awaiter4.SourceOnCompleted(Completed4Delegate, this); + } + } + if (!running5) + { + running5 = true; + awaiter5 = enumerator5.MoveNextAsync().GetAwaiter(); + if (awaiter5.IsCompleted) + { + Completed5(this); + } + else + { + awaiter5.SourceOnCompleted(Completed5Delegate, this); + } + } + if (!running6) + { + running6 = true; + awaiter6 = enumerator6.MoveNextAsync().GetAwaiter(); + if (awaiter6.IsCompleted) + { + Completed6(this); + } + else + { + awaiter6.SourceOnCompleted(Completed6Delegate, this); + } + } + if (!running7) + { + running7 = true; + awaiter7 = enumerator7.MoveNextAsync().GetAwaiter(); + if (awaiter7.IsCompleted) + { + Completed7(this); + } + else + { + awaiter7.SourceOnCompleted(Completed7Delegate, this); + } + } + + if (!running1 || !running2 || !running3 || !running4 || !running5 || !running6 || !running7) + { + goto AGAIN; + } + syncRunning = false; + + return new UniTask(this, completionSource.Version); + } + + static void Completed1(object state) + { + var self = (_CombineLatest)state; + self.running1 = false; + + try + { + if (self.awaiter1.GetResult()) + { + self.hasCurrent1 = true; + self.current1 = self.enumerator1.Current; + goto SUCCESS; + } + else + { + self.running1 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running1 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running1 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter1.SourceOnCompleted(Completed1Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed2(object state) + { + var self = (_CombineLatest)state; + self.running2 = false; + + try + { + if (self.awaiter2.GetResult()) + { + self.hasCurrent2 = true; + self.current2 = self.enumerator2.Current; + goto SUCCESS; + } + else + { + self.running2 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running2 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running2 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter2.SourceOnCompleted(Completed2Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed3(object state) + { + var self = (_CombineLatest)state; + self.running3 = false; + + try + { + if (self.awaiter3.GetResult()) + { + self.hasCurrent3 = true; + self.current3 = self.enumerator3.Current; + goto SUCCESS; + } + else + { + self.running3 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running3 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running3 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter3.SourceOnCompleted(Completed3Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed4(object state) + { + var self = (_CombineLatest)state; + self.running4 = false; + + try + { + if (self.awaiter4.GetResult()) + { + self.hasCurrent4 = true; + self.current4 = self.enumerator4.Current; + goto SUCCESS; + } + else + { + self.running4 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running4 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running4 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter4.SourceOnCompleted(Completed4Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed5(object state) + { + var self = (_CombineLatest)state; + self.running5 = false; + + try + { + if (self.awaiter5.GetResult()) + { + self.hasCurrent5 = true; + self.current5 = self.enumerator5.Current; + goto SUCCESS; + } + else + { + self.running5 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running5 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running5 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter5.SourceOnCompleted(Completed5Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed6(object state) + { + var self = (_CombineLatest)state; + self.running6 = false; + + try + { + if (self.awaiter6.GetResult()) + { + self.hasCurrent6 = true; + self.current6 = self.enumerator6.Current; + goto SUCCESS; + } + else + { + self.running6 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running6 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running6 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter6.SourceOnCompleted(Completed6Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed7(object state) + { + var self = (_CombineLatest)state; + self.running7 = false; + + try + { + if (self.awaiter7.GetResult()) + { + self.hasCurrent7 = true; + self.current7 = self.enumerator7.Current; + goto SUCCESS; + } + else + { + self.running7 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running7 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running7 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter7.SourceOnCompleted(Completed7Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + bool TrySetResult() + { + if (hasCurrent1 && hasCurrent2 && hasCurrent3 && hasCurrent4 && hasCurrent5 && hasCurrent6 && hasCurrent7) + { + result = resultSelector(current1, current2, current3, current4, current5, current6, current7); + completionSource.TrySetResult(true); + return true; + } + else + { + return false; + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator1 != null) + { + await enumerator1.DisposeAsync(); + } + if (enumerator2 != null) + { + await enumerator2.DisposeAsync(); + } + if (enumerator3 != null) + { + await enumerator3.DisposeAsync(); + } + if (enumerator4 != null) + { + await enumerator4.DisposeAsync(); + } + if (enumerator5 != null) + { + await enumerator5.DisposeAsync(); + } + if (enumerator6 != null) + { + await enumerator6.DisposeAsync(); + } + if (enumerator7 != null) + { + await enumerator7.DisposeAsync(); + } + } + } + } + + internal class CombineLatest : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + + readonly Func resultSelector; + + public CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, Func resultSelector) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, resultSelector, cancellationToken); + } + + class _CombineLatest : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action Completed1Delegate = Completed1; + static readonly Action Completed2Delegate = Completed2; + static readonly Action Completed3Delegate = Completed3; + static readonly Action Completed4Delegate = Completed4; + static readonly Action Completed5Delegate = Completed5; + static readonly Action Completed6Delegate = Completed6; + static readonly Action Completed7Delegate = Completed7; + static readonly Action Completed8Delegate = Completed8; + const int CompleteCount = 8; + + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + + readonly Func resultSelector; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator1; + UniTask.Awaiter awaiter1; + bool hasCurrent1; + bool running1; + T1 current1; + + IUniTaskAsyncEnumerator enumerator2; + UniTask.Awaiter awaiter2; + bool hasCurrent2; + bool running2; + T2 current2; + + IUniTaskAsyncEnumerator enumerator3; + UniTask.Awaiter awaiter3; + bool hasCurrent3; + bool running3; + T3 current3; + + IUniTaskAsyncEnumerator enumerator4; + UniTask.Awaiter awaiter4; + bool hasCurrent4; + bool running4; + T4 current4; + + IUniTaskAsyncEnumerator enumerator5; + UniTask.Awaiter awaiter5; + bool hasCurrent5; + bool running5; + T5 current5; + + IUniTaskAsyncEnumerator enumerator6; + UniTask.Awaiter awaiter6; + bool hasCurrent6; + bool running6; + T6 current6; + + IUniTaskAsyncEnumerator enumerator7; + UniTask.Awaiter awaiter7; + bool hasCurrent7; + bool running7; + T7 current7; + + IUniTaskAsyncEnumerator enumerator8; + UniTask.Awaiter awaiter8; + bool hasCurrent8; + bool running8; + T8 current8; + + int completedCount; + bool syncRunning; + TResult result; + + public _CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, Func resultSelector, CancellationToken cancellationToken) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current => result; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + if (completedCount == CompleteCount) return CompletedTasks.False; + + if (enumerator1 == null) + { + enumerator1 = source1.GetAsyncEnumerator(cancellationToken); + enumerator2 = source2.GetAsyncEnumerator(cancellationToken); + enumerator3 = source3.GetAsyncEnumerator(cancellationToken); + enumerator4 = source4.GetAsyncEnumerator(cancellationToken); + enumerator5 = source5.GetAsyncEnumerator(cancellationToken); + enumerator6 = source6.GetAsyncEnumerator(cancellationToken); + enumerator7 = source7.GetAsyncEnumerator(cancellationToken); + enumerator8 = source8.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + + AGAIN: + syncRunning = true; + if (!running1) + { + running1 = true; + awaiter1 = enumerator1.MoveNextAsync().GetAwaiter(); + if (awaiter1.IsCompleted) + { + Completed1(this); + } + else + { + awaiter1.SourceOnCompleted(Completed1Delegate, this); + } + } + if (!running2) + { + running2 = true; + awaiter2 = enumerator2.MoveNextAsync().GetAwaiter(); + if (awaiter2.IsCompleted) + { + Completed2(this); + } + else + { + awaiter2.SourceOnCompleted(Completed2Delegate, this); + } + } + if (!running3) + { + running3 = true; + awaiter3 = enumerator3.MoveNextAsync().GetAwaiter(); + if (awaiter3.IsCompleted) + { + Completed3(this); + } + else + { + awaiter3.SourceOnCompleted(Completed3Delegate, this); + } + } + if (!running4) + { + running4 = true; + awaiter4 = enumerator4.MoveNextAsync().GetAwaiter(); + if (awaiter4.IsCompleted) + { + Completed4(this); + } + else + { + awaiter4.SourceOnCompleted(Completed4Delegate, this); + } + } + if (!running5) + { + running5 = true; + awaiter5 = enumerator5.MoveNextAsync().GetAwaiter(); + if (awaiter5.IsCompleted) + { + Completed5(this); + } + else + { + awaiter5.SourceOnCompleted(Completed5Delegate, this); + } + } + if (!running6) + { + running6 = true; + awaiter6 = enumerator6.MoveNextAsync().GetAwaiter(); + if (awaiter6.IsCompleted) + { + Completed6(this); + } + else + { + awaiter6.SourceOnCompleted(Completed6Delegate, this); + } + } + if (!running7) + { + running7 = true; + awaiter7 = enumerator7.MoveNextAsync().GetAwaiter(); + if (awaiter7.IsCompleted) + { + Completed7(this); + } + else + { + awaiter7.SourceOnCompleted(Completed7Delegate, this); + } + } + if (!running8) + { + running8 = true; + awaiter8 = enumerator8.MoveNextAsync().GetAwaiter(); + if (awaiter8.IsCompleted) + { + Completed8(this); + } + else + { + awaiter8.SourceOnCompleted(Completed8Delegate, this); + } + } + + if (!running1 || !running2 || !running3 || !running4 || !running5 || !running6 || !running7 || !running8) + { + goto AGAIN; + } + syncRunning = false; + + return new UniTask(this, completionSource.Version); + } + + static void Completed1(object state) + { + var self = (_CombineLatest)state; + self.running1 = false; + + try + { + if (self.awaiter1.GetResult()) + { + self.hasCurrent1 = true; + self.current1 = self.enumerator1.Current; + goto SUCCESS; + } + else + { + self.running1 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running1 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running1 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter1.SourceOnCompleted(Completed1Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed2(object state) + { + var self = (_CombineLatest)state; + self.running2 = false; + + try + { + if (self.awaiter2.GetResult()) + { + self.hasCurrent2 = true; + self.current2 = self.enumerator2.Current; + goto SUCCESS; + } + else + { + self.running2 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running2 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running2 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter2.SourceOnCompleted(Completed2Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed3(object state) + { + var self = (_CombineLatest)state; + self.running3 = false; + + try + { + if (self.awaiter3.GetResult()) + { + self.hasCurrent3 = true; + self.current3 = self.enumerator3.Current; + goto SUCCESS; + } + else + { + self.running3 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running3 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running3 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter3.SourceOnCompleted(Completed3Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed4(object state) + { + var self = (_CombineLatest)state; + self.running4 = false; + + try + { + if (self.awaiter4.GetResult()) + { + self.hasCurrent4 = true; + self.current4 = self.enumerator4.Current; + goto SUCCESS; + } + else + { + self.running4 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running4 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running4 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter4.SourceOnCompleted(Completed4Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed5(object state) + { + var self = (_CombineLatest)state; + self.running5 = false; + + try + { + if (self.awaiter5.GetResult()) + { + self.hasCurrent5 = true; + self.current5 = self.enumerator5.Current; + goto SUCCESS; + } + else + { + self.running5 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running5 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running5 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter5.SourceOnCompleted(Completed5Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed6(object state) + { + var self = (_CombineLatest)state; + self.running6 = false; + + try + { + if (self.awaiter6.GetResult()) + { + self.hasCurrent6 = true; + self.current6 = self.enumerator6.Current; + goto SUCCESS; + } + else + { + self.running6 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running6 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running6 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter6.SourceOnCompleted(Completed6Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed7(object state) + { + var self = (_CombineLatest)state; + self.running7 = false; + + try + { + if (self.awaiter7.GetResult()) + { + self.hasCurrent7 = true; + self.current7 = self.enumerator7.Current; + goto SUCCESS; + } + else + { + self.running7 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running7 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running7 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter7.SourceOnCompleted(Completed7Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed8(object state) + { + var self = (_CombineLatest)state; + self.running8 = false; + + try + { + if (self.awaiter8.GetResult()) + { + self.hasCurrent8 = true; + self.current8 = self.enumerator8.Current; + goto SUCCESS; + } + else + { + self.running8 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running8 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running8 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter8.SourceOnCompleted(Completed8Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + bool TrySetResult() + { + if (hasCurrent1 && hasCurrent2 && hasCurrent3 && hasCurrent4 && hasCurrent5 && hasCurrent6 && hasCurrent7 && hasCurrent8) + { + result = resultSelector(current1, current2, current3, current4, current5, current6, current7, current8); + completionSource.TrySetResult(true); + return true; + } + else + { + return false; + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator1 != null) + { + await enumerator1.DisposeAsync(); + } + if (enumerator2 != null) + { + await enumerator2.DisposeAsync(); + } + if (enumerator3 != null) + { + await enumerator3.DisposeAsync(); + } + if (enumerator4 != null) + { + await enumerator4.DisposeAsync(); + } + if (enumerator5 != null) + { + await enumerator5.DisposeAsync(); + } + if (enumerator6 != null) + { + await enumerator6.DisposeAsync(); + } + if (enumerator7 != null) + { + await enumerator7.DisposeAsync(); + } + if (enumerator8 != null) + { + await enumerator8.DisposeAsync(); + } + } + } + } + + internal class CombineLatest : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + readonly IUniTaskAsyncEnumerable source9; + + readonly Func resultSelector; + + public CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, Func resultSelector) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + this.source9 = source9; + + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, resultSelector, cancellationToken); + } + + class _CombineLatest : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action Completed1Delegate = Completed1; + static readonly Action Completed2Delegate = Completed2; + static readonly Action Completed3Delegate = Completed3; + static readonly Action Completed4Delegate = Completed4; + static readonly Action Completed5Delegate = Completed5; + static readonly Action Completed6Delegate = Completed6; + static readonly Action Completed7Delegate = Completed7; + static readonly Action Completed8Delegate = Completed8; + static readonly Action Completed9Delegate = Completed9; + const int CompleteCount = 9; + + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + readonly IUniTaskAsyncEnumerable source9; + + readonly Func resultSelector; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator1; + UniTask.Awaiter awaiter1; + bool hasCurrent1; + bool running1; + T1 current1; + + IUniTaskAsyncEnumerator enumerator2; + UniTask.Awaiter awaiter2; + bool hasCurrent2; + bool running2; + T2 current2; + + IUniTaskAsyncEnumerator enumerator3; + UniTask.Awaiter awaiter3; + bool hasCurrent3; + bool running3; + T3 current3; + + IUniTaskAsyncEnumerator enumerator4; + UniTask.Awaiter awaiter4; + bool hasCurrent4; + bool running4; + T4 current4; + + IUniTaskAsyncEnumerator enumerator5; + UniTask.Awaiter awaiter5; + bool hasCurrent5; + bool running5; + T5 current5; + + IUniTaskAsyncEnumerator enumerator6; + UniTask.Awaiter awaiter6; + bool hasCurrent6; + bool running6; + T6 current6; + + IUniTaskAsyncEnumerator enumerator7; + UniTask.Awaiter awaiter7; + bool hasCurrent7; + bool running7; + T7 current7; + + IUniTaskAsyncEnumerator enumerator8; + UniTask.Awaiter awaiter8; + bool hasCurrent8; + bool running8; + T8 current8; + + IUniTaskAsyncEnumerator enumerator9; + UniTask.Awaiter awaiter9; + bool hasCurrent9; + bool running9; + T9 current9; + + int completedCount; + bool syncRunning; + TResult result; + + public _CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, Func resultSelector, CancellationToken cancellationToken) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + this.source9 = source9; + + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current => result; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + if (completedCount == CompleteCount) return CompletedTasks.False; + + if (enumerator1 == null) + { + enumerator1 = source1.GetAsyncEnumerator(cancellationToken); + enumerator2 = source2.GetAsyncEnumerator(cancellationToken); + enumerator3 = source3.GetAsyncEnumerator(cancellationToken); + enumerator4 = source4.GetAsyncEnumerator(cancellationToken); + enumerator5 = source5.GetAsyncEnumerator(cancellationToken); + enumerator6 = source6.GetAsyncEnumerator(cancellationToken); + enumerator7 = source7.GetAsyncEnumerator(cancellationToken); + enumerator8 = source8.GetAsyncEnumerator(cancellationToken); + enumerator9 = source9.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + + AGAIN: + syncRunning = true; + if (!running1) + { + running1 = true; + awaiter1 = enumerator1.MoveNextAsync().GetAwaiter(); + if (awaiter1.IsCompleted) + { + Completed1(this); + } + else + { + awaiter1.SourceOnCompleted(Completed1Delegate, this); + } + } + if (!running2) + { + running2 = true; + awaiter2 = enumerator2.MoveNextAsync().GetAwaiter(); + if (awaiter2.IsCompleted) + { + Completed2(this); + } + else + { + awaiter2.SourceOnCompleted(Completed2Delegate, this); + } + } + if (!running3) + { + running3 = true; + awaiter3 = enumerator3.MoveNextAsync().GetAwaiter(); + if (awaiter3.IsCompleted) + { + Completed3(this); + } + else + { + awaiter3.SourceOnCompleted(Completed3Delegate, this); + } + } + if (!running4) + { + running4 = true; + awaiter4 = enumerator4.MoveNextAsync().GetAwaiter(); + if (awaiter4.IsCompleted) + { + Completed4(this); + } + else + { + awaiter4.SourceOnCompleted(Completed4Delegate, this); + } + } + if (!running5) + { + running5 = true; + awaiter5 = enumerator5.MoveNextAsync().GetAwaiter(); + if (awaiter5.IsCompleted) + { + Completed5(this); + } + else + { + awaiter5.SourceOnCompleted(Completed5Delegate, this); + } + } + if (!running6) + { + running6 = true; + awaiter6 = enumerator6.MoveNextAsync().GetAwaiter(); + if (awaiter6.IsCompleted) + { + Completed6(this); + } + else + { + awaiter6.SourceOnCompleted(Completed6Delegate, this); + } + } + if (!running7) + { + running7 = true; + awaiter7 = enumerator7.MoveNextAsync().GetAwaiter(); + if (awaiter7.IsCompleted) + { + Completed7(this); + } + else + { + awaiter7.SourceOnCompleted(Completed7Delegate, this); + } + } + if (!running8) + { + running8 = true; + awaiter8 = enumerator8.MoveNextAsync().GetAwaiter(); + if (awaiter8.IsCompleted) + { + Completed8(this); + } + else + { + awaiter8.SourceOnCompleted(Completed8Delegate, this); + } + } + if (!running9) + { + running9 = true; + awaiter9 = enumerator9.MoveNextAsync().GetAwaiter(); + if (awaiter9.IsCompleted) + { + Completed9(this); + } + else + { + awaiter9.SourceOnCompleted(Completed9Delegate, this); + } + } + + if (!running1 || !running2 || !running3 || !running4 || !running5 || !running6 || !running7 || !running8 || !running9) + { + goto AGAIN; + } + syncRunning = false; + + return new UniTask(this, completionSource.Version); + } + + static void Completed1(object state) + { + var self = (_CombineLatest)state; + self.running1 = false; + + try + { + if (self.awaiter1.GetResult()) + { + self.hasCurrent1 = true; + self.current1 = self.enumerator1.Current; + goto SUCCESS; + } + else + { + self.running1 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running1 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running1 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter1.SourceOnCompleted(Completed1Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed2(object state) + { + var self = (_CombineLatest)state; + self.running2 = false; + + try + { + if (self.awaiter2.GetResult()) + { + self.hasCurrent2 = true; + self.current2 = self.enumerator2.Current; + goto SUCCESS; + } + else + { + self.running2 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running2 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running2 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter2.SourceOnCompleted(Completed2Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed3(object state) + { + var self = (_CombineLatest)state; + self.running3 = false; + + try + { + if (self.awaiter3.GetResult()) + { + self.hasCurrent3 = true; + self.current3 = self.enumerator3.Current; + goto SUCCESS; + } + else + { + self.running3 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running3 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running3 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter3.SourceOnCompleted(Completed3Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed4(object state) + { + var self = (_CombineLatest)state; + self.running4 = false; + + try + { + if (self.awaiter4.GetResult()) + { + self.hasCurrent4 = true; + self.current4 = self.enumerator4.Current; + goto SUCCESS; + } + else + { + self.running4 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running4 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running4 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter4.SourceOnCompleted(Completed4Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed5(object state) + { + var self = (_CombineLatest)state; + self.running5 = false; + + try + { + if (self.awaiter5.GetResult()) + { + self.hasCurrent5 = true; + self.current5 = self.enumerator5.Current; + goto SUCCESS; + } + else + { + self.running5 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running5 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running5 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter5.SourceOnCompleted(Completed5Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed6(object state) + { + var self = (_CombineLatest)state; + self.running6 = false; + + try + { + if (self.awaiter6.GetResult()) + { + self.hasCurrent6 = true; + self.current6 = self.enumerator6.Current; + goto SUCCESS; + } + else + { + self.running6 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running6 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running6 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter6.SourceOnCompleted(Completed6Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed7(object state) + { + var self = (_CombineLatest)state; + self.running7 = false; + + try + { + if (self.awaiter7.GetResult()) + { + self.hasCurrent7 = true; + self.current7 = self.enumerator7.Current; + goto SUCCESS; + } + else + { + self.running7 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running7 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running7 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter7.SourceOnCompleted(Completed7Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed8(object state) + { + var self = (_CombineLatest)state; + self.running8 = false; + + try + { + if (self.awaiter8.GetResult()) + { + self.hasCurrent8 = true; + self.current8 = self.enumerator8.Current; + goto SUCCESS; + } + else + { + self.running8 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running8 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running8 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter8.SourceOnCompleted(Completed8Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed9(object state) + { + var self = (_CombineLatest)state; + self.running9 = false; + + try + { + if (self.awaiter9.GetResult()) + { + self.hasCurrent9 = true; + self.current9 = self.enumerator9.Current; + goto SUCCESS; + } + else + { + self.running9 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running9 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running9 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter9.SourceOnCompleted(Completed9Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + bool TrySetResult() + { + if (hasCurrent1 && hasCurrent2 && hasCurrent3 && hasCurrent4 && hasCurrent5 && hasCurrent6 && hasCurrent7 && hasCurrent8 && hasCurrent9) + { + result = resultSelector(current1, current2, current3, current4, current5, current6, current7, current8, current9); + completionSource.TrySetResult(true); + return true; + } + else + { + return false; + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator1 != null) + { + await enumerator1.DisposeAsync(); + } + if (enumerator2 != null) + { + await enumerator2.DisposeAsync(); + } + if (enumerator3 != null) + { + await enumerator3.DisposeAsync(); + } + if (enumerator4 != null) + { + await enumerator4.DisposeAsync(); + } + if (enumerator5 != null) + { + await enumerator5.DisposeAsync(); + } + if (enumerator6 != null) + { + await enumerator6.DisposeAsync(); + } + if (enumerator7 != null) + { + await enumerator7.DisposeAsync(); + } + if (enumerator8 != null) + { + await enumerator8.DisposeAsync(); + } + if (enumerator9 != null) + { + await enumerator9.DisposeAsync(); + } + } + } + } + + internal class CombineLatest : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + readonly IUniTaskAsyncEnumerable source9; + readonly IUniTaskAsyncEnumerable source10; + + readonly Func resultSelector; + + public CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, Func resultSelector) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + this.source9 = source9; + this.source10 = source10; + + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, resultSelector, cancellationToken); + } + + class _CombineLatest : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action Completed1Delegate = Completed1; + static readonly Action Completed2Delegate = Completed2; + static readonly Action Completed3Delegate = Completed3; + static readonly Action Completed4Delegate = Completed4; + static readonly Action Completed5Delegate = Completed5; + static readonly Action Completed6Delegate = Completed6; + static readonly Action Completed7Delegate = Completed7; + static readonly Action Completed8Delegate = Completed8; + static readonly Action Completed9Delegate = Completed9; + static readonly Action Completed10Delegate = Completed10; + const int CompleteCount = 10; + + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + readonly IUniTaskAsyncEnumerable source9; + readonly IUniTaskAsyncEnumerable source10; + + readonly Func resultSelector; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator1; + UniTask.Awaiter awaiter1; + bool hasCurrent1; + bool running1; + T1 current1; + + IUniTaskAsyncEnumerator enumerator2; + UniTask.Awaiter awaiter2; + bool hasCurrent2; + bool running2; + T2 current2; + + IUniTaskAsyncEnumerator enumerator3; + UniTask.Awaiter awaiter3; + bool hasCurrent3; + bool running3; + T3 current3; + + IUniTaskAsyncEnumerator enumerator4; + UniTask.Awaiter awaiter4; + bool hasCurrent4; + bool running4; + T4 current4; + + IUniTaskAsyncEnumerator enumerator5; + UniTask.Awaiter awaiter5; + bool hasCurrent5; + bool running5; + T5 current5; + + IUniTaskAsyncEnumerator enumerator6; + UniTask.Awaiter awaiter6; + bool hasCurrent6; + bool running6; + T6 current6; + + IUniTaskAsyncEnumerator enumerator7; + UniTask.Awaiter awaiter7; + bool hasCurrent7; + bool running7; + T7 current7; + + IUniTaskAsyncEnumerator enumerator8; + UniTask.Awaiter awaiter8; + bool hasCurrent8; + bool running8; + T8 current8; + + IUniTaskAsyncEnumerator enumerator9; + UniTask.Awaiter awaiter9; + bool hasCurrent9; + bool running9; + T9 current9; + + IUniTaskAsyncEnumerator enumerator10; + UniTask.Awaiter awaiter10; + bool hasCurrent10; + bool running10; + T10 current10; + + int completedCount; + bool syncRunning; + TResult result; + + public _CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, Func resultSelector, CancellationToken cancellationToken) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + this.source9 = source9; + this.source10 = source10; + + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current => result; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + if (completedCount == CompleteCount) return CompletedTasks.False; + + if (enumerator1 == null) + { + enumerator1 = source1.GetAsyncEnumerator(cancellationToken); + enumerator2 = source2.GetAsyncEnumerator(cancellationToken); + enumerator3 = source3.GetAsyncEnumerator(cancellationToken); + enumerator4 = source4.GetAsyncEnumerator(cancellationToken); + enumerator5 = source5.GetAsyncEnumerator(cancellationToken); + enumerator6 = source6.GetAsyncEnumerator(cancellationToken); + enumerator7 = source7.GetAsyncEnumerator(cancellationToken); + enumerator8 = source8.GetAsyncEnumerator(cancellationToken); + enumerator9 = source9.GetAsyncEnumerator(cancellationToken); + enumerator10 = source10.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + + AGAIN: + syncRunning = true; + if (!running1) + { + running1 = true; + awaiter1 = enumerator1.MoveNextAsync().GetAwaiter(); + if (awaiter1.IsCompleted) + { + Completed1(this); + } + else + { + awaiter1.SourceOnCompleted(Completed1Delegate, this); + } + } + if (!running2) + { + running2 = true; + awaiter2 = enumerator2.MoveNextAsync().GetAwaiter(); + if (awaiter2.IsCompleted) + { + Completed2(this); + } + else + { + awaiter2.SourceOnCompleted(Completed2Delegate, this); + } + } + if (!running3) + { + running3 = true; + awaiter3 = enumerator3.MoveNextAsync().GetAwaiter(); + if (awaiter3.IsCompleted) + { + Completed3(this); + } + else + { + awaiter3.SourceOnCompleted(Completed3Delegate, this); + } + } + if (!running4) + { + running4 = true; + awaiter4 = enumerator4.MoveNextAsync().GetAwaiter(); + if (awaiter4.IsCompleted) + { + Completed4(this); + } + else + { + awaiter4.SourceOnCompleted(Completed4Delegate, this); + } + } + if (!running5) + { + running5 = true; + awaiter5 = enumerator5.MoveNextAsync().GetAwaiter(); + if (awaiter5.IsCompleted) + { + Completed5(this); + } + else + { + awaiter5.SourceOnCompleted(Completed5Delegate, this); + } + } + if (!running6) + { + running6 = true; + awaiter6 = enumerator6.MoveNextAsync().GetAwaiter(); + if (awaiter6.IsCompleted) + { + Completed6(this); + } + else + { + awaiter6.SourceOnCompleted(Completed6Delegate, this); + } + } + if (!running7) + { + running7 = true; + awaiter7 = enumerator7.MoveNextAsync().GetAwaiter(); + if (awaiter7.IsCompleted) + { + Completed7(this); + } + else + { + awaiter7.SourceOnCompleted(Completed7Delegate, this); + } + } + if (!running8) + { + running8 = true; + awaiter8 = enumerator8.MoveNextAsync().GetAwaiter(); + if (awaiter8.IsCompleted) + { + Completed8(this); + } + else + { + awaiter8.SourceOnCompleted(Completed8Delegate, this); + } + } + if (!running9) + { + running9 = true; + awaiter9 = enumerator9.MoveNextAsync().GetAwaiter(); + if (awaiter9.IsCompleted) + { + Completed9(this); + } + else + { + awaiter9.SourceOnCompleted(Completed9Delegate, this); + } + } + if (!running10) + { + running10 = true; + awaiter10 = enumerator10.MoveNextAsync().GetAwaiter(); + if (awaiter10.IsCompleted) + { + Completed10(this); + } + else + { + awaiter10.SourceOnCompleted(Completed10Delegate, this); + } + } + + if (!running1 || !running2 || !running3 || !running4 || !running5 || !running6 || !running7 || !running8 || !running9 || !running10) + { + goto AGAIN; + } + syncRunning = false; + + return new UniTask(this, completionSource.Version); + } + + static void Completed1(object state) + { + var self = (_CombineLatest)state; + self.running1 = false; + + try + { + if (self.awaiter1.GetResult()) + { + self.hasCurrent1 = true; + self.current1 = self.enumerator1.Current; + goto SUCCESS; + } + else + { + self.running1 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running1 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running1 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter1.SourceOnCompleted(Completed1Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed2(object state) + { + var self = (_CombineLatest)state; + self.running2 = false; + + try + { + if (self.awaiter2.GetResult()) + { + self.hasCurrent2 = true; + self.current2 = self.enumerator2.Current; + goto SUCCESS; + } + else + { + self.running2 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running2 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running2 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter2.SourceOnCompleted(Completed2Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed3(object state) + { + var self = (_CombineLatest)state; + self.running3 = false; + + try + { + if (self.awaiter3.GetResult()) + { + self.hasCurrent3 = true; + self.current3 = self.enumerator3.Current; + goto SUCCESS; + } + else + { + self.running3 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running3 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running3 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter3.SourceOnCompleted(Completed3Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed4(object state) + { + var self = (_CombineLatest)state; + self.running4 = false; + + try + { + if (self.awaiter4.GetResult()) + { + self.hasCurrent4 = true; + self.current4 = self.enumerator4.Current; + goto SUCCESS; + } + else + { + self.running4 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running4 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running4 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter4.SourceOnCompleted(Completed4Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed5(object state) + { + var self = (_CombineLatest)state; + self.running5 = false; + + try + { + if (self.awaiter5.GetResult()) + { + self.hasCurrent5 = true; + self.current5 = self.enumerator5.Current; + goto SUCCESS; + } + else + { + self.running5 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running5 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running5 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter5.SourceOnCompleted(Completed5Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed6(object state) + { + var self = (_CombineLatest)state; + self.running6 = false; + + try + { + if (self.awaiter6.GetResult()) + { + self.hasCurrent6 = true; + self.current6 = self.enumerator6.Current; + goto SUCCESS; + } + else + { + self.running6 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running6 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running6 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter6.SourceOnCompleted(Completed6Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed7(object state) + { + var self = (_CombineLatest)state; + self.running7 = false; + + try + { + if (self.awaiter7.GetResult()) + { + self.hasCurrent7 = true; + self.current7 = self.enumerator7.Current; + goto SUCCESS; + } + else + { + self.running7 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running7 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running7 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter7.SourceOnCompleted(Completed7Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed8(object state) + { + var self = (_CombineLatest)state; + self.running8 = false; + + try + { + if (self.awaiter8.GetResult()) + { + self.hasCurrent8 = true; + self.current8 = self.enumerator8.Current; + goto SUCCESS; + } + else + { + self.running8 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running8 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running8 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter8.SourceOnCompleted(Completed8Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed9(object state) + { + var self = (_CombineLatest)state; + self.running9 = false; + + try + { + if (self.awaiter9.GetResult()) + { + self.hasCurrent9 = true; + self.current9 = self.enumerator9.Current; + goto SUCCESS; + } + else + { + self.running9 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running9 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running9 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter9.SourceOnCompleted(Completed9Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed10(object state) + { + var self = (_CombineLatest)state; + self.running10 = false; + + try + { + if (self.awaiter10.GetResult()) + { + self.hasCurrent10 = true; + self.current10 = self.enumerator10.Current; + goto SUCCESS; + } + else + { + self.running10 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running10 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running10 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter10.SourceOnCompleted(Completed10Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + bool TrySetResult() + { + if (hasCurrent1 && hasCurrent2 && hasCurrent3 && hasCurrent4 && hasCurrent5 && hasCurrent6 && hasCurrent7 && hasCurrent8 && hasCurrent9 && hasCurrent10) + { + result = resultSelector(current1, current2, current3, current4, current5, current6, current7, current8, current9, current10); + completionSource.TrySetResult(true); + return true; + } + else + { + return false; + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator1 != null) + { + await enumerator1.DisposeAsync(); + } + if (enumerator2 != null) + { + await enumerator2.DisposeAsync(); + } + if (enumerator3 != null) + { + await enumerator3.DisposeAsync(); + } + if (enumerator4 != null) + { + await enumerator4.DisposeAsync(); + } + if (enumerator5 != null) + { + await enumerator5.DisposeAsync(); + } + if (enumerator6 != null) + { + await enumerator6.DisposeAsync(); + } + if (enumerator7 != null) + { + await enumerator7.DisposeAsync(); + } + if (enumerator8 != null) + { + await enumerator8.DisposeAsync(); + } + if (enumerator9 != null) + { + await enumerator9.DisposeAsync(); + } + if (enumerator10 != null) + { + await enumerator10.DisposeAsync(); + } + } + } + } + + internal class CombineLatest : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + readonly IUniTaskAsyncEnumerable source9; + readonly IUniTaskAsyncEnumerable source10; + readonly IUniTaskAsyncEnumerable source11; + + readonly Func resultSelector; + + public CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, Func resultSelector) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + this.source9 = source9; + this.source10 = source10; + this.source11 = source11; + + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, resultSelector, cancellationToken); + } + + class _CombineLatest : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action Completed1Delegate = Completed1; + static readonly Action Completed2Delegate = Completed2; + static readonly Action Completed3Delegate = Completed3; + static readonly Action Completed4Delegate = Completed4; + static readonly Action Completed5Delegate = Completed5; + static readonly Action Completed6Delegate = Completed6; + static readonly Action Completed7Delegate = Completed7; + static readonly Action Completed8Delegate = Completed8; + static readonly Action Completed9Delegate = Completed9; + static readonly Action Completed10Delegate = Completed10; + static readonly Action Completed11Delegate = Completed11; + const int CompleteCount = 11; + + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + readonly IUniTaskAsyncEnumerable source9; + readonly IUniTaskAsyncEnumerable source10; + readonly IUniTaskAsyncEnumerable source11; + + readonly Func resultSelector; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator1; + UniTask.Awaiter awaiter1; + bool hasCurrent1; + bool running1; + T1 current1; + + IUniTaskAsyncEnumerator enumerator2; + UniTask.Awaiter awaiter2; + bool hasCurrent2; + bool running2; + T2 current2; + + IUniTaskAsyncEnumerator enumerator3; + UniTask.Awaiter awaiter3; + bool hasCurrent3; + bool running3; + T3 current3; + + IUniTaskAsyncEnumerator enumerator4; + UniTask.Awaiter awaiter4; + bool hasCurrent4; + bool running4; + T4 current4; + + IUniTaskAsyncEnumerator enumerator5; + UniTask.Awaiter awaiter5; + bool hasCurrent5; + bool running5; + T5 current5; + + IUniTaskAsyncEnumerator enumerator6; + UniTask.Awaiter awaiter6; + bool hasCurrent6; + bool running6; + T6 current6; + + IUniTaskAsyncEnumerator enumerator7; + UniTask.Awaiter awaiter7; + bool hasCurrent7; + bool running7; + T7 current7; + + IUniTaskAsyncEnumerator enumerator8; + UniTask.Awaiter awaiter8; + bool hasCurrent8; + bool running8; + T8 current8; + + IUniTaskAsyncEnumerator enumerator9; + UniTask.Awaiter awaiter9; + bool hasCurrent9; + bool running9; + T9 current9; + + IUniTaskAsyncEnumerator enumerator10; + UniTask.Awaiter awaiter10; + bool hasCurrent10; + bool running10; + T10 current10; + + IUniTaskAsyncEnumerator enumerator11; + UniTask.Awaiter awaiter11; + bool hasCurrent11; + bool running11; + T11 current11; + + int completedCount; + bool syncRunning; + TResult result; + + public _CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, Func resultSelector, CancellationToken cancellationToken) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + this.source9 = source9; + this.source10 = source10; + this.source11 = source11; + + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current => result; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + if (completedCount == CompleteCount) return CompletedTasks.False; + + if (enumerator1 == null) + { + enumerator1 = source1.GetAsyncEnumerator(cancellationToken); + enumerator2 = source2.GetAsyncEnumerator(cancellationToken); + enumerator3 = source3.GetAsyncEnumerator(cancellationToken); + enumerator4 = source4.GetAsyncEnumerator(cancellationToken); + enumerator5 = source5.GetAsyncEnumerator(cancellationToken); + enumerator6 = source6.GetAsyncEnumerator(cancellationToken); + enumerator7 = source7.GetAsyncEnumerator(cancellationToken); + enumerator8 = source8.GetAsyncEnumerator(cancellationToken); + enumerator9 = source9.GetAsyncEnumerator(cancellationToken); + enumerator10 = source10.GetAsyncEnumerator(cancellationToken); + enumerator11 = source11.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + + AGAIN: + syncRunning = true; + if (!running1) + { + running1 = true; + awaiter1 = enumerator1.MoveNextAsync().GetAwaiter(); + if (awaiter1.IsCompleted) + { + Completed1(this); + } + else + { + awaiter1.SourceOnCompleted(Completed1Delegate, this); + } + } + if (!running2) + { + running2 = true; + awaiter2 = enumerator2.MoveNextAsync().GetAwaiter(); + if (awaiter2.IsCompleted) + { + Completed2(this); + } + else + { + awaiter2.SourceOnCompleted(Completed2Delegate, this); + } + } + if (!running3) + { + running3 = true; + awaiter3 = enumerator3.MoveNextAsync().GetAwaiter(); + if (awaiter3.IsCompleted) + { + Completed3(this); + } + else + { + awaiter3.SourceOnCompleted(Completed3Delegate, this); + } + } + if (!running4) + { + running4 = true; + awaiter4 = enumerator4.MoveNextAsync().GetAwaiter(); + if (awaiter4.IsCompleted) + { + Completed4(this); + } + else + { + awaiter4.SourceOnCompleted(Completed4Delegate, this); + } + } + if (!running5) + { + running5 = true; + awaiter5 = enumerator5.MoveNextAsync().GetAwaiter(); + if (awaiter5.IsCompleted) + { + Completed5(this); + } + else + { + awaiter5.SourceOnCompleted(Completed5Delegate, this); + } + } + if (!running6) + { + running6 = true; + awaiter6 = enumerator6.MoveNextAsync().GetAwaiter(); + if (awaiter6.IsCompleted) + { + Completed6(this); + } + else + { + awaiter6.SourceOnCompleted(Completed6Delegate, this); + } + } + if (!running7) + { + running7 = true; + awaiter7 = enumerator7.MoveNextAsync().GetAwaiter(); + if (awaiter7.IsCompleted) + { + Completed7(this); + } + else + { + awaiter7.SourceOnCompleted(Completed7Delegate, this); + } + } + if (!running8) + { + running8 = true; + awaiter8 = enumerator8.MoveNextAsync().GetAwaiter(); + if (awaiter8.IsCompleted) + { + Completed8(this); + } + else + { + awaiter8.SourceOnCompleted(Completed8Delegate, this); + } + } + if (!running9) + { + running9 = true; + awaiter9 = enumerator9.MoveNextAsync().GetAwaiter(); + if (awaiter9.IsCompleted) + { + Completed9(this); + } + else + { + awaiter9.SourceOnCompleted(Completed9Delegate, this); + } + } + if (!running10) + { + running10 = true; + awaiter10 = enumerator10.MoveNextAsync().GetAwaiter(); + if (awaiter10.IsCompleted) + { + Completed10(this); + } + else + { + awaiter10.SourceOnCompleted(Completed10Delegate, this); + } + } + if (!running11) + { + running11 = true; + awaiter11 = enumerator11.MoveNextAsync().GetAwaiter(); + if (awaiter11.IsCompleted) + { + Completed11(this); + } + else + { + awaiter11.SourceOnCompleted(Completed11Delegate, this); + } + } + + if (!running1 || !running2 || !running3 || !running4 || !running5 || !running6 || !running7 || !running8 || !running9 || !running10 || !running11) + { + goto AGAIN; + } + syncRunning = false; + + return new UniTask(this, completionSource.Version); + } + + static void Completed1(object state) + { + var self = (_CombineLatest)state; + self.running1 = false; + + try + { + if (self.awaiter1.GetResult()) + { + self.hasCurrent1 = true; + self.current1 = self.enumerator1.Current; + goto SUCCESS; + } + else + { + self.running1 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running1 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running1 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter1.SourceOnCompleted(Completed1Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed2(object state) + { + var self = (_CombineLatest)state; + self.running2 = false; + + try + { + if (self.awaiter2.GetResult()) + { + self.hasCurrent2 = true; + self.current2 = self.enumerator2.Current; + goto SUCCESS; + } + else + { + self.running2 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running2 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running2 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter2.SourceOnCompleted(Completed2Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed3(object state) + { + var self = (_CombineLatest)state; + self.running3 = false; + + try + { + if (self.awaiter3.GetResult()) + { + self.hasCurrent3 = true; + self.current3 = self.enumerator3.Current; + goto SUCCESS; + } + else + { + self.running3 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running3 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running3 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter3.SourceOnCompleted(Completed3Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed4(object state) + { + var self = (_CombineLatest)state; + self.running4 = false; + + try + { + if (self.awaiter4.GetResult()) + { + self.hasCurrent4 = true; + self.current4 = self.enumerator4.Current; + goto SUCCESS; + } + else + { + self.running4 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running4 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running4 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter4.SourceOnCompleted(Completed4Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed5(object state) + { + var self = (_CombineLatest)state; + self.running5 = false; + + try + { + if (self.awaiter5.GetResult()) + { + self.hasCurrent5 = true; + self.current5 = self.enumerator5.Current; + goto SUCCESS; + } + else + { + self.running5 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running5 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running5 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter5.SourceOnCompleted(Completed5Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed6(object state) + { + var self = (_CombineLatest)state; + self.running6 = false; + + try + { + if (self.awaiter6.GetResult()) + { + self.hasCurrent6 = true; + self.current6 = self.enumerator6.Current; + goto SUCCESS; + } + else + { + self.running6 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running6 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running6 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter6.SourceOnCompleted(Completed6Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed7(object state) + { + var self = (_CombineLatest)state; + self.running7 = false; + + try + { + if (self.awaiter7.GetResult()) + { + self.hasCurrent7 = true; + self.current7 = self.enumerator7.Current; + goto SUCCESS; + } + else + { + self.running7 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running7 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running7 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter7.SourceOnCompleted(Completed7Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed8(object state) + { + var self = (_CombineLatest)state; + self.running8 = false; + + try + { + if (self.awaiter8.GetResult()) + { + self.hasCurrent8 = true; + self.current8 = self.enumerator8.Current; + goto SUCCESS; + } + else + { + self.running8 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running8 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running8 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter8.SourceOnCompleted(Completed8Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed9(object state) + { + var self = (_CombineLatest)state; + self.running9 = false; + + try + { + if (self.awaiter9.GetResult()) + { + self.hasCurrent9 = true; + self.current9 = self.enumerator9.Current; + goto SUCCESS; + } + else + { + self.running9 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running9 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running9 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter9.SourceOnCompleted(Completed9Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed10(object state) + { + var self = (_CombineLatest)state; + self.running10 = false; + + try + { + if (self.awaiter10.GetResult()) + { + self.hasCurrent10 = true; + self.current10 = self.enumerator10.Current; + goto SUCCESS; + } + else + { + self.running10 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running10 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running10 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter10.SourceOnCompleted(Completed10Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed11(object state) + { + var self = (_CombineLatest)state; + self.running11 = false; + + try + { + if (self.awaiter11.GetResult()) + { + self.hasCurrent11 = true; + self.current11 = self.enumerator11.Current; + goto SUCCESS; + } + else + { + self.running11 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running11 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running11 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter11.SourceOnCompleted(Completed11Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + bool TrySetResult() + { + if (hasCurrent1 && hasCurrent2 && hasCurrent3 && hasCurrent4 && hasCurrent5 && hasCurrent6 && hasCurrent7 && hasCurrent8 && hasCurrent9 && hasCurrent10 && hasCurrent11) + { + result = resultSelector(current1, current2, current3, current4, current5, current6, current7, current8, current9, current10, current11); + completionSource.TrySetResult(true); + return true; + } + else + { + return false; + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator1 != null) + { + await enumerator1.DisposeAsync(); + } + if (enumerator2 != null) + { + await enumerator2.DisposeAsync(); + } + if (enumerator3 != null) + { + await enumerator3.DisposeAsync(); + } + if (enumerator4 != null) + { + await enumerator4.DisposeAsync(); + } + if (enumerator5 != null) + { + await enumerator5.DisposeAsync(); + } + if (enumerator6 != null) + { + await enumerator6.DisposeAsync(); + } + if (enumerator7 != null) + { + await enumerator7.DisposeAsync(); + } + if (enumerator8 != null) + { + await enumerator8.DisposeAsync(); + } + if (enumerator9 != null) + { + await enumerator9.DisposeAsync(); + } + if (enumerator10 != null) + { + await enumerator10.DisposeAsync(); + } + if (enumerator11 != null) + { + await enumerator11.DisposeAsync(); + } + } + } + } + + internal class CombineLatest : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + readonly IUniTaskAsyncEnumerable source9; + readonly IUniTaskAsyncEnumerable source10; + readonly IUniTaskAsyncEnumerable source11; + readonly IUniTaskAsyncEnumerable source12; + + readonly Func resultSelector; + + public CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, IUniTaskAsyncEnumerable source12, Func resultSelector) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + this.source9 = source9; + this.source10 = source10; + this.source11 = source11; + this.source12 = source12; + + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, resultSelector, cancellationToken); + } + + class _CombineLatest : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action Completed1Delegate = Completed1; + static readonly Action Completed2Delegate = Completed2; + static readonly Action Completed3Delegate = Completed3; + static readonly Action Completed4Delegate = Completed4; + static readonly Action Completed5Delegate = Completed5; + static readonly Action Completed6Delegate = Completed6; + static readonly Action Completed7Delegate = Completed7; + static readonly Action Completed8Delegate = Completed8; + static readonly Action Completed9Delegate = Completed9; + static readonly Action Completed10Delegate = Completed10; + static readonly Action Completed11Delegate = Completed11; + static readonly Action Completed12Delegate = Completed12; + const int CompleteCount = 12; + + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + readonly IUniTaskAsyncEnumerable source9; + readonly IUniTaskAsyncEnumerable source10; + readonly IUniTaskAsyncEnumerable source11; + readonly IUniTaskAsyncEnumerable source12; + + readonly Func resultSelector; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator1; + UniTask.Awaiter awaiter1; + bool hasCurrent1; + bool running1; + T1 current1; + + IUniTaskAsyncEnumerator enumerator2; + UniTask.Awaiter awaiter2; + bool hasCurrent2; + bool running2; + T2 current2; + + IUniTaskAsyncEnumerator enumerator3; + UniTask.Awaiter awaiter3; + bool hasCurrent3; + bool running3; + T3 current3; + + IUniTaskAsyncEnumerator enumerator4; + UniTask.Awaiter awaiter4; + bool hasCurrent4; + bool running4; + T4 current4; + + IUniTaskAsyncEnumerator enumerator5; + UniTask.Awaiter awaiter5; + bool hasCurrent5; + bool running5; + T5 current5; + + IUniTaskAsyncEnumerator enumerator6; + UniTask.Awaiter awaiter6; + bool hasCurrent6; + bool running6; + T6 current6; + + IUniTaskAsyncEnumerator enumerator7; + UniTask.Awaiter awaiter7; + bool hasCurrent7; + bool running7; + T7 current7; + + IUniTaskAsyncEnumerator enumerator8; + UniTask.Awaiter awaiter8; + bool hasCurrent8; + bool running8; + T8 current8; + + IUniTaskAsyncEnumerator enumerator9; + UniTask.Awaiter awaiter9; + bool hasCurrent9; + bool running9; + T9 current9; + + IUniTaskAsyncEnumerator enumerator10; + UniTask.Awaiter awaiter10; + bool hasCurrent10; + bool running10; + T10 current10; + + IUniTaskAsyncEnumerator enumerator11; + UniTask.Awaiter awaiter11; + bool hasCurrent11; + bool running11; + T11 current11; + + IUniTaskAsyncEnumerator enumerator12; + UniTask.Awaiter awaiter12; + bool hasCurrent12; + bool running12; + T12 current12; + + int completedCount; + bool syncRunning; + TResult result; + + public _CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, IUniTaskAsyncEnumerable source12, Func resultSelector, CancellationToken cancellationToken) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + this.source9 = source9; + this.source10 = source10; + this.source11 = source11; + this.source12 = source12; + + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current => result; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + if (completedCount == CompleteCount) return CompletedTasks.False; + + if (enumerator1 == null) + { + enumerator1 = source1.GetAsyncEnumerator(cancellationToken); + enumerator2 = source2.GetAsyncEnumerator(cancellationToken); + enumerator3 = source3.GetAsyncEnumerator(cancellationToken); + enumerator4 = source4.GetAsyncEnumerator(cancellationToken); + enumerator5 = source5.GetAsyncEnumerator(cancellationToken); + enumerator6 = source6.GetAsyncEnumerator(cancellationToken); + enumerator7 = source7.GetAsyncEnumerator(cancellationToken); + enumerator8 = source8.GetAsyncEnumerator(cancellationToken); + enumerator9 = source9.GetAsyncEnumerator(cancellationToken); + enumerator10 = source10.GetAsyncEnumerator(cancellationToken); + enumerator11 = source11.GetAsyncEnumerator(cancellationToken); + enumerator12 = source12.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + + AGAIN: + syncRunning = true; + if (!running1) + { + running1 = true; + awaiter1 = enumerator1.MoveNextAsync().GetAwaiter(); + if (awaiter1.IsCompleted) + { + Completed1(this); + } + else + { + awaiter1.SourceOnCompleted(Completed1Delegate, this); + } + } + if (!running2) + { + running2 = true; + awaiter2 = enumerator2.MoveNextAsync().GetAwaiter(); + if (awaiter2.IsCompleted) + { + Completed2(this); + } + else + { + awaiter2.SourceOnCompleted(Completed2Delegate, this); + } + } + if (!running3) + { + running3 = true; + awaiter3 = enumerator3.MoveNextAsync().GetAwaiter(); + if (awaiter3.IsCompleted) + { + Completed3(this); + } + else + { + awaiter3.SourceOnCompleted(Completed3Delegate, this); + } + } + if (!running4) + { + running4 = true; + awaiter4 = enumerator4.MoveNextAsync().GetAwaiter(); + if (awaiter4.IsCompleted) + { + Completed4(this); + } + else + { + awaiter4.SourceOnCompleted(Completed4Delegate, this); + } + } + if (!running5) + { + running5 = true; + awaiter5 = enumerator5.MoveNextAsync().GetAwaiter(); + if (awaiter5.IsCompleted) + { + Completed5(this); + } + else + { + awaiter5.SourceOnCompleted(Completed5Delegate, this); + } + } + if (!running6) + { + running6 = true; + awaiter6 = enumerator6.MoveNextAsync().GetAwaiter(); + if (awaiter6.IsCompleted) + { + Completed6(this); + } + else + { + awaiter6.SourceOnCompleted(Completed6Delegate, this); + } + } + if (!running7) + { + running7 = true; + awaiter7 = enumerator7.MoveNextAsync().GetAwaiter(); + if (awaiter7.IsCompleted) + { + Completed7(this); + } + else + { + awaiter7.SourceOnCompleted(Completed7Delegate, this); + } + } + if (!running8) + { + running8 = true; + awaiter8 = enumerator8.MoveNextAsync().GetAwaiter(); + if (awaiter8.IsCompleted) + { + Completed8(this); + } + else + { + awaiter8.SourceOnCompleted(Completed8Delegate, this); + } + } + if (!running9) + { + running9 = true; + awaiter9 = enumerator9.MoveNextAsync().GetAwaiter(); + if (awaiter9.IsCompleted) + { + Completed9(this); + } + else + { + awaiter9.SourceOnCompleted(Completed9Delegate, this); + } + } + if (!running10) + { + running10 = true; + awaiter10 = enumerator10.MoveNextAsync().GetAwaiter(); + if (awaiter10.IsCompleted) + { + Completed10(this); + } + else + { + awaiter10.SourceOnCompleted(Completed10Delegate, this); + } + } + if (!running11) + { + running11 = true; + awaiter11 = enumerator11.MoveNextAsync().GetAwaiter(); + if (awaiter11.IsCompleted) + { + Completed11(this); + } + else + { + awaiter11.SourceOnCompleted(Completed11Delegate, this); + } + } + if (!running12) + { + running12 = true; + awaiter12 = enumerator12.MoveNextAsync().GetAwaiter(); + if (awaiter12.IsCompleted) + { + Completed12(this); + } + else + { + awaiter12.SourceOnCompleted(Completed12Delegate, this); + } + } + + if (!running1 || !running2 || !running3 || !running4 || !running5 || !running6 || !running7 || !running8 || !running9 || !running10 || !running11 || !running12) + { + goto AGAIN; + } + syncRunning = false; + + return new UniTask(this, completionSource.Version); + } + + static void Completed1(object state) + { + var self = (_CombineLatest)state; + self.running1 = false; + + try + { + if (self.awaiter1.GetResult()) + { + self.hasCurrent1 = true; + self.current1 = self.enumerator1.Current; + goto SUCCESS; + } + else + { + self.running1 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running1 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running1 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter1.SourceOnCompleted(Completed1Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed2(object state) + { + var self = (_CombineLatest)state; + self.running2 = false; + + try + { + if (self.awaiter2.GetResult()) + { + self.hasCurrent2 = true; + self.current2 = self.enumerator2.Current; + goto SUCCESS; + } + else + { + self.running2 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running2 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running2 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter2.SourceOnCompleted(Completed2Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed3(object state) + { + var self = (_CombineLatest)state; + self.running3 = false; + + try + { + if (self.awaiter3.GetResult()) + { + self.hasCurrent3 = true; + self.current3 = self.enumerator3.Current; + goto SUCCESS; + } + else + { + self.running3 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running3 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running3 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter3.SourceOnCompleted(Completed3Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed4(object state) + { + var self = (_CombineLatest)state; + self.running4 = false; + + try + { + if (self.awaiter4.GetResult()) + { + self.hasCurrent4 = true; + self.current4 = self.enumerator4.Current; + goto SUCCESS; + } + else + { + self.running4 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running4 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running4 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter4.SourceOnCompleted(Completed4Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed5(object state) + { + var self = (_CombineLatest)state; + self.running5 = false; + + try + { + if (self.awaiter5.GetResult()) + { + self.hasCurrent5 = true; + self.current5 = self.enumerator5.Current; + goto SUCCESS; + } + else + { + self.running5 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running5 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running5 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter5.SourceOnCompleted(Completed5Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed6(object state) + { + var self = (_CombineLatest)state; + self.running6 = false; + + try + { + if (self.awaiter6.GetResult()) + { + self.hasCurrent6 = true; + self.current6 = self.enumerator6.Current; + goto SUCCESS; + } + else + { + self.running6 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running6 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running6 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter6.SourceOnCompleted(Completed6Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed7(object state) + { + var self = (_CombineLatest)state; + self.running7 = false; + + try + { + if (self.awaiter7.GetResult()) + { + self.hasCurrent7 = true; + self.current7 = self.enumerator7.Current; + goto SUCCESS; + } + else + { + self.running7 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running7 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running7 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter7.SourceOnCompleted(Completed7Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed8(object state) + { + var self = (_CombineLatest)state; + self.running8 = false; + + try + { + if (self.awaiter8.GetResult()) + { + self.hasCurrent8 = true; + self.current8 = self.enumerator8.Current; + goto SUCCESS; + } + else + { + self.running8 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running8 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running8 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter8.SourceOnCompleted(Completed8Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed9(object state) + { + var self = (_CombineLatest)state; + self.running9 = false; + + try + { + if (self.awaiter9.GetResult()) + { + self.hasCurrent9 = true; + self.current9 = self.enumerator9.Current; + goto SUCCESS; + } + else + { + self.running9 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running9 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running9 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter9.SourceOnCompleted(Completed9Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed10(object state) + { + var self = (_CombineLatest)state; + self.running10 = false; + + try + { + if (self.awaiter10.GetResult()) + { + self.hasCurrent10 = true; + self.current10 = self.enumerator10.Current; + goto SUCCESS; + } + else + { + self.running10 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running10 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running10 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter10.SourceOnCompleted(Completed10Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed11(object state) + { + var self = (_CombineLatest)state; + self.running11 = false; + + try + { + if (self.awaiter11.GetResult()) + { + self.hasCurrent11 = true; + self.current11 = self.enumerator11.Current; + goto SUCCESS; + } + else + { + self.running11 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running11 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running11 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter11.SourceOnCompleted(Completed11Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed12(object state) + { + var self = (_CombineLatest)state; + self.running12 = false; + + try + { + if (self.awaiter12.GetResult()) + { + self.hasCurrent12 = true; + self.current12 = self.enumerator12.Current; + goto SUCCESS; + } + else + { + self.running12 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running12 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running12 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter12 = self.enumerator12.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter12.SourceOnCompleted(Completed12Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + bool TrySetResult() + { + if (hasCurrent1 && hasCurrent2 && hasCurrent3 && hasCurrent4 && hasCurrent5 && hasCurrent6 && hasCurrent7 && hasCurrent8 && hasCurrent9 && hasCurrent10 && hasCurrent11 && hasCurrent12) + { + result = resultSelector(current1, current2, current3, current4, current5, current6, current7, current8, current9, current10, current11, current12); + completionSource.TrySetResult(true); + return true; + } + else + { + return false; + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator1 != null) + { + await enumerator1.DisposeAsync(); + } + if (enumerator2 != null) + { + await enumerator2.DisposeAsync(); + } + if (enumerator3 != null) + { + await enumerator3.DisposeAsync(); + } + if (enumerator4 != null) + { + await enumerator4.DisposeAsync(); + } + if (enumerator5 != null) + { + await enumerator5.DisposeAsync(); + } + if (enumerator6 != null) + { + await enumerator6.DisposeAsync(); + } + if (enumerator7 != null) + { + await enumerator7.DisposeAsync(); + } + if (enumerator8 != null) + { + await enumerator8.DisposeAsync(); + } + if (enumerator9 != null) + { + await enumerator9.DisposeAsync(); + } + if (enumerator10 != null) + { + await enumerator10.DisposeAsync(); + } + if (enumerator11 != null) + { + await enumerator11.DisposeAsync(); + } + if (enumerator12 != null) + { + await enumerator12.DisposeAsync(); + } + } + } + } + + internal class CombineLatest : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + readonly IUniTaskAsyncEnumerable source9; + readonly IUniTaskAsyncEnumerable source10; + readonly IUniTaskAsyncEnumerable source11; + readonly IUniTaskAsyncEnumerable source12; + readonly IUniTaskAsyncEnumerable source13; + + readonly Func resultSelector; + + public CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, IUniTaskAsyncEnumerable source12, IUniTaskAsyncEnumerable source13, Func resultSelector) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + this.source9 = source9; + this.source10 = source10; + this.source11 = source11; + this.source12 = source12; + this.source13 = source13; + + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, resultSelector, cancellationToken); + } + + class _CombineLatest : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action Completed1Delegate = Completed1; + static readonly Action Completed2Delegate = Completed2; + static readonly Action Completed3Delegate = Completed3; + static readonly Action Completed4Delegate = Completed4; + static readonly Action Completed5Delegate = Completed5; + static readonly Action Completed6Delegate = Completed6; + static readonly Action Completed7Delegate = Completed7; + static readonly Action Completed8Delegate = Completed8; + static readonly Action Completed9Delegate = Completed9; + static readonly Action Completed10Delegate = Completed10; + static readonly Action Completed11Delegate = Completed11; + static readonly Action Completed12Delegate = Completed12; + static readonly Action Completed13Delegate = Completed13; + const int CompleteCount = 13; + + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + readonly IUniTaskAsyncEnumerable source9; + readonly IUniTaskAsyncEnumerable source10; + readonly IUniTaskAsyncEnumerable source11; + readonly IUniTaskAsyncEnumerable source12; + readonly IUniTaskAsyncEnumerable source13; + + readonly Func resultSelector; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator1; + UniTask.Awaiter awaiter1; + bool hasCurrent1; + bool running1; + T1 current1; + + IUniTaskAsyncEnumerator enumerator2; + UniTask.Awaiter awaiter2; + bool hasCurrent2; + bool running2; + T2 current2; + + IUniTaskAsyncEnumerator enumerator3; + UniTask.Awaiter awaiter3; + bool hasCurrent3; + bool running3; + T3 current3; + + IUniTaskAsyncEnumerator enumerator4; + UniTask.Awaiter awaiter4; + bool hasCurrent4; + bool running4; + T4 current4; + + IUniTaskAsyncEnumerator enumerator5; + UniTask.Awaiter awaiter5; + bool hasCurrent5; + bool running5; + T5 current5; + + IUniTaskAsyncEnumerator enumerator6; + UniTask.Awaiter awaiter6; + bool hasCurrent6; + bool running6; + T6 current6; + + IUniTaskAsyncEnumerator enumerator7; + UniTask.Awaiter awaiter7; + bool hasCurrent7; + bool running7; + T7 current7; + + IUniTaskAsyncEnumerator enumerator8; + UniTask.Awaiter awaiter8; + bool hasCurrent8; + bool running8; + T8 current8; + + IUniTaskAsyncEnumerator enumerator9; + UniTask.Awaiter awaiter9; + bool hasCurrent9; + bool running9; + T9 current9; + + IUniTaskAsyncEnumerator enumerator10; + UniTask.Awaiter awaiter10; + bool hasCurrent10; + bool running10; + T10 current10; + + IUniTaskAsyncEnumerator enumerator11; + UniTask.Awaiter awaiter11; + bool hasCurrent11; + bool running11; + T11 current11; + + IUniTaskAsyncEnumerator enumerator12; + UniTask.Awaiter awaiter12; + bool hasCurrent12; + bool running12; + T12 current12; + + IUniTaskAsyncEnumerator enumerator13; + UniTask.Awaiter awaiter13; + bool hasCurrent13; + bool running13; + T13 current13; + + int completedCount; + bool syncRunning; + TResult result; + + public _CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, IUniTaskAsyncEnumerable source12, IUniTaskAsyncEnumerable source13, Func resultSelector, CancellationToken cancellationToken) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + this.source9 = source9; + this.source10 = source10; + this.source11 = source11; + this.source12 = source12; + this.source13 = source13; + + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current => result; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + if (completedCount == CompleteCount) return CompletedTasks.False; + + if (enumerator1 == null) + { + enumerator1 = source1.GetAsyncEnumerator(cancellationToken); + enumerator2 = source2.GetAsyncEnumerator(cancellationToken); + enumerator3 = source3.GetAsyncEnumerator(cancellationToken); + enumerator4 = source4.GetAsyncEnumerator(cancellationToken); + enumerator5 = source5.GetAsyncEnumerator(cancellationToken); + enumerator6 = source6.GetAsyncEnumerator(cancellationToken); + enumerator7 = source7.GetAsyncEnumerator(cancellationToken); + enumerator8 = source8.GetAsyncEnumerator(cancellationToken); + enumerator9 = source9.GetAsyncEnumerator(cancellationToken); + enumerator10 = source10.GetAsyncEnumerator(cancellationToken); + enumerator11 = source11.GetAsyncEnumerator(cancellationToken); + enumerator12 = source12.GetAsyncEnumerator(cancellationToken); + enumerator13 = source13.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + + AGAIN: + syncRunning = true; + if (!running1) + { + running1 = true; + awaiter1 = enumerator1.MoveNextAsync().GetAwaiter(); + if (awaiter1.IsCompleted) + { + Completed1(this); + } + else + { + awaiter1.SourceOnCompleted(Completed1Delegate, this); + } + } + if (!running2) + { + running2 = true; + awaiter2 = enumerator2.MoveNextAsync().GetAwaiter(); + if (awaiter2.IsCompleted) + { + Completed2(this); + } + else + { + awaiter2.SourceOnCompleted(Completed2Delegate, this); + } + } + if (!running3) + { + running3 = true; + awaiter3 = enumerator3.MoveNextAsync().GetAwaiter(); + if (awaiter3.IsCompleted) + { + Completed3(this); + } + else + { + awaiter3.SourceOnCompleted(Completed3Delegate, this); + } + } + if (!running4) + { + running4 = true; + awaiter4 = enumerator4.MoveNextAsync().GetAwaiter(); + if (awaiter4.IsCompleted) + { + Completed4(this); + } + else + { + awaiter4.SourceOnCompleted(Completed4Delegate, this); + } + } + if (!running5) + { + running5 = true; + awaiter5 = enumerator5.MoveNextAsync().GetAwaiter(); + if (awaiter5.IsCompleted) + { + Completed5(this); + } + else + { + awaiter5.SourceOnCompleted(Completed5Delegate, this); + } + } + if (!running6) + { + running6 = true; + awaiter6 = enumerator6.MoveNextAsync().GetAwaiter(); + if (awaiter6.IsCompleted) + { + Completed6(this); + } + else + { + awaiter6.SourceOnCompleted(Completed6Delegate, this); + } + } + if (!running7) + { + running7 = true; + awaiter7 = enumerator7.MoveNextAsync().GetAwaiter(); + if (awaiter7.IsCompleted) + { + Completed7(this); + } + else + { + awaiter7.SourceOnCompleted(Completed7Delegate, this); + } + } + if (!running8) + { + running8 = true; + awaiter8 = enumerator8.MoveNextAsync().GetAwaiter(); + if (awaiter8.IsCompleted) + { + Completed8(this); + } + else + { + awaiter8.SourceOnCompleted(Completed8Delegate, this); + } + } + if (!running9) + { + running9 = true; + awaiter9 = enumerator9.MoveNextAsync().GetAwaiter(); + if (awaiter9.IsCompleted) + { + Completed9(this); + } + else + { + awaiter9.SourceOnCompleted(Completed9Delegate, this); + } + } + if (!running10) + { + running10 = true; + awaiter10 = enumerator10.MoveNextAsync().GetAwaiter(); + if (awaiter10.IsCompleted) + { + Completed10(this); + } + else + { + awaiter10.SourceOnCompleted(Completed10Delegate, this); + } + } + if (!running11) + { + running11 = true; + awaiter11 = enumerator11.MoveNextAsync().GetAwaiter(); + if (awaiter11.IsCompleted) + { + Completed11(this); + } + else + { + awaiter11.SourceOnCompleted(Completed11Delegate, this); + } + } + if (!running12) + { + running12 = true; + awaiter12 = enumerator12.MoveNextAsync().GetAwaiter(); + if (awaiter12.IsCompleted) + { + Completed12(this); + } + else + { + awaiter12.SourceOnCompleted(Completed12Delegate, this); + } + } + if (!running13) + { + running13 = true; + awaiter13 = enumerator13.MoveNextAsync().GetAwaiter(); + if (awaiter13.IsCompleted) + { + Completed13(this); + } + else + { + awaiter13.SourceOnCompleted(Completed13Delegate, this); + } + } + + if (!running1 || !running2 || !running3 || !running4 || !running5 || !running6 || !running7 || !running8 || !running9 || !running10 || !running11 || !running12 || !running13) + { + goto AGAIN; + } + syncRunning = false; + + return new UniTask(this, completionSource.Version); + } + + static void Completed1(object state) + { + var self = (_CombineLatest)state; + self.running1 = false; + + try + { + if (self.awaiter1.GetResult()) + { + self.hasCurrent1 = true; + self.current1 = self.enumerator1.Current; + goto SUCCESS; + } + else + { + self.running1 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running1 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running1 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter1.SourceOnCompleted(Completed1Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed2(object state) + { + var self = (_CombineLatest)state; + self.running2 = false; + + try + { + if (self.awaiter2.GetResult()) + { + self.hasCurrent2 = true; + self.current2 = self.enumerator2.Current; + goto SUCCESS; + } + else + { + self.running2 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running2 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running2 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter2.SourceOnCompleted(Completed2Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed3(object state) + { + var self = (_CombineLatest)state; + self.running3 = false; + + try + { + if (self.awaiter3.GetResult()) + { + self.hasCurrent3 = true; + self.current3 = self.enumerator3.Current; + goto SUCCESS; + } + else + { + self.running3 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running3 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running3 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter3.SourceOnCompleted(Completed3Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed4(object state) + { + var self = (_CombineLatest)state; + self.running4 = false; + + try + { + if (self.awaiter4.GetResult()) + { + self.hasCurrent4 = true; + self.current4 = self.enumerator4.Current; + goto SUCCESS; + } + else + { + self.running4 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running4 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running4 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter4.SourceOnCompleted(Completed4Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed5(object state) + { + var self = (_CombineLatest)state; + self.running5 = false; + + try + { + if (self.awaiter5.GetResult()) + { + self.hasCurrent5 = true; + self.current5 = self.enumerator5.Current; + goto SUCCESS; + } + else + { + self.running5 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running5 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running5 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter5.SourceOnCompleted(Completed5Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed6(object state) + { + var self = (_CombineLatest)state; + self.running6 = false; + + try + { + if (self.awaiter6.GetResult()) + { + self.hasCurrent6 = true; + self.current6 = self.enumerator6.Current; + goto SUCCESS; + } + else + { + self.running6 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running6 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running6 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter6.SourceOnCompleted(Completed6Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed7(object state) + { + var self = (_CombineLatest)state; + self.running7 = false; + + try + { + if (self.awaiter7.GetResult()) + { + self.hasCurrent7 = true; + self.current7 = self.enumerator7.Current; + goto SUCCESS; + } + else + { + self.running7 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running7 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running7 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter7.SourceOnCompleted(Completed7Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed8(object state) + { + var self = (_CombineLatest)state; + self.running8 = false; + + try + { + if (self.awaiter8.GetResult()) + { + self.hasCurrent8 = true; + self.current8 = self.enumerator8.Current; + goto SUCCESS; + } + else + { + self.running8 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running8 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running8 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter8.SourceOnCompleted(Completed8Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed9(object state) + { + var self = (_CombineLatest)state; + self.running9 = false; + + try + { + if (self.awaiter9.GetResult()) + { + self.hasCurrent9 = true; + self.current9 = self.enumerator9.Current; + goto SUCCESS; + } + else + { + self.running9 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running9 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running9 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter9.SourceOnCompleted(Completed9Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed10(object state) + { + var self = (_CombineLatest)state; + self.running10 = false; + + try + { + if (self.awaiter10.GetResult()) + { + self.hasCurrent10 = true; + self.current10 = self.enumerator10.Current; + goto SUCCESS; + } + else + { + self.running10 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running10 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running10 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter10.SourceOnCompleted(Completed10Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed11(object state) + { + var self = (_CombineLatest)state; + self.running11 = false; + + try + { + if (self.awaiter11.GetResult()) + { + self.hasCurrent11 = true; + self.current11 = self.enumerator11.Current; + goto SUCCESS; + } + else + { + self.running11 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running11 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running11 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter11.SourceOnCompleted(Completed11Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed12(object state) + { + var self = (_CombineLatest)state; + self.running12 = false; + + try + { + if (self.awaiter12.GetResult()) + { + self.hasCurrent12 = true; + self.current12 = self.enumerator12.Current; + goto SUCCESS; + } + else + { + self.running12 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running12 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running12 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter12 = self.enumerator12.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter12.SourceOnCompleted(Completed12Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed13(object state) + { + var self = (_CombineLatest)state; + self.running13 = false; + + try + { + if (self.awaiter13.GetResult()) + { + self.hasCurrent13 = true; + self.current13 = self.enumerator13.Current; + goto SUCCESS; + } + else + { + self.running13 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running13 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running13 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter13 = self.enumerator13.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter13.SourceOnCompleted(Completed13Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + bool TrySetResult() + { + if (hasCurrent1 && hasCurrent2 && hasCurrent3 && hasCurrent4 && hasCurrent5 && hasCurrent6 && hasCurrent7 && hasCurrent8 && hasCurrent9 && hasCurrent10 && hasCurrent11 && hasCurrent12 && hasCurrent13) + { + result = resultSelector(current1, current2, current3, current4, current5, current6, current7, current8, current9, current10, current11, current12, current13); + completionSource.TrySetResult(true); + return true; + } + else + { + return false; + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator1 != null) + { + await enumerator1.DisposeAsync(); + } + if (enumerator2 != null) + { + await enumerator2.DisposeAsync(); + } + if (enumerator3 != null) + { + await enumerator3.DisposeAsync(); + } + if (enumerator4 != null) + { + await enumerator4.DisposeAsync(); + } + if (enumerator5 != null) + { + await enumerator5.DisposeAsync(); + } + if (enumerator6 != null) + { + await enumerator6.DisposeAsync(); + } + if (enumerator7 != null) + { + await enumerator7.DisposeAsync(); + } + if (enumerator8 != null) + { + await enumerator8.DisposeAsync(); + } + if (enumerator9 != null) + { + await enumerator9.DisposeAsync(); + } + if (enumerator10 != null) + { + await enumerator10.DisposeAsync(); + } + if (enumerator11 != null) + { + await enumerator11.DisposeAsync(); + } + if (enumerator12 != null) + { + await enumerator12.DisposeAsync(); + } + if (enumerator13 != null) + { + await enumerator13.DisposeAsync(); + } + } + } + } + + internal class CombineLatest : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + readonly IUniTaskAsyncEnumerable source9; + readonly IUniTaskAsyncEnumerable source10; + readonly IUniTaskAsyncEnumerable source11; + readonly IUniTaskAsyncEnumerable source12; + readonly IUniTaskAsyncEnumerable source13; + readonly IUniTaskAsyncEnumerable source14; + + readonly Func resultSelector; + + public CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, IUniTaskAsyncEnumerable source12, IUniTaskAsyncEnumerable source13, IUniTaskAsyncEnumerable source14, Func resultSelector) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + this.source9 = source9; + this.source10 = source10; + this.source11 = source11; + this.source12 = source12; + this.source13 = source13; + this.source14 = source14; + + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, resultSelector, cancellationToken); + } + + class _CombineLatest : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action Completed1Delegate = Completed1; + static readonly Action Completed2Delegate = Completed2; + static readonly Action Completed3Delegate = Completed3; + static readonly Action Completed4Delegate = Completed4; + static readonly Action Completed5Delegate = Completed5; + static readonly Action Completed6Delegate = Completed6; + static readonly Action Completed7Delegate = Completed7; + static readonly Action Completed8Delegate = Completed8; + static readonly Action Completed9Delegate = Completed9; + static readonly Action Completed10Delegate = Completed10; + static readonly Action Completed11Delegate = Completed11; + static readonly Action Completed12Delegate = Completed12; + static readonly Action Completed13Delegate = Completed13; + static readonly Action Completed14Delegate = Completed14; + const int CompleteCount = 14; + + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + readonly IUniTaskAsyncEnumerable source9; + readonly IUniTaskAsyncEnumerable source10; + readonly IUniTaskAsyncEnumerable source11; + readonly IUniTaskAsyncEnumerable source12; + readonly IUniTaskAsyncEnumerable source13; + readonly IUniTaskAsyncEnumerable source14; + + readonly Func resultSelector; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator1; + UniTask.Awaiter awaiter1; + bool hasCurrent1; + bool running1; + T1 current1; + + IUniTaskAsyncEnumerator enumerator2; + UniTask.Awaiter awaiter2; + bool hasCurrent2; + bool running2; + T2 current2; + + IUniTaskAsyncEnumerator enumerator3; + UniTask.Awaiter awaiter3; + bool hasCurrent3; + bool running3; + T3 current3; + + IUniTaskAsyncEnumerator enumerator4; + UniTask.Awaiter awaiter4; + bool hasCurrent4; + bool running4; + T4 current4; + + IUniTaskAsyncEnumerator enumerator5; + UniTask.Awaiter awaiter5; + bool hasCurrent5; + bool running5; + T5 current5; + + IUniTaskAsyncEnumerator enumerator6; + UniTask.Awaiter awaiter6; + bool hasCurrent6; + bool running6; + T6 current6; + + IUniTaskAsyncEnumerator enumerator7; + UniTask.Awaiter awaiter7; + bool hasCurrent7; + bool running7; + T7 current7; + + IUniTaskAsyncEnumerator enumerator8; + UniTask.Awaiter awaiter8; + bool hasCurrent8; + bool running8; + T8 current8; + + IUniTaskAsyncEnumerator enumerator9; + UniTask.Awaiter awaiter9; + bool hasCurrent9; + bool running9; + T9 current9; + + IUniTaskAsyncEnumerator enumerator10; + UniTask.Awaiter awaiter10; + bool hasCurrent10; + bool running10; + T10 current10; + + IUniTaskAsyncEnumerator enumerator11; + UniTask.Awaiter awaiter11; + bool hasCurrent11; + bool running11; + T11 current11; + + IUniTaskAsyncEnumerator enumerator12; + UniTask.Awaiter awaiter12; + bool hasCurrent12; + bool running12; + T12 current12; + + IUniTaskAsyncEnumerator enumerator13; + UniTask.Awaiter awaiter13; + bool hasCurrent13; + bool running13; + T13 current13; + + IUniTaskAsyncEnumerator enumerator14; + UniTask.Awaiter awaiter14; + bool hasCurrent14; + bool running14; + T14 current14; + + int completedCount; + bool syncRunning; + TResult result; + + public _CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, IUniTaskAsyncEnumerable source12, IUniTaskAsyncEnumerable source13, IUniTaskAsyncEnumerable source14, Func resultSelector, CancellationToken cancellationToken) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + this.source9 = source9; + this.source10 = source10; + this.source11 = source11; + this.source12 = source12; + this.source13 = source13; + this.source14 = source14; + + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current => result; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + if (completedCount == CompleteCount) return CompletedTasks.False; + + if (enumerator1 == null) + { + enumerator1 = source1.GetAsyncEnumerator(cancellationToken); + enumerator2 = source2.GetAsyncEnumerator(cancellationToken); + enumerator3 = source3.GetAsyncEnumerator(cancellationToken); + enumerator4 = source4.GetAsyncEnumerator(cancellationToken); + enumerator5 = source5.GetAsyncEnumerator(cancellationToken); + enumerator6 = source6.GetAsyncEnumerator(cancellationToken); + enumerator7 = source7.GetAsyncEnumerator(cancellationToken); + enumerator8 = source8.GetAsyncEnumerator(cancellationToken); + enumerator9 = source9.GetAsyncEnumerator(cancellationToken); + enumerator10 = source10.GetAsyncEnumerator(cancellationToken); + enumerator11 = source11.GetAsyncEnumerator(cancellationToken); + enumerator12 = source12.GetAsyncEnumerator(cancellationToken); + enumerator13 = source13.GetAsyncEnumerator(cancellationToken); + enumerator14 = source14.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + + AGAIN: + syncRunning = true; + if (!running1) + { + running1 = true; + awaiter1 = enumerator1.MoveNextAsync().GetAwaiter(); + if (awaiter1.IsCompleted) + { + Completed1(this); + } + else + { + awaiter1.SourceOnCompleted(Completed1Delegate, this); + } + } + if (!running2) + { + running2 = true; + awaiter2 = enumerator2.MoveNextAsync().GetAwaiter(); + if (awaiter2.IsCompleted) + { + Completed2(this); + } + else + { + awaiter2.SourceOnCompleted(Completed2Delegate, this); + } + } + if (!running3) + { + running3 = true; + awaiter3 = enumerator3.MoveNextAsync().GetAwaiter(); + if (awaiter3.IsCompleted) + { + Completed3(this); + } + else + { + awaiter3.SourceOnCompleted(Completed3Delegate, this); + } + } + if (!running4) + { + running4 = true; + awaiter4 = enumerator4.MoveNextAsync().GetAwaiter(); + if (awaiter4.IsCompleted) + { + Completed4(this); + } + else + { + awaiter4.SourceOnCompleted(Completed4Delegate, this); + } + } + if (!running5) + { + running5 = true; + awaiter5 = enumerator5.MoveNextAsync().GetAwaiter(); + if (awaiter5.IsCompleted) + { + Completed5(this); + } + else + { + awaiter5.SourceOnCompleted(Completed5Delegate, this); + } + } + if (!running6) + { + running6 = true; + awaiter6 = enumerator6.MoveNextAsync().GetAwaiter(); + if (awaiter6.IsCompleted) + { + Completed6(this); + } + else + { + awaiter6.SourceOnCompleted(Completed6Delegate, this); + } + } + if (!running7) + { + running7 = true; + awaiter7 = enumerator7.MoveNextAsync().GetAwaiter(); + if (awaiter7.IsCompleted) + { + Completed7(this); + } + else + { + awaiter7.SourceOnCompleted(Completed7Delegate, this); + } + } + if (!running8) + { + running8 = true; + awaiter8 = enumerator8.MoveNextAsync().GetAwaiter(); + if (awaiter8.IsCompleted) + { + Completed8(this); + } + else + { + awaiter8.SourceOnCompleted(Completed8Delegate, this); + } + } + if (!running9) + { + running9 = true; + awaiter9 = enumerator9.MoveNextAsync().GetAwaiter(); + if (awaiter9.IsCompleted) + { + Completed9(this); + } + else + { + awaiter9.SourceOnCompleted(Completed9Delegate, this); + } + } + if (!running10) + { + running10 = true; + awaiter10 = enumerator10.MoveNextAsync().GetAwaiter(); + if (awaiter10.IsCompleted) + { + Completed10(this); + } + else + { + awaiter10.SourceOnCompleted(Completed10Delegate, this); + } + } + if (!running11) + { + running11 = true; + awaiter11 = enumerator11.MoveNextAsync().GetAwaiter(); + if (awaiter11.IsCompleted) + { + Completed11(this); + } + else + { + awaiter11.SourceOnCompleted(Completed11Delegate, this); + } + } + if (!running12) + { + running12 = true; + awaiter12 = enumerator12.MoveNextAsync().GetAwaiter(); + if (awaiter12.IsCompleted) + { + Completed12(this); + } + else + { + awaiter12.SourceOnCompleted(Completed12Delegate, this); + } + } + if (!running13) + { + running13 = true; + awaiter13 = enumerator13.MoveNextAsync().GetAwaiter(); + if (awaiter13.IsCompleted) + { + Completed13(this); + } + else + { + awaiter13.SourceOnCompleted(Completed13Delegate, this); + } + } + if (!running14) + { + running14 = true; + awaiter14 = enumerator14.MoveNextAsync().GetAwaiter(); + if (awaiter14.IsCompleted) + { + Completed14(this); + } + else + { + awaiter14.SourceOnCompleted(Completed14Delegate, this); + } + } + + if (!running1 || !running2 || !running3 || !running4 || !running5 || !running6 || !running7 || !running8 || !running9 || !running10 || !running11 || !running12 || !running13 || !running14) + { + goto AGAIN; + } + syncRunning = false; + + return new UniTask(this, completionSource.Version); + } + + static void Completed1(object state) + { + var self = (_CombineLatest)state; + self.running1 = false; + + try + { + if (self.awaiter1.GetResult()) + { + self.hasCurrent1 = true; + self.current1 = self.enumerator1.Current; + goto SUCCESS; + } + else + { + self.running1 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running1 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running1 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter1.SourceOnCompleted(Completed1Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed2(object state) + { + var self = (_CombineLatest)state; + self.running2 = false; + + try + { + if (self.awaiter2.GetResult()) + { + self.hasCurrent2 = true; + self.current2 = self.enumerator2.Current; + goto SUCCESS; + } + else + { + self.running2 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running2 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running2 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter2.SourceOnCompleted(Completed2Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed3(object state) + { + var self = (_CombineLatest)state; + self.running3 = false; + + try + { + if (self.awaiter3.GetResult()) + { + self.hasCurrent3 = true; + self.current3 = self.enumerator3.Current; + goto SUCCESS; + } + else + { + self.running3 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running3 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running3 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter3.SourceOnCompleted(Completed3Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed4(object state) + { + var self = (_CombineLatest)state; + self.running4 = false; + + try + { + if (self.awaiter4.GetResult()) + { + self.hasCurrent4 = true; + self.current4 = self.enumerator4.Current; + goto SUCCESS; + } + else + { + self.running4 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running4 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running4 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter4.SourceOnCompleted(Completed4Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed5(object state) + { + var self = (_CombineLatest)state; + self.running5 = false; + + try + { + if (self.awaiter5.GetResult()) + { + self.hasCurrent5 = true; + self.current5 = self.enumerator5.Current; + goto SUCCESS; + } + else + { + self.running5 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running5 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running5 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter5.SourceOnCompleted(Completed5Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed6(object state) + { + var self = (_CombineLatest)state; + self.running6 = false; + + try + { + if (self.awaiter6.GetResult()) + { + self.hasCurrent6 = true; + self.current6 = self.enumerator6.Current; + goto SUCCESS; + } + else + { + self.running6 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running6 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running6 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter6.SourceOnCompleted(Completed6Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed7(object state) + { + var self = (_CombineLatest)state; + self.running7 = false; + + try + { + if (self.awaiter7.GetResult()) + { + self.hasCurrent7 = true; + self.current7 = self.enumerator7.Current; + goto SUCCESS; + } + else + { + self.running7 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running7 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running7 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter7.SourceOnCompleted(Completed7Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed8(object state) + { + var self = (_CombineLatest)state; + self.running8 = false; + + try + { + if (self.awaiter8.GetResult()) + { + self.hasCurrent8 = true; + self.current8 = self.enumerator8.Current; + goto SUCCESS; + } + else + { + self.running8 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running8 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running8 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter8.SourceOnCompleted(Completed8Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed9(object state) + { + var self = (_CombineLatest)state; + self.running9 = false; + + try + { + if (self.awaiter9.GetResult()) + { + self.hasCurrent9 = true; + self.current9 = self.enumerator9.Current; + goto SUCCESS; + } + else + { + self.running9 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running9 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running9 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter9.SourceOnCompleted(Completed9Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed10(object state) + { + var self = (_CombineLatest)state; + self.running10 = false; + + try + { + if (self.awaiter10.GetResult()) + { + self.hasCurrent10 = true; + self.current10 = self.enumerator10.Current; + goto SUCCESS; + } + else + { + self.running10 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running10 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running10 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter10.SourceOnCompleted(Completed10Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed11(object state) + { + var self = (_CombineLatest)state; + self.running11 = false; + + try + { + if (self.awaiter11.GetResult()) + { + self.hasCurrent11 = true; + self.current11 = self.enumerator11.Current; + goto SUCCESS; + } + else + { + self.running11 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running11 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running11 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter11.SourceOnCompleted(Completed11Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed12(object state) + { + var self = (_CombineLatest)state; + self.running12 = false; + + try + { + if (self.awaiter12.GetResult()) + { + self.hasCurrent12 = true; + self.current12 = self.enumerator12.Current; + goto SUCCESS; + } + else + { + self.running12 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running12 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running12 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter12 = self.enumerator12.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter12.SourceOnCompleted(Completed12Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed13(object state) + { + var self = (_CombineLatest)state; + self.running13 = false; + + try + { + if (self.awaiter13.GetResult()) + { + self.hasCurrent13 = true; + self.current13 = self.enumerator13.Current; + goto SUCCESS; + } + else + { + self.running13 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running13 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running13 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter13 = self.enumerator13.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter13.SourceOnCompleted(Completed13Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed14(object state) + { + var self = (_CombineLatest)state; + self.running14 = false; + + try + { + if (self.awaiter14.GetResult()) + { + self.hasCurrent14 = true; + self.current14 = self.enumerator14.Current; + goto SUCCESS; + } + else + { + self.running14 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running14 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running14 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter14 = self.enumerator14.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter14.SourceOnCompleted(Completed14Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + bool TrySetResult() + { + if (hasCurrent1 && hasCurrent2 && hasCurrent3 && hasCurrent4 && hasCurrent5 && hasCurrent6 && hasCurrent7 && hasCurrent8 && hasCurrent9 && hasCurrent10 && hasCurrent11 && hasCurrent12 && hasCurrent13 && hasCurrent14) + { + result = resultSelector(current1, current2, current3, current4, current5, current6, current7, current8, current9, current10, current11, current12, current13, current14); + completionSource.TrySetResult(true); + return true; + } + else + { + return false; + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator1 != null) + { + await enumerator1.DisposeAsync(); + } + if (enumerator2 != null) + { + await enumerator2.DisposeAsync(); + } + if (enumerator3 != null) + { + await enumerator3.DisposeAsync(); + } + if (enumerator4 != null) + { + await enumerator4.DisposeAsync(); + } + if (enumerator5 != null) + { + await enumerator5.DisposeAsync(); + } + if (enumerator6 != null) + { + await enumerator6.DisposeAsync(); + } + if (enumerator7 != null) + { + await enumerator7.DisposeAsync(); + } + if (enumerator8 != null) + { + await enumerator8.DisposeAsync(); + } + if (enumerator9 != null) + { + await enumerator9.DisposeAsync(); + } + if (enumerator10 != null) + { + await enumerator10.DisposeAsync(); + } + if (enumerator11 != null) + { + await enumerator11.DisposeAsync(); + } + if (enumerator12 != null) + { + await enumerator12.DisposeAsync(); + } + if (enumerator13 != null) + { + await enumerator13.DisposeAsync(); + } + if (enumerator14 != null) + { + await enumerator14.DisposeAsync(); + } + } + } + } + + internal class CombineLatest : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + readonly IUniTaskAsyncEnumerable source9; + readonly IUniTaskAsyncEnumerable source10; + readonly IUniTaskAsyncEnumerable source11; + readonly IUniTaskAsyncEnumerable source12; + readonly IUniTaskAsyncEnumerable source13; + readonly IUniTaskAsyncEnumerable source14; + readonly IUniTaskAsyncEnumerable source15; + + readonly Func resultSelector; + + public CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, IUniTaskAsyncEnumerable source12, IUniTaskAsyncEnumerable source13, IUniTaskAsyncEnumerable source14, IUniTaskAsyncEnumerable source15, Func resultSelector) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + this.source9 = source9; + this.source10 = source10; + this.source11 = source11; + this.source12 = source12; + this.source13 = source13; + this.source14 = source14; + this.source15 = source15; + + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, resultSelector, cancellationToken); + } + + class _CombineLatest : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action Completed1Delegate = Completed1; + static readonly Action Completed2Delegate = Completed2; + static readonly Action Completed3Delegate = Completed3; + static readonly Action Completed4Delegate = Completed4; + static readonly Action Completed5Delegate = Completed5; + static readonly Action Completed6Delegate = Completed6; + static readonly Action Completed7Delegate = Completed7; + static readonly Action Completed8Delegate = Completed8; + static readonly Action Completed9Delegate = Completed9; + static readonly Action Completed10Delegate = Completed10; + static readonly Action Completed11Delegate = Completed11; + static readonly Action Completed12Delegate = Completed12; + static readonly Action Completed13Delegate = Completed13; + static readonly Action Completed14Delegate = Completed14; + static readonly Action Completed15Delegate = Completed15; + const int CompleteCount = 15; + + readonly IUniTaskAsyncEnumerable source1; + readonly IUniTaskAsyncEnumerable source2; + readonly IUniTaskAsyncEnumerable source3; + readonly IUniTaskAsyncEnumerable source4; + readonly IUniTaskAsyncEnumerable source5; + readonly IUniTaskAsyncEnumerable source6; + readonly IUniTaskAsyncEnumerable source7; + readonly IUniTaskAsyncEnumerable source8; + readonly IUniTaskAsyncEnumerable source9; + readonly IUniTaskAsyncEnumerable source10; + readonly IUniTaskAsyncEnumerable source11; + readonly IUniTaskAsyncEnumerable source12; + readonly IUniTaskAsyncEnumerable source13; + readonly IUniTaskAsyncEnumerable source14; + readonly IUniTaskAsyncEnumerable source15; + + readonly Func resultSelector; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator1; + UniTask.Awaiter awaiter1; + bool hasCurrent1; + bool running1; + T1 current1; + + IUniTaskAsyncEnumerator enumerator2; + UniTask.Awaiter awaiter2; + bool hasCurrent2; + bool running2; + T2 current2; + + IUniTaskAsyncEnumerator enumerator3; + UniTask.Awaiter awaiter3; + bool hasCurrent3; + bool running3; + T3 current3; + + IUniTaskAsyncEnumerator enumerator4; + UniTask.Awaiter awaiter4; + bool hasCurrent4; + bool running4; + T4 current4; + + IUniTaskAsyncEnumerator enumerator5; + UniTask.Awaiter awaiter5; + bool hasCurrent5; + bool running5; + T5 current5; + + IUniTaskAsyncEnumerator enumerator6; + UniTask.Awaiter awaiter6; + bool hasCurrent6; + bool running6; + T6 current6; + + IUniTaskAsyncEnumerator enumerator7; + UniTask.Awaiter awaiter7; + bool hasCurrent7; + bool running7; + T7 current7; + + IUniTaskAsyncEnumerator enumerator8; + UniTask.Awaiter awaiter8; + bool hasCurrent8; + bool running8; + T8 current8; + + IUniTaskAsyncEnumerator enumerator9; + UniTask.Awaiter awaiter9; + bool hasCurrent9; + bool running9; + T9 current9; + + IUniTaskAsyncEnumerator enumerator10; + UniTask.Awaiter awaiter10; + bool hasCurrent10; + bool running10; + T10 current10; + + IUniTaskAsyncEnumerator enumerator11; + UniTask.Awaiter awaiter11; + bool hasCurrent11; + bool running11; + T11 current11; + + IUniTaskAsyncEnumerator enumerator12; + UniTask.Awaiter awaiter12; + bool hasCurrent12; + bool running12; + T12 current12; + + IUniTaskAsyncEnumerator enumerator13; + UniTask.Awaiter awaiter13; + bool hasCurrent13; + bool running13; + T13 current13; + + IUniTaskAsyncEnumerator enumerator14; + UniTask.Awaiter awaiter14; + bool hasCurrent14; + bool running14; + T14 current14; + + IUniTaskAsyncEnumerator enumerator15; + UniTask.Awaiter awaiter15; + bool hasCurrent15; + bool running15; + T15 current15; + + int completedCount; + bool syncRunning; + TResult result; + + public _CombineLatest(IUniTaskAsyncEnumerable source1, IUniTaskAsyncEnumerable source2, IUniTaskAsyncEnumerable source3, IUniTaskAsyncEnumerable source4, IUniTaskAsyncEnumerable source5, IUniTaskAsyncEnumerable source6, IUniTaskAsyncEnumerable source7, IUniTaskAsyncEnumerable source8, IUniTaskAsyncEnumerable source9, IUniTaskAsyncEnumerable source10, IUniTaskAsyncEnumerable source11, IUniTaskAsyncEnumerable source12, IUniTaskAsyncEnumerable source13, IUniTaskAsyncEnumerable source14, IUniTaskAsyncEnumerable source15, Func resultSelector, CancellationToken cancellationToken) + { + this.source1 = source1; + this.source2 = source2; + this.source3 = source3; + this.source4 = source4; + this.source5 = source5; + this.source6 = source6; + this.source7 = source7; + this.source8 = source8; + this.source9 = source9; + this.source10 = source10; + this.source11 = source11; + this.source12 = source12; + this.source13 = source13; + this.source14 = source14; + this.source15 = source15; + + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current => result; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + if (completedCount == CompleteCount) return CompletedTasks.False; + + if (enumerator1 == null) + { + enumerator1 = source1.GetAsyncEnumerator(cancellationToken); + enumerator2 = source2.GetAsyncEnumerator(cancellationToken); + enumerator3 = source3.GetAsyncEnumerator(cancellationToken); + enumerator4 = source4.GetAsyncEnumerator(cancellationToken); + enumerator5 = source5.GetAsyncEnumerator(cancellationToken); + enumerator6 = source6.GetAsyncEnumerator(cancellationToken); + enumerator7 = source7.GetAsyncEnumerator(cancellationToken); + enumerator8 = source8.GetAsyncEnumerator(cancellationToken); + enumerator9 = source9.GetAsyncEnumerator(cancellationToken); + enumerator10 = source10.GetAsyncEnumerator(cancellationToken); + enumerator11 = source11.GetAsyncEnumerator(cancellationToken); + enumerator12 = source12.GetAsyncEnumerator(cancellationToken); + enumerator13 = source13.GetAsyncEnumerator(cancellationToken); + enumerator14 = source14.GetAsyncEnumerator(cancellationToken); + enumerator15 = source15.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + + AGAIN: + syncRunning = true; + if (!running1) + { + running1 = true; + awaiter1 = enumerator1.MoveNextAsync().GetAwaiter(); + if (awaiter1.IsCompleted) + { + Completed1(this); + } + else + { + awaiter1.SourceOnCompleted(Completed1Delegate, this); + } + } + if (!running2) + { + running2 = true; + awaiter2 = enumerator2.MoveNextAsync().GetAwaiter(); + if (awaiter2.IsCompleted) + { + Completed2(this); + } + else + { + awaiter2.SourceOnCompleted(Completed2Delegate, this); + } + } + if (!running3) + { + running3 = true; + awaiter3 = enumerator3.MoveNextAsync().GetAwaiter(); + if (awaiter3.IsCompleted) + { + Completed3(this); + } + else + { + awaiter3.SourceOnCompleted(Completed3Delegate, this); + } + } + if (!running4) + { + running4 = true; + awaiter4 = enumerator4.MoveNextAsync().GetAwaiter(); + if (awaiter4.IsCompleted) + { + Completed4(this); + } + else + { + awaiter4.SourceOnCompleted(Completed4Delegate, this); + } + } + if (!running5) + { + running5 = true; + awaiter5 = enumerator5.MoveNextAsync().GetAwaiter(); + if (awaiter5.IsCompleted) + { + Completed5(this); + } + else + { + awaiter5.SourceOnCompleted(Completed5Delegate, this); + } + } + if (!running6) + { + running6 = true; + awaiter6 = enumerator6.MoveNextAsync().GetAwaiter(); + if (awaiter6.IsCompleted) + { + Completed6(this); + } + else + { + awaiter6.SourceOnCompleted(Completed6Delegate, this); + } + } + if (!running7) + { + running7 = true; + awaiter7 = enumerator7.MoveNextAsync().GetAwaiter(); + if (awaiter7.IsCompleted) + { + Completed7(this); + } + else + { + awaiter7.SourceOnCompleted(Completed7Delegate, this); + } + } + if (!running8) + { + running8 = true; + awaiter8 = enumerator8.MoveNextAsync().GetAwaiter(); + if (awaiter8.IsCompleted) + { + Completed8(this); + } + else + { + awaiter8.SourceOnCompleted(Completed8Delegate, this); + } + } + if (!running9) + { + running9 = true; + awaiter9 = enumerator9.MoveNextAsync().GetAwaiter(); + if (awaiter9.IsCompleted) + { + Completed9(this); + } + else + { + awaiter9.SourceOnCompleted(Completed9Delegate, this); + } + } + if (!running10) + { + running10 = true; + awaiter10 = enumerator10.MoveNextAsync().GetAwaiter(); + if (awaiter10.IsCompleted) + { + Completed10(this); + } + else + { + awaiter10.SourceOnCompleted(Completed10Delegate, this); + } + } + if (!running11) + { + running11 = true; + awaiter11 = enumerator11.MoveNextAsync().GetAwaiter(); + if (awaiter11.IsCompleted) + { + Completed11(this); + } + else + { + awaiter11.SourceOnCompleted(Completed11Delegate, this); + } + } + if (!running12) + { + running12 = true; + awaiter12 = enumerator12.MoveNextAsync().GetAwaiter(); + if (awaiter12.IsCompleted) + { + Completed12(this); + } + else + { + awaiter12.SourceOnCompleted(Completed12Delegate, this); + } + } + if (!running13) + { + running13 = true; + awaiter13 = enumerator13.MoveNextAsync().GetAwaiter(); + if (awaiter13.IsCompleted) + { + Completed13(this); + } + else + { + awaiter13.SourceOnCompleted(Completed13Delegate, this); + } + } + if (!running14) + { + running14 = true; + awaiter14 = enumerator14.MoveNextAsync().GetAwaiter(); + if (awaiter14.IsCompleted) + { + Completed14(this); + } + else + { + awaiter14.SourceOnCompleted(Completed14Delegate, this); + } + } + if (!running15) + { + running15 = true; + awaiter15 = enumerator15.MoveNextAsync().GetAwaiter(); + if (awaiter15.IsCompleted) + { + Completed15(this); + } + else + { + awaiter15.SourceOnCompleted(Completed15Delegate, this); + } + } + + if (!running1 || !running2 || !running3 || !running4 || !running5 || !running6 || !running7 || !running8 || !running9 || !running10 || !running11 || !running12 || !running13 || !running14 || !running15) + { + goto AGAIN; + } + syncRunning = false; + + return new UniTask(this, completionSource.Version); + } + + static void Completed1(object state) + { + var self = (_CombineLatest)state; + self.running1 = false; + + try + { + if (self.awaiter1.GetResult()) + { + self.hasCurrent1 = true; + self.current1 = self.enumerator1.Current; + goto SUCCESS; + } + else + { + self.running1 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running1 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running1 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter1.SourceOnCompleted(Completed1Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed2(object state) + { + var self = (_CombineLatest)state; + self.running2 = false; + + try + { + if (self.awaiter2.GetResult()) + { + self.hasCurrent2 = true; + self.current2 = self.enumerator2.Current; + goto SUCCESS; + } + else + { + self.running2 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running2 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running2 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter2.SourceOnCompleted(Completed2Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed3(object state) + { + var self = (_CombineLatest)state; + self.running3 = false; + + try + { + if (self.awaiter3.GetResult()) + { + self.hasCurrent3 = true; + self.current3 = self.enumerator3.Current; + goto SUCCESS; + } + else + { + self.running3 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running3 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running3 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter3.SourceOnCompleted(Completed3Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed4(object state) + { + var self = (_CombineLatest)state; + self.running4 = false; + + try + { + if (self.awaiter4.GetResult()) + { + self.hasCurrent4 = true; + self.current4 = self.enumerator4.Current; + goto SUCCESS; + } + else + { + self.running4 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running4 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running4 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter4.SourceOnCompleted(Completed4Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed5(object state) + { + var self = (_CombineLatest)state; + self.running5 = false; + + try + { + if (self.awaiter5.GetResult()) + { + self.hasCurrent5 = true; + self.current5 = self.enumerator5.Current; + goto SUCCESS; + } + else + { + self.running5 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running5 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running5 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter5.SourceOnCompleted(Completed5Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed6(object state) + { + var self = (_CombineLatest)state; + self.running6 = false; + + try + { + if (self.awaiter6.GetResult()) + { + self.hasCurrent6 = true; + self.current6 = self.enumerator6.Current; + goto SUCCESS; + } + else + { + self.running6 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running6 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running6 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter6.SourceOnCompleted(Completed6Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed7(object state) + { + var self = (_CombineLatest)state; + self.running7 = false; + + try + { + if (self.awaiter7.GetResult()) + { + self.hasCurrent7 = true; + self.current7 = self.enumerator7.Current; + goto SUCCESS; + } + else + { + self.running7 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running7 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running7 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter7.SourceOnCompleted(Completed7Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed8(object state) + { + var self = (_CombineLatest)state; + self.running8 = false; + + try + { + if (self.awaiter8.GetResult()) + { + self.hasCurrent8 = true; + self.current8 = self.enumerator8.Current; + goto SUCCESS; + } + else + { + self.running8 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running8 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running8 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter8.SourceOnCompleted(Completed8Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed9(object state) + { + var self = (_CombineLatest)state; + self.running9 = false; + + try + { + if (self.awaiter9.GetResult()) + { + self.hasCurrent9 = true; + self.current9 = self.enumerator9.Current; + goto SUCCESS; + } + else + { + self.running9 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running9 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running9 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter9.SourceOnCompleted(Completed9Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed10(object state) + { + var self = (_CombineLatest)state; + self.running10 = false; + + try + { + if (self.awaiter10.GetResult()) + { + self.hasCurrent10 = true; + self.current10 = self.enumerator10.Current; + goto SUCCESS; + } + else + { + self.running10 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running10 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running10 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter10.SourceOnCompleted(Completed10Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed11(object state) + { + var self = (_CombineLatest)state; + self.running11 = false; + + try + { + if (self.awaiter11.GetResult()) + { + self.hasCurrent11 = true; + self.current11 = self.enumerator11.Current; + goto SUCCESS; + } + else + { + self.running11 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running11 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running11 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter11.SourceOnCompleted(Completed11Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed12(object state) + { + var self = (_CombineLatest)state; + self.running12 = false; + + try + { + if (self.awaiter12.GetResult()) + { + self.hasCurrent12 = true; + self.current12 = self.enumerator12.Current; + goto SUCCESS; + } + else + { + self.running12 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running12 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running12 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter12 = self.enumerator12.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter12.SourceOnCompleted(Completed12Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed13(object state) + { + var self = (_CombineLatest)state; + self.running13 = false; + + try + { + if (self.awaiter13.GetResult()) + { + self.hasCurrent13 = true; + self.current13 = self.enumerator13.Current; + goto SUCCESS; + } + else + { + self.running13 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running13 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running13 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter13 = self.enumerator13.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter13.SourceOnCompleted(Completed13Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed14(object state) + { + var self = (_CombineLatest)state; + self.running14 = false; + + try + { + if (self.awaiter14.GetResult()) + { + self.hasCurrent14 = true; + self.current14 = self.enumerator14.Current; + goto SUCCESS; + } + else + { + self.running14 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running14 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running14 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter14 = self.enumerator14.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter14.SourceOnCompleted(Completed14Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + static void Completed15(object state) + { + var self = (_CombineLatest)state; + self.running15 = false; + + try + { + if (self.awaiter15.GetResult()) + { + self.hasCurrent15 = true; + self.current15 = self.enumerator15.Current; + goto SUCCESS; + } + else + { + self.running15 = true; // as complete, no more call MoveNextAsync. + if (Interlocked.Increment(ref self.completedCount) == CompleteCount) + { + goto COMPLETE; + } + return; + } + } + catch (Exception ex) + { + self.running15 = true; // as complete, no more call MoveNextAsync. + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + SUCCESS: + if (!self.TrySetResult()) + { + if (self.syncRunning) return; + self.running15 = true; // as complete, no more call MoveNextAsync. + try + { + self.awaiter15 = self.enumerator15.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } + + self.awaiter15.SourceOnCompleted(Completed15Delegate, self); + } + return; + COMPLETE: + self.completionSource.TrySetResult(false); + return; + } + + bool TrySetResult() + { + if (hasCurrent1 && hasCurrent2 && hasCurrent3 && hasCurrent4 && hasCurrent5 && hasCurrent6 && hasCurrent7 && hasCurrent8 && hasCurrent9 && hasCurrent10 && hasCurrent11 && hasCurrent12 && hasCurrent13 && hasCurrent14 && hasCurrent15) + { + result = resultSelector(current1, current2, current3, current4, current5, current6, current7, current8, current9, current10, current11, current12, current13, current14, current15); + completionSource.TrySetResult(true); + return true; + } + else + { + return false; + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator1 != null) + { + await enumerator1.DisposeAsync(); + } + if (enumerator2 != null) + { + await enumerator2.DisposeAsync(); + } + if (enumerator3 != null) + { + await enumerator3.DisposeAsync(); + } + if (enumerator4 != null) + { + await enumerator4.DisposeAsync(); + } + if (enumerator5 != null) + { + await enumerator5.DisposeAsync(); + } + if (enumerator6 != null) + { + await enumerator6.DisposeAsync(); + } + if (enumerator7 != null) + { + await enumerator7.DisposeAsync(); + } + if (enumerator8 != null) + { + await enumerator8.DisposeAsync(); + } + if (enumerator9 != null) + { + await enumerator9.DisposeAsync(); + } + if (enumerator10 != null) + { + await enumerator10.DisposeAsync(); + } + if (enumerator11 != null) + { + await enumerator11.DisposeAsync(); + } + if (enumerator12 != null) + { + await enumerator12.DisposeAsync(); + } + if (enumerator13 != null) + { + await enumerator13.DisposeAsync(); + } + if (enumerator14 != null) + { + await enumerator14.DisposeAsync(); + } + if (enumerator15 != null) + { + await enumerator15.DisposeAsync(); + } + } + } + } + +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/CombineLatest.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/CombineLatest.cs.meta new file mode 100644 index 0000000..4e8b1c3 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/CombineLatest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6cb07f6e88287e34d9b9301a572284a5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Concat.cs b/Assets/Plugins/UniTask/Runtime/Linq/Concat.cs new file mode 100644 index 0000000..715795e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Concat.cs @@ -0,0 +1,164 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Concat(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second) + { + Error.ThrowArgumentNullException(first, nameof(first)); + Error.ThrowArgumentNullException(second, nameof(second)); + + return new Concat(first, second); + } + } + + internal sealed class Concat : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable first; + readonly IUniTaskAsyncEnumerable second; + + public Concat(IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second) + { + this.first = first; + this.second = second; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Concat(first, second, cancellationToken); + } + + sealed class _Concat : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + enum IteratingState + { + IteratingFirst, + IteratingSecond, + Complete + } + + readonly IUniTaskAsyncEnumerable first; + readonly IUniTaskAsyncEnumerable second; + CancellationToken cancellationToken; + + IteratingState iteratingState; + + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + + public _Concat(IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, CancellationToken cancellationToken) + { + this.first = first; + this.second = second; + this.cancellationToken = cancellationToken; + this.iteratingState = IteratingState.IteratingFirst; + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (iteratingState == IteratingState.Complete) return CompletedTasks.False; + + completionSource.Reset(); + StartIterate(); + return new UniTask(this, completionSource.Version); + } + + void StartIterate() + { + if (enumerator == null) + { + if (iteratingState == IteratingState.IteratingFirst) + { + enumerator = first.GetAsyncEnumerator(cancellationToken); + } + else if (iteratingState == IteratingState.IteratingSecond) + { + enumerator = second.GetAsyncEnumerator(cancellationToken); + } + } + + try + { + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + + if (awaiter.IsCompleted) + { + MoveNextCoreDelegate(this); + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + + static void MoveNextCore(object state) + { + var self = (_Concat)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + self.Current = self.enumerator.Current; + self.completionSource.TrySetResult(true); + } + else + { + if (self.iteratingState == IteratingState.IteratingFirst) + { + self.RunSecondAfterDisposeAsync().Forget(); + return; + } + + self.iteratingState = IteratingState.Complete; + self.completionSource.TrySetResult(false); + } + } + } + + async UniTaskVoid RunSecondAfterDisposeAsync() + { + try + { + await enumerator.DisposeAsync(); + enumerator = null; + awaiter = default; + iteratingState = IteratingState.IteratingSecond; + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + + StartIterate(); + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Concat.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Concat.cs.meta new file mode 100644 index 0000000..6bfcf31 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Concat.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7cb9e19c449127a459851a135ce7d527 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Contains.cs b/Assets/Plugins/UniTask/Runtime/Linq/Contains.cs new file mode 100644 index 0000000..a93f566 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Contains.cs @@ -0,0 +1,50 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask ContainsAsync(this IUniTaskAsyncEnumerable source, TSource value, CancellationToken cancellationToken = default) + { + return ContainsAsync(source, value, EqualityComparer.Default, cancellationToken); + } + + public static UniTask ContainsAsync(this IUniTaskAsyncEnumerable source, TSource value, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return Contains.ContainsAsync(source, value, comparer, cancellationToken); + } + } + + internal static class Contains + { + internal static async UniTask ContainsAsync(IUniTaskAsyncEnumerable source, TSource value, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + if (comparer.Equals(value, e.Current)) + { + return true; + } + } + + return false; + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Contains.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Contains.cs.meta new file mode 100644 index 0000000..9bd414b --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Contains.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 36ab06d30f3223048b4f676e05431a7f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Count.cs b/Assets/Plugins/UniTask/Runtime/Linq/Count.cs new file mode 100644 index 0000000..807b529 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Count.cs @@ -0,0 +1,144 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask CountAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Count.CountAsync(source, cancellationToken); + } + + public static UniTask CountAsync(this IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return Count.CountAsync(source, predicate, cancellationToken); + } + + public static UniTask CountAwaitAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return Count.CountAwaitAsync(source, predicate, cancellationToken); + } + + public static UniTask CountAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return Count.CountAwaitWithCancellationAsync(source, predicate, cancellationToken); + } + } + + internal static class Count + { + internal static async UniTask CountAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + var count = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked { count++; } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return count; + } + + internal static async UniTask CountAsync(IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken) + { + var count = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + if (predicate(e.Current)) + { + checked { count++; } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return count; + } + + internal static async UniTask CountAwaitAsync(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + { + var count = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + if (await predicate(e.Current)) + { + checked { count++; } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return count; + } + + internal static async UniTask CountAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + { + var count = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + if (await predicate(e.Current, cancellationToken)) + { + checked { count++; } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return count; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Count.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Count.cs.meta new file mode 100644 index 0000000..35db332 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Count.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e606d38eed688574bb2ba89d983cc9bb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Create.cs b/Assets/Plugins/UniTask/Runtime/Linq/Create.cs new file mode 100644 index 0000000..fa34774 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Create.cs @@ -0,0 +1,184 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Create(Func, CancellationToken, UniTask> create) + { + Error.ThrowArgumentNullException(create, nameof(create)); + return new Create(create); + } + } + + public interface IAsyncWriter + { + UniTask YieldAsync(T value); + } + + internal sealed class Create : IUniTaskAsyncEnumerable + { + readonly Func, CancellationToken, UniTask> create; + + public Create(Func, CancellationToken, UniTask> create) + { + this.create = create; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Create(create, cancellationToken); + } + + sealed class _Create : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly Func, CancellationToken, UniTask> create; + readonly CancellationToken cancellationToken; + + int state = -1; + AsyncWriter writer; + + public _Create(Func, CancellationToken, UniTask> create, CancellationToken cancellationToken) + { + this.create = create; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public T Current { get; private set; } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + writer.Dispose(); + return default; + } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + try + { + switch (state) + { + case -1: // init + { + writer = new AsyncWriter(this); + RunWriterTask(create(writer, cancellationToken)).Forget(); + if (Volatile.Read(ref state) == -2) + { + return; // complete synchronously + } + state = 0; // wait YieldAsync, it set TrySetResult(true) + return; + } + case 0: + writer.SignalWriter(); + return; + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + } + + async UniTaskVoid RunWriterTask(UniTask task) + { + try + { + await task; + goto DONE; + } + catch (Exception ex) + { + Volatile.Write(ref state, -2); + completionSource.TrySetException(ex); + return; + } + + DONE: + Volatile.Write(ref state, -2); + completionSource.TrySetResult(false); + } + + public void SetResult(T value) + { + Current = value; + completionSource.TrySetResult(true); + } + } + + sealed class AsyncWriter : IUniTaskSource, IAsyncWriter, IDisposable + { + readonly _Create enumerator; + + UniTaskCompletionSourceCore core; + + public AsyncWriter(_Create enumerator) + { + this.enumerator = enumerator; + } + + public void Dispose() + { + var status = core.GetStatus(core.Version); + if (status == UniTaskStatus.Pending) + { + core.TrySetCanceled(); + } + } + + public void GetResult(short token) + { + core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTask YieldAsync(T value) + { + core.Reset(); + enumerator.SetResult(value); + return new UniTask(this, core.Version); + } + + public void SignalWriter() + { + core.TrySetResult(AsyncUnit.Default); + } + } + } +} diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Create.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Create.cs.meta new file mode 100644 index 0000000..5aba456 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Create.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0202f723469f93945afa063bfb440d15 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/DefaultIfEmpty.cs b/Assets/Plugins/UniTask/Runtime/Linq/DefaultIfEmpty.cs new file mode 100644 index 0000000..3d21bd7 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/DefaultIfEmpty.cs @@ -0,0 +1,142 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable DefaultIfEmpty(this IUniTaskAsyncEnumerable source) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new DefaultIfEmpty(source, default); + } + + public static IUniTaskAsyncEnumerable DefaultIfEmpty(this IUniTaskAsyncEnumerable source, TSource defaultValue) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new DefaultIfEmpty(source, defaultValue); + } + } + + internal sealed class DefaultIfEmpty : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly TSource defaultValue; + + public DefaultIfEmpty(IUniTaskAsyncEnumerable source, TSource defaultValue) + { + this.source = source; + this.defaultValue = defaultValue; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _DefaultIfEmpty(source, defaultValue, cancellationToken); + } + + sealed class _DefaultIfEmpty : MoveNextSource, IUniTaskAsyncEnumerator + { + enum IteratingState : byte + { + Empty, + Iterating, + Completed + } + + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable source; + readonly TSource defaultValue; + CancellationToken cancellationToken; + + IteratingState iteratingState; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + + public _DefaultIfEmpty(IUniTaskAsyncEnumerable source, TSource defaultValue, CancellationToken cancellationToken) + { + this.source = source; + this.defaultValue = defaultValue; + this.cancellationToken = cancellationToken; + + this.iteratingState = IteratingState.Empty; + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (iteratingState == IteratingState.Completed) + { + return CompletedTasks.False; + } + + if (enumerator == null) + { + enumerator = source.GetAsyncEnumerator(cancellationToken); + } + + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + + if (awaiter.IsCompleted) + { + MoveNextCore(this); + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + + return new UniTask(this, completionSource.Version); + } + + static void MoveNextCore(object state) + { + var self = (_DefaultIfEmpty)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + self.iteratingState = IteratingState.Iterating; + self.Current = self.enumerator.Current; + self.completionSource.TrySetResult(true); + } + else + { + if (self.iteratingState == IteratingState.Empty) + { + self.iteratingState = IteratingState.Completed; + + self.Current = self.defaultValue; + self.completionSource.TrySetResult(true); + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } + } + +} diff --git a/Assets/Plugins/UniTask/Runtime/Linq/DefaultIfEmpty.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/DefaultIfEmpty.cs.meta new file mode 100644 index 0000000..5aa5993 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/DefaultIfEmpty.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 19e437c039ad7e1478dbce1779ef8660 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Distinct.cs b/Assets/Plugins/UniTask/Runtime/Linq/Distinct.cs new file mode 100644 index 0000000..85bf795 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Distinct.cs @@ -0,0 +1,277 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Distinct(this IUniTaskAsyncEnumerable source) + { + return Distinct(source, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable Distinct(this IUniTaskAsyncEnumerable source, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new Distinct(source, comparer); + } + + public static IUniTaskAsyncEnumerable Distinct(this IUniTaskAsyncEnumerable source, Func keySelector) + { + return Distinct(source, keySelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable Distinct(this IUniTaskAsyncEnumerable source, Func keySelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new Distinct(source, keySelector, comparer); + } + + public static IUniTaskAsyncEnumerable DistinctAwait(this IUniTaskAsyncEnumerable source, Func> keySelector) + { + return DistinctAwait(source, keySelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable DistinctAwait(this IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new DistinctAwait(source, keySelector, comparer); + } + + public static IUniTaskAsyncEnumerable DistinctAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector) + { + return DistinctAwaitWithCancellation(source, keySelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable DistinctAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new DistinctAwaitWithCancellation(source, keySelector, comparer); + } + } + + internal sealed class Distinct : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly IEqualityComparer comparer; + + public Distinct(IUniTaskAsyncEnumerable source, IEqualityComparer comparer) + { + this.source = source; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Distinct(source, comparer, cancellationToken); + } + + class _Distinct : AsyncEnumeratorBase + { + readonly HashSet set; + + public _Distinct(IUniTaskAsyncEnumerable source, IEqualityComparer comparer, CancellationToken cancellationToken) + + : base(source, cancellationToken) + { + this.set = new HashSet(comparer); + } + + protected override bool TryMoveNextCore(bool sourceHasCurrent, out bool result) + { + if (sourceHasCurrent) + { + var v = SourceCurrent; + if (set.Add(v)) + { + Current = v; + result = true; + return true; + } + else + { + result = default; + return false; + } + } + + result = false; + return true; + } + } + } + + internal sealed class Distinct : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func keySelector; + readonly IEqualityComparer comparer; + + public Distinct(IUniTaskAsyncEnumerable source, Func keySelector, IEqualityComparer comparer) + { + this.source = source; + this.keySelector = keySelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Distinct(source, keySelector, comparer, cancellationToken); + } + + class _Distinct : AsyncEnumeratorBase + { + readonly HashSet set; + readonly Func keySelector; + + public _Distinct(IUniTaskAsyncEnumerable source, Func keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) + + : base(source, cancellationToken) + { + this.set = new HashSet(comparer); + this.keySelector = keySelector; + } + + protected override bool TryMoveNextCore(bool sourceHasCurrent, out bool result) + { + if (sourceHasCurrent) + { + var v = SourceCurrent; + if (set.Add(keySelector(v))) + { + Current = v; + result = true; + return true; + } + else + { + result = default; + return false; + } + } + + result = false; + return true; + } + } + } + + internal sealed class DistinctAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> keySelector; + readonly IEqualityComparer comparer; + + public DistinctAwait(IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) + { + this.source = source; + this.keySelector = keySelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _DistinctAwait(source, keySelector, comparer, cancellationToken); + } + + class _DistinctAwait : AsyncEnumeratorAwaitSelectorBase + { + readonly HashSet set; + readonly Func> keySelector; + + public _DistinctAwait(IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) + + : base(source, cancellationToken) + { + this.set = new HashSet(comparer); + this.keySelector = keySelector; + } + + protected override UniTask TransformAsync(TSource sourceCurrent) + { + return keySelector(sourceCurrent); + } + + protected override bool TrySetCurrentCore(TKey awaitResult, out bool terminateIteration) + { + if (set.Add(awaitResult)) + { + Current = SourceCurrent; + terminateIteration = false; + return true; + } + else + { + terminateIteration = false; + return false; + } + } + } + } + + internal sealed class DistinctAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> keySelector; + readonly IEqualityComparer comparer; + + public DistinctAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) + { + this.source = source; + this.keySelector = keySelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _DistinctAwaitWithCancellation(source, keySelector, comparer, cancellationToken); + } + + class _DistinctAwaitWithCancellation : AsyncEnumeratorAwaitSelectorBase + { + readonly HashSet set; + readonly Func> keySelector; + + public _DistinctAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) + + : base(source, cancellationToken) + { + this.set = new HashSet(comparer); + this.keySelector = keySelector; + } + + protected override UniTask TransformAsync(TSource sourceCurrent) + { + return keySelector(sourceCurrent, cancellationToken); + } + + protected override bool TrySetCurrentCore(TKey awaitResult, out bool terminateIteration) + { + if (set.Add(awaitResult)) + { + Current = SourceCurrent; + terminateIteration = false; + return true; + } + else + { + terminateIteration = false; + return false; + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Distinct.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Distinct.cs.meta new file mode 100644 index 0000000..61804b7 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Distinct.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8f09903be66e5d943b243d7c19cb3811 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/DistinctUntilChanged.cs b/Assets/Plugins/UniTask/Runtime/Linq/DistinctUntilChanged.cs new file mode 100644 index 0000000..d91bef9 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/DistinctUntilChanged.cs @@ -0,0 +1,662 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable DistinctUntilChanged(this IUniTaskAsyncEnumerable source) + { + return DistinctUntilChanged(source, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable DistinctUntilChanged(this IUniTaskAsyncEnumerable source, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new DistinctUntilChanged(source, comparer); + } + + public static IUniTaskAsyncEnumerable DistinctUntilChanged(this IUniTaskAsyncEnumerable source, Func keySelector) + { + return DistinctUntilChanged(source, keySelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable DistinctUntilChanged(this IUniTaskAsyncEnumerable source, Func keySelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new DistinctUntilChanged(source, keySelector, comparer); + } + + public static IUniTaskAsyncEnumerable DistinctUntilChangedAwait(this IUniTaskAsyncEnumerable source, Func> keySelector) + { + return DistinctUntilChangedAwait(source, keySelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable DistinctUntilChangedAwait(this IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new DistinctUntilChangedAwait(source, keySelector, comparer); + } + + public static IUniTaskAsyncEnumerable DistinctUntilChangedAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector) + { + return DistinctUntilChangedAwaitWithCancellation(source, keySelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable DistinctUntilChangedAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new DistinctUntilChangedAwaitWithCancellation(source, keySelector, comparer); + } + } + + internal sealed class DistinctUntilChanged : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly IEqualityComparer comparer; + + public DistinctUntilChanged(IUniTaskAsyncEnumerable source, IEqualityComparer comparer) + { + this.source = source; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _DistinctUntilChanged(source, comparer, cancellationToken); + } + + sealed class _DistinctUntilChanged : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly IEqualityComparer comparer; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + Action moveNextAction; + + public _DistinctUntilChanged(IUniTaskAsyncEnumerable source, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.source = source; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + REPEAT: + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case -3; + } + else + { + state = -3; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case -3: // first + if (awaiter.GetResult()) + { + Current = enumerator.Current; + goto CONTINUE; + } + else + { + goto DONE; + } + case 0: // normal + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + var v = enumerator.Current; + if (!comparer.Equals(Current, v)) + { + Current = v; + goto CONTINUE; + } + else + { + state = 0; + goto REPEAT; + } + } + else + { + goto DONE; + } + case -2: + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + return enumerator.DisposeAsync(); + } + } + } + + internal sealed class DistinctUntilChanged : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func keySelector; + readonly IEqualityComparer comparer; + + public DistinctUntilChanged(IUniTaskAsyncEnumerable source, Func keySelector, IEqualityComparer comparer) + { + this.source = source; + this.keySelector = keySelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _DistinctUntilChanged(source, keySelector, comparer, cancellationToken); + } + + sealed class _DistinctUntilChanged : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func keySelector; + readonly IEqualityComparer comparer; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + Action moveNextAction; + TKey prev; + + public _DistinctUntilChanged(IUniTaskAsyncEnumerable source, Func keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.source = source; + this.keySelector = keySelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + REPEAT: + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case -3; + } + else + { + state = -3; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case -3: // first + if (awaiter.GetResult()) + { + Current = enumerator.Current; + goto CONTINUE; + } + else + { + goto DONE; + } + case 0: // normal + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + var v = enumerator.Current; + var key = keySelector(v); + if (!comparer.Equals(prev, key)) + { + prev = key; + Current = v; + goto CONTINUE; + } + else + { + state = 0; + goto REPEAT; + } + } + else + { + goto DONE; + } + case -2: + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + return enumerator.DisposeAsync(); + } + } + } + + internal sealed class DistinctUntilChangedAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> keySelector; + readonly IEqualityComparer comparer; + + public DistinctUntilChangedAwait(IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) + { + this.source = source; + this.keySelector = keySelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _DistinctUntilChangedAwait(source, keySelector, comparer, cancellationToken); + } + + sealed class _DistinctUntilChangedAwait : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> keySelector; + readonly IEqualityComparer comparer; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + UniTask.Awaiter awaiter2; + Action moveNextAction; + TSource enumeratorCurrent; + TKey prev; + + public _DistinctUntilChangedAwait(IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.source = source; + this.keySelector = keySelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + REPEAT: + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case -3; + } + else + { + state = -3; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case -3: // first + if (awaiter.GetResult()) + { + Current = enumerator.Current; + goto CONTINUE; + } + else + { + goto DONE; + } + case 0: // normal + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + enumeratorCurrent = enumerator.Current; + awaiter2 = keySelector(enumeratorCurrent).GetAwaiter(); + if (awaiter2.IsCompleted) + { + goto case 2; + } + else + { + state = 2; + awaiter2.UnsafeOnCompleted(moveNextAction); + return; + } + } + else + { + goto DONE; + } + case 2: + var key = awaiter2.GetResult(); + if (!comparer.Equals(prev, key)) + { + prev = key; + Current = enumeratorCurrent; + goto CONTINUE; + } + else + { + state = 0; + goto REPEAT; + } + case -2: + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + return enumerator.DisposeAsync(); + } + } + } + + internal sealed class DistinctUntilChangedAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> keySelector; + readonly IEqualityComparer comparer; + + public DistinctUntilChangedAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) + { + this.source = source; + this.keySelector = keySelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _DistinctUntilChangedAwaitWithCancellation(source, keySelector, comparer, cancellationToken); + } + + sealed class _DistinctUntilChangedAwaitWithCancellation : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> keySelector; + readonly IEqualityComparer comparer; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + UniTask.Awaiter awaiter2; + Action moveNextAction; + TSource enumeratorCurrent; + TKey prev; + + public _DistinctUntilChangedAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.source = source; + this.keySelector = keySelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + REPEAT: + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case -3; + } + else + { + state = -3; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case -3: // first + if (awaiter.GetResult()) + { + Current = enumerator.Current; + goto CONTINUE; + } + else + { + goto DONE; + } + case 0: // normal + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + enumeratorCurrent = enumerator.Current; + awaiter2 = keySelector(enumeratorCurrent, cancellationToken).GetAwaiter(); + if (awaiter2.IsCompleted) + { + goto case 2; + } + else + { + state = 2; + awaiter2.UnsafeOnCompleted(moveNextAction); + return; + } + } + else + { + goto DONE; + } + case 2: + var key = awaiter2.GetResult(); + if (!comparer.Equals(prev, key)) + { + prev = key; + Current = enumeratorCurrent; + goto CONTINUE; + } + else + { + state = 0; + goto REPEAT; + } + case -2: + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + return enumerator.DisposeAsync(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/DistinctUntilChanged.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/DistinctUntilChanged.cs.meta new file mode 100644 index 0000000..84cddf8 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/DistinctUntilChanged.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0351f6767df7e644b935d4d599968162 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Do.cs b/Assets/Plugins/UniTask/Runtime/Linq/Do.cs new file mode 100644 index 0000000..f6df368 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Do.cs @@ -0,0 +1,258 @@ +using Cysharp.Threading.Tasks; +using Cysharp.Threading.Tasks.Internal; +using Cysharp.Threading.Tasks.Linq; +using System; +using System.Threading; +using System.Threading.Tasks; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Do(this IUniTaskAsyncEnumerable source, Action onNext) + { + Error.ThrowArgumentNullException(source, nameof(source)); + return source.Do(onNext, null, null); + } + + public static IUniTaskAsyncEnumerable Do(this IUniTaskAsyncEnumerable source, Action onNext, Action onError) + { + Error.ThrowArgumentNullException(source, nameof(source)); + return source.Do(onNext, onError, null); + } + + public static IUniTaskAsyncEnumerable Do(this IUniTaskAsyncEnumerable source, Action onNext, Action onCompleted) + { + Error.ThrowArgumentNullException(source, nameof(source)); + return source.Do(onNext, null, onCompleted); + } + + public static IUniTaskAsyncEnumerable Do(this IUniTaskAsyncEnumerable source, Action onNext, Action onError, Action onCompleted) + { + Error.ThrowArgumentNullException(source, nameof(source)); + return new Do(source, onNext, onError, onCompleted); + } + + public static IUniTaskAsyncEnumerable Do(this IUniTaskAsyncEnumerable source, IObserver observer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(observer, nameof(observer)); + + return source.Do(observer.OnNext, observer.OnError, observer.OnCompleted); // alloc delegate. + } + + // not yet impl. + + //public static IUniTaskAsyncEnumerable DoAwait(this IUniTaskAsyncEnumerable source, Func onNext) + //{ + // throw new NotImplementedException(); + //} + + //public static IUniTaskAsyncEnumerable DoAwait(this IUniTaskAsyncEnumerable source, Func onNext, Func onError) + //{ + // throw new NotImplementedException(); + //} + + //public static IUniTaskAsyncEnumerable DoAwait(this IUniTaskAsyncEnumerable source, Func onNext, Func onCompleted) + //{ + // throw new NotImplementedException(); + //} + + //public static IUniTaskAsyncEnumerable DoAwait(this IUniTaskAsyncEnumerable source, Func onNext, Func onError, Func onCompleted) + //{ + // throw new NotImplementedException(); + //} + + //public static IUniTaskAsyncEnumerable DoAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func onNext) + //{ + // throw new NotImplementedException(); + //} + + //public static IUniTaskAsyncEnumerable DoAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func onNext, Func onError) + //{ + // throw new NotImplementedException(); + //} + + //public static IUniTaskAsyncEnumerable DoAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func onNext, Func onCompleted) + //{ + // throw new NotImplementedException(); + //} + + //public static IUniTaskAsyncEnumerable DoAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func onNext, Func onError, Func onCompleted) + //{ + // throw new NotImplementedException(); + //} + } + + internal sealed class Do : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Action onNext; + readonly Action onError; + readonly Action onCompleted; + + public Do(IUniTaskAsyncEnumerable source, Action onNext, Action onError, Action onCompleted) + { + this.source = source; + this.onNext = onNext; + this.onError = onError; + this.onCompleted = onCompleted; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Do(source, onNext, onError, onCompleted, cancellationToken); + } + + sealed class _Do : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable source; + readonly Action onNext; + readonly Action onError; + readonly Action onCompleted; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + + public _Do(IUniTaskAsyncEnumerable source, Action onNext, Action onError, Action onCompleted, CancellationToken cancellationToken) + { + this.source = source; + this.onNext = onNext; + this.onError = onError; + this.onCompleted = onCompleted; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + bool isCompleted = false; + try + { + if (enumerator == null) + { + enumerator = source.GetAsyncEnumerator(cancellationToken); + } + + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + isCompleted = awaiter.IsCompleted; + } + catch (Exception ex) + { + CallTrySetExceptionAfterNotification(ex); + return new UniTask(this, completionSource.Version); + } + + if (isCompleted) + { + MoveNextCore(this); + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + + return new UniTask(this, completionSource.Version); + } + + void CallTrySetExceptionAfterNotification(Exception ex) + { + if (onError != null) + { + try + { + onError(ex); + } + catch (Exception ex2) + { + completionSource.TrySetException(ex2); + return; + } + } + + completionSource.TrySetException(ex); + } + + bool TryGetResultWithNotification(UniTask.Awaiter awaiter, out T result) + { + try + { + result = awaiter.GetResult(); + return true; + } + catch (Exception ex) + { + CallTrySetExceptionAfterNotification(ex); + result = default; + return false; + } + } + + + static void MoveNextCore(object state) + { + var self = (_Do)state; + + if (self.TryGetResultWithNotification(self.awaiter, out var result)) + { + if (result) + { + var v = self.enumerator.Current; + + if (self.onNext != null) + { + try + { + self.onNext(v); + } + catch (Exception ex) + { + self.CallTrySetExceptionAfterNotification(ex); + } + } + + self.Current = v; + self.completionSource.TrySetResult(true); + } + else + { + if (self.onCompleted != null) + { + try + { + self.onCompleted(); + } + catch (Exception ex) + { + self.CallTrySetExceptionAfterNotification(ex); + return; + } + } + + self.completionSource.TrySetResult(false); + } + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } + } + +} diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Do.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Do.cs.meta new file mode 100644 index 0000000..766bbb5 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Do.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dd83c8e12dedf75409b829b93146d130 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ElementAt.cs b/Assets/Plugins/UniTask/Runtime/Linq/ElementAt.cs new file mode 100644 index 0000000..930675e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ElementAt.cs @@ -0,0 +1,58 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask ElementAtAsync(this IUniTaskAsyncEnumerable source, int index, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return ElementAt.ElementAtAsync(source, index, cancellationToken, false); + } + + public static UniTask ElementAtOrDefaultAsync(this IUniTaskAsyncEnumerable source, int index, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return ElementAt.ElementAtAsync(source, index, cancellationToken, true); + } + } + + internal static class ElementAt + { + public static async UniTask ElementAtAsync(IUniTaskAsyncEnumerable source, int index, CancellationToken cancellationToken, bool defaultIfEmpty) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + int i = 0; + while (await e.MoveNextAsync()) + { + if (i++ == index) + { + return e.Current; + } + } + + if (defaultIfEmpty) + { + return default; + } + else + { + throw Error.ArgumentOutOfRange(nameof(index)); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ElementAt.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/ElementAt.cs.meta new file mode 100644 index 0000000..fb0850b --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ElementAt.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c835bd2dd8555234c8919c7b8ef3b69a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Empty.cs b/Assets/Plugins/UniTask/Runtime/Linq/Empty.cs new file mode 100644 index 0000000..2f5b3a4 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Empty.cs @@ -0,0 +1,47 @@ +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Empty() + { + return Cysharp.Threading.Tasks.Linq.Empty.Instance; + } + } + + internal class Empty : IUniTaskAsyncEnumerable + { + public static readonly IUniTaskAsyncEnumerable Instance = new Empty(); + + Empty() + { + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return _Empty.Instance; + } + + class _Empty : IUniTaskAsyncEnumerator + { + public static readonly IUniTaskAsyncEnumerator Instance = new _Empty(); + + _Empty() + { + } + + public T Current => default; + + public UniTask MoveNextAsync() + { + return CompletedTasks.False; + } + + public UniTask DisposeAsync() + { + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Empty.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Empty.cs.meta new file mode 100644 index 0000000..bfa577a --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Empty.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4fa123ad6258abb4184721b719a13810 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Except.cs b/Assets/Plugins/UniTask/Runtime/Linq/Except.cs new file mode 100644 index 0000000..c405482 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Except.cs @@ -0,0 +1,116 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Except(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second) + { + Error.ThrowArgumentNullException(first, nameof(first)); + Error.ThrowArgumentNullException(second, nameof(second)); + + return new Except(first, second, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable Except(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(first, nameof(first)); + Error.ThrowArgumentNullException(second, nameof(second)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new Except(first, second, comparer); + } + } + + internal sealed class Except : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable first; + readonly IUniTaskAsyncEnumerable second; + readonly IEqualityComparer comparer; + + public Except(IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, IEqualityComparer comparer) + { + this.first = first; + this.second = second; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Except(first, second, comparer, cancellationToken); + } + + class _Except : AsyncEnumeratorBase + { + static Action HashSetAsyncCoreDelegate = HashSetAsyncCore; + + readonly IEqualityComparer comparer; + readonly IUniTaskAsyncEnumerable second; + + HashSet set; + UniTask>.Awaiter awaiter; + + public _Except(IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, IEqualityComparer comparer, CancellationToken cancellationToken) + + : base(first, cancellationToken) + { + this.second = second; + this.comparer = comparer; + } + + protected override bool OnFirstIteration() + { + if (set != null) return false; + + awaiter = second.ToHashSetAsync(cancellationToken).GetAwaiter(); + if (awaiter.IsCompleted) + { + set = awaiter.GetResult(); + SourceMoveNext(); + } + else + { + awaiter.SourceOnCompleted(HashSetAsyncCoreDelegate, this); + } + + return true; + } + + static void HashSetAsyncCore(object state) + { + var self = (_Except)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + self.set = result; + self.SourceMoveNext(); + } + } + + protected override bool TryMoveNextCore(bool sourceHasCurrent, out bool result) + { + if (sourceHasCurrent) + { + var v = SourceCurrent; + if (set.Add(v)) + { + Current = v; + result = true; + return true; + } + else + { + result = default; + return false; + } + } + + result = false; + return true; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Except.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Except.cs.meta new file mode 100644 index 0000000..f61a1aa --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Except.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 38c1c4129f59dcb49a5b864eaf4ec63c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/First.cs b/Assets/Plugins/UniTask/Runtime/Linq/First.cs new file mode 100644 index 0000000..da5688b --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/First.cs @@ -0,0 +1,200 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask FirstAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return First.FirstAsync(source, cancellationToken, false); + } + + public static UniTask FirstAsync(this IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return First.FirstAsync(source, predicate, cancellationToken, false); + } + + public static UniTask FirstAwaitAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return First.FirstAwaitAsync(source, predicate, cancellationToken, false); + } + + public static UniTask FirstAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return First.FirstAwaitWithCancellationAsync(source, predicate, cancellationToken, false); + } + + public static UniTask FirstOrDefaultAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return First.FirstAsync(source, cancellationToken, true); + } + + public static UniTask FirstOrDefaultAsync(this IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return First.FirstAsync(source, predicate, cancellationToken, true); + } + + public static UniTask FirstOrDefaultAwaitAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return First.FirstAwaitAsync(source, predicate, cancellationToken, true); + } + + public static UniTask FirstOrDefaultAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return First.FirstAwaitWithCancellationAsync(source, predicate, cancellationToken, true); + } + } + + internal static class First + { + public static async UniTask FirstAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken, bool defaultIfEmpty) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + if (await e.MoveNextAsync()) + { + return e.Current; + } + else + { + if (defaultIfEmpty) + { + return default; + } + else + { + throw Error.NoElements(); + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTask FirstAsync(IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken, bool defaultIfEmpty) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = e.Current; + if (predicate(v)) + { + return v; + } + } + + if (defaultIfEmpty) + { + return default; + } + else + { + throw Error.NoElements(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTask FirstAwaitAsync(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken, bool defaultIfEmpty) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = e.Current; + if (await predicate(v)) + { + return v; + } + } + + if (defaultIfEmpty) + { + return default; + } + else + { + throw Error.NoElements(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTask FirstAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken, bool defaultIfEmpty) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = e.Current; + if (await predicate(v, cancellationToken)) + { + return v; + } + } + + if (defaultIfEmpty) + { + return default; + } + else + { + throw Error.NoElements(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/First.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/First.cs.meta new file mode 100644 index 0000000..6924307 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/First.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 417946e97e9eed84db6f840f57037ca6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ForEach.cs b/Assets/Plugins/UniTask/Runtime/Linq/ForEach.cs new file mode 100644 index 0000000..60f246d --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ForEach.cs @@ -0,0 +1,193 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask ForEachAsync(this IUniTaskAsyncEnumerable source, Action action, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(action, nameof(action)); + + return Cysharp.Threading.Tasks.Linq.ForEach.ForEachAsync(source, action, cancellationToken); + } + + public static UniTask ForEachAsync(this IUniTaskAsyncEnumerable source, Action action, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(action, nameof(action)); + + return Cysharp.Threading.Tasks.Linq.ForEach.ForEachAsync(source, action, cancellationToken); + } + + /// Obsolete(Error), Use Use ForEachAwaitAsync instead. + [Obsolete("Use ForEachAwaitAsync instead.", true)] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public static UniTask ForEachAsync(this IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) + { + throw new NotSupportedException("Use ForEachAwaitAsync instead."); + } + + /// Obsolete(Error), Use Use ForEachAwaitAsync instead. + [Obsolete("Use ForEachAwaitAsync instead.", true)] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public static UniTask ForEachAsync(this IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) + { + throw new NotSupportedException("Use ForEachAwaitAsync instead."); + } + + public static UniTask ForEachAwaitAsync(this IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(action, nameof(action)); + + return Cysharp.Threading.Tasks.Linq.ForEach.ForEachAwaitAsync(source, action, cancellationToken); + } + + public static UniTask ForEachAwaitAsync(this IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(action, nameof(action)); + + return Cysharp.Threading.Tasks.Linq.ForEach.ForEachAwaitAsync(source, action, cancellationToken); + } + + public static UniTask ForEachAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(action, nameof(action)); + + return Cysharp.Threading.Tasks.Linq.ForEach.ForEachAwaitWithCancellationAsync(source, action, cancellationToken); + } + + public static UniTask ForEachAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(action, nameof(action)); + + return Cysharp.Threading.Tasks.Linq.ForEach.ForEachAwaitWithCancellationAsync(source, action, cancellationToken); + } + } + + internal static class ForEach + { + public static async UniTask ForEachAsync(IUniTaskAsyncEnumerable source, Action action, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + action(e.Current); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTask ForEachAsync(IUniTaskAsyncEnumerable source, Action action, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + int index = 0; + while (await e.MoveNextAsync()) + { + action(e.Current, checked(index++)); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTask ForEachAwaitAsync(IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + await action(e.Current); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTask ForEachAwaitAsync(IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + int index = 0; + while (await e.MoveNextAsync()) + { + await action(e.Current, checked(index++)); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTask ForEachAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + await action(e.Current, cancellationToken); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTask ForEachAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + int index = 0; + while (await e.MoveNextAsync()) + { + await action(e.Current, checked(index++), cancellationToken); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ForEach.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/ForEach.cs.meta new file mode 100644 index 0000000..5317756 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ForEach.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ca8d7f8177ba16140920af405aea3fd4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/GroupBy.cs b/Assets/Plugins/UniTask/Runtime/Linq/GroupBy.cs new file mode 100644 index 0000000..b9460ae --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/GroupBy.cs @@ -0,0 +1,923 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + // Ix-Async returns IGrouping but it is competely waste, use standard IGrouping. + + public static IUniTaskAsyncEnumerable> GroupBy(this IUniTaskAsyncEnumerable source, Func keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + return new GroupBy(source, keySelector, x => x, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable> GroupBy(this IUniTaskAsyncEnumerable source, Func keySelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + return new GroupBy(source, keySelector, x => x, comparer); + } + + public static IUniTaskAsyncEnumerable> GroupBy(this IUniTaskAsyncEnumerable source, Func keySelector, Func elementSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + return new GroupBy(source, keySelector, elementSelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable> GroupBy(this IUniTaskAsyncEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + return new GroupBy(source, keySelector, elementSelector, comparer); + } + + public static IUniTaskAsyncEnumerable GroupBy(this IUniTaskAsyncEnumerable source, Func keySelector, Func, TResult> resultSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + return new GroupBy(source, keySelector, x => x, resultSelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable GroupBy(this IUniTaskAsyncEnumerable source, Func keySelector, Func, TResult> resultSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + return new GroupBy(source, keySelector, x => x, resultSelector, comparer); + } + + public static IUniTaskAsyncEnumerable GroupBy(this IUniTaskAsyncEnumerable source, Func keySelector, Func elementSelector, Func, TResult> resultSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + return new GroupBy(source, keySelector, elementSelector, resultSelector, EqualityComparer.Default); + } + public static IUniTaskAsyncEnumerable GroupBy(this IUniTaskAsyncEnumerable source, Func keySelector, Func elementSelector, Func, TResult> resultSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + return new GroupBy(source, keySelector, elementSelector, resultSelector, comparer); + } + + // await + + public static IUniTaskAsyncEnumerable> GroupByAwait(this IUniTaskAsyncEnumerable source, Func> keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + return new GroupByAwait(source, keySelector, x => UniTask.FromResult(x), EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable> GroupByAwait(this IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + return new GroupByAwait(source, keySelector, x => UniTask.FromResult(x), comparer); + } + + public static IUniTaskAsyncEnumerable> GroupByAwait(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + return new GroupByAwait(source, keySelector, elementSelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable> GroupByAwait(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + return new GroupByAwait(source, keySelector, elementSelector, comparer); + } + + public static IUniTaskAsyncEnumerable GroupByAwait(this IUniTaskAsyncEnumerable source, Func> keySelector, Func, UniTask> resultSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + return new GroupByAwait(source, keySelector, x => UniTask.FromResult(x), resultSelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable GroupByAwait(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, UniTask> resultSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + return new GroupByAwait(source, keySelector, elementSelector, resultSelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable GroupByAwait(this IUniTaskAsyncEnumerable source, Func> keySelector, Func, UniTask> resultSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + return new GroupByAwait(source, keySelector, x => UniTask.FromResult(x), resultSelector, comparer); + } + + public static IUniTaskAsyncEnumerable GroupByAwait(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, UniTask> resultSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + return new GroupByAwait(source, keySelector, elementSelector, resultSelector, comparer); + } + + // with ct + + public static IUniTaskAsyncEnumerable> GroupByAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + return new GroupByAwaitWithCancellation(source, keySelector, (x, _) => UniTask.FromResult(x), EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable> GroupByAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + return new GroupByAwaitWithCancellation(source, keySelector, (x, _) => UniTask.FromResult(x), comparer); + } + + public static IUniTaskAsyncEnumerable> GroupByAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + return new GroupByAwaitWithCancellation(source, keySelector, elementSelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable> GroupByAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + return new GroupByAwaitWithCancellation(source, keySelector, elementSelector, comparer); + } + + public static IUniTaskAsyncEnumerable GroupByAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector, Func, CancellationToken, UniTask> resultSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + return new GroupByAwaitWithCancellation(source, keySelector, (x, _) => UniTask.FromResult(x), resultSelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable GroupByAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, UniTask> resultSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + return new GroupByAwaitWithCancellation(source, keySelector, elementSelector, resultSelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable GroupByAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector, Func, CancellationToken, UniTask> resultSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + return new GroupByAwaitWithCancellation(source, keySelector, (x, _) => UniTask.FromResult(x), resultSelector, comparer); + } + + public static IUniTaskAsyncEnumerable GroupByAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, UniTask> resultSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + return new GroupByAwaitWithCancellation(source, keySelector, elementSelector, resultSelector, comparer); + } + } + + internal sealed class GroupBy : IUniTaskAsyncEnumerable> + { + readonly IUniTaskAsyncEnumerable source; + readonly Func keySelector; + readonly Func elementSelector; + readonly IEqualityComparer comparer; + + public GroupBy(IUniTaskAsyncEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer comparer) + { + this.source = source; + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator> GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _GroupBy(source, keySelector, elementSelector, comparer, cancellationToken); + } + + sealed class _GroupBy : MoveNextSource, IUniTaskAsyncEnumerator> + { + readonly IUniTaskAsyncEnumerable source; + readonly Func keySelector; + readonly Func elementSelector; + readonly IEqualityComparer comparer; + CancellationToken cancellationToken; + + IEnumerator> groupEnumerator; + + public _GroupBy(IUniTaskAsyncEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.source = source; + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public IGrouping Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (groupEnumerator == null) + { + CreateLookup().Forget(); + } + else + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + async UniTaskVoid CreateLookup() + { + try + { + var lookup = await source.ToLookupAsync(keySelector, elementSelector, comparer, cancellationToken); + groupEnumerator = lookup.GetEnumerator(); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + SourceMoveNext(); + } + + void SourceMoveNext() + { + try + { + if (groupEnumerator.MoveNext()) + { + Current = groupEnumerator.Current as IGrouping; + completionSource.TrySetResult(true); + } + else + { + completionSource.TrySetResult(false); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (groupEnumerator != null) + { + groupEnumerator.Dispose(); + } + + return default; + } + } + } + + internal sealed class GroupBy : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func keySelector; + readonly Func elementSelector; + readonly Func, TResult> resultSelector; + readonly IEqualityComparer comparer; + + public GroupBy(IUniTaskAsyncEnumerable source, Func keySelector, Func elementSelector, Func, TResult> resultSelector, IEqualityComparer comparer) + { + this.source = source; + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _GroupBy(source, keySelector, elementSelector, resultSelector, comparer, cancellationToken); + } + + sealed class _GroupBy : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func keySelector; + readonly Func elementSelector; + readonly Func, TResult> resultSelector; + readonly IEqualityComparer comparer; + CancellationToken cancellationToken; + + IEnumerator> groupEnumerator; + + public _GroupBy(IUniTaskAsyncEnumerable source, Func keySelector, Func elementSelector, Func, TResult> resultSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.source = source; + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (groupEnumerator == null) + { + CreateLookup().Forget(); + } + else + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + async UniTaskVoid CreateLookup() + { + try + { + var lookup = await source.ToLookupAsync(keySelector, elementSelector, comparer, cancellationToken); + groupEnumerator = lookup.GetEnumerator(); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + SourceMoveNext(); + } + + void SourceMoveNext() + { + try + { + if (groupEnumerator.MoveNext()) + { + var current = groupEnumerator.Current; + Current = resultSelector(current.Key, current); + completionSource.TrySetResult(true); + } + else + { + completionSource.TrySetResult(false); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (groupEnumerator != null) + { + groupEnumerator.Dispose(); + } + + return default; + } + } + } + + internal sealed class GroupByAwait : IUniTaskAsyncEnumerable> + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> keySelector; + readonly Func> elementSelector; + readonly IEqualityComparer comparer; + + public GroupByAwait(IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) + { + this.source = source; + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator> GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _GroupByAwait(source, keySelector, elementSelector, comparer, cancellationToken); + } + + sealed class _GroupByAwait : MoveNextSource, IUniTaskAsyncEnumerator> + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> keySelector; + readonly Func> elementSelector; + readonly IEqualityComparer comparer; + CancellationToken cancellationToken; + + IEnumerator> groupEnumerator; + + public _GroupByAwait(IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.source = source; + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public IGrouping Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (groupEnumerator == null) + { + CreateLookup().Forget(); + } + else + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + async UniTaskVoid CreateLookup() + { + try + { + var lookup = await source.ToLookupAwaitAsync(keySelector, elementSelector, comparer, cancellationToken); + groupEnumerator = lookup.GetEnumerator(); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + SourceMoveNext(); + } + + void SourceMoveNext() + { + try + { + if (groupEnumerator.MoveNext()) + { + Current = groupEnumerator.Current as IGrouping; + completionSource.TrySetResult(true); + } + else + { + completionSource.TrySetResult(false); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (groupEnumerator != null) + { + groupEnumerator.Dispose(); + } + + return default; + } + } + } + + internal sealed class GroupByAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> keySelector; + readonly Func> elementSelector; + readonly Func, UniTask> resultSelector; + readonly IEqualityComparer comparer; + + public GroupByAwait(IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, UniTask> resultSelector, IEqualityComparer comparer) + { + this.source = source; + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _GroupByAwait(source, keySelector, elementSelector, resultSelector, comparer, cancellationToken); + } + + sealed class _GroupByAwait : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly static Action ResultSelectCoreDelegate = ResultSelectCore; + + readonly IUniTaskAsyncEnumerable source; + readonly Func> keySelector; + readonly Func> elementSelector; + readonly Func, UniTask> resultSelector; + readonly IEqualityComparer comparer; + CancellationToken cancellationToken; + + IEnumerator> groupEnumerator; + UniTask.Awaiter awaiter; + + public _GroupByAwait(IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, UniTask> resultSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.source = source; + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (groupEnumerator == null) + { + CreateLookup().Forget(); + } + else + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + async UniTaskVoid CreateLookup() + { + try + { + var lookup = await source.ToLookupAwaitAsync(keySelector, elementSelector, comparer, cancellationToken); + groupEnumerator = lookup.GetEnumerator(); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + SourceMoveNext(); + } + + void SourceMoveNext() + { + try + { + if (groupEnumerator.MoveNext()) + { + var current = groupEnumerator.Current; + + awaiter = resultSelector(current.Key, current).GetAwaiter(); + if (awaiter.IsCompleted) + { + ResultSelectCore(this); + } + else + { + awaiter.SourceOnCompleted(ResultSelectCoreDelegate, this); + } + return; + } + else + { + completionSource.TrySetResult(false); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + } + + static void ResultSelectCore(object state) + { + var self = (_GroupByAwait)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + self.Current = result; + self.completionSource.TrySetResult(true); + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (groupEnumerator != null) + { + groupEnumerator.Dispose(); + } + + return default; + } + } + } + + internal sealed class GroupByAwaitWithCancellation : IUniTaskAsyncEnumerable> + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> keySelector; + readonly Func> elementSelector; + readonly IEqualityComparer comparer; + + public GroupByAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) + { + this.source = source; + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator> GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _GroupByAwaitWithCancellation(source, keySelector, elementSelector, comparer, cancellationToken); + } + + sealed class _GroupByAwaitWithCancellation : MoveNextSource, IUniTaskAsyncEnumerator> + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> keySelector; + readonly Func> elementSelector; + readonly IEqualityComparer comparer; + CancellationToken cancellationToken; + + IEnumerator> groupEnumerator; + + public _GroupByAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.source = source; + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public IGrouping Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (groupEnumerator == null) + { + CreateLookup().Forget(); + } + else + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + async UniTaskVoid CreateLookup() + { + try + { + var lookup = await source.ToLookupAwaitWithCancellationAsync(keySelector, elementSelector, comparer, cancellationToken); + groupEnumerator = lookup.GetEnumerator(); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + SourceMoveNext(); + } + + void SourceMoveNext() + { + try + { + if (groupEnumerator.MoveNext()) + { + Current = groupEnumerator.Current as IGrouping; + completionSource.TrySetResult(true); + } + else + { + completionSource.TrySetResult(false); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (groupEnumerator != null) + { + groupEnumerator.Dispose(); + } + + return default; + } + } + } + + internal sealed class GroupByAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> keySelector; + readonly Func> elementSelector; + readonly Func, CancellationToken, UniTask> resultSelector; + readonly IEqualityComparer comparer; + + public GroupByAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, UniTask> resultSelector, IEqualityComparer comparer) + { + this.source = source; + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _GroupByAwaitWithCancellation(source, keySelector, elementSelector, resultSelector, comparer, cancellationToken); + } + + sealed class _GroupByAwaitWithCancellation : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly static Action ResultSelectCoreDelegate = ResultSelectCore; + + readonly IUniTaskAsyncEnumerable source; + readonly Func> keySelector; + readonly Func> elementSelector; + readonly Func, CancellationToken, UniTask> resultSelector; + readonly IEqualityComparer comparer; + CancellationToken cancellationToken; + + IEnumerator> groupEnumerator; + UniTask.Awaiter awaiter; + + public _GroupByAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, UniTask> resultSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.source = source; + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (groupEnumerator == null) + { + CreateLookup().Forget(); + } + else + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + async UniTaskVoid CreateLookup() + { + try + { + var lookup = await source.ToLookupAwaitWithCancellationAsync(keySelector, elementSelector, comparer, cancellationToken); + groupEnumerator = lookup.GetEnumerator(); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + SourceMoveNext(); + } + + void SourceMoveNext() + { + try + { + if (groupEnumerator.MoveNext()) + { + var current = groupEnumerator.Current; + + awaiter = resultSelector(current.Key, current, cancellationToken).GetAwaiter(); + if (awaiter.IsCompleted) + { + ResultSelectCore(this); + } + else + { + awaiter.SourceOnCompleted(ResultSelectCoreDelegate, this); + } + return; + } + else + { + completionSource.TrySetResult(false); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + } + + static void ResultSelectCore(object state) + { + var self = (_GroupByAwaitWithCancellation)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + self.Current = result; + self.completionSource.TrySetResult(true); + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (groupEnumerator != null) + { + groupEnumerator.Dispose(); + } + + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/GroupBy.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/GroupBy.cs.meta new file mode 100644 index 0000000..1489701 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/GroupBy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a2de80df1cc8a1240ab0ee7badd334d0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/GroupJoin.cs b/Assets/Plugins/UniTask/Runtime/Linq/GroupJoin.cs new file mode 100644 index 0000000..607b221 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/GroupJoin.cs @@ -0,0 +1,612 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable GroupJoin(this IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func, TResult> resultSelector) + { + Error.ThrowArgumentNullException(outer, nameof(outer)); + Error.ThrowArgumentNullException(inner, nameof(inner)); + Error.ThrowArgumentNullException(outerKeySelector, nameof(outerKeySelector)); + Error.ThrowArgumentNullException(innerKeySelector, nameof(innerKeySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new GroupJoin(outer, inner, outerKeySelector, innerKeySelector, resultSelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable GroupJoin(this IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func, TResult> resultSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(outer, nameof(outer)); + Error.ThrowArgumentNullException(inner, nameof(inner)); + Error.ThrowArgumentNullException(outerKeySelector, nameof(outerKeySelector)); + Error.ThrowArgumentNullException(innerKeySelector, nameof(innerKeySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new GroupJoin(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); + } + + public static IUniTaskAsyncEnumerable GroupJoinAwait(this IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, UniTask> resultSelector) + { + Error.ThrowArgumentNullException(outer, nameof(outer)); + Error.ThrowArgumentNullException(inner, nameof(inner)); + Error.ThrowArgumentNullException(outerKeySelector, nameof(outerKeySelector)); + Error.ThrowArgumentNullException(innerKeySelector, nameof(innerKeySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new GroupJoinAwait(outer, inner, outerKeySelector, innerKeySelector, resultSelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable GroupJoinAwait(this IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, UniTask> resultSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(outer, nameof(outer)); + Error.ThrowArgumentNullException(inner, nameof(inner)); + Error.ThrowArgumentNullException(outerKeySelector, nameof(outerKeySelector)); + Error.ThrowArgumentNullException(innerKeySelector, nameof(innerKeySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new GroupJoinAwait(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); + } + + public static IUniTaskAsyncEnumerable GroupJoinAwaitWithCancellation(this IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, UniTask> resultSelector) + { + Error.ThrowArgumentNullException(outer, nameof(outer)); + Error.ThrowArgumentNullException(inner, nameof(inner)); + Error.ThrowArgumentNullException(outerKeySelector, nameof(outerKeySelector)); + Error.ThrowArgumentNullException(innerKeySelector, nameof(innerKeySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new GroupJoinAwaitWithCancellation(outer, inner, outerKeySelector, innerKeySelector, resultSelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable GroupJoinAwaitWithCancellation(this IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, UniTask> resultSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(outer, nameof(outer)); + Error.ThrowArgumentNullException(inner, nameof(inner)); + Error.ThrowArgumentNullException(outerKeySelector, nameof(outerKeySelector)); + Error.ThrowArgumentNullException(innerKeySelector, nameof(innerKeySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new GroupJoinAwaitWithCancellation(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); + } + + } + + internal sealed class GroupJoin : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable outer; + readonly IUniTaskAsyncEnumerable inner; + readonly Func outerKeySelector; + readonly Func innerKeySelector; + readonly Func, TResult> resultSelector; + readonly IEqualityComparer comparer; + + public GroupJoin(IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func, TResult> resultSelector, IEqualityComparer comparer) + { + this.outer = outer; + this.inner = inner; + this.outerKeySelector = outerKeySelector; + this.innerKeySelector = innerKeySelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _GroupJoin(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer, cancellationToken); + } + + sealed class _GroupJoin : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable outer; + readonly IUniTaskAsyncEnumerable inner; + readonly Func outerKeySelector; + readonly Func innerKeySelector; + readonly Func, TResult> resultSelector; + readonly IEqualityComparer comparer; + CancellationToken cancellationToken; + + ILookup lookup; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + + + public _GroupJoin(IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func, TResult> resultSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.outer = outer; + this.inner = inner; + this.outerKeySelector = outerKeySelector; + this.innerKeySelector = innerKeySelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (lookup == null) + { + CreateLookup().Forget(); + } + else + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + async UniTaskVoid CreateLookup() + { + try + { + lookup = await inner.ToLookupAsync(innerKeySelector, comparer, cancellationToken); + enumerator = outer.GetAsyncEnumerator(cancellationToken); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + SourceMoveNext(); + } + + void SourceMoveNext() + { + try + { + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + MoveNextCore(this); + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + static void MoveNextCore(object state) + { + var self = (_GroupJoin)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + var outer = self.enumerator.Current; + var key = self.outerKeySelector(outer); + var values = self.lookup[key]; + + self.Current = self.resultSelector(outer, values); + self.completionSource.TrySetResult(true); + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + + return default; + } + } + } + + internal sealed class GroupJoinAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable outer; + readonly IUniTaskAsyncEnumerable inner; + readonly Func> outerKeySelector; + readonly Func> innerKeySelector; + readonly Func, UniTask> resultSelector; + readonly IEqualityComparer comparer; + + public GroupJoinAwait(IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, UniTask> resultSelector, IEqualityComparer comparer) + { + this.outer = outer; + this.inner = inner; + this.outerKeySelector = outerKeySelector; + this.innerKeySelector = innerKeySelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _GroupJoinAwait(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer, cancellationToken); + } + + sealed class _GroupJoinAwait : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action MoveNextCoreDelegate = MoveNextCore; + readonly static Action ResultSelectCoreDelegate = ResultSelectCore; + readonly static Action OuterKeySelectCoreDelegate = OuterKeySelectCore; + + readonly IUniTaskAsyncEnumerable outer; + readonly IUniTaskAsyncEnumerable inner; + readonly Func> outerKeySelector; + readonly Func> innerKeySelector; + readonly Func, UniTask> resultSelector; + readonly IEqualityComparer comparer; + CancellationToken cancellationToken; + + ILookup lookup; + IUniTaskAsyncEnumerator enumerator; + TOuter outerValue; + UniTask.Awaiter awaiter; + UniTask.Awaiter outerKeyAwaiter; + UniTask.Awaiter resultAwaiter; + + + public _GroupJoinAwait(IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, UniTask> resultSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.outer = outer; + this.inner = inner; + this.outerKeySelector = outerKeySelector; + this.innerKeySelector = innerKeySelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (lookup == null) + { + CreateLookup().Forget(); + } + else + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + async UniTaskVoid CreateLookup() + { + try + { + lookup = await inner.ToLookupAwaitAsync(innerKeySelector, comparer, cancellationToken); + enumerator = outer.GetAsyncEnumerator(cancellationToken); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + SourceMoveNext(); + } + + void SourceMoveNext() + { + try + { + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + MoveNextCore(this); + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + static void MoveNextCore(object state) + { + var self = (_GroupJoinAwait)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + try + { + + self.outerValue = self.enumerator.Current; + self.outerKeyAwaiter = self.outerKeySelector(self.outerValue).GetAwaiter(); + if (self.outerKeyAwaiter.IsCompleted) + { + OuterKeySelectCore(self); + } + else + { + self.outerKeyAwaiter.SourceOnCompleted(OuterKeySelectCoreDelegate, self); + } + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + static void OuterKeySelectCore(object state) + { + var self = (_GroupJoinAwait)state; + + if (self.TryGetResult(self.outerKeyAwaiter, out var result)) + { + try + { + var values = self.lookup[result]; + self.resultAwaiter = self.resultSelector(self.outerValue, values).GetAwaiter(); + if (self.resultAwaiter.IsCompleted) + { + ResultSelectCore(self); + } + else + { + self.resultAwaiter.SourceOnCompleted(ResultSelectCoreDelegate, self); + } + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + } + } + } + + static void ResultSelectCore(object state) + { + var self = (_GroupJoinAwait)state; + + if (self.TryGetResult(self.resultAwaiter, out var result)) + { + self.Current = result; + self.completionSource.TrySetResult(true); + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + + return default; + } + } + } + + internal sealed class GroupJoinAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable outer; + readonly IUniTaskAsyncEnumerable inner; + readonly Func> outerKeySelector; + readonly Func> innerKeySelector; + readonly Func, CancellationToken, UniTask> resultSelector; + readonly IEqualityComparer comparer; + + public GroupJoinAwaitWithCancellation(IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, UniTask> resultSelector, IEqualityComparer comparer) + { + this.outer = outer; + this.inner = inner; + this.outerKeySelector = outerKeySelector; + this.innerKeySelector = innerKeySelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _GroupJoinAwaitWithCancellation(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer, cancellationToken); + } + + sealed class _GroupJoinAwaitWithCancellation : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action MoveNextCoreDelegate = MoveNextCore; + readonly static Action ResultSelectCoreDelegate = ResultSelectCore; + readonly static Action OuterKeySelectCoreDelegate = OuterKeySelectCore; + + readonly IUniTaskAsyncEnumerable outer; + readonly IUniTaskAsyncEnumerable inner; + readonly Func> outerKeySelector; + readonly Func> innerKeySelector; + readonly Func, CancellationToken, UniTask> resultSelector; + readonly IEqualityComparer comparer; + CancellationToken cancellationToken; + + ILookup lookup; + IUniTaskAsyncEnumerator enumerator; + TOuter outerValue; + UniTask.Awaiter awaiter; + UniTask.Awaiter outerKeyAwaiter; + UniTask.Awaiter resultAwaiter; + + + public _GroupJoinAwaitWithCancellation(IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, UniTask> resultSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.outer = outer; + this.inner = inner; + this.outerKeySelector = outerKeySelector; + this.innerKeySelector = innerKeySelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (lookup == null) + { + CreateLookup().Forget(); + } + else + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + async UniTaskVoid CreateLookup() + { + try + { + lookup = await inner.ToLookupAwaitWithCancellationAsync(innerKeySelector, comparer, cancellationToken); + enumerator = outer.GetAsyncEnumerator(cancellationToken); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + SourceMoveNext(); + } + + void SourceMoveNext() + { + try + { + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + MoveNextCore(this); + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + static void MoveNextCore(object state) + { + var self = (_GroupJoinAwaitWithCancellation)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + try + { + + self.outerValue = self.enumerator.Current; + self.outerKeyAwaiter = self.outerKeySelector(self.outerValue, self.cancellationToken).GetAwaiter(); + if (self.outerKeyAwaiter.IsCompleted) + { + OuterKeySelectCore(self); + } + else + { + self.outerKeyAwaiter.SourceOnCompleted(OuterKeySelectCoreDelegate, self); + } + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + static void OuterKeySelectCore(object state) + { + var self = (_GroupJoinAwaitWithCancellation)state; + + if (self.TryGetResult(self.outerKeyAwaiter, out var result)) + { + try + { + var values = self.lookup[result]; + self.resultAwaiter = self.resultSelector(self.outerValue, values, self.cancellationToken).GetAwaiter(); + if (self.resultAwaiter.IsCompleted) + { + ResultSelectCore(self); + } + else + { + self.resultAwaiter.SourceOnCompleted(ResultSelectCoreDelegate, self); + } + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + } + } + } + + static void ResultSelectCore(object state) + { + var self = (_GroupJoinAwaitWithCancellation)state; + + if (self.TryGetResult(self.resultAwaiter, out var result)) + { + self.Current = result; + self.completionSource.TrySetResult(true); + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/GroupJoin.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/GroupJoin.cs.meta new file mode 100644 index 0000000..f171ed1 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/GroupJoin.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7bf7759d03bf3f64190d3ae83b182c2c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Intersect.cs b/Assets/Plugins/UniTask/Runtime/Linq/Intersect.cs new file mode 100644 index 0000000..3faf645 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Intersect.cs @@ -0,0 +1,117 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Intersect(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second) + { + Error.ThrowArgumentNullException(first, nameof(first)); + Error.ThrowArgumentNullException(second, nameof(second)); + + return new Intersect(first, second, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable Intersect(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(first, nameof(first)); + Error.ThrowArgumentNullException(second, nameof(second)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new Intersect(first, second, comparer); + } + } + + internal sealed class Intersect : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable first; + readonly IUniTaskAsyncEnumerable second; + readonly IEqualityComparer comparer; + + public Intersect(IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, IEqualityComparer comparer) + { + this.first = first; + this.second = second; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Intersect(first, second, comparer, cancellationToken); + } + + class _Intersect : AsyncEnumeratorBase + { + static Action HashSetAsyncCoreDelegate = HashSetAsyncCore; + + readonly IEqualityComparer comparer; + readonly IUniTaskAsyncEnumerable second; + + HashSet set; + UniTask>.Awaiter awaiter; + + public _Intersect(IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, IEqualityComparer comparer, CancellationToken cancellationToken) + + : base(first, cancellationToken) + { + this.second = second; + this.comparer = comparer; + } + + protected override bool OnFirstIteration() + { + if (set != null) return false; + + awaiter = second.ToHashSetAsync(cancellationToken).GetAwaiter(); + if (awaiter.IsCompleted) + { + set = awaiter.GetResult(); + SourceMoveNext(); + } + else + { + awaiter.SourceOnCompleted(HashSetAsyncCoreDelegate, this); + } + + return true; + } + + static void HashSetAsyncCore(object state) + { + var self = (_Intersect)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + self.set = result; + self.SourceMoveNext(); + } + } + + protected override bool TryMoveNextCore(bool sourceHasCurrent, out bool result) + { + if (sourceHasCurrent) + { + var v = SourceCurrent; + + if (set.Remove(v)) + { + Current = v; + result = true; + return true; + } + else + { + result = default; + return false; + } + } + + result = false; + return true; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Intersect.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Intersect.cs.meta new file mode 100644 index 0000000..28cf8e3 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Intersect.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 93999a70f5d57134bbe971f3e988c4f2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Join.cs b/Assets/Plugins/UniTask/Runtime/Linq/Join.cs new file mode 100644 index 0000000..2d80889 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Join.cs @@ -0,0 +1,728 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Join(this IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func resultSelector) + { + Error.ThrowArgumentNullException(outer, nameof(outer)); + Error.ThrowArgumentNullException(inner, nameof(inner)); + Error.ThrowArgumentNullException(outerKeySelector, nameof(outerKeySelector)); + Error.ThrowArgumentNullException(innerKeySelector, nameof(innerKeySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new Join(outer, inner, outerKeySelector, innerKeySelector, resultSelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable Join(this IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func resultSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(outer, nameof(outer)); + Error.ThrowArgumentNullException(inner, nameof(inner)); + Error.ThrowArgumentNullException(outerKeySelector, nameof(outerKeySelector)); + Error.ThrowArgumentNullException(innerKeySelector, nameof(innerKeySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new Join(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); + } + + public static IUniTaskAsyncEnumerable JoinAwait(this IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) + { + Error.ThrowArgumentNullException(outer, nameof(outer)); + Error.ThrowArgumentNullException(inner, nameof(inner)); + Error.ThrowArgumentNullException(outerKeySelector, nameof(outerKeySelector)); + Error.ThrowArgumentNullException(innerKeySelector, nameof(innerKeySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new JoinAwait(outer, inner, outerKeySelector, innerKeySelector, resultSelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable JoinAwait(this IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(outer, nameof(outer)); + Error.ThrowArgumentNullException(inner, nameof(inner)); + Error.ThrowArgumentNullException(outerKeySelector, nameof(outerKeySelector)); + Error.ThrowArgumentNullException(innerKeySelector, nameof(innerKeySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new JoinAwait(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); + } + + public static IUniTaskAsyncEnumerable JoinAwaitWithCancellation(this IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) + { + Error.ThrowArgumentNullException(outer, nameof(outer)); + Error.ThrowArgumentNullException(inner, nameof(inner)); + Error.ThrowArgumentNullException(outerKeySelector, nameof(outerKeySelector)); + Error.ThrowArgumentNullException(innerKeySelector, nameof(innerKeySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new JoinAwaitWithCancellation(outer, inner, outerKeySelector, innerKeySelector, resultSelector, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable JoinAwaitWithCancellation(this IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(outer, nameof(outer)); + Error.ThrowArgumentNullException(inner, nameof(inner)); + Error.ThrowArgumentNullException(outerKeySelector, nameof(outerKeySelector)); + Error.ThrowArgumentNullException(innerKeySelector, nameof(innerKeySelector)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new JoinAwaitWithCancellation(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); + } + } + + internal sealed class Join : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable outer; + readonly IUniTaskAsyncEnumerable inner; + readonly Func outerKeySelector; + readonly Func innerKeySelector; + readonly Func resultSelector; + readonly IEqualityComparer comparer; + + public Join(IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func resultSelector, IEqualityComparer comparer) + { + this.outer = outer; + this.inner = inner; + this.outerKeySelector = outerKeySelector; + this.innerKeySelector = innerKeySelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Join(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer, cancellationToken); + } + + sealed class _Join : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable outer; + readonly IUniTaskAsyncEnumerable inner; + readonly Func outerKeySelector; + readonly Func innerKeySelector; + readonly Func resultSelector; + readonly IEqualityComparer comparer; + CancellationToken cancellationToken; + + ILookup lookup; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + TOuter currentOuterValue; + IEnumerator valueEnumerator; + + bool continueNext; + + public _Join(IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func resultSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.outer = outer; + this.inner = inner; + this.outerKeySelector = outerKeySelector; + this.innerKeySelector = innerKeySelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (lookup == null) + { + CreateInnerHashSet().Forget(); + } + else + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + async UniTaskVoid CreateInnerHashSet() + { + try + { + lookup = await inner.ToLookupAsync(innerKeySelector, comparer, cancellationToken); + enumerator = outer.GetAsyncEnumerator(cancellationToken); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + SourceMoveNext(); + } + + void SourceMoveNext() + { + try + { + LOOP: + if (valueEnumerator != null) + { + if (valueEnumerator.MoveNext()) + { + Current = resultSelector(currentOuterValue, valueEnumerator.Current); + goto TRY_SET_RESULT_TRUE; + } + else + { + valueEnumerator.Dispose(); + valueEnumerator = null; + } + } + + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + continueNext = true; + MoveNextCore(this); + if (continueNext) + { + continueNext = false; + goto LOOP; // avoid recursive + } + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + + return; + + TRY_SET_RESULT_TRUE: + completionSource.TrySetResult(true); + } + + + static void MoveNextCore(object state) + { + var self = (_Join)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + self.currentOuterValue = self.enumerator.Current; + var key = self.outerKeySelector(self.currentOuterValue); + self.valueEnumerator = self.lookup[key].GetEnumerator(); + + if (self.continueNext) + { + return; + } + else + { + self.SourceMoveNext(); + } + } + else + { + self.continueNext = false; + self.completionSource.TrySetResult(false); + } + } + else + { + self.continueNext = false; + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (valueEnumerator != null) + { + valueEnumerator.Dispose(); + } + + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + + return default; + } + } + } + + internal sealed class JoinAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable outer; + readonly IUniTaskAsyncEnumerable inner; + readonly Func> outerKeySelector; + readonly Func> innerKeySelector; + readonly Func> resultSelector; + readonly IEqualityComparer comparer; + + public JoinAwait(IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) + { + this.outer = outer; + this.inner = inner; + this.outerKeySelector = outerKeySelector; + this.innerKeySelector = innerKeySelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _JoinAwait(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer, cancellationToken); + } + + sealed class _JoinAwait : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action MoveNextCoreDelegate = MoveNextCore; + static readonly Action OuterSelectCoreDelegate = OuterSelectCore; + static readonly Action ResultSelectCoreDelegate = ResultSelectCore; + + readonly IUniTaskAsyncEnumerable outer; + readonly IUniTaskAsyncEnumerable inner; + readonly Func> outerKeySelector; + readonly Func> innerKeySelector; + readonly Func> resultSelector; + readonly IEqualityComparer comparer; + CancellationToken cancellationToken; + + ILookup lookup; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + TOuter currentOuterValue; + IEnumerator valueEnumerator; + + UniTask.Awaiter resultAwaiter; + UniTask.Awaiter outerKeyAwaiter; + + bool continueNext; + + public _JoinAwait(IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.outer = outer; + this.inner = inner; + this.outerKeySelector = outerKeySelector; + this.innerKeySelector = innerKeySelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (lookup == null) + { + CreateInnerHashSet().Forget(); + } + else + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + async UniTaskVoid CreateInnerHashSet() + { + try + { + lookup = await inner.ToLookupAwaitAsync(innerKeySelector, comparer, cancellationToken); + enumerator = outer.GetAsyncEnumerator(cancellationToken); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + SourceMoveNext(); + } + + void SourceMoveNext() + { + try + { + LOOP: + if (valueEnumerator != null) + { + if (valueEnumerator.MoveNext()) + { + resultAwaiter = resultSelector(currentOuterValue, valueEnumerator.Current).GetAwaiter(); + if (resultAwaiter.IsCompleted) + { + ResultSelectCore(this); + } + else + { + resultAwaiter.SourceOnCompleted(ResultSelectCoreDelegate, this); + } + return; + } + else + { + valueEnumerator.Dispose(); + valueEnumerator = null; + } + } + + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + continueNext = true; + MoveNextCore(this); + if (continueNext) + { + continueNext = false; + goto LOOP; // avoid recursive + } + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + + static void MoveNextCore(object state) + { + var self = (_JoinAwait)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + self.currentOuterValue = self.enumerator.Current; + + self.outerKeyAwaiter = self.outerKeySelector(self.currentOuterValue).GetAwaiter(); + + if (self.outerKeyAwaiter.IsCompleted) + { + OuterSelectCore(self); + } + else + { + self.continueNext = false; + self.outerKeyAwaiter.SourceOnCompleted(OuterSelectCoreDelegate, self); + } + } + else + { + self.continueNext = false; + self.completionSource.TrySetResult(false); + } + } + else + { + self.continueNext = false; + } + } + + static void OuterSelectCore(object state) + { + var self = (_JoinAwait)state; + + if (self.TryGetResult(self.outerKeyAwaiter, out var key)) + { + self.valueEnumerator = self.lookup[key].GetEnumerator(); + + if (self.continueNext) + { + return; + } + else + { + self.SourceMoveNext(); + } + } + else + { + self.continueNext = false; + } + } + + static void ResultSelectCore(object state) + { + var self = (_JoinAwait)state; + + if (self.TryGetResult(self.resultAwaiter, out var result)) + { + self.Current = result; + self.completionSource.TrySetResult(true); + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (valueEnumerator != null) + { + valueEnumerator.Dispose(); + } + + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + + return default; + } + } + } + + internal sealed class JoinAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable outer; + readonly IUniTaskAsyncEnumerable inner; + readonly Func> outerKeySelector; + readonly Func> innerKeySelector; + readonly Func> resultSelector; + readonly IEqualityComparer comparer; + + public JoinAwaitWithCancellation(IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) + { + this.outer = outer; + this.inner = inner; + this.outerKeySelector = outerKeySelector; + this.innerKeySelector = innerKeySelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _JoinAwaitWithCancellation(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer, cancellationToken); + } + + sealed class _JoinAwaitWithCancellation : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action MoveNextCoreDelegate = MoveNextCore; + static readonly Action OuterSelectCoreDelegate = OuterSelectCore; + static readonly Action ResultSelectCoreDelegate = ResultSelectCore; + + readonly IUniTaskAsyncEnumerable outer; + readonly IUniTaskAsyncEnumerable inner; + readonly Func> outerKeySelector; + readonly Func> innerKeySelector; + readonly Func> resultSelector; + readonly IEqualityComparer comparer; + CancellationToken cancellationToken; + + ILookup lookup; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + TOuter currentOuterValue; + IEnumerator valueEnumerator; + + UniTask.Awaiter resultAwaiter; + UniTask.Awaiter outerKeyAwaiter; + + bool continueNext; + + public _JoinAwaitWithCancellation(IUniTaskAsyncEnumerable outer, IUniTaskAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + this.outer = outer; + this.inner = inner; + this.outerKeySelector = outerKeySelector; + this.innerKeySelector = innerKeySelector; + this.resultSelector = resultSelector; + this.comparer = comparer; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (lookup == null) + { + CreateInnerHashSet().Forget(); + } + else + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + async UniTaskVoid CreateInnerHashSet() + { + try + { + lookup = await inner.ToLookupAwaitWithCancellationAsync(innerKeySelector, comparer, cancellationToken: cancellationToken); + enumerator = outer.GetAsyncEnumerator(cancellationToken); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + SourceMoveNext(); + } + + void SourceMoveNext() + { + try + { + LOOP: + if (valueEnumerator != null) + { + if (valueEnumerator.MoveNext()) + { + resultAwaiter = resultSelector(currentOuterValue, valueEnumerator.Current, cancellationToken).GetAwaiter(); + if (resultAwaiter.IsCompleted) + { + ResultSelectCore(this); + } + else + { + resultAwaiter.SourceOnCompleted(ResultSelectCoreDelegate, this); + } + return; + } + else + { + valueEnumerator.Dispose(); + valueEnumerator = null; + } + } + + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + continueNext = true; + MoveNextCore(this); + if (continueNext) + { + continueNext = false; + goto LOOP; // avoid recursive + } + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + + static void MoveNextCore(object state) + { + var self = (_JoinAwaitWithCancellation)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + self.currentOuterValue = self.enumerator.Current; + + self.outerKeyAwaiter = self.outerKeySelector(self.currentOuterValue, self.cancellationToken).GetAwaiter(); + + if (self.outerKeyAwaiter.IsCompleted) + { + OuterSelectCore(self); + } + else + { + self.continueNext = false; + self.outerKeyAwaiter.SourceOnCompleted(OuterSelectCoreDelegate, self); + } + } + else + { + self.continueNext = false; + self.completionSource.TrySetResult(false); + } + } + else + { + self.continueNext = false; + } + } + + static void OuterSelectCore(object state) + { + var self = (_JoinAwaitWithCancellation)state; + + if (self.TryGetResult(self.outerKeyAwaiter, out var key)) + { + self.valueEnumerator = self.lookup[key].GetEnumerator(); + + if (self.continueNext) + { + return; + } + else + { + self.SourceMoveNext(); + } + } + else + { + self.continueNext = false; + } + } + + static void ResultSelectCore(object state) + { + var self = (_JoinAwaitWithCancellation)state; + + if (self.TryGetResult(self.resultAwaiter, out var result)) + { + self.Current = result; + self.completionSource.TrySetResult(true); + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (valueEnumerator != null) + { + valueEnumerator.Dispose(); + } + + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + + return default; + } + } + } + +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Join.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Join.cs.meta new file mode 100644 index 0000000..3ab1015 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Join.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dc4ff8cb6d7c9a64896f2f082124d6b3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Last.cs b/Assets/Plugins/UniTask/Runtime/Linq/Last.cs new file mode 100644 index 0000000..664bb27 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Last.cs @@ -0,0 +1,240 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask LastAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Last.LastAsync(source, cancellationToken, false); + } + + public static UniTask LastAsync(this IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return Last.LastAsync(source, predicate, cancellationToken, false); + } + + public static UniTask LastAwaitAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return Last.LastAwaitAsync(source, predicate, cancellationToken, false); + } + + public static UniTask LastAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return Last.LastAwaitWithCancellationAsync(source, predicate, cancellationToken, false); + } + + public static UniTask LastOrDefaultAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Last.LastAsync(source, cancellationToken, true); + } + + public static UniTask LastOrDefaultAsync(this IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return Last.LastAsync(source, predicate, cancellationToken, true); + } + + public static UniTask LastOrDefaultAwaitAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return Last.LastAwaitAsync(source, predicate, cancellationToken, true); + } + + public static UniTask LastOrDefaultAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return Last.LastAwaitWithCancellationAsync(source, predicate, cancellationToken, true); + } + } + + internal static class Last + { + public static async UniTask LastAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken, bool defaultIfEmpty) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TSource value = default; + if (await e.MoveNextAsync()) + { + value = e.Current; + } + else + { + if (defaultIfEmpty) + { + return value; + } + else + { + throw Error.NoElements(); + } + } + + while (await e.MoveNextAsync()) + { + value = e.Current; + } + return value; + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTask LastAsync(IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken, bool defaultIfEmpty) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TSource value = default; + + bool found = false; + while (await e.MoveNextAsync()) + { + var v = e.Current; + if (predicate(v)) + { + found = true; + value = v; + } + } + + if (defaultIfEmpty) + { + return value; + } + else + { + if (found) + { + return value; + } + else + { + throw Error.NoElements(); + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTask LastAwaitAsync(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken, bool defaultIfEmpty) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TSource value = default; + + bool found = false; + while (await e.MoveNextAsync()) + { + var v = e.Current; + if (await predicate(v)) + { + found = true; + value = v; + } + } + + if (defaultIfEmpty) + { + return value; + } + else + { + if (found) + { + return value; + } + else + { + throw Error.NoElements(); + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTask LastAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken, bool defaultIfEmpty) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TSource value = default; + + bool found = false; + while (await e.MoveNextAsync()) + { + var v = e.Current; + if (await predicate(v, cancellationToken)) + { + found = true; + value = v; + } + } + + if (defaultIfEmpty) + { + return value; + } + else + { + if (found) + { + return value; + } + else + { + throw Error.NoElements(); + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Last.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Last.cs.meta new file mode 100644 index 0000000..edfa124 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Last.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a0ccc93be1387fa4a975f06310127c11 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/LongCount.cs b/Assets/Plugins/UniTask/Runtime/Linq/LongCount.cs new file mode 100644 index 0000000..78ae805 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/LongCount.cs @@ -0,0 +1,144 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask LongCountAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return LongCount.LongCountAsync(source, cancellationToken); + } + + public static UniTask LongCountAsync(this IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return LongCount.LongCountAsync(source, predicate, cancellationToken); + } + + public static UniTask LongCountAwaitAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return LongCount.LongCountAwaitAsync(source, predicate, cancellationToken); + } + + public static UniTask LongCountAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return LongCount.LongCountAwaitWithCancellationAsync(source, predicate, cancellationToken); + } + } + + internal static class LongCount + { + internal static async UniTask LongCountAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + long count = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + checked { count++; } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return count; + } + + internal static async UniTask LongCountAsync(IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken) + { + long count = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + if (predicate(e.Current)) + { + checked { count++; } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return count; + } + + internal static async UniTask LongCountAwaitAsync(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + { + long count = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + if (await predicate(e.Current)) + { + checked { count++; } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return count; + } + + internal static async UniTask LongCountAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + { + long count = 0; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + if (await predicate(e.Current, cancellationToken)) + { + checked { count++; } + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return count; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/LongCount.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/LongCount.cs.meta new file mode 100644 index 0000000..862c2bc --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/LongCount.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 198b39e58ced3ab4f97ccbe0916787d5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Max.cs b/Assets/Plugins/UniTask/Runtime/Linq/Max.cs new file mode 100644 index 0000000..d244a15 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Max.cs @@ -0,0 +1,200 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Max.MaxAsync(source, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitWithCancellationAsync(source, selector, cancellationToken); + } + } + + internal static partial class Max + { + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + TSource value = default; + var comparer = Comparer.Default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + + goto NEXT_LOOP; + } + + return value; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if (comparer.Compare(value, x) < 0) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + TResult value = default; + var comparer = Comparer.Default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + + goto NEXT_LOOP; + } + + return value; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if (comparer.Compare(value, x) < 0) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + TResult value = default; + var comparer = Comparer.Default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + + goto NEXT_LOOP; + } + + return value; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if (comparer.Compare(value, x) < 0) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + TResult value = default; + var comparer = Comparer.Default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + + goto NEXT_LOOP; + } + + return value; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if (comparer.Compare(value, x) < 0) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Max.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Max.cs.meta new file mode 100644 index 0000000..2125edf --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Max.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5c8a118a6b664c441820b8a87d7f6e28 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Merge.cs b/Assets/Plugins/UniTask/Runtime/Linq/Merge.cs new file mode 100644 index 0000000..b74bf25 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Merge.cs @@ -0,0 +1,234 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Merge(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second) + { + Error.ThrowArgumentNullException(first, nameof(first)); + Error.ThrowArgumentNullException(second, nameof(second)); + + return new Merge(new [] { first, second }); + } + + public static IUniTaskAsyncEnumerable Merge(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, IUniTaskAsyncEnumerable third) + { + Error.ThrowArgumentNullException(first, nameof(first)); + Error.ThrowArgumentNullException(second, nameof(second)); + Error.ThrowArgumentNullException(third, nameof(third)); + + return new Merge(new[] { first, second, third }); + } + + public static IUniTaskAsyncEnumerable Merge(this IEnumerable> sources) + { + return sources is IUniTaskAsyncEnumerable[] array + ? new Merge(array) + : new Merge(sources.ToArray()); + } + + public static IUniTaskAsyncEnumerable Merge(params IUniTaskAsyncEnumerable[] sources) + { + return new Merge(sources); + } + } + + internal sealed class Merge : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable[] sources; + + public Merge(IUniTaskAsyncEnumerable[] sources) + { + if (sources.Length <= 0) + { + Error.ThrowArgumentException("No source async enumerable to merge"); + } + this.sources = sources; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + => new _Merge(sources, cancellationToken); + + enum MergeSourceState + { + Pending, + Running, + Completed, + } + + sealed class _Merge : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action GetResultAtAction = GetResultAt; + + readonly int length; + readonly IUniTaskAsyncEnumerator[] enumerators; + readonly MergeSourceState[] states; + readonly Queue<(T, Exception, bool)> queuedResult = new Queue<(T, Exception, bool)>(); + readonly CancellationToken cancellationToken; + + int moveNextCompleted; + + public T Current { get; private set; } + + public _Merge(IUniTaskAsyncEnumerable[] sources, CancellationToken cancellationToken) + { + this.cancellationToken = cancellationToken; + length = sources.Length; + states = ArrayPool.Shared.Rent(length); + enumerators = ArrayPool>.Shared.Rent(length); + for (var i = 0; i < length; i++) + { + enumerators[i] = sources[i].GetAsyncEnumerator(cancellationToken); + states[i] = (int)MergeSourceState.Pending;; + } + } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + Interlocked.Exchange(ref moveNextCompleted, 0); + + if (HasQueuedResult() && Interlocked.CompareExchange(ref moveNextCompleted, 1, 0) == 0) + { + (T, Exception, bool) value; + lock (states) + { + value = queuedResult.Dequeue(); + } + var resultValue = value.Item1; + var exception = value.Item2; + var hasNext = value.Item3; + if (exception != null) + { + completionSource.TrySetException(exception); + } + else + { + Current = resultValue; + completionSource.TrySetResult(hasNext); + } + return new UniTask(this, completionSource.Version); + } + + for (var i = 0; i < length; i++) + { + lock (states) + { + if (states[i] == MergeSourceState.Pending) + { + states[i] = MergeSourceState.Running; + } + else + { + continue; + } + } + var awaiter = enumerators[i].MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + GetResultAt(i, awaiter); + } + else + { + awaiter.SourceOnCompleted(GetResultAtAction, StateTuple.Create(this, i, awaiter)); + } + } + return new UniTask(this, completionSource.Version); + } + + public async UniTask DisposeAsync() + { + for (var i = 0; i < length; i++) + { + await enumerators[i].DisposeAsync(); + } + + ArrayPool.Shared.Return(states, true); + ArrayPool>.Shared.Return(enumerators, true); + } + + static void GetResultAt(object state) + { + using (var tuple = (StateTuple<_Merge, int, UniTask.Awaiter>)state) + { + tuple.Item1.GetResultAt(tuple.Item2, tuple.Item3); + } + } + + void GetResultAt(int index, UniTask.Awaiter awaiter) + { + bool hasNext; + bool completedAll; + try + { + hasNext = awaiter.GetResult(); + } + catch (Exception ex) + { + if (Interlocked.CompareExchange(ref moveNextCompleted, 1, 0) == 0) + { + completionSource.TrySetException(ex); + } + else + { + lock (states) + { + queuedResult.Enqueue((default, ex, default)); + } + } + return; + } + + lock (states) + { + states[index] = hasNext ? MergeSourceState.Pending : MergeSourceState.Completed; + completedAll = !hasNext && IsCompletedAll(); + } + if (hasNext || completedAll) + { + if (Interlocked.CompareExchange(ref moveNextCompleted, 1, 0) == 0) + { + Current = enumerators[index].Current; + completionSource.TrySetResult(!completedAll); + } + else + { + lock (states) + { + queuedResult.Enqueue((enumerators[index].Current, null, !completedAll)); + } + } + } + } + + bool HasQueuedResult() + { + lock (states) + { + return queuedResult.Count > 0; + } + } + + bool IsCompletedAll() + { + lock (states) + { + for (var i = 0; i < length; i++) + { + if (states[i] != MergeSourceState.Completed) + { + return false; + } + } + } + return true; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Merge.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Merge.cs.meta new file mode 100644 index 0000000..2f671f4 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Merge.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ca56812f160c45d0bacb4339819edf1a +timeCreated: 1694133666 \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Min.cs b/Assets/Plugins/UniTask/Runtime/Linq/Min.cs new file mode 100644 index 0000000..8768a86 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Min.cs @@ -0,0 +1,200 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Min.MinAsync(source, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitWithCancellationAsync(source, selector, cancellationToken); + } + } + + internal static partial class Min + { + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + TSource value = default; + var comparer = Comparer.Default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + + goto NEXT_LOOP; + } + + return value; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if (comparer.Compare(value, x) > 0) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + TResult value = default; + var comparer = Comparer.Default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + + goto NEXT_LOOP; + } + + return value; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if (comparer.Compare(value, x) > 0) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + TResult value = default; + var comparer = Comparer.Default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + + goto NEXT_LOOP; + } + + return value; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if (comparer.Compare(value, x) > 0) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + TResult value = default; + var comparer = Comparer.Default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + + goto NEXT_LOOP; + } + + return value; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if (comparer.Compare(value, x) > 0) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Min.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Min.cs.meta new file mode 100644 index 0000000..91378dc --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Min.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 57ac9da21d3457849a8e45548290a508 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/MinMax.cs b/Assets/Plugins/UniTask/Runtime/Linq/MinMax.cs new file mode 100644 index 0000000..aae3541 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/MinMax.cs @@ -0,0 +1,3763 @@ +using System; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Min.MinAsync(source, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Min.MinAsync(source, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Min.MinAsync(source, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Min.MinAsync(source, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Min.MinAsync(source, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Min.MinAsync(source, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Min.MinAsync(source, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Min.MinAsync(source, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Min.MinAsync(source, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Min.MinAsync(source, cancellationToken); + } + + public static UniTask MinAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MinAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Min.MinAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + } + + internal static partial class Min + { + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Int32 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Int32 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int32 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int32 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Int64 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Int64 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int64 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int64 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Single value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Single value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Single value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Single value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Double value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Double value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Double value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Double value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Decimal value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Decimal value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Decimal value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Decimal value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Int32? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Int32? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int32? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int32? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Int64? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Int64? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int64? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int64? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Single? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Single? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Single? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Single? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Double? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Double? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Double? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Double? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Decimal? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Decimal? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Decimal? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MinAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Decimal? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if( x == null) continue; + if (value > x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + } + + public static partial class UniTaskAsyncEnumerable + { + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Max.MaxAsync(source, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Max.MaxAsync(source, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Max.MaxAsync(source, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Max.MaxAsync(source, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Max.MaxAsync(source, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Max.MaxAsync(source, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Max.MaxAsync(source, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Max.MaxAsync(source, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Max.MaxAsync(source, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Max.MaxAsync(source, cancellationToken); + } + + public static UniTask MaxAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask MaxAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Max.MaxAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + } + + internal static partial class Max + { + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Int32 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Int32 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int32 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int32 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Int64 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Int64 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int64 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int64 value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Single value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Single value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Single value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Single value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Double value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Double value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Double value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Double value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Decimal value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Decimal value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Decimal value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Decimal value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + + goto NEXT_LOOP; + } + + throw Error.NoElements(); + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Int32? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Int32? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int32? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int32? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Int64? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Int64? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int64? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int64? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Single? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Single? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Single? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Single? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Double? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Double? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Double? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Double? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Decimal? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = e.Current; + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = e.Current; + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Decimal? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = selector(e.Current); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Decimal? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + public static async UniTask MaxAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Decimal? value = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + value = await selector(e.Current, cancellationToken); + if(value == null) continue; + + goto NEXT_LOOP; + } + + return default; + + NEXT_LOOP: + + while (await e.MoveNextAsync()) + { + var x = await selector(e.Current, cancellationToken); + if( x == null) continue; + if (value < x) + { + value = x; + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return value; + } + + } + +} diff --git a/Assets/Plugins/UniTask/Runtime/Linq/MinMax.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/MinMax.cs.meta new file mode 100644 index 0000000..3856b65 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/MinMax.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2d6da02d9ab970e4999daf7147d98e36 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Never.cs b/Assets/Plugins/UniTask/Runtime/Linq/Never.cs new file mode 100644 index 0000000..2dbce71 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Never.cs @@ -0,0 +1,56 @@ +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Never() + { + return Cysharp.Threading.Tasks.Linq.Never.Instance; + } + } + + internal class Never : IUniTaskAsyncEnumerable + { + public static readonly IUniTaskAsyncEnumerable Instance = new Never(); + + Never() + { + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Never(cancellationToken); + } + + class _Never : IUniTaskAsyncEnumerator + { + CancellationToken cancellationToken; + + public _Never(CancellationToken cancellationToken) + { + this.cancellationToken = cancellationToken; + } + + public T Current => default; + + public UniTask MoveNextAsync() + { + var tcs = new UniTaskCompletionSource(); + + cancellationToken.Register(state => + { + var task = (UniTaskCompletionSource)state; + task.TrySetCanceled(cancellationToken); + }, tcs); + + return tcs.Task; + } + + public UniTask DisposeAsync() + { + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Never.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Never.cs.meta new file mode 100644 index 0000000..ba9d358 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Never.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8b307c3d3be71a94da251564bcdefa3d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/OfType.cs b/Assets/Plugins/UniTask/Runtime/Linq/OfType.cs new file mode 100644 index 0000000..fea8069 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/OfType.cs @@ -0,0 +1,61 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable OfType(this IUniTaskAsyncEnumerable source) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new OfType(source); + } + } + + internal sealed class OfType : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + + public OfType(IUniTaskAsyncEnumerable source) + { + this.source = source; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _OfType(source, cancellationToken); + } + + class _OfType : AsyncEnumeratorBase + { + public _OfType(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + + : base(source, cancellationToken) + { + } + + protected override bool TryMoveNextCore(bool sourceHasCurrent, out bool result) + { + if (sourceHasCurrent) + { + if (SourceCurrent is TResult castCurent) + { + Current = castCurent; + result = true; + return true; + } + else + { + result = default; + return false; + } + } + + result = false; + return true; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/OfType.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/OfType.cs.meta new file mode 100644 index 0000000..6ace53f --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/OfType.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 111ffe87a7d700442a9ef5af554b252c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/OrderBy.cs b/Assets/Plugins/UniTask/Runtime/Linq/OrderBy.cs new file mode 100644 index 0000000..d0c379f --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/OrderBy.cs @@ -0,0 +1,558 @@ +using Cysharp.Threading.Tasks; +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + #region OrderBy_OrderByDescending + + public static IUniTaskOrderedAsyncEnumerable OrderBy(this IUniTaskAsyncEnumerable source, Func keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return new OrderedAsyncEnumerable(source, keySelector, Comparer.Default, false, null); + } + + public static IUniTaskOrderedAsyncEnumerable OrderBy(this IUniTaskAsyncEnumerable source, Func keySelector, IComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new OrderedAsyncEnumerable(source, keySelector, comparer, false, null); + } + + public static IUniTaskOrderedAsyncEnumerable OrderByAwait(this IUniTaskAsyncEnumerable source, Func> keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return new OrderedAsyncEnumerableAwait(source, keySelector, Comparer.Default, false, null); + } + + public static IUniTaskOrderedAsyncEnumerable OrderByAwait(this IUniTaskAsyncEnumerable source, Func> keySelector, IComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new OrderedAsyncEnumerableAwait(source, keySelector, comparer, false, null); + } + + public static IUniTaskOrderedAsyncEnumerable OrderByAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return new OrderedAsyncEnumerableAwaitWithCancellation(source, keySelector, Comparer.Default, false, null); + } + + public static IUniTaskOrderedAsyncEnumerable OrderByAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector, IComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new OrderedAsyncEnumerableAwaitWithCancellation(source, keySelector, comparer, false, null); + } + + public static IUniTaskOrderedAsyncEnumerable OrderByDescending(this IUniTaskAsyncEnumerable source, Func keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return new OrderedAsyncEnumerable(source, keySelector, Comparer.Default, true, null); + } + + public static IUniTaskOrderedAsyncEnumerable OrderByDescending(this IUniTaskAsyncEnumerable source, Func keySelector, IComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new OrderedAsyncEnumerable(source, keySelector, comparer, true, null); + } + + public static IUniTaskOrderedAsyncEnumerable OrderByDescendingAwait(this IUniTaskAsyncEnumerable source, Func> keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return new OrderedAsyncEnumerableAwait(source, keySelector, Comparer.Default, true, null); + } + + public static IUniTaskOrderedAsyncEnumerable OrderByDescendingAwait(this IUniTaskAsyncEnumerable source, Func> keySelector, IComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new OrderedAsyncEnumerableAwait(source, keySelector, comparer, true, null); + } + + public static IUniTaskOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return new OrderedAsyncEnumerableAwaitWithCancellation(source, keySelector, Comparer.Default, true, null); + } + + public static IUniTaskOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> keySelector, IComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return new OrderedAsyncEnumerableAwaitWithCancellation(source, keySelector, comparer, true, null); + } + + #endregion + + #region ThenBy_ThenByDescending + + public static IUniTaskOrderedAsyncEnumerable ThenBy(this IUniTaskOrderedAsyncEnumerable source, Func keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return source.CreateOrderedEnumerable(keySelector, Comparer.Default, false); + } + + public static IUniTaskOrderedAsyncEnumerable ThenBy(this IUniTaskOrderedAsyncEnumerable source, Func keySelector, IComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return source.CreateOrderedEnumerable(keySelector, comparer, false); + } + + public static IUniTaskOrderedAsyncEnumerable ThenByAwait(this IUniTaskOrderedAsyncEnumerable source, Func> keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return source.CreateOrderedEnumerable(keySelector, Comparer.Default, false); + } + + public static IUniTaskOrderedAsyncEnumerable ThenByAwait(this IUniTaskOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return source.CreateOrderedEnumerable(keySelector, comparer, false); + } + + public static IUniTaskOrderedAsyncEnumerable ThenByAwaitWithCancellation(this IUniTaskOrderedAsyncEnumerable source, Func> keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return source.CreateOrderedEnumerable(keySelector, Comparer.Default, false); + } + + public static IUniTaskOrderedAsyncEnumerable ThenByAwaitWithCancellation(this IUniTaskOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return source.CreateOrderedEnumerable(keySelector, comparer, false); + } + + public static IUniTaskOrderedAsyncEnumerable ThenByDescending(this IUniTaskOrderedAsyncEnumerable source, Func keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return source.CreateOrderedEnumerable(keySelector, Comparer.Default, true); + } + + public static IUniTaskOrderedAsyncEnumerable ThenByDescending(this IUniTaskOrderedAsyncEnumerable source, Func keySelector, IComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return source.CreateOrderedEnumerable(keySelector, comparer, true); + } + + public static IUniTaskOrderedAsyncEnumerable ThenByDescendingAwait(this IUniTaskOrderedAsyncEnumerable source, Func> keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return source.CreateOrderedEnumerable(keySelector, Comparer.Default, true); + } + + public static IUniTaskOrderedAsyncEnumerable ThenByDescendingAwait(this IUniTaskOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return source.CreateOrderedEnumerable(keySelector, comparer, true); + } + + public static IUniTaskOrderedAsyncEnumerable ThenByDescendingAwaitWithCancellation(this IUniTaskOrderedAsyncEnumerable source, Func> keySelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return source.CreateOrderedEnumerable(keySelector, Comparer.Default, true); + } + + public static IUniTaskOrderedAsyncEnumerable ThenByDescendingAwaitWithCancellation(this IUniTaskOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return source.CreateOrderedEnumerable(keySelector, comparer, true); + } + + #endregion + } + + internal abstract class AsyncEnumerableSorter + { + internal abstract UniTask ComputeKeysAsync(TElement[] elements, int count); + + internal abstract int CompareKeys(int index1, int index2); + + internal async UniTask SortAsync(TElement[] elements, int count) + { + await ComputeKeysAsync(elements, count); + + int[] map = new int[count]; + for (int i = 0; i < count; i++) map[i] = i; + QuickSort(map, 0, count - 1); + return map; + } + + void QuickSort(int[] map, int left, int right) + { + do + { + int i = left; + int j = right; + int x = map[i + ((j - i) >> 1)]; + do + { + while (i < map.Length && CompareKeys(x, map[i]) > 0) i++; + while (j >= 0 && CompareKeys(x, map[j]) < 0) j--; + if (i > j) break; + if (i < j) + { + int temp = map[i]; + map[i] = map[j]; + map[j] = temp; + } + i++; + j--; + } while (i <= j); + if (j - left <= right - i) + { + if (left < j) QuickSort(map, left, j); + left = i; + } + else + { + if (i < right) QuickSort(map, i, right); + right = j; + } + } while (left < right); + } + } + + internal class SyncSelectorAsyncEnumerableSorter : AsyncEnumerableSorter + { + readonly Func keySelector; + readonly IComparer comparer; + readonly bool descending; + readonly AsyncEnumerableSorter next; + TKey[] keys; + + internal SyncSelectorAsyncEnumerableSorter(Func keySelector, IComparer comparer, bool descending, AsyncEnumerableSorter next) + { + this.keySelector = keySelector; + this.comparer = comparer; + this.descending = descending; + this.next = next; + } + + internal override async UniTask ComputeKeysAsync(TElement[] elements, int count) + { + keys = new TKey[count]; + for (int i = 0; i < count; i++) keys[i] = keySelector(elements[i]); + if (next != null) await next.ComputeKeysAsync(elements, count); + } + + internal override int CompareKeys(int index1, int index2) + { + int c = comparer.Compare(keys[index1], keys[index2]); + if (c == 0) + { + if (next == null) return index1 - index2; + return next.CompareKeys(index1, index2); + } + return descending ? -c : c; + } + } + + internal class AsyncSelectorEnumerableSorter : AsyncEnumerableSorter + { + readonly Func> keySelector; + readonly IComparer comparer; + readonly bool descending; + readonly AsyncEnumerableSorter next; + TKey[] keys; + + internal AsyncSelectorEnumerableSorter(Func> keySelector, IComparer comparer, bool descending, AsyncEnumerableSorter next) + { + this.keySelector = keySelector; + this.comparer = comparer; + this.descending = descending; + this.next = next; + } + + internal override async UniTask ComputeKeysAsync(TElement[] elements, int count) + { + keys = new TKey[count]; + for (int i = 0; i < count; i++) keys[i] = await keySelector(elements[i]); + if (next != null) await next.ComputeKeysAsync(elements, count); + } + + internal override int CompareKeys(int index1, int index2) + { + int c = comparer.Compare(keys[index1], keys[index2]); + if (c == 0) + { + if (next == null) return index1 - index2; + return next.CompareKeys(index1, index2); + } + return descending ? -c : c; + } + } + + internal class AsyncSelectorWithCancellationEnumerableSorter : AsyncEnumerableSorter + { + readonly Func> keySelector; + readonly IComparer comparer; + readonly bool descending; + readonly AsyncEnumerableSorter next; + CancellationToken cancellationToken; + TKey[] keys; + + internal AsyncSelectorWithCancellationEnumerableSorter(Func> keySelector, IComparer comparer, bool descending, AsyncEnumerableSorter next, CancellationToken cancellationToken) + { + this.keySelector = keySelector; + this.comparer = comparer; + this.descending = descending; + this.next = next; + this.cancellationToken = cancellationToken; + } + + internal override async UniTask ComputeKeysAsync(TElement[] elements, int count) + { + keys = new TKey[count]; + for (int i = 0; i < count; i++) keys[i] = await keySelector(elements[i], cancellationToken); + if (next != null) await next.ComputeKeysAsync(elements, count); + } + + internal override int CompareKeys(int index1, int index2) + { + int c = comparer.Compare(keys[index1], keys[index2]); + if (c == 0) + { + if (next == null) return index1 - index2; + return next.CompareKeys(index1, index2); + } + return descending ? -c : c; + } + } + + internal abstract class OrderedAsyncEnumerable : IUniTaskOrderedAsyncEnumerable + { + protected readonly IUniTaskAsyncEnumerable source; + + public OrderedAsyncEnumerable(IUniTaskAsyncEnumerable source) + { + this.source = source; + } + + public IUniTaskOrderedAsyncEnumerable CreateOrderedEnumerable(Func keySelector, IComparer comparer, bool descending) + { + return new OrderedAsyncEnumerable(source, keySelector, comparer, descending, this); + } + + public IUniTaskOrderedAsyncEnumerable CreateOrderedEnumerable(Func> keySelector, IComparer comparer, bool descending) + { + return new OrderedAsyncEnumerableAwait(source, keySelector, comparer, descending, this); + } + + public IUniTaskOrderedAsyncEnumerable CreateOrderedEnumerable(Func> keySelector, IComparer comparer, bool descending) + { + return new OrderedAsyncEnumerableAwaitWithCancellation(source, keySelector, comparer, descending, this); + } + + internal abstract AsyncEnumerableSorter GetAsyncEnumerableSorter(AsyncEnumerableSorter next, CancellationToken cancellationToken); + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _OrderedAsyncEnumerator(this, cancellationToken); + } + + class _OrderedAsyncEnumerator : MoveNextSource, IUniTaskAsyncEnumerator + { + protected readonly OrderedAsyncEnumerable parent; + CancellationToken cancellationToken; + TElement[] buffer; + int[] map; + int index; + + public _OrderedAsyncEnumerator(OrderedAsyncEnumerable parent, CancellationToken cancellationToken) + { + this.parent = parent; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TElement Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (map == null) + { + completionSource.Reset(); + CreateSortSource().Forget(); + return new UniTask(this, completionSource.Version); + } + + if (index < buffer.Length) + { + Current = buffer[map[index++]]; + return CompletedTasks.True; + } + else + { + return CompletedTasks.False; + } + } + + async UniTaskVoid CreateSortSource() + { + try + { + buffer = await parent.source.ToArrayAsync(); + if (buffer.Length == 0) + { + completionSource.TrySetResult(false); + return; + } + + var sorter = parent.GetAsyncEnumerableSorter(null, cancellationToken); + map = await sorter.SortAsync(buffer, buffer.Length); + sorter = null; + + // set first value + Current = buffer[map[index++]]; + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + + completionSource.TrySetResult(true); + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + return default; + } + } + } + + internal class OrderedAsyncEnumerable : OrderedAsyncEnumerable + { + readonly Func keySelector; + readonly IComparer comparer; + readonly bool descending; + readonly OrderedAsyncEnumerable parent; + + public OrderedAsyncEnumerable(IUniTaskAsyncEnumerable source, Func keySelector, IComparer comparer, bool descending, OrderedAsyncEnumerable parent) + : base(source) + { + this.keySelector = keySelector; + this.comparer = comparer; + this.descending = descending; + this.parent = parent; + } + + internal override AsyncEnumerableSorter GetAsyncEnumerableSorter(AsyncEnumerableSorter next, CancellationToken cancellationToken) + { + AsyncEnumerableSorter sorter = new SyncSelectorAsyncEnumerableSorter(keySelector, comparer, descending, next); + if (parent != null) sorter = parent.GetAsyncEnumerableSorter(sorter, cancellationToken); + return sorter; + } + } + + internal class OrderedAsyncEnumerableAwait : OrderedAsyncEnumerable + { + readonly Func> keySelector; + readonly IComparer comparer; + readonly bool descending; + readonly OrderedAsyncEnumerable parent; + + public OrderedAsyncEnumerableAwait(IUniTaskAsyncEnumerable source, Func> keySelector, IComparer comparer, bool descending, OrderedAsyncEnumerable parent) + : base(source) + { + this.keySelector = keySelector; + this.comparer = comparer; + this.descending = descending; + this.parent = parent; + } + + internal override AsyncEnumerableSorter GetAsyncEnumerableSorter(AsyncEnumerableSorter next, CancellationToken cancellationToken) + { + AsyncEnumerableSorter sorter = new AsyncSelectorEnumerableSorter(keySelector, comparer, descending, next); + if (parent != null) sorter = parent.GetAsyncEnumerableSorter(sorter, cancellationToken); + return sorter; + } + } + + internal class OrderedAsyncEnumerableAwaitWithCancellation : OrderedAsyncEnumerable + { + readonly Func> keySelector; + readonly IComparer comparer; + readonly bool descending; + readonly OrderedAsyncEnumerable parent; + + public OrderedAsyncEnumerableAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> keySelector, IComparer comparer, bool descending, OrderedAsyncEnumerable parent) + : base(source) + { + this.keySelector = keySelector; + this.comparer = comparer; + this.descending = descending; + this.parent = parent; + } + + internal override AsyncEnumerableSorter GetAsyncEnumerableSorter(AsyncEnumerableSorter next, CancellationToken cancellationToken) + { + AsyncEnumerableSorter sorter = new AsyncSelectorWithCancellationEnumerableSorter(keySelector, comparer, descending, next, cancellationToken); + if (parent != null) sorter = parent.GetAsyncEnumerableSorter(sorter, cancellationToken); + return sorter; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/OrderBy.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/OrderBy.cs.meta new file mode 100644 index 0000000..5c6b3e4 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/OrderBy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 413883ceff8546143bdf200aafa4b8f7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Pairwise.cs b/Assets/Plugins/UniTask/Runtime/Linq/Pairwise.cs new file mode 100644 index 0000000..5d44a9e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Pairwise.cs @@ -0,0 +1,128 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable<(TSource, TSource)> Pairwise(this IUniTaskAsyncEnumerable source) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new Pairwise(source); + } + } + + internal sealed class Pairwise : IUniTaskAsyncEnumerable<(TSource, TSource)> + { + readonly IUniTaskAsyncEnumerable source; + + public Pairwise(IUniTaskAsyncEnumerable source) + { + this.source = source; + } + + public IUniTaskAsyncEnumerator<(TSource, TSource)> GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Pairwise(source, cancellationToken); + } + + sealed class _Pairwise : MoveNextSource, IUniTaskAsyncEnumerator<(TSource, TSource)> + { + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable source; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + + TSource prev; + bool isFirst; + + public _Pairwise(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + this.source = source; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public (TSource, TSource) Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (enumerator == null) + { + isFirst = true; + enumerator = source.GetAsyncEnumerator(cancellationToken); + } + + completionSource.Reset(); + SourceMoveNext(); + return new UniTask(this, completionSource.Version); + } + + void SourceMoveNext() + { + try + { + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + MoveNextCore(this); + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + static void MoveNextCore(object state) + { + var self = (_Pairwise)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + if (self.isFirst) + { + self.isFirst = false; + self.prev = self.enumerator.Current; + self.SourceMoveNext(); // run again. okay to use recursive(only one more). + } + else + { + var p = self.prev; + self.prev = self.enumerator.Current; + self.Current = (p, self.prev); + self.completionSource.TrySetResult(true); + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Pairwise.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Pairwise.cs.meta new file mode 100644 index 0000000..727b8cf --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Pairwise.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cddbf051d2a88f549986c468b23214af +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Publish.cs b/Assets/Plugins/UniTask/Runtime/Linq/Publish.cs new file mode 100644 index 0000000..d218c0f --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Publish.cs @@ -0,0 +1,173 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IConnectableUniTaskAsyncEnumerable Publish(this IUniTaskAsyncEnumerable source) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new Publish(source); + } + } + + internal sealed class Publish : IConnectableUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly CancellationTokenSource cancellationTokenSource; + + TriggerEvent trigger; + IUniTaskAsyncEnumerator enumerator; + IDisposable connectedDisposable; + bool isCompleted; + + public Publish(IUniTaskAsyncEnumerable source) + { + this.source = source; + this.cancellationTokenSource = new CancellationTokenSource(); + } + + public IDisposable Connect() + { + if (connectedDisposable != null) return connectedDisposable; + + if (enumerator == null) + { + enumerator = source.GetAsyncEnumerator(cancellationTokenSource.Token); + } + + ConsumeEnumerator().Forget(); + + connectedDisposable = new ConnectDisposable(cancellationTokenSource); + return connectedDisposable; + } + + async UniTaskVoid ConsumeEnumerator() + { + try + { + try + { + while (await enumerator.MoveNextAsync()) + { + trigger.SetResult(enumerator.Current); + } + trigger.SetCompleted(); + } + catch (Exception ex) + { + trigger.SetError(ex); + } + } + finally + { + isCompleted = true; + await enumerator.DisposeAsync(); + } + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Publish(this, cancellationToken); + } + + sealed class ConnectDisposable : IDisposable + { + readonly CancellationTokenSource cancellationTokenSource; + + public ConnectDisposable(CancellationTokenSource cancellationTokenSource) + { + this.cancellationTokenSource = cancellationTokenSource; + } + + public void Dispose() + { + this.cancellationTokenSource.Cancel(); + } + } + + sealed class _Publish : MoveNextSource, IUniTaskAsyncEnumerator, ITriggerHandler + { + static readonly Action CancelDelegate = OnCanceled; + + readonly Publish parent; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool isDisposed; + + public _Publish(Publish parent, CancellationToken cancellationToken) + { + if (cancellationToken.IsCancellationRequested) return; + + this.parent = parent; + this.cancellationToken = cancellationToken; + + if (cancellationToken.CanBeCanceled) + { + this.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(CancelDelegate, this); + } + + parent.trigger.Add(this); + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + ITriggerHandler ITriggerHandler.Prev { get; set; } + ITriggerHandler ITriggerHandler.Next { get; set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (parent.isCompleted) return CompletedTasks.False; + + completionSource.Reset(); + return new UniTask(this, completionSource.Version); + } + + static void OnCanceled(object state) + { + var self = (_Publish)state; + self.completionSource.TrySetCanceled(self.cancellationToken); + self.DisposeAsync().Forget(); + } + + public UniTask DisposeAsync() + { + if (!isDisposed) + { + isDisposed = true; + TaskTracker.RemoveTracking(this); + cancellationTokenRegistration.Dispose(); + parent.trigger.Remove(this); + } + + return default; + } + + public void OnNext(TSource value) + { + Current = value; + completionSource.TrySetResult(true); + } + + public void OnCanceled(CancellationToken cancellationToken) + { + completionSource.TrySetCanceled(cancellationToken); + } + + public void OnCompleted() + { + completionSource.TrySetResult(false); + } + + public void OnError(Exception ex) + { + completionSource.TrySetException(ex); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Publish.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Publish.cs.meta new file mode 100644 index 0000000..f3a81ba --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Publish.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 93c684d1e88c09d4e89b79437d97b810 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Queue.cs b/Assets/Plugins/UniTask/Runtime/Linq/Queue.cs new file mode 100644 index 0000000..b5c221f --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Queue.cs @@ -0,0 +1,103 @@ +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Queue(this IUniTaskAsyncEnumerable source) + { + return new QueueOperator(source); + } + } + + internal sealed class QueueOperator : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + + public QueueOperator(IUniTaskAsyncEnumerable source) + { + this.source = source; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Queue(source, cancellationToken); + } + + sealed class _Queue : IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + CancellationToken cancellationToken; + + Channel channel; + IUniTaskAsyncEnumerator channelEnumerator; + IUniTaskAsyncEnumerator sourceEnumerator; + bool channelClosed; + + public _Queue(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + this.source = source; + this.cancellationToken = cancellationToken; + } + + public TSource Current => channelEnumerator.Current; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (sourceEnumerator == null) + { + sourceEnumerator = source.GetAsyncEnumerator(cancellationToken); + channel = Channel.CreateSingleConsumerUnbounded(); + + channelEnumerator = channel.Reader.ReadAllAsync().GetAsyncEnumerator(cancellationToken); + + ConsumeAll(this, sourceEnumerator, channel).Forget(); + } + + return channelEnumerator.MoveNextAsync(); + } + + static async UniTaskVoid ConsumeAll(_Queue self, IUniTaskAsyncEnumerator enumerator, ChannelWriter writer) + { + try + { + while (await enumerator.MoveNextAsync()) + { + writer.TryWrite(enumerator.Current); + } + writer.TryComplete(); + } + catch (Exception ex) + { + writer.TryComplete(ex); + } + finally + { + self.channelClosed = true; + await enumerator.DisposeAsync(); + } + } + + public async UniTask DisposeAsync() + { + if (sourceEnumerator != null) + { + await sourceEnumerator.DisposeAsync(); + } + if (channelEnumerator != null) + { + await channelEnumerator.DisposeAsync(); + } + + if (!channelClosed) + { + channelClosed = true; + channel.Writer.TryComplete(new OperationCanceledException()); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Queue.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Queue.cs.meta new file mode 100644 index 0000000..35f3fab --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Queue.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b7ea1bcf9dbebb042bc99c7816249e02 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Range.cs b/Assets/Plugins/UniTask/Runtime/Linq/Range.cs new file mode 100644 index 0000000..24a795d --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Range.cs @@ -0,0 +1,75 @@ +using Cysharp.Threading.Tasks.Internal; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Range(int start, int count) + { + if (count < 0) throw Error.ArgumentOutOfRange(nameof(count)); + + var end = (long)start + count - 1L; + if (end > int.MaxValue) throw Error.ArgumentOutOfRange(nameof(count)); + + if (count == 0) UniTaskAsyncEnumerable.Empty(); + + return new Cysharp.Threading.Tasks.Linq.Range(start, count); + } + } + + internal class Range : IUniTaskAsyncEnumerable + { + readonly int start; + readonly int end; + + public Range(int start, int count) + { + this.start = start; + this.end = start + count; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Range(start, end, cancellationToken); + } + + class _Range : IUniTaskAsyncEnumerator + { + readonly int start; + readonly int end; + int current; + CancellationToken cancellationToken; + + public _Range(int start, int end, CancellationToken cancellationToken) + { + this.start = start; + this.end = end; + this.cancellationToken = cancellationToken; + + this.current = start - 1; + } + + public int Current => current; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + current++; + + if (current != end) + { + return CompletedTasks.True; + } + + return CompletedTasks.False; + } + + public UniTask DisposeAsync() + { + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Range.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Range.cs.meta new file mode 100644 index 0000000..36272fc --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Range.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d826418a813498648b10542d0a5fb173 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Repeat.cs b/Assets/Plugins/UniTask/Runtime/Linq/Repeat.cs new file mode 100644 index 0000000..db90a1a --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Repeat.cs @@ -0,0 +1,68 @@ +using Cysharp.Threading.Tasks.Internal; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Repeat(TElement element, int count) + { + if (count < 0) throw Error.ArgumentOutOfRange(nameof(count)); + + return new Repeat(element, count); + } + } + + internal class Repeat : IUniTaskAsyncEnumerable + { + readonly TElement element; + readonly int count; + + public Repeat(TElement element, int count) + { + this.element = element; + this.count = count; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Repeat(element, count, cancellationToken); + } + + class _Repeat : IUniTaskAsyncEnumerator + { + readonly TElement element; + readonly int count; + int remaining; + CancellationToken cancellationToken; + + public _Repeat(TElement element, int count, CancellationToken cancellationToken) + { + this.element = element; + this.count = count; + this.cancellationToken = cancellationToken; + + this.remaining = count; + } + + public TElement Current => element; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (remaining-- != 0) + { + return CompletedTasks.True; + } + + return CompletedTasks.False; + } + + public UniTask DisposeAsync() + { + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Repeat.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Repeat.cs.meta new file mode 100644 index 0000000..693d579 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Repeat.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3819a3925165a674d80ee848c8600379 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Return.cs b/Assets/Plugins/UniTask/Runtime/Linq/Return.cs new file mode 100644 index 0000000..ba8fa8d --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Return.cs @@ -0,0 +1,63 @@ +using Cysharp.Threading.Tasks.Internal; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Return(TValue value) + { + return new Return(value); + } + } + + internal class Return : IUniTaskAsyncEnumerable + { + readonly TValue value; + + public Return(TValue value) + { + this.value = value; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Return(value, cancellationToken); + } + + class _Return : IUniTaskAsyncEnumerator + { + readonly TValue value; + CancellationToken cancellationToken; + + bool called; + + public _Return(TValue value, CancellationToken cancellationToken) + { + this.value = value; + this.cancellationToken = cancellationToken; + this.called = false; + } + + public TValue Current => value; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (!called) + { + called = true; + return CompletedTasks.True; + } + + return CompletedTasks.False; + } + + public UniTask DisposeAsync() + { + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Return.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Return.cs.meta new file mode 100644 index 0000000..ad264d0 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Return.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4313cd8ecf705e44f9064ce46e293c2c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Reverse.cs b/Assets/Plugins/UniTask/Runtime/Linq/Reverse.cs new file mode 100644 index 0000000..48d4318 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Reverse.cs @@ -0,0 +1,78 @@ +using Cysharp.Threading.Tasks.Internal; +using System.Collections.Generic; +using System.Linq; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Reverse(this IUniTaskAsyncEnumerable source) + { + Error.ThrowArgumentNullException(source, nameof(source)); + return new Reverse(source); + } + } + + internal sealed class Reverse : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + + public Reverse(IUniTaskAsyncEnumerable source) + { + this.source = source; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Reverse(source, cancellationToken); + } + + sealed class _Reverse : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + CancellationToken cancellationToken; + + TSource[] array; + int index; + + public _Reverse(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + this.source = source; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + // after consumed array, don't use await so allow async(not require UniTaskCompletionSourceCore). + public async UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (array == null) + { + array = await source.ToArrayAsync(cancellationToken); + index = array.Length - 1; + } + + if (index != -1) + { + Current = array[index]; + --index; + return true; + } + else + { + return false; + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Reverse.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Reverse.cs.meta new file mode 100644 index 0000000..4a28306 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Reverse.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b2769e65c729b4f4ca6af9826d9c7b90 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Select.cs b/Assets/Plugins/UniTask/Runtime/Linq/Select.cs new file mode 100644 index 0000000..50e9cec --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Select.cs @@ -0,0 +1,760 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Select(this IUniTaskAsyncEnumerable source, Func selector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(selector, nameof(selector)); + + return new Cysharp.Threading.Tasks.Linq.Select(source, selector); + } + + public static IUniTaskAsyncEnumerable Select(this IUniTaskAsyncEnumerable source, Func selector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(selector, nameof(selector)); + + return new Cysharp.Threading.Tasks.Linq.SelectInt(source, selector); + } + + public static IUniTaskAsyncEnumerable SelectAwait(this IUniTaskAsyncEnumerable source, Func> selector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(selector, nameof(selector)); + + return new Cysharp.Threading.Tasks.Linq.SelectAwait(source, selector); + } + + public static IUniTaskAsyncEnumerable SelectAwait(this IUniTaskAsyncEnumerable source, Func> selector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(selector, nameof(selector)); + + return new Cysharp.Threading.Tasks.Linq.SelectIntAwait(source, selector); + } + + public static IUniTaskAsyncEnumerable SelectAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> selector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(selector, nameof(selector)); + + return new Cysharp.Threading.Tasks.Linq.SelectAwaitWithCancellation(source, selector); + } + + public static IUniTaskAsyncEnumerable SelectAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> selector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(selector, nameof(selector)); + + return new Cysharp.Threading.Tasks.Linq.SelectIntAwaitWithCancellation(source, selector); + } + } + + internal sealed class Select : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func selector; + + public Select(IUniTaskAsyncEnumerable source, Func selector) + { + this.source = source; + this.selector = selector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Select(source, selector, cancellationToken); + } + + sealed class _Select : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func selector; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + Action moveNextAction; + + public _Select(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + this.source = source; + this.selector = selector; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + goto case 0; + case 0: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + Current = selector(enumerator.Current); + goto CONTINUE; + } + else + { + goto DONE; + } + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + return enumerator.DisposeAsync(); + } + } + } + + internal sealed class SelectInt : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func selector; + + public SelectInt(IUniTaskAsyncEnumerable source, Func selector) + { + this.source = source; + this.selector = selector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Select(source, selector, cancellationToken); + } + + sealed class _Select : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func selector; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + Action moveNextAction; + int index; + + public _Select(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + this.source = source; + this.selector = selector; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + goto case 0; + case 0: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + Current = selector(enumerator.Current, checked(index++)); + goto CONTINUE; + } + else + { + goto DONE; + } + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + return enumerator.DisposeAsync(); + } + } + } + + internal sealed class SelectAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> selector; + + public SelectAwait(IUniTaskAsyncEnumerable source, Func> selector) + { + this.source = source; + this.selector = selector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SelectAwait(source, selector, cancellationToken); + } + + sealed class _SelectAwait : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> selector; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + UniTask.Awaiter awaiter2; + Action moveNextAction; + + public _SelectAwait(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + this.source = source; + this.selector = selector; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + goto case 0; + case 0: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + awaiter2 = selector(enumerator.Current).GetAwaiter(); + if (awaiter2.IsCompleted) + { + goto case 2; + } + else + { + state = 2; + awaiter2.UnsafeOnCompleted(moveNextAction); + return; + } + } + else + { + goto DONE; + } + case 2: + Current = awaiter2.GetResult(); + goto CONTINUE; + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + return enumerator.DisposeAsync(); + } + } + } + + internal sealed class SelectIntAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> selector; + + public SelectIntAwait(IUniTaskAsyncEnumerable source, Func> selector) + { + this.source = source; + this.selector = selector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SelectAwait(source, selector, cancellationToken); + } + + sealed class _SelectAwait : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> selector; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + UniTask.Awaiter awaiter2; + Action moveNextAction; + int index; + + public _SelectAwait(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + this.source = source; + this.selector = selector; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + goto case 0; + case 0: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + awaiter2 = selector(enumerator.Current, checked(index++)).GetAwaiter(); + if (awaiter2.IsCompleted) + { + goto case 2; + } + else + { + state = 2; + awaiter2.UnsafeOnCompleted(moveNextAction); + return; + } + } + else + { + goto DONE; + } + case 2: + Current = awaiter2.GetResult(); + goto CONTINUE; + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + return enumerator.DisposeAsync(); + } + } + } + + internal sealed class SelectAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> selector; + + public SelectAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> selector) + { + this.source = source; + this.selector = selector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SelectAwaitWithCancellation(source, selector, cancellationToken); + } + + sealed class _SelectAwaitWithCancellation : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> selector; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + UniTask.Awaiter awaiter2; + Action moveNextAction; + + public _SelectAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + this.source = source; + this.selector = selector; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + goto case 0; + case 0: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + awaiter2 = selector(enumerator.Current, cancellationToken).GetAwaiter(); + if (awaiter2.IsCompleted) + { + goto case 2; + } + else + { + state = 2; + awaiter2.UnsafeOnCompleted(moveNextAction); + return; + } + } + else + { + goto DONE; + } + case 2: + Current = awaiter2.GetResult(); + goto CONTINUE; + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + return enumerator.DisposeAsync(); + } + } + } + + internal sealed class SelectIntAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> selector; + + public SelectIntAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> selector) + { + this.source = source; + this.selector = selector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SelectAwaitWithCancellation(source, selector, cancellationToken); + } + + sealed class _SelectAwaitWithCancellation : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> selector; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + UniTask.Awaiter awaiter2; + Action moveNextAction; + int index; + + public _SelectAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + this.source = source; + this.selector = selector; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + goto case 0; + case 0: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + awaiter2 = selector(enumerator.Current, checked(index++), cancellationToken).GetAwaiter(); + if (awaiter2.IsCompleted) + { + goto case 2; + } + else + { + state = 2; + awaiter2.UnsafeOnCompleted(moveNextAction); + return; + } + } + else + { + goto DONE; + } + case 2: + Current = awaiter2.GetResult(); + goto CONTINUE; + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + return enumerator.DisposeAsync(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Select.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Select.cs.meta new file mode 100644 index 0000000..476e972 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Select.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dc68e598ca44a134b988dfaf5e53bfba +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/SelectMany.cs b/Assets/Plugins/UniTask/Runtime/Linq/SelectMany.cs new file mode 100644 index 0000000..6cad2a5 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/SelectMany.cs @@ -0,0 +1,892 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + + public static IUniTaskAsyncEnumerable SelectMany(this IUniTaskAsyncEnumerable source, Func> selector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(selector, nameof(selector)); + + return new SelectMany(source, selector, (x, y) => y); + } + + public static IUniTaskAsyncEnumerable SelectMany(this IUniTaskAsyncEnumerable source, Func> selector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(selector, nameof(selector)); + + return new SelectMany(source, selector, (x, y) => y); + } + + public static IUniTaskAsyncEnumerable SelectMany(this IUniTaskAsyncEnumerable source, Func> collectionSelector, Func resultSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(collectionSelector, nameof(collectionSelector)); + + return new SelectMany(source, collectionSelector, resultSelector); + } + + public static IUniTaskAsyncEnumerable SelectMany(this IUniTaskAsyncEnumerable source, Func> collectionSelector, Func resultSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(collectionSelector, nameof(collectionSelector)); + + return new SelectMany(source, collectionSelector, resultSelector); + } + + public static IUniTaskAsyncEnumerable SelectManyAwait(this IUniTaskAsyncEnumerable source, Func>> selector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(selector, nameof(selector)); + + return new SelectManyAwait(source, selector, (x, y) => UniTask.FromResult(y)); + } + + public static IUniTaskAsyncEnumerable SelectManyAwait(this IUniTaskAsyncEnumerable source, Func>> selector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(selector, nameof(selector)); + + return new SelectManyAwait(source, selector, (x, y) => UniTask.FromResult(y)); + } + + public static IUniTaskAsyncEnumerable SelectManyAwait(this IUniTaskAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(collectionSelector, nameof(collectionSelector)); + + return new SelectManyAwait(source, collectionSelector, resultSelector); + } + + public static IUniTaskAsyncEnumerable SelectManyAwait(this IUniTaskAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(collectionSelector, nameof(collectionSelector)); + + return new SelectManyAwait(source, collectionSelector, resultSelector); + } + + public static IUniTaskAsyncEnumerable SelectManyAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func>> selector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(selector, nameof(selector)); + + return new SelectManyAwaitWithCancellation(source, selector, (x, y, c) => UniTask.FromResult(y)); + } + + public static IUniTaskAsyncEnumerable SelectManyAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func>> selector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(selector, nameof(selector)); + + return new SelectManyAwaitWithCancellation(source, selector, (x, y, c) => UniTask.FromResult(y)); + } + + public static IUniTaskAsyncEnumerable SelectManyAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(collectionSelector, nameof(collectionSelector)); + + return new SelectManyAwaitWithCancellation(source, collectionSelector, resultSelector); + } + + public static IUniTaskAsyncEnumerable SelectManyAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(collectionSelector, nameof(collectionSelector)); + + return new SelectManyAwaitWithCancellation(source, collectionSelector, resultSelector); + } + } + + internal sealed class SelectMany : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> selector1; + readonly Func> selector2; + readonly Func resultSelector; + + public SelectMany(IUniTaskAsyncEnumerable source, Func> selector, Func resultSelector) + { + this.source = source; + this.selector1 = selector; + this.selector2 = null; + this.resultSelector = resultSelector; + } + + public SelectMany(IUniTaskAsyncEnumerable source, Func> selector, Func resultSelector) + { + this.source = source; + this.selector1 = null; + this.selector2 = selector; + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SelectMany(source, selector1, selector2, resultSelector, cancellationToken); + } + + sealed class _SelectMany : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action sourceMoveNextCoreDelegate = SourceMoveNextCore; + static readonly Action selectedSourceMoveNextCoreDelegate = SeletedSourceMoveNextCore; + static readonly Action selectedEnumeratorDisposeAsyncCoreDelegate = SelectedEnumeratorDisposeAsyncCore; + + readonly IUniTaskAsyncEnumerable source; + + readonly Func> selector1; + readonly Func> selector2; + readonly Func resultSelector; + CancellationToken cancellationToken; + + TSource sourceCurrent; + int sourceIndex; + IUniTaskAsyncEnumerator sourceEnumerator; + IUniTaskAsyncEnumerator selectedEnumerator; + UniTask.Awaiter sourceAwaiter; + UniTask.Awaiter selectedAwaiter; + UniTask.Awaiter selectedDisposeAsyncAwaiter; + + public _SelectMany(IUniTaskAsyncEnumerable source, Func> selector1, Func> selector2, Func resultSelector, CancellationToken cancellationToken) + { + this.source = source; + this.selector1 = selector1; + this.selector2 = selector2; + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + completionSource.Reset(); + + // iterate selected field + if (selectedEnumerator != null) + { + MoveNextSelected(); + } + else + { + // iterate source field + if (sourceEnumerator == null) + { + sourceEnumerator = source.GetAsyncEnumerator(cancellationToken); + } + MoveNextSource(); + } + + return new UniTask(this, completionSource.Version); + } + + void MoveNextSource() + { + try + { + sourceAwaiter = sourceEnumerator.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + + if (sourceAwaiter.IsCompleted) + { + SourceMoveNextCore(this); + } + else + { + sourceAwaiter.SourceOnCompleted(sourceMoveNextCoreDelegate, this); + } + } + + void MoveNextSelected() + { + try + { + selectedAwaiter = selectedEnumerator.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + + if (selectedAwaiter.IsCompleted) + { + SeletedSourceMoveNextCore(this); + } + else + { + selectedAwaiter.SourceOnCompleted(selectedSourceMoveNextCoreDelegate, this); + } + } + + static void SourceMoveNextCore(object state) + { + var self = (_SelectMany)state; + + if (self.TryGetResult(self.sourceAwaiter, out var result)) + { + if (result) + { + try + { + self.sourceCurrent = self.sourceEnumerator.Current; + if (self.selector1 != null) + { + self.selectedEnumerator = self.selector1(self.sourceCurrent).GetAsyncEnumerator(self.cancellationToken); + } + else + { + self.selectedEnumerator = self.selector2(self.sourceCurrent, checked(self.sourceIndex++)).GetAsyncEnumerator(self.cancellationToken); + } + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + + self.MoveNextSelected(); // iterated selected source. + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + static void SeletedSourceMoveNextCore(object state) + { + var self = (_SelectMany)state; + + if (self.TryGetResult(self.selectedAwaiter, out var result)) + { + if (result) + { + try + { + self.Current = self.resultSelector(self.sourceCurrent, self.selectedEnumerator.Current); + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + + self.completionSource.TrySetResult(true); + } + else + { + // dispose selected source and try iterate source. + try + { + self.selectedDisposeAsyncAwaiter = self.selectedEnumerator.DisposeAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + if (self.selectedDisposeAsyncAwaiter.IsCompleted) + { + SelectedEnumeratorDisposeAsyncCore(self); + } + else + { + self.selectedDisposeAsyncAwaiter.SourceOnCompleted(selectedEnumeratorDisposeAsyncCoreDelegate, self); + } + } + } + } + + static void SelectedEnumeratorDisposeAsyncCore(object state) + { + var self = (_SelectMany)state; + + if (self.TryGetResult(self.selectedDisposeAsyncAwaiter)) + { + self.selectedEnumerator = null; + self.selectedAwaiter = default; + + self.MoveNextSource(); // iterate next source + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (selectedEnumerator != null) + { + await selectedEnumerator.DisposeAsync(); + } + if (sourceEnumerator != null) + { + await sourceEnumerator.DisposeAsync(); + } + } + } + } + + internal sealed class SelectManyAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func>> selector1; + readonly Func>> selector2; + readonly Func> resultSelector; + + public SelectManyAwait(IUniTaskAsyncEnumerable source, Func>> selector, Func> resultSelector) + { + this.source = source; + this.selector1 = selector; + this.selector2 = null; + this.resultSelector = resultSelector; + } + + public SelectManyAwait(IUniTaskAsyncEnumerable source, Func>> selector, Func> resultSelector) + { + this.source = source; + this.selector1 = null; + this.selector2 = selector; + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SelectManyAwait(source, selector1, selector2, resultSelector, cancellationToken); + } + + sealed class _SelectManyAwait : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action sourceMoveNextCoreDelegate = SourceMoveNextCore; + static readonly Action selectedSourceMoveNextCoreDelegate = SeletedSourceMoveNextCore; + static readonly Action selectedEnumeratorDisposeAsyncCoreDelegate = SelectedEnumeratorDisposeAsyncCore; + static readonly Action selectorAwaitCoreDelegate = SelectorAwaitCore; + static readonly Action resultSelectorAwaitCoreDelegate = ResultSelectorAwaitCore; + + readonly IUniTaskAsyncEnumerable source; + + readonly Func>> selector1; + readonly Func>> selector2; + readonly Func> resultSelector; + CancellationToken cancellationToken; + + TSource sourceCurrent; + int sourceIndex; + IUniTaskAsyncEnumerator sourceEnumerator; + IUniTaskAsyncEnumerator selectedEnumerator; + UniTask.Awaiter sourceAwaiter; + UniTask.Awaiter selectedAwaiter; + UniTask.Awaiter selectedDisposeAsyncAwaiter; + + // await additional + UniTask>.Awaiter collectionSelectorAwaiter; + UniTask.Awaiter resultSelectorAwaiter; + + public _SelectManyAwait(IUniTaskAsyncEnumerable source, Func>> selector1, Func>> selector2, Func> resultSelector, CancellationToken cancellationToken) + { + this.source = source; + this.selector1 = selector1; + this.selector2 = selector2; + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + completionSource.Reset(); + + // iterate selected field + if (selectedEnumerator != null) + { + MoveNextSelected(); + } + else + { + // iterate source field + if (sourceEnumerator == null) + { + sourceEnumerator = source.GetAsyncEnumerator(cancellationToken); + } + MoveNextSource(); + } + + return new UniTask(this, completionSource.Version); + } + + void MoveNextSource() + { + try + { + sourceAwaiter = sourceEnumerator.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + + if (sourceAwaiter.IsCompleted) + { + SourceMoveNextCore(this); + } + else + { + sourceAwaiter.SourceOnCompleted(sourceMoveNextCoreDelegate, this); + } + } + + void MoveNextSelected() + { + try + { + selectedAwaiter = selectedEnumerator.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + + if (selectedAwaiter.IsCompleted) + { + SeletedSourceMoveNextCore(this); + } + else + { + selectedAwaiter.SourceOnCompleted(selectedSourceMoveNextCoreDelegate, this); + } + } + + static void SourceMoveNextCore(object state) + { + var self = (_SelectManyAwait)state; + + if (self.TryGetResult(self.sourceAwaiter, out var result)) + { + if (result) + { + try + { + self.sourceCurrent = self.sourceEnumerator.Current; + + if (self.selector1 != null) + { + self.collectionSelectorAwaiter = self.selector1(self.sourceCurrent).GetAwaiter(); + } + else + { + self.collectionSelectorAwaiter = self.selector2(self.sourceCurrent, checked(self.sourceIndex++)).GetAwaiter(); + } + + if (self.collectionSelectorAwaiter.IsCompleted) + { + SelectorAwaitCore(self); + } + else + { + self.collectionSelectorAwaiter.SourceOnCompleted(selectorAwaitCoreDelegate, self); + } + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + static void SeletedSourceMoveNextCore(object state) + { + var self = (_SelectManyAwait)state; + + if (self.TryGetResult(self.selectedAwaiter, out var result)) + { + if (result) + { + try + { + self.resultSelectorAwaiter = self.resultSelector(self.sourceCurrent, self.selectedEnumerator.Current).GetAwaiter(); + if (self.resultSelectorAwaiter.IsCompleted) + { + ResultSelectorAwaitCore(self); + } + else + { + self.resultSelectorAwaiter.SourceOnCompleted(resultSelectorAwaitCoreDelegate, self); + } + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + } + else + { + // dispose selected source and try iterate source. + try + { + self.selectedDisposeAsyncAwaiter = self.selectedEnumerator.DisposeAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + if (self.selectedDisposeAsyncAwaiter.IsCompleted) + { + SelectedEnumeratorDisposeAsyncCore(self); + } + else + { + self.selectedDisposeAsyncAwaiter.SourceOnCompleted(selectedEnumeratorDisposeAsyncCoreDelegate, self); + } + } + } + } + + static void SelectedEnumeratorDisposeAsyncCore(object state) + { + var self = (_SelectManyAwait)state; + + if (self.TryGetResult(self.selectedDisposeAsyncAwaiter)) + { + self.selectedEnumerator = null; + self.selectedAwaiter = default; + + self.MoveNextSource(); // iterate next source + } + } + + static void SelectorAwaitCore(object state) + { + var self = (_SelectManyAwait)state; + + if (self.TryGetResult(self.collectionSelectorAwaiter, out var result)) + { + self.selectedEnumerator = result.GetAsyncEnumerator(self.cancellationToken); + self.MoveNextSelected(); // iterated selected source. + } + } + + static void ResultSelectorAwaitCore(object state) + { + var self = (_SelectManyAwait)state; + + if (self.TryGetResult(self.resultSelectorAwaiter, out var result)) + { + self.Current = result; + self.completionSource.TrySetResult(true); + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (selectedEnumerator != null) + { + await selectedEnumerator.DisposeAsync(); + } + if (sourceEnumerator != null) + { + await sourceEnumerator.DisposeAsync(); + } + } + } + } + + internal sealed class SelectManyAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func>> selector1; + readonly Func>> selector2; + readonly Func> resultSelector; + + public SelectManyAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func>> selector, Func> resultSelector) + { + this.source = source; + this.selector1 = selector; + this.selector2 = null; + this.resultSelector = resultSelector; + } + + public SelectManyAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func>> selector, Func> resultSelector) + { + this.source = source; + this.selector1 = null; + this.selector2 = selector; + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SelectManyAwaitWithCancellation(source, selector1, selector2, resultSelector, cancellationToken); + } + + sealed class _SelectManyAwaitWithCancellation : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action sourceMoveNextCoreDelegate = SourceMoveNextCore; + static readonly Action selectedSourceMoveNextCoreDelegate = SeletedSourceMoveNextCore; + static readonly Action selectedEnumeratorDisposeAsyncCoreDelegate = SelectedEnumeratorDisposeAsyncCore; + static readonly Action selectorAwaitCoreDelegate = SelectorAwaitCore; + static readonly Action resultSelectorAwaitCoreDelegate = ResultSelectorAwaitCore; + + readonly IUniTaskAsyncEnumerable source; + + readonly Func>> selector1; + readonly Func>> selector2; + readonly Func> resultSelector; + CancellationToken cancellationToken; + + TSource sourceCurrent; + int sourceIndex; + IUniTaskAsyncEnumerator sourceEnumerator; + IUniTaskAsyncEnumerator selectedEnumerator; + UniTask.Awaiter sourceAwaiter; + UniTask.Awaiter selectedAwaiter; + UniTask.Awaiter selectedDisposeAsyncAwaiter; + + // await additional + UniTask>.Awaiter collectionSelectorAwaiter; + UniTask.Awaiter resultSelectorAwaiter; + + public _SelectManyAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func>> selector1, Func>> selector2, Func> resultSelector, CancellationToken cancellationToken) + { + this.source = source; + this.selector1 = selector1; + this.selector2 = selector2; + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + completionSource.Reset(); + + // iterate selected field + if (selectedEnumerator != null) + { + MoveNextSelected(); + } + else + { + // iterate source field + if (sourceEnumerator == null) + { + sourceEnumerator = source.GetAsyncEnumerator(cancellationToken); + } + MoveNextSource(); + } + + return new UniTask(this, completionSource.Version); + } + + void MoveNextSource() + { + try + { + sourceAwaiter = sourceEnumerator.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + + if (sourceAwaiter.IsCompleted) + { + SourceMoveNextCore(this); + } + else + { + sourceAwaiter.SourceOnCompleted(sourceMoveNextCoreDelegate, this); + } + } + + void MoveNextSelected() + { + try + { + selectedAwaiter = selectedEnumerator.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return; + } + + if (selectedAwaiter.IsCompleted) + { + SeletedSourceMoveNextCore(this); + } + else + { + selectedAwaiter.SourceOnCompleted(selectedSourceMoveNextCoreDelegate, this); + } + } + + static void SourceMoveNextCore(object state) + { + var self = (_SelectManyAwaitWithCancellation)state; + + if (self.TryGetResult(self.sourceAwaiter, out var result)) + { + if (result) + { + try + { + self.sourceCurrent = self.sourceEnumerator.Current; + + if (self.selector1 != null) + { + self.collectionSelectorAwaiter = self.selector1(self.sourceCurrent, self.cancellationToken).GetAwaiter(); + } + else + { + self.collectionSelectorAwaiter = self.selector2(self.sourceCurrent, checked(self.sourceIndex++), self.cancellationToken).GetAwaiter(); + } + + if (self.collectionSelectorAwaiter.IsCompleted) + { + SelectorAwaitCore(self); + } + else + { + self.collectionSelectorAwaiter.SourceOnCompleted(selectorAwaitCoreDelegate, self); + } + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + static void SeletedSourceMoveNextCore(object state) + { + var self = (_SelectManyAwaitWithCancellation)state; + + if (self.TryGetResult(self.selectedAwaiter, out var result)) + { + if (result) + { + try + { + self.resultSelectorAwaiter = self.resultSelector(self.sourceCurrent, self.selectedEnumerator.Current, self.cancellationToken).GetAwaiter(); + if (self.resultSelectorAwaiter.IsCompleted) + { + ResultSelectorAwaitCore(self); + } + else + { + self.resultSelectorAwaiter.SourceOnCompleted(resultSelectorAwaitCoreDelegate, self); + } + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + } + else + { + // dispose selected source and try iterate source. + try + { + self.selectedDisposeAsyncAwaiter = self.selectedEnumerator.DisposeAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + if (self.selectedDisposeAsyncAwaiter.IsCompleted) + { + SelectedEnumeratorDisposeAsyncCore(self); + } + else + { + self.selectedDisposeAsyncAwaiter.SourceOnCompleted(selectedEnumeratorDisposeAsyncCoreDelegate, self); + } + } + } + } + + static void SelectedEnumeratorDisposeAsyncCore(object state) + { + var self = (_SelectManyAwaitWithCancellation)state; + + if (self.TryGetResult(self.selectedDisposeAsyncAwaiter)) + { + self.selectedEnumerator = null; + self.selectedAwaiter = default; + + self.MoveNextSource(); // iterate next source + } + } + + static void SelectorAwaitCore(object state) + { + var self = (_SelectManyAwaitWithCancellation)state; + + if (self.TryGetResult(self.collectionSelectorAwaiter, out var result)) + { + self.selectedEnumerator = result.GetAsyncEnumerator(self.cancellationToken); + self.MoveNextSelected(); // iterated selected source. + } + } + + static void ResultSelectorAwaitCore(object state) + { + var self = (_SelectManyAwaitWithCancellation)state; + + if (self.TryGetResult(self.resultSelectorAwaiter, out var result)) + { + self.Current = result; + self.completionSource.TrySetResult(true); + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (selectedEnumerator != null) + { + await selectedEnumerator.DisposeAsync(); + } + if (sourceEnumerator != null) + { + await sourceEnumerator.DisposeAsync(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/SelectMany.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/SelectMany.cs.meta new file mode 100644 index 0000000..a8dbbaf --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/SelectMany.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d81862f0eb12680479ccaaf2ac319d24 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/SequenceEqual.cs b/Assets/Plugins/UniTask/Runtime/Linq/SequenceEqual.cs new file mode 100644 index 0000000..9512ea7 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/SequenceEqual.cs @@ -0,0 +1,87 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask SequenceEqualAsync(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, CancellationToken cancellationToken = default) + { + return SequenceEqualAsync(first, second, EqualityComparer.Default, cancellationToken); + } + + public static UniTask SequenceEqualAsync(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(first, nameof(first)); + Error.ThrowArgumentNullException(second, nameof(second)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return SequenceEqual.SequenceEqualAsync(first, second, comparer, cancellationToken); + } + } + + internal static class SequenceEqual + { + internal static async UniTask SequenceEqualAsync(IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var e1 = first.GetAsyncEnumerator(cancellationToken); + try + { + var e2 = second.GetAsyncEnumerator(cancellationToken); + try + { + while (true) + { + if (await e1.MoveNextAsync()) + { + if (await e2.MoveNextAsync()) + { + if (comparer.Equals(e1.Current, e2.Current)) + { + continue; + } + else + { + return false; + } + } + else + { + // e2 is finished, but e1 has value + return false; + } + } + else + { + // e1 is finished, e2? + if (await e2.MoveNextAsync()) + { + return false; + } + else + { + return true; + } + } + } + } + finally + { + if (e2 != null) + { + await e2.DisposeAsync(); + } + } + } + finally + { + if (e1 != null) + { + await e1.DisposeAsync(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/SequenceEqual.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/SequenceEqual.cs.meta new file mode 100644 index 0000000..ee2b75c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/SequenceEqual.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b382772aba6128842928cdb6b2e034b0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Single.cs b/Assets/Plugins/UniTask/Runtime/Linq/Single.cs new file mode 100644 index 0000000..30df1b3 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Single.cs @@ -0,0 +1,230 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask SingleAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return SingleOperator.SingleAsync(source, cancellationToken, false); + } + + public static UniTask SingleAsync(this IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return SingleOperator.SingleAsync(source, predicate, cancellationToken, false); + } + + public static UniTask SingleAwaitAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return SingleOperator.SingleAwaitAsync(source, predicate, cancellationToken, false); + } + + public static UniTask SingleAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return SingleOperator.SingleAwaitWithCancellationAsync(source, predicate, cancellationToken, false); + } + + public static UniTask SingleOrDefaultAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return SingleOperator.SingleAsync(source, cancellationToken, true); + } + + public static UniTask SingleOrDefaultAsync(this IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return SingleOperator.SingleAsync(source, predicate, cancellationToken, true); + } + + public static UniTask SingleOrDefaultAwaitAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return SingleOperator.SingleAwaitAsync(source, predicate, cancellationToken, true); + } + + public static UniTask SingleOrDefaultAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return SingleOperator.SingleAwaitWithCancellationAsync(source, predicate, cancellationToken, true); + } + } + + internal static class SingleOperator + { + public static async UniTask SingleAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken, bool defaultIfEmpty) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + if (await e.MoveNextAsync()) + { + var v = e.Current; + if (!await e.MoveNextAsync()) + { + return v; + } + + throw Error.MoreThanOneElement(); + } + else + { + if (defaultIfEmpty) + { + return default; + } + else + { + throw Error.NoElements(); + } + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTask SingleAsync(IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken, bool defaultIfEmpty) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TSource value = default; + bool found = false; + while (await e.MoveNextAsync()) + { + var v = e.Current; + if (predicate(v)) + { + if (found) + { + throw Error.MoreThanOneElement(); + } + else + { + found = true; + value = v; + } + } + } + + if (found || defaultIfEmpty) + { + return value; + } + + throw Error.NoElements(); + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTask SingleAwaitAsync(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken, bool defaultIfEmpty) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TSource value = default; + bool found = false; + while (await e.MoveNextAsync()) + { + var v = e.Current; + if (await predicate(v)) + { + if (found) + { + throw Error.MoreThanOneElement(); + } + else + { + found = true; + value = v; + } + } + } + + if (found || defaultIfEmpty) + { + return value; + } + + throw Error.NoElements(); + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTask SingleAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken, bool defaultIfEmpty) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + TSource value = default; + bool found = false; + while (await e.MoveNextAsync()) + { + var v = e.Current; + if (await predicate(v, cancellationToken)) + { + if (found) + { + throw Error.MoreThanOneElement(); + } + else + { + found = true; + value = v; + } + } + } + + if (found || defaultIfEmpty) + { + return value; + } + + throw Error.NoElements(); + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Single.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Single.cs.meta new file mode 100644 index 0000000..c053dfd --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Single.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1bcd3928b90472e43a3a92c3ba708967 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Skip.cs b/Assets/Plugins/UniTask/Runtime/Linq/Skip.cs new file mode 100644 index 0000000..6f4831d --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Skip.cs @@ -0,0 +1,69 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Skip(this IUniTaskAsyncEnumerable source, Int32 count) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new Skip(source, count); + } + } + + internal sealed class Skip : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly int count; + + public Skip(IUniTaskAsyncEnumerable source, int count) + { + this.source = source; + this.count = count; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Skip(source, count, cancellationToken); + } + + sealed class _Skip : AsyncEnumeratorBase + { + readonly int count; + + int index; + + public _Skip(IUniTaskAsyncEnumerable source, int count, CancellationToken cancellationToken) + : base(source, cancellationToken) + { + this.count = count; + } + + protected override bool TryMoveNextCore(bool sourceHasCurrent, out bool result) + { + if (sourceHasCurrent) + { + if (count <= checked(index++)) + { + Current = SourceCurrent; + result = true; + return true; + } + else + { + result = default; + return false; + } + } + else + { + result = false; + return true; + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Skip.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Skip.cs.meta new file mode 100644 index 0000000..25ad847 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Skip.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9c46b6c7dce0cb049a73c81084c75154 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/SkipLast.cs b/Assets/Plugins/UniTask/Runtime/Linq/SkipLast.cs new file mode 100644 index 0000000..9d127b8 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/SkipLast.cs @@ -0,0 +1,159 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable SkipLast(this IUniTaskAsyncEnumerable source, Int32 count) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + // non skip. + if (count <= 0) + { + return source; + } + + return new SkipLast(source, count); + } + } + + internal sealed class SkipLast : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly int count; + + public SkipLast(IUniTaskAsyncEnumerable source, int count) + { + this.source = source; + this.count = count; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SkipLast(source, count, cancellationToken); + } + + sealed class _SkipLast : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable source; + readonly int count; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + Queue queue; + + bool continueNext; + + public _SkipLast(IUniTaskAsyncEnumerable source, int count, CancellationToken cancellationToken) + { + this.source = source; + this.count = count; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (enumerator == null) + { + enumerator = source.GetAsyncEnumerator(cancellationToken); + queue = new Queue(); + } + + completionSource.Reset(); + SourceMoveNext(); + return new UniTask(this, completionSource.Version); + } + + void SourceMoveNext() + { + try + { + + LOOP: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + continueNext = true; + MoveNextCore(this); + if (continueNext) + { + continueNext = false; + goto LOOP; // avoid recursive + } + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + + static void MoveNextCore(object state) + { + var self = (_SkipLast)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + if (self.queue.Count == self.count) + { + self.continueNext = false; + + var deq = self.queue.Dequeue(); + self.Current = deq; + self.queue.Enqueue(self.enumerator.Current); + + self.completionSource.TrySetResult(true); + } + else + { + self.queue.Enqueue(self.enumerator.Current); + + if (!self.continueNext) + { + self.SourceMoveNext(); + } + } + } + else + { + self.continueNext = false; + self.completionSource.TrySetResult(false); + } + } + else + { + self.continueNext = false; + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/SkipLast.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/SkipLast.cs.meta new file mode 100644 index 0000000..06b1ede --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/SkipLast.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: df1d7f44d4fe7754f972c9e0b6fa72d5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/SkipUntil.cs b/Assets/Plugins/UniTask/Runtime/Linq/SkipUntil.cs new file mode 100644 index 0000000..5a707bb --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/SkipUntil.cs @@ -0,0 +1,187 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable SkipUntil(this IUniTaskAsyncEnumerable source, UniTask other) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new SkipUntil(source, other, null); + } + + public static IUniTaskAsyncEnumerable SkipUntil(this IUniTaskAsyncEnumerable source, Func other) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(other)); + + return new SkipUntil(source, default, other); + } + } + + internal sealed class SkipUntil : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly UniTask other; + readonly Func other2; + + public SkipUntil(IUniTaskAsyncEnumerable source, UniTask other, Func other2) + { + this.source = source; + this.other = other; + this.other2 = other2; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + if (other2 != null) + { + return new _SkipUntil(source, this.other2(cancellationToken), cancellationToken); + } + else + { + return new _SkipUntil(source, this.other, cancellationToken); + } + } + + sealed class _SkipUntil : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action CancelDelegate1 = OnCanceled1; + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable source; + CancellationToken cancellationToken1; + + bool completed; + CancellationTokenRegistration cancellationTokenRegistration1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + bool continueNext; + Exception exception; + + public _SkipUntil(IUniTaskAsyncEnumerable source, UniTask other, CancellationToken cancellationToken1) + { + this.source = source; + this.cancellationToken1 = cancellationToken1; + if (cancellationToken1.CanBeCanceled) + { + this.cancellationTokenRegistration1 = cancellationToken1.RegisterWithoutCaptureExecutionContext(CancelDelegate1, this); + } + + TaskTracker.TrackActiveTask(this, 3); + RunOther(other).Forget(); + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (exception != null) + { + return UniTask.FromException(exception); + } + + if (cancellationToken1.IsCancellationRequested) + { + return UniTask.FromCanceled(cancellationToken1); + } + + if (enumerator == null) + { + enumerator = source.GetAsyncEnumerator(cancellationToken1); + } + completionSource.Reset(); + + if (completed) + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + void SourceMoveNext() + { + try + { + LOOP: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + continueNext = true; + MoveNextCore(this); + if (continueNext) + { + continueNext = false; + goto LOOP; + } + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + static void MoveNextCore(object state) + { + var self = (_SkipUntil)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + self.Current = self.enumerator.Current; + self.completionSource.TrySetResult(true); + if (self.continueNext) + { + self.SourceMoveNext(); + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + async UniTaskVoid RunOther(UniTask other) + { + try + { + await other; + completed = true; + SourceMoveNext(); + } + catch (Exception ex) + { + exception = ex; + completionSource.TrySetException(ex); + } + } + + static void OnCanceled1(object state) + { + var self = (_SkipUntil)state; + self.completionSource.TrySetCanceled(self.cancellationToken1); + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + cancellationTokenRegistration1.Dispose(); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/SkipUntil.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/SkipUntil.cs.meta new file mode 100644 index 0000000..0772ed0 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/SkipUntil.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: de932d79c8d9f3841a066d05ff29edc9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/SkipUntilCanceled.cs b/Assets/Plugins/UniTask/Runtime/Linq/SkipUntilCanceled.cs new file mode 100644 index 0000000..f4c9679 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/SkipUntilCanceled.cs @@ -0,0 +1,173 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable SkipUntilCanceled(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new SkipUntilCanceled(source, cancellationToken); + } + } + + internal sealed class SkipUntilCanceled : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly CancellationToken cancellationToken; + + public SkipUntilCanceled(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + this.source = source; + this.cancellationToken = cancellationToken; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SkipUntilCanceled(source, this.cancellationToken, cancellationToken); + } + + sealed class _SkipUntilCanceled : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action CancelDelegate1 = OnCanceled1; + static readonly Action CancelDelegate2 = OnCanceled2; + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable source; + CancellationToken cancellationToken1; + CancellationToken cancellationToken2; + CancellationTokenRegistration cancellationTokenRegistration1; + CancellationTokenRegistration cancellationTokenRegistration2; + + int isCanceled; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + bool continueNext; + + public _SkipUntilCanceled(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken1, CancellationToken cancellationToken2) + { + this.source = source; + this.cancellationToken1 = cancellationToken1; + this.cancellationToken2 = cancellationToken2; + if (cancellationToken1.CanBeCanceled) + { + this.cancellationTokenRegistration1 = cancellationToken1.RegisterWithoutCaptureExecutionContext(CancelDelegate1, this); + } + if (cancellationToken1 != cancellationToken2 && cancellationToken2.CanBeCanceled) + { + this.cancellationTokenRegistration2 = cancellationToken2.RegisterWithoutCaptureExecutionContext(CancelDelegate2, this); + } + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (enumerator == null) + { + if (cancellationToken1.IsCancellationRequested) isCanceled = 1; + if (cancellationToken2.IsCancellationRequested) isCanceled = 1; + enumerator = source.GetAsyncEnumerator(cancellationToken2); // use only AsyncEnumerator provided token. + } + completionSource.Reset(); + + if (isCanceled != 0) + { + SourceMoveNext(); + } + return new UniTask(this, completionSource.Version); + } + + void SourceMoveNext() + { + try + { + LOOP: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + continueNext = true; + MoveNextCore(this); + if (continueNext) + { + continueNext = false; + goto LOOP; + } + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + static void MoveNextCore(object state) + { + var self = (_SkipUntilCanceled)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + self.Current = self.enumerator.Current; + self.completionSource.TrySetResult(true); + if (self.continueNext) + { + self.SourceMoveNext(); + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + static void OnCanceled1(object state) + { + var self = (_SkipUntilCanceled)state; + if (self.isCanceled == 0) + { + if (Interlocked.Increment(ref self.isCanceled) == 1) + { + self.cancellationTokenRegistration2.Dispose(); + self.SourceMoveNext(); + } + } + } + + static void OnCanceled2(object state) + { + var self = (_SkipUntilCanceled)state; + if (self.isCanceled == 0) + { + if (Interlocked.Increment(ref self.isCanceled) == 1) + { + self.cancellationTokenRegistration2.Dispose(); + self.SourceMoveNext(); + } + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + cancellationTokenRegistration1.Dispose(); + cancellationTokenRegistration2.Dispose(); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/SkipUntilCanceled.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/SkipUntilCanceled.cs.meta new file mode 100644 index 0000000..9f67181 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/SkipUntilCanceled.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4b1a778aef7150d47b93a49aa1bc34ae +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/SkipWhile.cs b/Assets/Plugins/UniTask/Runtime/Linq/SkipWhile.cs new file mode 100644 index 0000000..771a2e2 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/SkipWhile.cs @@ -0,0 +1,379 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable SkipWhile(this IUniTaskAsyncEnumerable source, Func predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new SkipWhile(source, predicate); + } + + public static IUniTaskAsyncEnumerable SkipWhile(this IUniTaskAsyncEnumerable source, Func predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new SkipWhileInt(source, predicate); + } + + public static IUniTaskAsyncEnumerable SkipWhileAwait(this IUniTaskAsyncEnumerable source, Func> predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new SkipWhileAwait(source, predicate); + } + + public static IUniTaskAsyncEnumerable SkipWhileAwait(this IUniTaskAsyncEnumerable source, Func> predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new SkipWhileIntAwait(source, predicate); + } + + public static IUniTaskAsyncEnumerable SkipWhileAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new SkipWhileAwaitWithCancellation(source, predicate); + } + + public static IUniTaskAsyncEnumerable SkipWhileAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new SkipWhileIntAwaitWithCancellation(source, predicate); + } + } + + internal sealed class SkipWhile : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func predicate; + + public SkipWhile(IUniTaskAsyncEnumerable source, Func predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SkipWhile(source, predicate, cancellationToken); + } + + class _SkipWhile : AsyncEnumeratorBase + { + Func predicate; + + public _SkipWhile(IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken) + + : base(source, cancellationToken) + { + this.predicate = predicate; + } + + protected override bool TryMoveNextCore(bool sourceHasCurrent, out bool result) + { + if (sourceHasCurrent) + { + if (predicate == null || !predicate(SourceCurrent)) + { + predicate = null; + Current = SourceCurrent; + result = true; + return true; + } + else + { + result = default; + return false; + } + } + + result = false; + return true; + } + } + } + + internal sealed class SkipWhileInt : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func predicate; + + public SkipWhileInt(IUniTaskAsyncEnumerable source, Func predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SkipWhileInt(source, predicate, cancellationToken); + } + + class _SkipWhileInt : AsyncEnumeratorBase + { + Func predicate; + int index; + + public _SkipWhileInt(IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken) + + : base(source, cancellationToken) + { + this.predicate = predicate; + } + + protected override bool TryMoveNextCore(bool sourceHasCurrent, out bool result) + { + if (sourceHasCurrent) + { + if (predicate == null || !predicate(SourceCurrent, checked(index++))) + { + predicate = null; + Current = SourceCurrent; + result = true; + return true; + } + else + { + result = default; + return false; + } + } + + result = false; + return true; + } + } + } + + internal sealed class SkipWhileAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + + public SkipWhileAwait(IUniTaskAsyncEnumerable source, Func> predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SkipWhileAwait(source, predicate, cancellationToken); + } + + class _SkipWhileAwait : AsyncEnumeratorAwaitSelectorBase + { + Func> predicate; + + public _SkipWhileAwait(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + + : base(source, cancellationToken) + { + this.predicate = predicate; + } + + protected override UniTask TransformAsync(TSource sourceCurrent) + { + if (predicate == null) + { + return CompletedTasks.False; + } + + return predicate(sourceCurrent); + } + + protected override bool TrySetCurrentCore(bool awaitResult, out bool terminateIteration) + { + if (!awaitResult) + { + predicate = null; + Current = SourceCurrent; + terminateIteration= false; + return true; + } + else + { + terminateIteration= false; + return false; + } + } + } + } + + internal sealed class SkipWhileIntAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + + public SkipWhileIntAwait(IUniTaskAsyncEnumerable source, Func> predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SkipWhileIntAwait(source, predicate, cancellationToken); + } + + class _SkipWhileIntAwait : AsyncEnumeratorAwaitSelectorBase + { + Func> predicate; + int index; + + public _SkipWhileIntAwait(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + + : base(source, cancellationToken) + { + this.predicate = predicate; + } + + protected override UniTask TransformAsync(TSource sourceCurrent) + { + if (predicate == null) + { + return CompletedTasks.False; + } + + return predicate(sourceCurrent, checked(index++)); + } + + protected override bool TrySetCurrentCore(bool awaitResult, out bool terminateIteration) + { + terminateIteration= false; + if (!awaitResult) + { + predicate = null; + Current = SourceCurrent; + return true; + } + else + { + return false; + } + } + } + } + + internal sealed class SkipWhileAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + + public SkipWhileAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SkipWhileAwaitWithCancellation(source, predicate, cancellationToken); + } + + class _SkipWhileAwaitWithCancellation : AsyncEnumeratorAwaitSelectorBase + { + Func> predicate; + + public _SkipWhileAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + + : base(source, cancellationToken) + { + this.predicate = predicate; + } + + protected override UniTask TransformAsync(TSource sourceCurrent) + { + if (predicate == null) + { + return CompletedTasks.False; + } + + return predicate(sourceCurrent, cancellationToken); + } + + protected override bool TrySetCurrentCore(bool awaitResult, out bool terminateIteration) + { + terminateIteration= false; + if (!awaitResult) + { + predicate = null; + Current = SourceCurrent; + return true; + } + else + { + return false; + } + } + } + } + + internal sealed class SkipWhileIntAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + + public SkipWhileIntAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _SkipWhileIntAwaitWithCancellation(source, predicate, cancellationToken); + } + + class _SkipWhileIntAwaitWithCancellation : AsyncEnumeratorAwaitSelectorBase + { + Func> predicate; + int index; + + public _SkipWhileIntAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + + : base(source, cancellationToken) + { + this.predicate = predicate; + } + + protected override UniTask TransformAsync(TSource sourceCurrent) + { + if (predicate == null) + { + return CompletedTasks.False; + } + + return predicate(sourceCurrent, checked(index++), cancellationToken); + } + + protected override bool TrySetCurrentCore(bool awaitResult, out bool terminateIteration) + { + terminateIteration= false; + if (!awaitResult) + { + predicate = null; + Current = SourceCurrent; + return true; + } + else + { + return false; + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/SkipWhile.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/SkipWhile.cs.meta new file mode 100644 index 0000000..f2b210a --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/SkipWhile.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0b74b9fe361bf7148b51a29c8b2561e8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Subscribe.cs b/Assets/Plugins/UniTask/Runtime/Linq/Subscribe.cs new file mode 100644 index 0000000..0785bc2 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Subscribe.cs @@ -0,0 +1,536 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; +using Subscribes = Cysharp.Threading.Tasks.Linq.Subscribe; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + // OnNext + + public static IDisposable Subscribe(this IUniTaskAsyncEnumerable source, Action action) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(action, nameof(action)); + + var cts = new CancellationTokenDisposable(); + Subscribes.SubscribeCore(source, action, Subscribes.NopError, Subscribes.NopCompleted, cts.Token).Forget(); + return cts; + } + + public static IDisposable Subscribe(this IUniTaskAsyncEnumerable source, Func action) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(action, nameof(action)); + + var cts = new CancellationTokenDisposable(); + Subscribes.SubscribeCore(source, action, Subscribes.NopError, Subscribes.NopCompleted, cts.Token).Forget(); + return cts; + } + + public static IDisposable Subscribe(this IUniTaskAsyncEnumerable source, Func action) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(action, nameof(action)); + + var cts = new CancellationTokenDisposable(); + Subscribes.SubscribeCore(source, action, Subscribes.NopError, Subscribes.NopCompleted, cts.Token).Forget(); + return cts; + } + + public static void Subscribe(this IUniTaskAsyncEnumerable source, Action action, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(action, nameof(action)); + + Subscribes.SubscribeCore(source, action, Subscribes.NopError, Subscribes.NopCompleted, cancellationToken).Forget(); + } + + public static void Subscribe(this IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(action, nameof(action)); + + Subscribes.SubscribeCore(source, action, Subscribes.NopError, Subscribes.NopCompleted, cancellationToken).Forget(); + } + + public static void Subscribe(this IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(action, nameof(action)); + + Subscribes.SubscribeCore(source, action, Subscribes.NopError, Subscribes.NopCompleted, cancellationToken).Forget(); + } + + public static IDisposable SubscribeAwait(this IUniTaskAsyncEnumerable source, Func onNext) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + + var cts = new CancellationTokenDisposable(); + Subscribes.SubscribeAwaitCore(source, onNext, Subscribes.NopError, Subscribes.NopCompleted, cts.Token).Forget(); + return cts; + } + + public static void SubscribeAwait(this IUniTaskAsyncEnumerable source, Func onNext, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + + Subscribes.SubscribeAwaitCore(source, onNext, Subscribes.NopError, Subscribes.NopCompleted, cancellationToken).Forget(); + } + + public static IDisposable SubscribeAwait(this IUniTaskAsyncEnumerable source, Func onNext) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + + var cts = new CancellationTokenDisposable(); + Subscribes.SubscribeAwaitCore(source, onNext, Subscribes.NopError, Subscribes.NopCompleted, cts.Token).Forget(); + return cts; + } + + public static void SubscribeAwait(this IUniTaskAsyncEnumerable source, Func onNext, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + + Subscribes.SubscribeAwaitCore(source, onNext, Subscribes.NopError, Subscribes.NopCompleted, cancellationToken).Forget(); + } + + // OnNext, OnError + + public static IDisposable Subscribe(this IUniTaskAsyncEnumerable source, Action onNext, Action onError) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onError, nameof(onError)); + + var cts = new CancellationTokenDisposable(); + Subscribes.SubscribeCore(source, onNext, onError, Subscribes.NopCompleted, cts.Token).Forget(); + return cts; + } + + public static IDisposable Subscribe(this IUniTaskAsyncEnumerable source, Func onNext, Action onError) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onError, nameof(onError)); + + var cts = new CancellationTokenDisposable(); + Subscribes.SubscribeCore(source, onNext, onError, Subscribes.NopCompleted, cts.Token).Forget(); + return cts; + } + + public static void Subscribe(this IUniTaskAsyncEnumerable source, Action onNext, Action onError, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onError, nameof(onError)); + + Subscribes.SubscribeCore(source, onNext, onError, Subscribes.NopCompleted, cancellationToken).Forget(); + } + + public static void Subscribe(this IUniTaskAsyncEnumerable source, Func onNext, Action onError, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onError, nameof(onError)); + + Subscribes.SubscribeCore(source, onNext, onError, Subscribes.NopCompleted, cancellationToken).Forget(); + } + + public static IDisposable SubscribeAwait(this IUniTaskAsyncEnumerable source, Func onNext, Action onError) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onError, nameof(onError)); + + var cts = new CancellationTokenDisposable(); + Subscribes.SubscribeAwaitCore(source, onNext, onError, Subscribes.NopCompleted, cts.Token).Forget(); + return cts; + } + + public static void SubscribeAwait(this IUniTaskAsyncEnumerable source, Func onNext, Action onError, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onError, nameof(onError)); + + Subscribes.SubscribeAwaitCore(source, onNext, onError, Subscribes.NopCompleted, cancellationToken).Forget(); + } + + public static IDisposable SubscribeAwait(this IUniTaskAsyncEnumerable source, Func onNext, Action onError) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onError, nameof(onError)); + + var cts = new CancellationTokenDisposable(); + Subscribes.SubscribeAwaitCore(source, onNext, onError, Subscribes.NopCompleted, cts.Token).Forget(); + return cts; + } + + public static void SubscribeAwait(this IUniTaskAsyncEnumerable source, Func onNext, Action onError, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onError, nameof(onError)); + + Subscribes.SubscribeAwaitCore(source, onNext, onError, Subscribes.NopCompleted, cancellationToken).Forget(); + } + + // OnNext, OnCompleted + + public static IDisposable Subscribe(this IUniTaskAsyncEnumerable source, Action onNext, Action onCompleted) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onCompleted, nameof(onCompleted)); + + var cts = new CancellationTokenDisposable(); + Subscribes.SubscribeCore(source, onNext, Subscribes.NopError, onCompleted, cts.Token).Forget(); + return cts; + } + + public static IDisposable Subscribe(this IUniTaskAsyncEnumerable source, Func onNext, Action onCompleted) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onCompleted, nameof(onCompleted)); + + var cts = new CancellationTokenDisposable(); + Subscribes.SubscribeCore(source, onNext, Subscribes.NopError, onCompleted, cts.Token).Forget(); + return cts; + } + + public static void Subscribe(this IUniTaskAsyncEnumerable source, Action onNext, Action onCompleted, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onCompleted, nameof(onCompleted)); + + Subscribes.SubscribeCore(source, onNext, Subscribes.NopError, onCompleted, cancellationToken).Forget(); + } + + public static void Subscribe(this IUniTaskAsyncEnumerable source, Func onNext, Action onCompleted, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onCompleted, nameof(onCompleted)); + + Subscribes.SubscribeCore(source, onNext, Subscribes.NopError, onCompleted, cancellationToken).Forget(); + } + + public static IDisposable SubscribeAwait(this IUniTaskAsyncEnumerable source, Func onNext, Action onCompleted) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onCompleted, nameof(onCompleted)); + + var cts = new CancellationTokenDisposable(); + Subscribes.SubscribeAwaitCore(source, onNext, Subscribes.NopError, onCompleted, cts.Token).Forget(); + return cts; + } + + public static void SubscribeAwait(this IUniTaskAsyncEnumerable source, Func onNext, Action onCompleted, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onCompleted, nameof(onCompleted)); + + Subscribes.SubscribeAwaitCore(source, onNext, Subscribes.NopError, onCompleted, cancellationToken).Forget(); + } + + public static IDisposable SubscribeAwait(this IUniTaskAsyncEnumerable source, Func onNext, Action onCompleted) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onCompleted, nameof(onCompleted)); + + var cts = new CancellationTokenDisposable(); + Subscribes.SubscribeAwaitCore(source, onNext, Subscribes.NopError, onCompleted, cts.Token).Forget(); + return cts; + } + + public static void SubscribeAwait(this IUniTaskAsyncEnumerable source, Func onNext, Action onCompleted, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(onNext, nameof(onNext)); + Error.ThrowArgumentNullException(onCompleted, nameof(onCompleted)); + + Subscribes.SubscribeAwaitCore(source, onNext, Subscribes.NopError, onCompleted, cancellationToken).Forget(); + } + + // IObserver + + public static IDisposable Subscribe(this IUniTaskAsyncEnumerable source, IObserver observer) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(observer, nameof(observer)); + + var cts = new CancellationTokenDisposable(); + Subscribes.SubscribeCore(source, observer, cts.Token).Forget(); + return cts; + } + + public static void Subscribe(this IUniTaskAsyncEnumerable source, IObserver observer, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(observer, nameof(observer)); + + Subscribes.SubscribeCore(source, observer, cancellationToken).Forget(); + } + } + + internal sealed class CancellationTokenDisposable : IDisposable + { + readonly CancellationTokenSource cts = new CancellationTokenSource(); + + public CancellationToken Token => cts.Token; + + public void Dispose() + { + if (!cts.IsCancellationRequested) + { + cts.Cancel(); + } + } + } + + internal static class Subscribe + { + public static readonly Action NopError = _ => { }; + public static readonly Action NopCompleted = () => { }; + + public static async UniTaskVoid SubscribeCore(IUniTaskAsyncEnumerable source, Action onNext, Action onError, Action onCompleted, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + try + { + onNext(e.Current); + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + } + onCompleted(); + } + catch (Exception ex) + { + if (onError == NopError) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + return; + } + + if (ex is OperationCanceledException) return; + + onError(ex); + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTaskVoid SubscribeCore(IUniTaskAsyncEnumerable source, Func onNext, Action onError, Action onCompleted, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + try + { + onNext(e.Current).Forget(); + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + } + onCompleted(); + } + catch (Exception ex) + { + if (onError == NopError) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + return; + } + + if (ex is OperationCanceledException) return; + + onError(ex); + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTaskVoid SubscribeCore(IUniTaskAsyncEnumerable source, Func onNext, Action onError, Action onCompleted, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + try + { + onNext(e.Current, cancellationToken).Forget(); + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + } + onCompleted(); + } + catch (Exception ex) + { + if (onError == NopError) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + return; + } + + if (ex is OperationCanceledException) return; + + onError(ex); + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTaskVoid SubscribeCore(IUniTaskAsyncEnumerable source, IObserver observer, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + try + { + observer.OnNext(e.Current); + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + } + observer.OnCompleted(); + } + catch (Exception ex) + { + if (ex is OperationCanceledException) return; + + observer.OnError(ex); + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTaskVoid SubscribeAwaitCore(IUniTaskAsyncEnumerable source, Func onNext, Action onError, Action onCompleted, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + try + { + await onNext(e.Current); + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + } + onCompleted(); + } + catch (Exception ex) + { + if (onError == NopError) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + return; + } + + if (ex is OperationCanceledException) return; + + onError(ex); + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + public static async UniTaskVoid SubscribeAwaitCore(IUniTaskAsyncEnumerable source, Func onNext, Action onError, Action onCompleted, CancellationToken cancellationToken) + { + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + try + { + await onNext(e.Current, cancellationToken); + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + } + onCompleted(); + } + catch (Exception ex) + { + if (onError == NopError) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + return; + } + + if (ex is OperationCanceledException) return; + + onError(ex); + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Subscribe.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Subscribe.cs.meta new file mode 100644 index 0000000..ea83567 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Subscribe.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 263479eb04c189741931fc0e2f615c2d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Sum.cs b/Assets/Plugins/UniTask/Runtime/Linq/Sum.cs new file mode 100644 index 0000000..1101cd7 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Sum.cs @@ -0,0 +1,1244 @@ +using System; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Sum.SumAsync(source, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Sum.SumAsync(source, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Sum.SumAsync(source, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Sum.SumAsync(source, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Sum.SumAsync(source, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Sum.SumAsync(source, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Sum.SumAsync(source, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Sum.SumAsync(source, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Sum.SumAsync(source, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Sum.SumAsync(source, cancellationToken); + } + + public static UniTask SumAsync(this IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitAsync(source, selector, cancellationToken); + } + + public static UniTask SumAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(selector)); + + return Sum.SumAwaitWithCancellationAsync(source, selector, cancellationToken); + } + + } + + internal static class Sum + { + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Int32 sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += e.Current; + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Int32 sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int32 sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current)); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int32 sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current, cancellationToken)); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Int64 sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += e.Current; + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Int64 sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int64 sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current)); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int64 sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current, cancellationToken)); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Single sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += e.Current; + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Single sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Single sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current)); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Single sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current, cancellationToken)); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Double sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += e.Current; + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Double sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Double sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current)); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Double sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current, cancellationToken)); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Decimal sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += e.Current; + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Decimal sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Decimal sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current)); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Decimal sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current, cancellationToken)); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Int32? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += e.Current.GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Int32? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int32? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current)).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int32? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current, cancellationToken)).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Int64? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += e.Current.GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Int64? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int64? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current)).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Int64? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current, cancellationToken)).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Single? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += e.Current.GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Single? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Single? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current)).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Single? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current, cancellationToken)).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Double? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += e.Current.GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Double? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Double? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current)).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Double? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current, cancellationToken)).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Decimal? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += e.Current.GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAsync(IUniTaskAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + Decimal? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Decimal? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current)).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + public static async UniTask SumAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + Decimal? sum = default; + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + sum += (await selector(e.Current, cancellationToken)).GetValueOrDefault(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return sum; + } + + } +} diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Sum.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Sum.cs.meta new file mode 100644 index 0000000..5331e34 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Sum.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4149754066a21a341be58c04357061f6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Take.cs b/Assets/Plugins/UniTask/Runtime/Linq/Take.cs new file mode 100644 index 0000000..6cd4eda --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Take.cs @@ -0,0 +1,124 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Take(this IUniTaskAsyncEnumerable source, Int32 count) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new Take(source, count); + } + } + + internal sealed class Take : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly int count; + + public Take(IUniTaskAsyncEnumerable source, int count) + { + this.source = source; + this.count = count; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Take(source, count, cancellationToken); + } + + sealed class _Take : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable source; + readonly int count; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + int index; + + public _Take(IUniTaskAsyncEnumerable source, int count, CancellationToken cancellationToken) + { + this.source = source; + this.count = count; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (enumerator == null) + { + enumerator = source.GetAsyncEnumerator(cancellationToken); + } + + if (checked(index) >= count) + { + return CompletedTasks.False; + } + + completionSource.Reset(); + SourceMoveNext(); + return new UniTask(this, completionSource.Version); + } + + void SourceMoveNext() + { + try + { + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + MoveNextCore(this); + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + static void MoveNextCore(object state) + { + var self = (_Take)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + self.index++; + self.Current = self.enumerator.Current; + self.completionSource.TrySetResult(true); + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Take.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Take.cs.meta new file mode 100644 index 0000000..1cc91ab --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Take.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 42f02cb84e5875b488304755d0e1383d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/TakeLast.cs b/Assets/Plugins/UniTask/Runtime/Linq/TakeLast.cs new file mode 100644 index 0000000..ca0084e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/TakeLast.cs @@ -0,0 +1,175 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable TakeLast(this IUniTaskAsyncEnumerable source, Int32 count) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + // non take. + if (count <= 0) + { + return Empty(); + } + + return new TakeLast(source, count); + } + } + + internal sealed class TakeLast : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly int count; + + public TakeLast(IUniTaskAsyncEnumerable source, int count) + { + this.source = source; + this.count = count; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _TakeLast(source, count, cancellationToken); + } + + sealed class _TakeLast : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable source; + readonly int count; + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + Queue queue; + + bool iterateCompleted; + bool continueNext; + + public _TakeLast(IUniTaskAsyncEnumerable source, int count, CancellationToken cancellationToken) + { + this.source = source; + this.count = count; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (enumerator == null) + { + enumerator = source.GetAsyncEnumerator(cancellationToken); + queue = new Queue(); + } + + completionSource.Reset(); + SourceMoveNext(); + return new UniTask(this, completionSource.Version); + } + + void SourceMoveNext() + { + if (iterateCompleted) + { + if (queue.Count > 0) + { + Current = queue.Dequeue(); + completionSource.TrySetResult(true); + } + else + { + completionSource.TrySetResult(false); + } + + return; + } + + try + { + LOOP: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + continueNext = true; + MoveNextCore(this); + if (continueNext) + { + continueNext = false; + goto LOOP; // avoid recursive + } + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + + static void MoveNextCore(object state) + { + var self = (_TakeLast)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + if (self.queue.Count < self.count) + { + self.queue.Enqueue(self.enumerator.Current); + + if (!self.continueNext) + { + self.SourceMoveNext(); + } + } + else + { + self.queue.Dequeue(); + self.queue.Enqueue(self.enumerator.Current); + + if (!self.continueNext) + { + self.SourceMoveNext(); + } + } + } + else + { + self.continueNext = false; + self.iterateCompleted = true; + self.SourceMoveNext(); + } + } + else + { + self.continueNext = false; + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/TakeLast.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/TakeLast.cs.meta new file mode 100644 index 0000000..d80037f --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/TakeLast.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 510aa9fd35b45fc40bcdb7e59f01fd1b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/TakeUntil.cs b/Assets/Plugins/UniTask/Runtime/Linq/TakeUntil.cs new file mode 100644 index 0000000..25371ad --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/TakeUntil.cs @@ -0,0 +1,190 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable TakeUntil(this IUniTaskAsyncEnumerable source, UniTask other) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new TakeUntil(source, other, null); + } + + public static IUniTaskAsyncEnumerable TakeUntil(this IUniTaskAsyncEnumerable source, Func other) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(source, nameof(other)); + + return new TakeUntil(source, default, other); + } + } + + internal sealed class TakeUntil : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly UniTask other; + readonly Func other2; + + public TakeUntil(IUniTaskAsyncEnumerable source, UniTask other, Func other2) + { + this.source = source; + this.other = other; + this.other2 = other2; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + if (other2 != null) + { + return new _TakeUntil(source, this.other2(cancellationToken), cancellationToken); + } + else + { + return new _TakeUntil(source, this.other, cancellationToken); + } + } + + sealed class _TakeUntil : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action CancelDelegate1 = OnCanceled1; + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable source; + CancellationToken cancellationToken1; + CancellationTokenRegistration cancellationTokenRegistration1; + + bool completed; + Exception exception; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + + public _TakeUntil(IUniTaskAsyncEnumerable source, UniTask other, CancellationToken cancellationToken1) + { + this.source = source; + this.cancellationToken1 = cancellationToken1; + + if (cancellationToken1.CanBeCanceled) + { + this.cancellationTokenRegistration1 = cancellationToken1.RegisterWithoutCaptureExecutionContext(CancelDelegate1, this); + } + + TaskTracker.TrackActiveTask(this, 3); + + RunOther(other).Forget(); + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (completed) + { + return CompletedTasks.False; + } + + if (exception != null) + { + return UniTask.FromException(exception); + } + + if (cancellationToken1.IsCancellationRequested) + { + return UniTask.FromCanceled(cancellationToken1); + } + + if (enumerator == null) + { + enumerator = source.GetAsyncEnumerator(cancellationToken1); + } + + completionSource.Reset(); + SourceMoveNext(); + return new UniTask(this, completionSource.Version); + } + + void SourceMoveNext() + { + try + { + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + MoveNextCore(this); + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + static void MoveNextCore(object state) + { + var self = (_TakeUntil)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + if (self.exception != null) + { + self.completionSource.TrySetException(self.exception); + } + else if (self.cancellationToken1.IsCancellationRequested) + { + self.completionSource.TrySetCanceled(self.cancellationToken1); + } + else + { + self.Current = self.enumerator.Current; + self.completionSource.TrySetResult(true); + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + async UniTaskVoid RunOther(UniTask other) + { + try + { + await other; + completed = true; + completionSource.TrySetResult(false); + } + catch (Exception ex) + { + exception = ex; + completionSource.TrySetException(ex); + } + } + + static void OnCanceled1(object state) + { + var self = (_TakeUntil)state; + self.completionSource.TrySetCanceled(self.cancellationToken1); + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + cancellationTokenRegistration1.Dispose(); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/TakeUntil.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/TakeUntil.cs.meta new file mode 100644 index 0000000..44cf63e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/TakeUntil.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 12bda324162f15349afefc2c152ac07f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/TakeUntilCanceled.cs b/Assets/Plugins/UniTask/Runtime/Linq/TakeUntilCanceled.cs new file mode 100644 index 0000000..67ee3c8 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/TakeUntilCanceled.cs @@ -0,0 +1,164 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable TakeUntilCanceled(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new TakeUntilCanceled(source, cancellationToken); + } + } + + internal sealed class TakeUntilCanceled : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly CancellationToken cancellationToken; + + public TakeUntilCanceled(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + this.source = source; + this.cancellationToken = cancellationToken; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _TakeUntilCanceled(source, this.cancellationToken, cancellationToken); + } + + sealed class _TakeUntilCanceled : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action CancelDelegate1 = OnCanceled1; + static readonly Action CancelDelegate2 = OnCanceled2; + static readonly Action MoveNextCoreDelegate = MoveNextCore; + + readonly IUniTaskAsyncEnumerable source; + CancellationToken cancellationToken1; + CancellationToken cancellationToken2; + CancellationTokenRegistration cancellationTokenRegistration1; + CancellationTokenRegistration cancellationTokenRegistration2; + + bool isCanceled; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + + public _TakeUntilCanceled(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken1, CancellationToken cancellationToken2) + { + this.source = source; + this.cancellationToken1 = cancellationToken1; + this.cancellationToken2 = cancellationToken2; + + if (cancellationToken1.CanBeCanceled) + { + this.cancellationTokenRegistration1 = cancellationToken1.RegisterWithoutCaptureExecutionContext(CancelDelegate1, this); + } + + if (cancellationToken1 != cancellationToken2 && cancellationToken2.CanBeCanceled) + { + this.cancellationTokenRegistration2 = cancellationToken2.RegisterWithoutCaptureExecutionContext(CancelDelegate2, this); + } + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (cancellationToken1.IsCancellationRequested) isCanceled = true; + if (cancellationToken2.IsCancellationRequested) isCanceled = true; + + if (enumerator == null) + { + enumerator = source.GetAsyncEnumerator(cancellationToken2); // use only AsyncEnumerator provided token. + } + + if (isCanceled) return CompletedTasks.False; + + completionSource.Reset(); + SourceMoveNext(); + return new UniTask(this, completionSource.Version); + } + + void SourceMoveNext() + { + try + { + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + MoveNextCore(this); + } + else + { + awaiter.SourceOnCompleted(MoveNextCoreDelegate, this); + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + } + } + + static void MoveNextCore(object state) + { + var self = (_TakeUntilCanceled)state; + + if (self.TryGetResult(self.awaiter, out var result)) + { + if (result) + { + if (self.isCanceled) + { + self.completionSource.TrySetResult(false); + } + else + { + self.Current = self.enumerator.Current; + self.completionSource.TrySetResult(true); + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + static void OnCanceled1(object state) + { + var self = (_TakeUntilCanceled)state; + if (!self.isCanceled) + { + self.cancellationTokenRegistration2.Dispose(); + self.completionSource.TrySetResult(false); + } + } + + static void OnCanceled2(object state) + { + var self = (_TakeUntilCanceled)state; + if (!self.isCanceled) + { + self.cancellationTokenRegistration1.Dispose(); + self.completionSource.TrySetResult(false); + } + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + cancellationTokenRegistration1.Dispose(); + cancellationTokenRegistration2.Dispose(); + if (enumerator != null) + { + return enumerator.DisposeAsync(); + } + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/TakeUntilCanceled.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/TakeUntilCanceled.cs.meta new file mode 100644 index 0000000..4a89be5 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/TakeUntilCanceled.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e82f498cf3a1df04cbf646773fc11319 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/TakeWhile.cs b/Assets/Plugins/UniTask/Runtime/Linq/TakeWhile.cs new file mode 100644 index 0000000..6239c77 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/TakeWhile.cs @@ -0,0 +1,342 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable TakeWhile(this IUniTaskAsyncEnumerable source, Func predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new TakeWhile(source, predicate); + } + + public static IUniTaskAsyncEnumerable TakeWhile(this IUniTaskAsyncEnumerable source, Func predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new TakeWhileInt(source, predicate); + } + + public static IUniTaskAsyncEnumerable TakeWhileAwait(this IUniTaskAsyncEnumerable source, Func> predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new TakeWhileAwait(source, predicate); + } + + public static IUniTaskAsyncEnumerable TakeWhileAwait(this IUniTaskAsyncEnumerable source, Func> predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new TakeWhileIntAwait(source, predicate); + } + + public static IUniTaskAsyncEnumerable TakeWhileAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new TakeWhileAwaitWithCancellation(source, predicate); + } + + public static IUniTaskAsyncEnumerable TakeWhileAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new TakeWhileIntAwaitWithCancellation(source, predicate); + } + } + + internal sealed class TakeWhile : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func predicate; + + public TakeWhile(IUniTaskAsyncEnumerable source, Func predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _TakeWhile(source, predicate, cancellationToken); + } + + class _TakeWhile : AsyncEnumeratorBase + { + Func predicate; + + public _TakeWhile(IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken) + + : base(source, cancellationToken) + { + this.predicate = predicate; + } + + protected override bool TryMoveNextCore(bool sourceHasCurrent, out bool result) + { + if (sourceHasCurrent) + { + if (predicate(SourceCurrent)) + { + Current = SourceCurrent; + result = true; + return true; + } + } + + result = false; + return true; + } + } + } + + internal sealed class TakeWhileInt : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func predicate; + + public TakeWhileInt(IUniTaskAsyncEnumerable source, Func predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _TakeWhileInt(source, predicate, cancellationToken); + } + + class _TakeWhileInt : AsyncEnumeratorBase + { + readonly Func predicate; + int index; + + public _TakeWhileInt(IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken) + + : base(source, cancellationToken) + { + this.predicate = predicate; + } + + protected override bool TryMoveNextCore(bool sourceHasCurrent, out bool result) + { + if (sourceHasCurrent) + { + if (predicate(SourceCurrent, checked(index++))) + { + Current = SourceCurrent; + result = true; + return true; + } + } + + result = false; + return true; + } + } + } + + internal sealed class TakeWhileAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + + public TakeWhileAwait(IUniTaskAsyncEnumerable source, Func> predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _TakeWhileAwait(source, predicate, cancellationToken); + } + + class _TakeWhileAwait : AsyncEnumeratorAwaitSelectorBase + { + Func> predicate; + + public _TakeWhileAwait(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + : base(source, cancellationToken) + { + this.predicate = predicate; + } + + protected override UniTask TransformAsync(TSource sourceCurrent) + { + return predicate(sourceCurrent); + } + + protected override bool TrySetCurrentCore(bool awaitResult, out bool terminateIteration) + { + if (awaitResult) + { + Current = SourceCurrent; + terminateIteration = false; + return true; + } + else + { + terminateIteration = true; + return false; + } + } + } + } + + internal sealed class TakeWhileIntAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + + public TakeWhileIntAwait(IUniTaskAsyncEnumerable source, Func> predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _TakeWhileIntAwait(source, predicate, cancellationToken); + } + + class _TakeWhileIntAwait : AsyncEnumeratorAwaitSelectorBase + { + readonly Func> predicate; + int index; + + public _TakeWhileIntAwait(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + : base(source, cancellationToken) + { + this.predicate = predicate; + } + + protected override UniTask TransformAsync(TSource sourceCurrent) + { + return predicate(sourceCurrent, checked(index++)); + } + + protected override bool TrySetCurrentCore(bool awaitResult, out bool terminateIteration) + { + if (awaitResult) + { + Current = SourceCurrent; + terminateIteration = false; + return true; + } + else + { + terminateIteration = true; + return false; + } + } + } + } + + internal sealed class TakeWhileAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + + public TakeWhileAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _TakeWhileAwaitWithCancellation(source, predicate, cancellationToken); + } + + class _TakeWhileAwaitWithCancellation : AsyncEnumeratorAwaitSelectorBase + { + Func> predicate; + + public _TakeWhileAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + : base(source, cancellationToken) + { + this.predicate = predicate; + } + + protected override UniTask TransformAsync(TSource sourceCurrent) + { + return predicate(sourceCurrent, cancellationToken); + } + + protected override bool TrySetCurrentCore(bool awaitResult, out bool terminateIteration) + { + if (awaitResult) + { + Current = SourceCurrent; + terminateIteration = false; + return true; + } + else + { + terminateIteration = true; + return false; + } + } + } + } + + internal sealed class TakeWhileIntAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + + public TakeWhileIntAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _TakeWhileIntAwaitWithCancellation(source, predicate, cancellationToken); + } + + class _TakeWhileIntAwaitWithCancellation : AsyncEnumeratorAwaitSelectorBase + { + readonly Func> predicate; + int index; + + public _TakeWhileIntAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + : base(source, cancellationToken) + { + this.predicate = predicate; + } + + protected override UniTask TransformAsync(TSource sourceCurrent) + { + return predicate(sourceCurrent, checked(index++), cancellationToken); + } + + protected override bool TrySetCurrentCore(bool awaitResult, out bool terminateIteration) + { + if (awaitResult) + { + Current = SourceCurrent; + terminateIteration = false; + return true; + } + else + { + terminateIteration = true; + return false; + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/TakeWhile.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/TakeWhile.cs.meta new file mode 100644 index 0000000..f2173d5 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/TakeWhile.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bca55adabcc4b3141b50b8b09634f764 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Throw.cs b/Assets/Plugins/UniTask/Runtime/Linq/Throw.cs new file mode 100644 index 0000000..b6994c4 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Throw.cs @@ -0,0 +1,54 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Throw(Exception exception) + { + return new Throw(exception); + } + } + + internal class Throw : IUniTaskAsyncEnumerable + { + readonly Exception exception; + + public Throw(Exception exception) + { + this.exception = exception; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Throw(exception, cancellationToken); + } + + class _Throw : IUniTaskAsyncEnumerator + { + readonly Exception exception; + CancellationToken cancellationToken; + + public _Throw(Exception exception, CancellationToken cancellationToken) + { + this.exception = exception; + this.cancellationToken = cancellationToken; + } + + public TValue Current => default; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + return UniTask.FromException(exception); + } + + public UniTask DisposeAsync() + { + return default; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Throw.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Throw.cs.meta new file mode 100644 index 0000000..c768ef1 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Throw.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9d05a7d4f4161e549b4789e1022baae8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ToArray.cs b/Assets/Plugins/UniTask/Runtime/Linq/ToArray.cs new file mode 100644 index 0000000..3554968 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ToArray.cs @@ -0,0 +1,60 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask ToArrayAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Cysharp.Threading.Tasks.Linq.ToArray.ToArrayAsync(source, cancellationToken); + } + } + + internal static class ToArray + { + internal static async UniTask ToArrayAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + var pool = ArrayPool.Shared; + var array = pool.Rent(16); + + TSource[] result = default; + IUniTaskAsyncEnumerator e = default; + try + { + e = source.GetAsyncEnumerator(cancellationToken); + var i = 0; + while (await e.MoveNextAsync()) + { + ArrayPoolUtil.EnsureCapacity(ref array, i, pool); + array[i++] = e.Current; + } + + if (i == 0) + { + result = Array.Empty(); + } + else + { + result = new TSource[i]; + Array.Copy(array, result, i); + } + } + finally + { + pool.Return(array, clearArray: !RuntimeHelpersAbstraction.IsWellKnownNoReferenceContainsType()); + + if (e != null) + { + await e.DisposeAsync(); + } + } + + return result; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ToArray.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/ToArray.cs.meta new file mode 100644 index 0000000..679d61c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ToArray.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: debb010bbb1622e43b94fe70ec0133dd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ToDictionary.cs b/Assets/Plugins/UniTask/Runtime/Linq/ToDictionary.cs new file mode 100644 index 0000000..083ace0 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ToDictionary.cs @@ -0,0 +1,278 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask> ToDictionaryAsync(this IUniTaskAsyncEnumerable source, Func keySelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return ToDictionary.ToDictionaryAsync(source, keySelector, EqualityComparer.Default, cancellationToken); + } + + public static UniTask> ToDictionaryAsync(this IUniTaskAsyncEnumerable source, Func keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return ToDictionary.ToDictionaryAsync(source, keySelector, comparer, cancellationToken); + } + + public static UniTask> ToDictionaryAsync(this IUniTaskAsyncEnumerable source, Func keySelector, Func elementSelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + + return ToDictionary.ToDictionaryAsync(source, keySelector, elementSelector, EqualityComparer.Default, cancellationToken); + } + + public static UniTask> ToDictionaryAsync(this IUniTaskAsyncEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return ToDictionary.ToDictionaryAsync(source, keySelector, elementSelector, comparer, cancellationToken); + } + + public static UniTask> ToDictionaryAwaitAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return ToDictionary.ToDictionaryAwaitAsync(source, keySelector, EqualityComparer.Default, cancellationToken); + } + + public static UniTask> ToDictionaryAwaitAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return ToDictionary.ToDictionaryAwaitAsync(source, keySelector, comparer, cancellationToken); + } + + public static UniTask> ToDictionaryAwaitAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + + return ToDictionary.ToDictionaryAwaitAsync(source, keySelector, elementSelector, EqualityComparer.Default, cancellationToken); + } + + public static UniTask> ToDictionaryAwaitAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return ToDictionary.ToDictionaryAwaitAsync(source, keySelector, elementSelector, comparer, cancellationToken); + } + + public static UniTask> ToDictionaryAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return ToDictionary.ToDictionaryAwaitWithCancellationAsync(source, keySelector, EqualityComparer.Default, cancellationToken); + } + + public static UniTask> ToDictionaryAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return ToDictionary.ToDictionaryAwaitWithCancellationAsync(source, keySelector, comparer, cancellationToken); + } + + public static UniTask> ToDictionaryAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + + return ToDictionary.ToDictionaryAwaitWithCancellationAsync(source, keySelector, elementSelector, EqualityComparer.Default, cancellationToken); + } + + public static UniTask> ToDictionaryAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return ToDictionary.ToDictionaryAwaitWithCancellationAsync(source, keySelector, elementSelector, comparer, cancellationToken); + } + } + + internal static class ToDictionary + { + internal static async UniTask> ToDictionaryAsync(IUniTaskAsyncEnumerable source, Func keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var dict = new Dictionary(comparer); + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = e.Current; + var key = keySelector(v); + dict.Add(key, v); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return dict; + } + + internal static async UniTask> ToDictionaryAsync(IUniTaskAsyncEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var dict = new Dictionary(comparer); + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = e.Current; + var key = keySelector(v); + var value = elementSelector(v); + dict.Add(key, value); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return dict; + } + + // with await + + internal static async UniTask> ToDictionaryAwaitAsync(IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var dict = new Dictionary(comparer); + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = e.Current; + var key = await keySelector(v); + dict.Add(key, v); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return dict; + } + + internal static async UniTask> ToDictionaryAwaitAsync(IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var dict = new Dictionary(comparer); + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = e.Current; + var key = await keySelector(v); + var value = await elementSelector(v); + dict.Add(key, value); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return dict; + } + + // with cancellation + + internal static async UniTask> ToDictionaryAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var dict = new Dictionary(comparer); + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = e.Current; + var key = await keySelector(v, cancellationToken); + dict.Add(key, v); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return dict; + } + + internal static async UniTask> ToDictionaryAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var dict = new Dictionary(comparer); + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + var v = e.Current; + var key = await keySelector(v, cancellationToken); + var value = await elementSelector(v, cancellationToken); + dict.Add(key, value); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return dict; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ToDictionary.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/ToDictionary.cs.meta new file mode 100644 index 0000000..4deed19 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ToDictionary.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 03b109b1fe1f2df46aa56ffb26747654 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ToHashSet.cs b/Assets/Plugins/UniTask/Runtime/Linq/ToHashSet.cs new file mode 100644 index 0000000..d058cb1 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ToHashSet.cs @@ -0,0 +1,50 @@ +using Cysharp.Threading.Tasks.Internal; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask> ToHashSetAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Cysharp.Threading.Tasks.Linq.ToHashSet.ToHashSetAsync(source, EqualityComparer.Default, cancellationToken); + } + + public static UniTask> ToHashSetAsync(this IUniTaskAsyncEnumerable source, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return Cysharp.Threading.Tasks.Linq.ToHashSet.ToHashSetAsync(source, comparer, cancellationToken); + } + } + + internal static class ToHashSet + { + internal static async UniTask> ToHashSetAsync(IUniTaskAsyncEnumerable source, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var set = new HashSet(comparer); + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + set.Add(e.Current); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return set; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ToHashSet.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/ToHashSet.cs.meta new file mode 100644 index 0000000..8d3c4af --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ToHashSet.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7a3e552113af96e4986805ec3c4fc80a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ToList.cs b/Assets/Plugins/UniTask/Runtime/Linq/ToList.cs new file mode 100644 index 0000000..e6fa35e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ToList.cs @@ -0,0 +1,42 @@ +using Cysharp.Threading.Tasks.Internal; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask> ToListAsync(this IUniTaskAsyncEnumerable source, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return Cysharp.Threading.Tasks.Linq.ToList.ToListAsync(source, cancellationToken); + } + } + + internal static class ToList + { + internal static async UniTask> ToListAsync(IUniTaskAsyncEnumerable source, CancellationToken cancellationToken) + { + var list = new List(); + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (await e.MoveNextAsync()) + { + list.Add(e.Current); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + + return list; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ToList.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/ToList.cs.meta new file mode 100644 index 0000000..4f09373 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ToList.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3859c1b31e81d9b44b282e7d97e11635 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ToLookup.cs b/Assets/Plugins/UniTask/Runtime/Linq/ToLookup.cs new file mode 100644 index 0000000..015c1c0 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ToLookup.cs @@ -0,0 +1,554 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static UniTask> ToLookupAsync(this IUniTaskAsyncEnumerable source, Func keySelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return ToLookup.ToLookupAsync(source, keySelector, EqualityComparer.Default, cancellationToken); + } + + public static UniTask> ToLookupAsync(this IUniTaskAsyncEnumerable source, Func keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return ToLookup.ToLookupAsync(source, keySelector, comparer, cancellationToken); + } + + public static UniTask> ToLookupAsync(this IUniTaskAsyncEnumerable source, Func keySelector, Func elementSelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + + return ToLookup.ToLookupAsync(source, keySelector, elementSelector, EqualityComparer.Default, cancellationToken); + } + + public static UniTask> ToLookupAsync(this IUniTaskAsyncEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return ToLookup.ToLookupAsync(source, keySelector, elementSelector, comparer, cancellationToken); + } + + public static UniTask> ToLookupAwaitAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return ToLookup.ToLookupAwaitAsync(source, keySelector, EqualityComparer.Default, cancellationToken); + } + + public static UniTask> ToLookupAwaitAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return ToLookup.ToLookupAwaitAsync(source, keySelector, comparer, cancellationToken); + } + + public static UniTask> ToLookupAwaitAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + + return ToLookup.ToLookupAwaitAsync(source, keySelector, elementSelector, EqualityComparer.Default, cancellationToken); + } + + public static UniTask> ToLookupAwaitAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return ToLookup.ToLookupAwaitAsync(source, keySelector, elementSelector, comparer, cancellationToken); + } + + public static UniTask> ToLookupAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + + return ToLookup.ToLookupAwaitWithCancellationAsync(source, keySelector, EqualityComparer.Default, cancellationToken); + } + + public static UniTask> ToLookupAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return ToLookup.ToLookupAwaitWithCancellationAsync(source, keySelector, comparer, cancellationToken); + } + + public static UniTask> ToLookupAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + + return ToLookup.ToLookupAwaitWithCancellationAsync(source, keySelector, elementSelector, EqualityComparer.Default, cancellationToken); + } + + public static UniTask> ToLookupAwaitWithCancellationAsync(this IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(keySelector, nameof(keySelector)); + Error.ThrowArgumentNullException(elementSelector, nameof(elementSelector)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + return ToLookup.ToLookupAwaitWithCancellationAsync(source, keySelector, elementSelector, comparer, cancellationToken); + } + } + + internal static class ToLookup + { + internal static async UniTask> ToLookupAsync(IUniTaskAsyncEnumerable source, Func keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var pool = ArrayPool.Shared; + var array = pool.Rent(16); + + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + var i = 0; + while (await e.MoveNextAsync()) + { + ArrayPoolUtil.EnsureCapacity(ref array, i, pool); + array[i++] = e.Current; + } + + if (i == 0) + { + return Lookup.CreateEmpty(); + } + else + { + return Lookup.Create(new ArraySegment(array, 0, i), keySelector, comparer); + } + } + finally + { + pool.Return(array, clearArray: !RuntimeHelpersAbstraction.IsWellKnownNoReferenceContainsType()); + + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal static async UniTask> ToLookupAsync(IUniTaskAsyncEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var pool = ArrayPool.Shared; + var array = pool.Rent(16); + + IUniTaskAsyncEnumerator e = default; + try + { + e = source.GetAsyncEnumerator(cancellationToken); + var i = 0; + while (await e.MoveNextAsync()) + { + ArrayPoolUtil.EnsureCapacity(ref array, i, pool); + array[i++] = e.Current; + } + + if (i == 0) + { + return Lookup.CreateEmpty(); + } + else + { + return Lookup.Create(new ArraySegment(array, 0, i), keySelector, elementSelector, comparer); + } + } + finally + { + pool.Return(array, clearArray: !RuntimeHelpersAbstraction.IsWellKnownNoReferenceContainsType()); + + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + + // with await + + internal static async UniTask> ToLookupAwaitAsync(IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var pool = ArrayPool.Shared; + var array = pool.Rent(16); + + IUniTaskAsyncEnumerator e = default; + try + { + e = source.GetAsyncEnumerator(cancellationToken); + var i = 0; + while (await e.MoveNextAsync()) + { + ArrayPoolUtil.EnsureCapacity(ref array, i, pool); + array[i++] = e.Current; + } + + if (i == 0) + { + return Lookup.CreateEmpty(); + } + else + { + return await Lookup.CreateAsync(new ArraySegment(array, 0, i), keySelector, comparer); + } + } + finally + { + pool.Return(array, clearArray: !RuntimeHelpersAbstraction.IsWellKnownNoReferenceContainsType()); + + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal static async UniTask> ToLookupAwaitAsync(IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var pool = ArrayPool.Shared; + var array = pool.Rent(16); + + IUniTaskAsyncEnumerator e = default; + try + { + e = source.GetAsyncEnumerator(cancellationToken); + var i = 0; + while (await e.MoveNextAsync()) + { + ArrayPoolUtil.EnsureCapacity(ref array, i, pool); + array[i++] = e.Current; + } + + if (i == 0) + { + return Lookup.CreateEmpty(); + } + else + { + return await Lookup.CreateAsync(new ArraySegment(array, 0, i), keySelector, elementSelector, comparer); + } + } + finally + { + pool.Return(array, clearArray: !RuntimeHelpersAbstraction.IsWellKnownNoReferenceContainsType()); + + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + // with cancellation + + internal static async UniTask> ToLookupAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var pool = ArrayPool.Shared; + var array = pool.Rent(16); + + IUniTaskAsyncEnumerator e = default; + try + { + e = source.GetAsyncEnumerator(cancellationToken); + var i = 0; + while (await e.MoveNextAsync()) + { + ArrayPoolUtil.EnsureCapacity(ref array, i, pool); + array[i++] = e.Current; + } + + if (i == 0) + { + return Lookup.CreateEmpty(); + } + else + { + return await Lookup.CreateAsync(new ArraySegment(array, 0, i), keySelector, comparer, cancellationToken); + } + } + finally + { + pool.Return(array, clearArray: !RuntimeHelpersAbstraction.IsWellKnownNoReferenceContainsType()); + + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal static async UniTask> ToLookupAwaitWithCancellationAsync(IUniTaskAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var pool = ArrayPool.Shared; + var array = pool.Rent(16); + + IUniTaskAsyncEnumerator e = default; + try + { + e = source.GetAsyncEnumerator(cancellationToken); + var i = 0; + while (await e.MoveNextAsync()) + { + ArrayPoolUtil.EnsureCapacity(ref array, i, pool); + array[i++] = e.Current; + } + + if (i == 0) + { + return Lookup.CreateEmpty(); + } + else + { + return await Lookup.CreateAsync(new ArraySegment(array, 0, i), keySelector, elementSelector, comparer, cancellationToken); + } + } + finally + { + pool.Return(array, clearArray: !RuntimeHelpersAbstraction.IsWellKnownNoReferenceContainsType()); + + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + // Lookup + + class Lookup : ILookup + { + static readonly Lookup empty = new Lookup(new Dictionary>()); + + // original lookup keeps order but this impl does not(dictionary not guarantee) + readonly Dictionary> dict; + + Lookup(Dictionary> dict) + { + this.dict = dict; + } + + public static Lookup CreateEmpty() + { + return empty; + } + + public static Lookup Create(ArraySegment source, Func keySelector, IEqualityComparer comparer) + { + var dict = new Dictionary>(comparer); + + var arr = source.Array; + var c = source.Count; + for (int i = source.Offset; i < c; i++) + { + var key = keySelector(arr[i]); + + if (!dict.TryGetValue(key, out var list)) + { + list = new Grouping(key); + dict[key] = list; + } + + list.Add(arr[i]); + } + + return new Lookup(dict); + } + + public static Lookup Create(ArraySegment source, Func keySelector, Func elementSelector, IEqualityComparer comparer) + { + var dict = new Dictionary>(comparer); + + var arr = source.Array; + var c = source.Count; + for (int i = source.Offset; i < c; i++) + { + var key = keySelector(arr[i]); + var elem = elementSelector(arr[i]); + + if (!dict.TryGetValue(key, out var list)) + { + list = new Grouping(key); + dict[key] = list; + } + + list.Add(elem); + } + + return new Lookup(dict); + } + + public static async UniTask> CreateAsync(ArraySegment source, Func> keySelector, IEqualityComparer comparer) + { + var dict = new Dictionary>(comparer); + + var arr = source.Array; + var c = source.Count; + for (int i = source.Offset; i < c; i++) + { + var key = await keySelector(arr[i]); + + if (!dict.TryGetValue(key, out var list)) + { + list = new Grouping(key); + dict[key] = list; + } + + list.Add(arr[i]); + } + + return new Lookup(dict); + } + + public static async UniTask> CreateAsync(ArraySegment source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) + { + var dict = new Dictionary>(comparer); + + var arr = source.Array; + var c = source.Count; + for (int i = source.Offset; i < c; i++) + { + var key = await keySelector(arr[i]); + var elem = await elementSelector(arr[i]); + + if (!dict.TryGetValue(key, out var list)) + { + list = new Grouping(key); + dict[key] = list; + } + + list.Add(elem); + } + + return new Lookup(dict); + } + + public static async UniTask> CreateAsync(ArraySegment source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var dict = new Dictionary>(comparer); + + var arr = source.Array; + var c = source.Count; + for (int i = source.Offset; i < c; i++) + { + var key = await keySelector(arr[i], cancellationToken); + + if (!dict.TryGetValue(key, out var list)) + { + list = new Grouping(key); + dict[key] = list; + } + + list.Add(arr[i]); + } + + return new Lookup(dict); + } + + public static async UniTask> CreateAsync(ArraySegment source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) + { + var dict = new Dictionary>(comparer); + + var arr = source.Array; + var c = source.Count; + for (int i = source.Offset; i < c; i++) + { + var key = await keySelector(arr[i], cancellationToken); + var elem = await elementSelector(arr[i], cancellationToken); + + if (!dict.TryGetValue(key, out var list)) + { + list = new Grouping(key); + dict[key] = list; + } + + list.Add(elem); + } + + return new Lookup(dict); + } + + public IEnumerable this[TKey key] => dict.TryGetValue(key, out var g) ? g : Enumerable.Empty(); + + public int Count => dict.Count; + + public bool Contains(TKey key) + { + return dict.ContainsKey(key); + } + + public IEnumerator> GetEnumerator() + { + return dict.Values.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return dict.Values.GetEnumerator(); + } + } + + class Grouping : IGrouping // , IUniTaskAsyncGrouping + { + readonly List elements; + + public TKey Key { get; private set; } + + public Grouping(TKey key) + { + this.Key = key; + this.elements = new List(); + } + + public void Add(TElement value) + { + elements.Add(value); + } + public IEnumerator GetEnumerator() + { + return elements.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return elements.GetEnumerator(); + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return this.ToUniTaskAsyncEnumerable().GetAsyncEnumerator(cancellationToken); + } + + public override string ToString() + { + return "Key: " + Key + ", Count: " + elements.Count; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ToLookup.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/ToLookup.cs.meta new file mode 100644 index 0000000..7dd8ecd --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ToLookup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 57da22563bcd6ca4aaf256d941de5cb0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ToObservable.cs b/Assets/Plugins/UniTask/Runtime/Linq/ToObservable.cs new file mode 100644 index 0000000..4f48388 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ToObservable.cs @@ -0,0 +1,97 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IObservable ToObservable(this IUniTaskAsyncEnumerable source) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new ToObservable(source); + } + } + + internal sealed class ToObservable : IObservable + { + readonly IUniTaskAsyncEnumerable source; + + public ToObservable(IUniTaskAsyncEnumerable source) + { + this.source = source; + } + + public IDisposable Subscribe(IObserver observer) + { + var ctd = new CancellationTokenDisposable(); + + RunAsync(source, observer, ctd.Token).Forget(); + + return ctd; + } + + static async UniTaskVoid RunAsync(IUniTaskAsyncEnumerable src, IObserver observer, CancellationToken cancellationToken) + { + // cancellationToken.IsCancellationRequested is called when Rx's Disposed. + // when disposed, finish silently. + + var e = src.GetAsyncEnumerator(cancellationToken); + try + { + bool hasNext; + + do + { + try + { + hasNext = await e.MoveNextAsync(); + } + catch (Exception ex) + { + if (cancellationToken.IsCancellationRequested) + { + return; + } + + observer.OnError(ex); + return; + } + + if (hasNext) + { + observer.OnNext(e.Current); + } + else + { + observer.OnCompleted(); + return; + } + } while (!cancellationToken.IsCancellationRequested); + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + internal sealed class CancellationTokenDisposable : IDisposable + { + readonly CancellationTokenSource cts = new CancellationTokenSource(); + + public CancellationToken Token => cts.Token; + + public void Dispose() + { + if (!cts.IsCancellationRequested) + { + cts.Cancel(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ToObservable.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/ToObservable.cs.meta new file mode 100644 index 0000000..44d917e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ToObservable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b4f6f48a532188e4c80b7ebe69aea3a8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ToUniTaskAsyncEnumerable.cs b/Assets/Plugins/UniTask/Runtime/Linq/ToUniTaskAsyncEnumerable.cs new file mode 100644 index 0000000..02523c6 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ToUniTaskAsyncEnumerable.cs @@ -0,0 +1,1115 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Runtime.ExceptionServices; +using System.Threading; +using System.Threading.Tasks; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable ToUniTaskAsyncEnumerable(this IEnumerable source) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new ToUniTaskAsyncEnumerable(source); + } + + public static IUniTaskAsyncEnumerable ToUniTaskAsyncEnumerable(this Task source) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new ToUniTaskAsyncEnumerableTask(source); + } + + public static IUniTaskAsyncEnumerable ToUniTaskAsyncEnumerable(this UniTask source) + { + return new ToUniTaskAsyncEnumerableUniTask(source); + } + + public static IUniTaskAsyncEnumerable ToUniTaskAsyncEnumerable(this IObservable source) + { + Error.ThrowArgumentNullException(source, nameof(source)); + + return new ToUniTaskAsyncEnumerableObservable(source); + } + } + + internal class ToUniTaskAsyncEnumerable : IUniTaskAsyncEnumerable + { + readonly IEnumerable source; + + public ToUniTaskAsyncEnumerable(IEnumerable source) + { + this.source = source; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _ToUniTaskAsyncEnumerable(source, cancellationToken); + } + + class _ToUniTaskAsyncEnumerable : IUniTaskAsyncEnumerator + { + readonly IEnumerable source; + CancellationToken cancellationToken; + + IEnumerator enumerator; + + public _ToUniTaskAsyncEnumerable(IEnumerable source, CancellationToken cancellationToken) + { + this.source = source; + this.cancellationToken = cancellationToken; + } + + public T Current => enumerator.Current; + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (enumerator == null) + { + enumerator = source.GetEnumerator(); + } + + if (enumerator.MoveNext()) + { + return CompletedTasks.True; + } + + return CompletedTasks.False; + } + + public UniTask DisposeAsync() + { + enumerator.Dispose(); + return default; + } + } + } + + internal class ToUniTaskAsyncEnumerableTask : IUniTaskAsyncEnumerable + { + readonly Task source; + + public ToUniTaskAsyncEnumerableTask(Task source) + { + this.source = source; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _ToUniTaskAsyncEnumerableTask(source, cancellationToken); + } + + class _ToUniTaskAsyncEnumerableTask : IUniTaskAsyncEnumerator + { + readonly Task source; + CancellationToken cancellationToken; + + T current; + bool called; + + public _ToUniTaskAsyncEnumerableTask(Task source, CancellationToken cancellationToken) + { + this.source = source; + this.cancellationToken = cancellationToken; + + this.called = false; + } + + public T Current => current; + + public async UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (called) + { + return false; + } + called = true; + + current = await source; + return true; + } + + public UniTask DisposeAsync() + { + return default; + } + } + } + + internal class ToUniTaskAsyncEnumerableUniTask : IUniTaskAsyncEnumerable + { + readonly UniTask source; + + public ToUniTaskAsyncEnumerableUniTask(UniTask source) + { + this.source = source; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _ToUniTaskAsyncEnumerableUniTask(source, cancellationToken); + } + + class _ToUniTaskAsyncEnumerableUniTask : IUniTaskAsyncEnumerator + { + readonly UniTask source; + CancellationToken cancellationToken; + + T current; + bool called; + + public _ToUniTaskAsyncEnumerableUniTask(UniTask source, CancellationToken cancellationToken) + { + this.source = source; + this.cancellationToken = cancellationToken; + + this.called = false; + } + + public T Current => current; + + public async UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + + if (called) + { + return false; + } + called = true; + + current = await source; + return true; + } + + public UniTask DisposeAsync() + { + return default; + } + } + } + + internal class ToUniTaskAsyncEnumerableObservable : IUniTaskAsyncEnumerable + { + readonly IObservable source; + + public ToUniTaskAsyncEnumerableObservable(IObservable source) + { + this.source = source; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _ToUniTaskAsyncEnumerableObservable(source, cancellationToken); + } + + class _ToUniTaskAsyncEnumerableObservable : MoveNextSource, IUniTaskAsyncEnumerator, IObserver + { + static readonly Action OnCanceledDelegate = OnCanceled; + + readonly IObservable source; + CancellationToken cancellationToken; + + + bool useCachedCurrent; + T current; + bool subscribeCompleted; + readonly Queue queuedResult; + Exception error; + IDisposable subscription; + CancellationTokenRegistration cancellationTokenRegistration; + + public _ToUniTaskAsyncEnumerableObservable(IObservable source, CancellationToken cancellationToken) + { + this.source = source; + this.cancellationToken = cancellationToken; + this.queuedResult = new Queue(); + + if (cancellationToken.CanBeCanceled) + { + cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(OnCanceledDelegate, this); + } + } + + public T Current + { + get + { + if (useCachedCurrent) + { + return current; + } + + lock (queuedResult) + { + if (queuedResult.Count != 0) + { + current = queuedResult.Dequeue(); + useCachedCurrent = true; + return current; + } + else + { + return default; // undefined. + } + } + } + } + + public UniTask MoveNextAsync() + { + lock (queuedResult) + { + useCachedCurrent = false; + + if (cancellationToken.IsCancellationRequested) + { + return UniTask.FromCanceled(cancellationToken); + } + + if (subscription == null) + { + subscription = source.Subscribe(this); + } + + if (error != null) + { + return UniTask.FromException(error); + } + + if (queuedResult.Count != 0) + { + return CompletedTasks.True; + } + + if (subscribeCompleted) + { + return CompletedTasks.False; + } + + completionSource.Reset(); + return new UniTask(this, completionSource.Version); + } + } + + public UniTask DisposeAsync() + { + subscription.Dispose(); + cancellationTokenRegistration.Dispose(); + completionSource.Reset(); + return default; + } + + public void OnCompleted() + { + lock (queuedResult) + { + subscribeCompleted = true; + completionSource.TrySetResult(false); + } + } + + public void OnError(Exception error) + { + lock (queuedResult) + { + this.error = error; + completionSource.TrySetException(error); + } + } + + public void OnNext(T value) + { + lock (queuedResult) + { + queuedResult.Enqueue(value); + completionSource.TrySetResult(true); // include callback execution, too long lock? + } + } + + static void OnCanceled(object state) + { + var self = (_ToUniTaskAsyncEnumerableObservable)state; + lock (self.queuedResult) + { + self.completionSource.TrySetCanceled(self.cancellationToken); + } + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Assets/Plugins/UniTask/Runtime/Linq/ToUniTaskAsyncEnumerable.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/ToUniTaskAsyncEnumerable.cs.meta new file mode 100644 index 0000000..45fd3b0 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/ToUniTaskAsyncEnumerable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d7192de2a0581ec4db62962cc1404af5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/UniTask.Linq.asmdef b/Assets/Plugins/UniTask/Runtime/Linq/UniTask.Linq.asmdef new file mode 100644 index 0000000..db84553 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/UniTask.Linq.asmdef @@ -0,0 +1,15 @@ +{ + "name": "UniTask.Linq", + "references": [ + "UniTask" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/UniTask.Linq.asmdef.meta b/Assets/Plugins/UniTask/Runtime/Linq/UniTask.Linq.asmdef.meta new file mode 100644 index 0000000..1c85d19 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/UniTask.Linq.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5c01796d064528144a599661eaab93a6 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Union.cs b/Assets/Plugins/UniTask/Runtime/Linq/Union.cs new file mode 100644 index 0000000..2ceefab --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Union.cs @@ -0,0 +1,26 @@ +using Cysharp.Threading.Tasks.Internal; +using System.Collections.Generic; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Union(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second) + { + Error.ThrowArgumentNullException(first, nameof(first)); + Error.ThrowArgumentNullException(second, nameof(second)); + + return Union(first, second, EqualityComparer.Default); + } + + public static IUniTaskAsyncEnumerable Union(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, IEqualityComparer comparer) + { + Error.ThrowArgumentNullException(first, nameof(first)); + Error.ThrowArgumentNullException(second, nameof(second)); + Error.ThrowArgumentNullException(comparer, nameof(comparer)); + + // improv without combinate? + return first.Concat(second).Distinct(comparer); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Union.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Union.cs.meta new file mode 100644 index 0000000..1d9c7ad --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Union.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ae57a55bdeba98b4f8ff234d98d7dd76 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions.meta b/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions.meta new file mode 100644 index 0000000..75990e3 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 55549006c31f089479f80d685e34ccf3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryUpdate.cs b/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryUpdate.cs new file mode 100644 index 0000000..8f09110 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryUpdate.cs @@ -0,0 +1,100 @@ +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable EveryUpdate(PlayerLoopTiming updateTiming = PlayerLoopTiming.Update, bool cancelImmediately = false) + { + return new EveryUpdate(updateTiming, cancelImmediately); + } + } + + internal class EveryUpdate : IUniTaskAsyncEnumerable + { + readonly PlayerLoopTiming updateTiming; + readonly bool cancelImmediately; + + public EveryUpdate(PlayerLoopTiming updateTiming, bool cancelImmediately) + { + this.updateTiming = updateTiming; + this.cancelImmediately = cancelImmediately; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _EveryUpdate(updateTiming, cancellationToken, cancelImmediately); + } + + class _EveryUpdate : MoveNextSource, IUniTaskAsyncEnumerator, IPlayerLoopItem + { + readonly PlayerLoopTiming updateTiming; + readonly CancellationToken cancellationToken; + readonly CancellationTokenRegistration cancellationTokenRegistration; + + bool disposed; + + public _EveryUpdate(PlayerLoopTiming updateTiming, CancellationToken cancellationToken, bool cancelImmediately) + { + this.updateTiming = updateTiming; + this.cancellationToken = cancellationToken; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var source = (_EveryUpdate)state; + source.completionSource.TrySetCanceled(source.cancellationToken); + }, this); + } + + TaskTracker.TrackActiveTask(this, 2); + PlayerLoopHelper.AddAction(updateTiming, this); + } + + public AsyncUnit Current => default; + + public UniTask MoveNextAsync() + { + if (disposed) return CompletedTasks.False; + + completionSource.Reset(); + + if (cancellationToken.IsCancellationRequested) + { + completionSource.TrySetCanceled(cancellationToken); + } + return new UniTask(this, completionSource.Version); + } + + public UniTask DisposeAsync() + { + if (!disposed) + { + cancellationTokenRegistration.Dispose(); + disposed = true; + TaskTracker.RemoveTracking(this); + } + return default; + } + + public bool MoveNext() + { + if (cancellationToken.IsCancellationRequested) + { + completionSource.TrySetCanceled(cancellationToken); + return false; + } + + if (disposed) + { + completionSource.TrySetResult(false); + return false; + } + + completionSource.TrySetResult(true); + return true; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryUpdate.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryUpdate.cs.meta new file mode 100644 index 0000000..6336e0e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryUpdate.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 00520eb52e49b5b4e8d9870d6ff1aced +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryValueChanged.cs b/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryValueChanged.cs new file mode 100644 index 0000000..ef5739c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryValueChanged.cs @@ -0,0 +1,292 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable EveryValueChanged(TTarget target, Func propertySelector, PlayerLoopTiming monitorTiming = PlayerLoopTiming.Update, IEqualityComparer equalityComparer = null, bool cancelImmediately = false) + where TTarget : class + { + var unityObject = target as UnityEngine.Object; + var isUnityObject = target is UnityEngine.Object; // don't use (unityObject == null) + + if (isUnityObject) + { + return new EveryValueChangedUnityObject(target, propertySelector, equalityComparer ?? UnityEqualityComparer.GetDefault(), monitorTiming, cancelImmediately); + } + else + { + return new EveryValueChangedStandardObject(target, propertySelector, equalityComparer ?? UnityEqualityComparer.GetDefault(), monitorTiming, cancelImmediately); + } + } + } + + internal sealed class EveryValueChangedUnityObject : IUniTaskAsyncEnumerable + { + readonly TTarget target; + readonly Func propertySelector; + readonly IEqualityComparer equalityComparer; + readonly PlayerLoopTiming monitorTiming; + readonly bool cancelImmediately; + + public EveryValueChangedUnityObject(TTarget target, Func propertySelector, IEqualityComparer equalityComparer, PlayerLoopTiming monitorTiming, bool cancelImmediately) + { + this.target = target; + this.propertySelector = propertySelector; + this.equalityComparer = equalityComparer; + this.monitorTiming = monitorTiming; + this.cancelImmediately = cancelImmediately; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _EveryValueChanged(target, propertySelector, equalityComparer, monitorTiming, cancellationToken, cancelImmediately); + } + + sealed class _EveryValueChanged : MoveNextSource, IUniTaskAsyncEnumerator, IPlayerLoopItem + { + readonly TTarget target; + readonly UnityEngine.Object targetAsUnityObject; + readonly IEqualityComparer equalityComparer; + readonly Func propertySelector; + readonly CancellationToken cancellationToken; + readonly CancellationTokenRegistration cancellationTokenRegistration; + + bool first; + TProperty currentValue; + bool disposed; + + public _EveryValueChanged(TTarget target, Func propertySelector, IEqualityComparer equalityComparer, PlayerLoopTiming monitorTiming, CancellationToken cancellationToken, bool cancelImmediately) + { + this.target = target; + this.targetAsUnityObject = target as UnityEngine.Object; + this.propertySelector = propertySelector; + this.equalityComparer = equalityComparer; + this.cancellationToken = cancellationToken; + this.first = true; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var source = (_EveryValueChanged)state; + source.completionSource.TrySetCanceled(source.cancellationToken); + }, this); + } + + TaskTracker.TrackActiveTask(this, 2); + PlayerLoopHelper.AddAction(monitorTiming, this); + } + + public TProperty Current => currentValue; + + public UniTask MoveNextAsync() + { + if (disposed) return CompletedTasks.False; + + completionSource.Reset(); + + if (cancellationToken.IsCancellationRequested) + { + completionSource.TrySetCanceled(cancellationToken); + return new UniTask(this, completionSource.Version); + } + + if (first) + { + first = false; + if (targetAsUnityObject == null) + { + return CompletedTasks.False; + } + this.currentValue = propertySelector(target); + return CompletedTasks.True; + } + + return new UniTask(this, completionSource.Version); + } + + public UniTask DisposeAsync() + { + if (!disposed) + { + cancellationTokenRegistration.Dispose(); + disposed = true; + TaskTracker.RemoveTracking(this); + } + return default; + } + + public bool MoveNext() + { + if (disposed || targetAsUnityObject == null) + { + completionSource.TrySetResult(false); + DisposeAsync().Forget(); + return false; + } + + if (cancellationToken.IsCancellationRequested) + { + completionSource.TrySetCanceled(cancellationToken); + return false; + } + TProperty nextValue = default(TProperty); + try + { + nextValue = propertySelector(target); + if (equalityComparer.Equals(currentValue, nextValue)) + { + return true; + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + DisposeAsync().Forget(); + return false; + } + + currentValue = nextValue; + completionSource.TrySetResult(true); + return true; + } + } + } + + internal sealed class EveryValueChangedStandardObject : IUniTaskAsyncEnumerable + where TTarget : class + { + readonly WeakReference target; + readonly Func propertySelector; + readonly IEqualityComparer equalityComparer; + readonly PlayerLoopTiming monitorTiming; + readonly bool cancelImmediately; + + public EveryValueChangedStandardObject(TTarget target, Func propertySelector, IEqualityComparer equalityComparer, PlayerLoopTiming monitorTiming, bool cancelImmediately) + { + this.target = new WeakReference(target, false); + this.propertySelector = propertySelector; + this.equalityComparer = equalityComparer; + this.monitorTiming = monitorTiming; + this.cancelImmediately = cancelImmediately; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _EveryValueChanged(target, propertySelector, equalityComparer, monitorTiming, cancellationToken, cancelImmediately); + } + + sealed class _EveryValueChanged : MoveNextSource, IUniTaskAsyncEnumerator, IPlayerLoopItem + { + readonly WeakReference target; + readonly IEqualityComparer equalityComparer; + readonly Func propertySelector; + readonly CancellationToken cancellationToken; + readonly CancellationTokenRegistration cancellationTokenRegistration; + + bool first; + TProperty currentValue; + bool disposed; + + public _EveryValueChanged(WeakReference target, Func propertySelector, IEqualityComparer equalityComparer, PlayerLoopTiming monitorTiming, CancellationToken cancellationToken, bool cancelImmediately) + { + this.target = target; + this.propertySelector = propertySelector; + this.equalityComparer = equalityComparer; + this.cancellationToken = cancellationToken; + this.first = true; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var source = (_EveryValueChanged)state; + source.completionSource.TrySetCanceled(source.cancellationToken); + }, this); + } + + TaskTracker.TrackActiveTask(this, 2); + PlayerLoopHelper.AddAction(monitorTiming, this); + } + + public TProperty Current => currentValue; + + public UniTask MoveNextAsync() + { + if (disposed) return CompletedTasks.False; + + completionSource.Reset(); + + if (cancellationToken.IsCancellationRequested) + { + completionSource.TrySetCanceled(cancellationToken); + return new UniTask(this, completionSource.Version); + } + + if (first) + { + first = false; + if (!target.TryGetTarget(out var t)) + { + return CompletedTasks.False; + } + this.currentValue = propertySelector(t); + return CompletedTasks.True; + } + + return new UniTask(this, completionSource.Version); + } + + public UniTask DisposeAsync() + { + if (!disposed) + { + cancellationTokenRegistration.Dispose(); + disposed = true; + TaskTracker.RemoveTracking(this); + } + return default; + } + + public bool MoveNext() + { + if (disposed || !target.TryGetTarget(out var t)) + { + completionSource.TrySetResult(false); + DisposeAsync().Forget(); + return false; + } + + if (cancellationToken.IsCancellationRequested) + { + completionSource.TrySetCanceled(cancellationToken); + return false; + } + + TProperty nextValue = default(TProperty); + try + { + nextValue = propertySelector(t); + if (equalityComparer.Equals(currentValue, nextValue)) + { + return true; + } + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + DisposeAsync().Forget(); + return false; + } + + currentValue = nextValue; + completionSource.TrySetResult(true); + return true; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryValueChanged.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryValueChanged.cs.meta new file mode 100644 index 0000000..9d2be70 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryValueChanged.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1ec39f1c41c305344854782c935ad354 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/Timer.cs b/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/Timer.cs new file mode 100644 index 0000000..b8aabf2 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/Timer.cs @@ -0,0 +1,355 @@ +using System; +using System.Threading; +using UnityEngine; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Timer(TimeSpan dueTime, PlayerLoopTiming updateTiming = PlayerLoopTiming.Update, bool ignoreTimeScale = false, bool cancelImmediately = false) + { + return new Timer(dueTime, null, updateTiming, ignoreTimeScale, cancelImmediately); + } + + public static IUniTaskAsyncEnumerable Timer(TimeSpan dueTime, TimeSpan period, PlayerLoopTiming updateTiming = PlayerLoopTiming.Update, bool ignoreTimeScale = false, bool cancelImmediately = false) + { + return new Timer(dueTime, period, updateTiming, ignoreTimeScale, cancelImmediately); + } + + public static IUniTaskAsyncEnumerable Interval(TimeSpan period, PlayerLoopTiming updateTiming = PlayerLoopTiming.Update, bool ignoreTimeScale = false, bool cancelImmediately = false) + { + return new Timer(period, period, updateTiming, ignoreTimeScale, cancelImmediately); + } + + public static IUniTaskAsyncEnumerable TimerFrame(int dueTimeFrameCount, PlayerLoopTiming updateTiming = PlayerLoopTiming.Update, bool cancelImmediately = false) + { + if (dueTimeFrameCount < 0) + { + throw new ArgumentOutOfRangeException("Delay does not allow minus delayFrameCount. dueTimeFrameCount:" + dueTimeFrameCount); + } + + return new TimerFrame(dueTimeFrameCount, null, updateTiming, cancelImmediately); + } + + public static IUniTaskAsyncEnumerable TimerFrame(int dueTimeFrameCount, int periodFrameCount, PlayerLoopTiming updateTiming = PlayerLoopTiming.Update, bool cancelImmediately = false) + { + if (dueTimeFrameCount < 0) + { + throw new ArgumentOutOfRangeException("Delay does not allow minus delayFrameCount. dueTimeFrameCount:" + dueTimeFrameCount); + } + if (periodFrameCount < 0) + { + throw new ArgumentOutOfRangeException("Delay does not allow minus periodFrameCount. periodFrameCount:" + dueTimeFrameCount); + } + + return new TimerFrame(dueTimeFrameCount, periodFrameCount, updateTiming, cancelImmediately); + } + + public static IUniTaskAsyncEnumerable IntervalFrame(int intervalFrameCount, PlayerLoopTiming updateTiming = PlayerLoopTiming.Update, bool cancelImmediately = false) + { + if (intervalFrameCount < 0) + { + throw new ArgumentOutOfRangeException("Delay does not allow minus intervalFrameCount. intervalFrameCount:" + intervalFrameCount); + } + return new TimerFrame(intervalFrameCount, intervalFrameCount, updateTiming, cancelImmediately); + } + } + + internal class Timer : IUniTaskAsyncEnumerable + { + readonly PlayerLoopTiming updateTiming; + readonly TimeSpan dueTime; + readonly TimeSpan? period; + readonly bool ignoreTimeScale; + readonly bool cancelImmediately; + + public Timer(TimeSpan dueTime, TimeSpan? period, PlayerLoopTiming updateTiming, bool ignoreTimeScale, bool cancelImmediately) + { + this.updateTiming = updateTiming; + this.dueTime = dueTime; + this.period = period; + this.ignoreTimeScale = ignoreTimeScale; + this.cancelImmediately = cancelImmediately; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Timer(dueTime, period, updateTiming, ignoreTimeScale, cancellationToken, cancelImmediately); + } + + class _Timer : MoveNextSource, IUniTaskAsyncEnumerator, IPlayerLoopItem + { + readonly float dueTime; + readonly float? period; + readonly PlayerLoopTiming updateTiming; + readonly bool ignoreTimeScale; + readonly CancellationToken cancellationToken; + readonly CancellationTokenRegistration cancellationTokenRegistration; + + int initialFrame; + float elapsed; + bool dueTimePhase; + bool completed; + bool disposed; + + public _Timer(TimeSpan dueTime, TimeSpan? period, PlayerLoopTiming updateTiming, bool ignoreTimeScale, CancellationToken cancellationToken, bool cancelImmediately) + { + this.dueTime = (float)dueTime.TotalSeconds; + this.period = (period == null) ? null : (float?)period.Value.TotalSeconds; + + if (this.dueTime <= 0) this.dueTime = 0; + if (this.period != null) + { + if (this.period <= 0) this.period = 1; + } + + this.initialFrame = PlayerLoopHelper.IsMainThread ? Time.frameCount : -1; + this.dueTimePhase = true; + this.updateTiming = updateTiming; + this.ignoreTimeScale = ignoreTimeScale; + this.cancellationToken = cancellationToken; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var source = (_Timer)state; + source.completionSource.TrySetCanceled(source.cancellationToken); + }, this); + } + + TaskTracker.TrackActiveTask(this, 2); + PlayerLoopHelper.AddAction(updateTiming, this); + } + + public AsyncUnit Current => default; + + public UniTask MoveNextAsync() + { + // return false instead of throw + if (disposed || completed) return CompletedTasks.False; + + // reset value here. + this.elapsed = 0; + + completionSource.Reset(); + if (cancellationToken.IsCancellationRequested) + { + completionSource.TrySetCanceled(cancellationToken); + } + return new UniTask(this, completionSource.Version); + } + + public UniTask DisposeAsync() + { + if (!disposed) + { + cancellationTokenRegistration.Dispose(); + disposed = true; + TaskTracker.RemoveTracking(this); + } + return default; + } + + public bool MoveNext() + { + if (disposed) + { + completionSource.TrySetResult(false); + return false; + } + if (cancellationToken.IsCancellationRequested) + { + completionSource.TrySetCanceled(cancellationToken); + return false; + } + + if (dueTimePhase) + { + if (elapsed == 0) + { + // skip in initial frame. + if (initialFrame == Time.frameCount) + { + return true; + } + } + + elapsed += (ignoreTimeScale) ? UnityEngine.Time.unscaledDeltaTime : UnityEngine.Time.deltaTime; + + if (elapsed >= dueTime) + { + dueTimePhase = false; + completionSource.TrySetResult(true); + } + } + else + { + if (period == null) + { + completed = true; + completionSource.TrySetResult(false); + return false; + } + + elapsed += (ignoreTimeScale) ? UnityEngine.Time.unscaledDeltaTime : UnityEngine.Time.deltaTime; + + if (elapsed >= period) + { + completionSource.TrySetResult(true); + } + } + + return true; + } + } + } + + internal class TimerFrame : IUniTaskAsyncEnumerable + { + readonly PlayerLoopTiming updateTiming; + readonly int dueTimeFrameCount; + readonly int? periodFrameCount; + readonly bool cancelImmediately; + + public TimerFrame(int dueTimeFrameCount, int? periodFrameCount, PlayerLoopTiming updateTiming, bool cancelImmediately) + { + this.updateTiming = updateTiming; + this.dueTimeFrameCount = dueTimeFrameCount; + this.periodFrameCount = periodFrameCount; + this.cancelImmediately = cancelImmediately; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _TimerFrame(dueTimeFrameCount, periodFrameCount, updateTiming, cancellationToken, cancelImmediately); + } + + class _TimerFrame : MoveNextSource, IUniTaskAsyncEnumerator, IPlayerLoopItem + { + readonly int dueTimeFrameCount; + readonly int? periodFrameCount; + readonly CancellationToken cancellationToken; + readonly CancellationTokenRegistration cancellationTokenRegistration; + + int initialFrame; + int currentFrame; + bool dueTimePhase; + bool completed; + bool disposed; + + public _TimerFrame(int dueTimeFrameCount, int? periodFrameCount, PlayerLoopTiming updateTiming, CancellationToken cancellationToken, bool cancelImmediately) + { + if (dueTimeFrameCount <= 0) dueTimeFrameCount = 0; + if (periodFrameCount != null) + { + if (periodFrameCount <= 0) periodFrameCount = 1; + } + + this.initialFrame = PlayerLoopHelper.IsMainThread ? Time.frameCount : -1; + this.dueTimePhase = true; + this.dueTimeFrameCount = dueTimeFrameCount; + this.periodFrameCount = periodFrameCount; + this.cancellationToken = cancellationToken; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var source = (_TimerFrame)state; + source.completionSource.TrySetCanceled(source.cancellationToken); + }, this); + } + + TaskTracker.TrackActiveTask(this, 2); + PlayerLoopHelper.AddAction(updateTiming, this); + } + + public AsyncUnit Current => default; + + public UniTask MoveNextAsync() + { + if (disposed || completed) return CompletedTasks.False; + + if (cancellationToken.IsCancellationRequested) + { + completionSource.TrySetCanceled(cancellationToken); + } + + // reset value here. + this.currentFrame = 0; + completionSource.Reset(); + return new UniTask(this, completionSource.Version); + } + + public UniTask DisposeAsync() + { + if (!disposed) + { + cancellationTokenRegistration.Dispose(); + disposed = true; + TaskTracker.RemoveTracking(this); + } + return default; + } + + public bool MoveNext() + { + if (cancellationToken.IsCancellationRequested) + { + completionSource.TrySetCanceled(cancellationToken); + return false; + } + if (disposed) + { + completionSource.TrySetResult(false); + return false; + } + + if (dueTimePhase) + { + if (currentFrame == 0) + { + if (dueTimeFrameCount == 0) + { + dueTimePhase = false; + completionSource.TrySetResult(true); + return true; + } + + // skip in initial frame. + if (initialFrame == Time.frameCount) + { + return true; + } + } + + if (++currentFrame >= dueTimeFrameCount) + { + dueTimePhase = false; + completionSource.TrySetResult(true); + } + else + { + } + } + else + { + if (periodFrameCount == null) + { + completed = true; + completionSource.TrySetResult(false); + return false; + } + + if (++currentFrame >= periodFrameCount) + { + completionSource.TrySetResult(true); + } + } + + return true; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/Timer.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/Timer.cs.meta new file mode 100644 index 0000000..aa790c5 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/Timer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 382caacde439855418709c641e4d7b04 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Where.cs b/Assets/Plugins/UniTask/Runtime/Linq/Where.cs new file mode 100644 index 0000000..1b5ac47 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Where.cs @@ -0,0 +1,818 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + public static IUniTaskAsyncEnumerable Where(this IUniTaskAsyncEnumerable source, Func predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new Where(source, predicate); + } + + public static IUniTaskAsyncEnumerable Where(this IUniTaskAsyncEnumerable source, Func predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new WhereInt(source, predicate); + } + + public static IUniTaskAsyncEnumerable WhereAwait(this IUniTaskAsyncEnumerable source, Func> predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new WhereAwait(source, predicate); + } + + public static IUniTaskAsyncEnumerable WhereAwait(this IUniTaskAsyncEnumerable source, Func> predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new WhereIntAwait(source, predicate); + } + + public static IUniTaskAsyncEnumerable WhereAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new WhereAwaitWithCancellation(source, predicate); + } + + public static IUniTaskAsyncEnumerable WhereAwaitWithCancellation(this IUniTaskAsyncEnumerable source, Func> predicate) + { + Error.ThrowArgumentNullException(source, nameof(source)); + Error.ThrowArgumentNullException(predicate, nameof(predicate)); + + return new WhereIntAwaitWithCancellation(source, predicate); + } + } + + internal sealed class Where : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func predicate; + + public Where(IUniTaskAsyncEnumerable source, Func predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Where(source, predicate, cancellationToken); + } + + sealed class _Where : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func predicate; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + Action moveNextAction; + + public _Where(IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken) + { + this.source = source; + this.predicate = predicate; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + REPEAT: + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + goto case 0; + case 0: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + Current = enumerator.Current; + if (predicate(Current)) + { + goto CONTINUE; + } + else + { + state = 0; + goto REPEAT; + } + } + else + { + goto DONE; + } + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + return enumerator.DisposeAsync(); + } + } + } + + internal sealed class WhereInt : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func predicate; + + public WhereInt(IUniTaskAsyncEnumerable source, Func predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Where(source, predicate, cancellationToken); + } + + sealed class _Where : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func predicate; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + Action moveNextAction; + int index; + + public _Where(IUniTaskAsyncEnumerable source, Func predicate, CancellationToken cancellationToken) + { + this.source = source; + this.predicate = predicate; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + REPEAT: + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + goto case 0; + case 0: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + Current = enumerator.Current; + if (predicate(Current, checked(index++))) + { + goto CONTINUE; + } + else + { + state = 0; + goto REPEAT; + } + } + else + { + goto DONE; + } + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + return enumerator.DisposeAsync(); + } + } + } + + internal sealed class WhereAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + + public WhereAwait(IUniTaskAsyncEnumerable source, Func> predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _WhereAwait(source, predicate, cancellationToken); + } + + sealed class _WhereAwait : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + UniTask.Awaiter awaiter2; + Action moveNextAction; + + public _WhereAwait(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + { + this.source = source; + this.predicate = predicate; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + REPEAT: + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + goto case 0; + case 0: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + Current = enumerator.Current; + + awaiter2 = predicate(Current).GetAwaiter(); + if (awaiter2.IsCompleted) + { + goto case 2; + } + else + { + state = 2; + awaiter2.UnsafeOnCompleted(moveNextAction); + return; + } + } + else + { + goto DONE; + } + case 2: + if (awaiter2.GetResult()) + { + goto CONTINUE; + } + else + { + state = 0; + goto REPEAT; + } + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + return enumerator.DisposeAsync(); + } + } + } + + internal sealed class WhereIntAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + + public WhereIntAwait(IUniTaskAsyncEnumerable source, Func> predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _WhereAwait(source, predicate, cancellationToken); + } + + sealed class _WhereAwait : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + UniTask.Awaiter awaiter2; + Action moveNextAction; + int index; + + public _WhereAwait(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + { + this.source = source; + this.predicate = predicate; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + REPEAT: + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + goto case 0; + case 0: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + Current = enumerator.Current; + + awaiter2 = predicate(Current, checked(index++)).GetAwaiter(); + if (awaiter2.IsCompleted) + { + goto case 2; + } + else + { + state = 2; + awaiter2.UnsafeOnCompleted(moveNextAction); + return; + } + } + else + { + goto DONE; + } + case 2: + if (awaiter2.GetResult()) + { + goto CONTINUE; + } + else + { + state = 0; + goto REPEAT; + } + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + return enumerator.DisposeAsync(); + } + } + } + + internal sealed class WhereAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + + public WhereAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _WhereAwaitWithCancellation(source, predicate, cancellationToken); + } + + sealed class _WhereAwaitWithCancellation : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + UniTask.Awaiter awaiter2; + Action moveNextAction; + + public _WhereAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + { + this.source = source; + this.predicate = predicate; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + REPEAT: + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + goto case 0; + case 0: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + Current = enumerator.Current; + + awaiter2 = predicate(Current, cancellationToken).GetAwaiter(); + if (awaiter2.IsCompleted) + { + goto case 2; + } + else + { + state = 2; + awaiter2.UnsafeOnCompleted(moveNextAction); + return; + } + } + else + { + goto DONE; + } + case 2: + if (awaiter2.GetResult()) + { + goto CONTINUE; + } + else + { + state = 0; + goto REPEAT; + } + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + return enumerator.DisposeAsync(); + } + } + } + + internal sealed class WhereIntAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + + public WhereIntAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> predicate) + { + this.source = source; + this.predicate = predicate; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _WhereAwaitWithCancellation(source, predicate, cancellationToken); + } + + sealed class _WhereAwaitWithCancellation : MoveNextSource, IUniTaskAsyncEnumerator + { + readonly IUniTaskAsyncEnumerable source; + readonly Func> predicate; + readonly CancellationToken cancellationToken; + + int state = -1; + IUniTaskAsyncEnumerator enumerator; + UniTask.Awaiter awaiter; + UniTask.Awaiter awaiter2; + Action moveNextAction; + int index; + + public _WhereAwaitWithCancellation(IUniTaskAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) + { + this.source = source; + this.predicate = predicate; + this.cancellationToken = cancellationToken; + this.moveNextAction = MoveNext; + TaskTracker.TrackActiveTask(this, 3); + } + + public TSource Current { get; private set; } + + public UniTask MoveNextAsync() + { + if (state == -2) return default; + + completionSource.Reset(); + MoveNext(); + return new UniTask(this, completionSource.Version); + } + + void MoveNext() + { + REPEAT: + try + { + switch (state) + { + case -1: // init + enumerator = source.GetAsyncEnumerator(cancellationToken); + goto case 0; + case 0: + awaiter = enumerator.MoveNextAsync().GetAwaiter(); + if (awaiter.IsCompleted) + { + goto case 1; + } + else + { + state = 1; + awaiter.UnsafeOnCompleted(moveNextAction); + return; + } + case 1: + if (awaiter.GetResult()) + { + Current = enumerator.Current; + + awaiter2 = predicate(Current, checked(index++), cancellationToken).GetAwaiter(); + if (awaiter2.IsCompleted) + { + goto case 2; + } + else + { + state = 2; + awaiter2.UnsafeOnCompleted(moveNextAction); + return; + } + } + else + { + goto DONE; + } + case 2: + if (awaiter2.GetResult()) + { + goto CONTINUE; + } + else + { + state = 0; + goto REPEAT; + } + default: + goto DONE; + } + } + catch (Exception ex) + { + state = -2; + completionSource.TrySetException(ex); + return; + } + + DONE: + state = -2; + completionSource.TrySetResult(false); + return; + + CONTINUE: + state = 0; + completionSource.TrySetResult(true); + return; + } + + public UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + return enumerator.DisposeAsync(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Where.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Where.cs.meta new file mode 100644 index 0000000..7e50337 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Where.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d882a3238d9535e4e8ce1ad3291eb7fb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Zip.cs b/Assets/Plugins/UniTask/Runtime/Linq/Zip.cs new file mode 100644 index 0000000..af6d5f1 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Zip.cs @@ -0,0 +1,541 @@ +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks.Linq +{ + public static partial class UniTaskAsyncEnumerable + { + + public static IUniTaskAsyncEnumerable<(TFirst First, TSecond Second)> Zip(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second) + { + Error.ThrowArgumentNullException(first, nameof(first)); + Error.ThrowArgumentNullException(second, nameof(second)); + + return Zip(first, second, (x, y) => (x, y)); + } + + public static IUniTaskAsyncEnumerable Zip(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, Func resultSelector) + { + Error.ThrowArgumentNullException(first, nameof(first)); + Error.ThrowArgumentNullException(second, nameof(second)); + Error.ThrowArgumentNullException(resultSelector, nameof(resultSelector)); + + return new Zip(first, second, resultSelector); + } + + public static IUniTaskAsyncEnumerable ZipAwait(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, Func> selector) + { + Error.ThrowArgumentNullException(first, nameof(first)); + Error.ThrowArgumentNullException(second, nameof(second)); + Error.ThrowArgumentNullException(selector, nameof(selector)); + + return new ZipAwait(first, second, selector); + } + + public static IUniTaskAsyncEnumerable ZipAwaitWithCancellation(this IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, Func> selector) + { + Error.ThrowArgumentNullException(first, nameof(first)); + Error.ThrowArgumentNullException(second, nameof(second)); + Error.ThrowArgumentNullException(selector, nameof(selector)); + + return new ZipAwaitWithCancellation(first, second, selector); + } + } + + internal sealed class Zip : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable first; + readonly IUniTaskAsyncEnumerable second; + readonly Func resultSelector; + + public Zip(IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, Func resultSelector) + { + this.first = first; + this.second = second; + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _Zip(first, second, resultSelector, cancellationToken); + } + + sealed class _Zip : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action firstMoveNextCoreDelegate = FirstMoveNextCore; + static readonly Action secondMoveNextCoreDelegate = SecondMoveNextCore; + + readonly IUniTaskAsyncEnumerable first; + readonly IUniTaskAsyncEnumerable second; + readonly Func resultSelector; + + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator firstEnumerator; + IUniTaskAsyncEnumerator secondEnumerator; + + UniTask.Awaiter firstAwaiter; + UniTask.Awaiter secondAwaiter; + + public _Zip(IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, Func resultSelector, CancellationToken cancellationToken) + { + this.first = first; + this.second = second; + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + completionSource.Reset(); + + if (firstEnumerator == null) + { + firstEnumerator = first.GetAsyncEnumerator(cancellationToken); + secondEnumerator = second.GetAsyncEnumerator(cancellationToken); + } + + firstAwaiter = firstEnumerator.MoveNextAsync().GetAwaiter(); + + if (firstAwaiter.IsCompleted) + { + FirstMoveNextCore(this); + } + else + { + firstAwaiter.SourceOnCompleted(firstMoveNextCoreDelegate, this); + } + + return new UniTask(this, completionSource.Version); + } + + static void FirstMoveNextCore(object state) + { + var self = (_Zip)state; + + if (self.TryGetResult(self.firstAwaiter, out var result)) + { + if (result) + { + try + { + self.secondAwaiter = self.secondEnumerator.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + + if (self.secondAwaiter.IsCompleted) + { + SecondMoveNextCore(self); + } + else + { + self.secondAwaiter.SourceOnCompleted(secondMoveNextCoreDelegate, self); + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + static void SecondMoveNextCore(object state) + { + var self = (_Zip)state; + + if (self.TryGetResult(self.secondAwaiter, out var result)) + { + if (result) + { + try + { + self.Current = self.resultSelector(self.firstEnumerator.Current, self.secondEnumerator.Current); + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + } + + if (self.cancellationToken.IsCancellationRequested) + { + self.completionSource.TrySetCanceled(self.cancellationToken); + } + else + { + self.completionSource.TrySetResult(true); + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (firstEnumerator != null) + { + await firstEnumerator.DisposeAsync(); + } + if (secondEnumerator != null) + { + await secondEnumerator.DisposeAsync(); + } + } + } + } + + internal sealed class ZipAwait : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable first; + readonly IUniTaskAsyncEnumerable second; + readonly Func> resultSelector; + + public ZipAwait(IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, Func> resultSelector) + { + this.first = first; + this.second = second; + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _ZipAwait(first, second, resultSelector, cancellationToken); + } + + sealed class _ZipAwait : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action firstMoveNextCoreDelegate = FirstMoveNextCore; + static readonly Action secondMoveNextCoreDelegate = SecondMoveNextCore; + static readonly Action resultAwaitCoreDelegate = ResultAwaitCore; + + readonly IUniTaskAsyncEnumerable first; + readonly IUniTaskAsyncEnumerable second; + readonly Func> resultSelector; + + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator firstEnumerator; + IUniTaskAsyncEnumerator secondEnumerator; + + UniTask.Awaiter firstAwaiter; + UniTask.Awaiter secondAwaiter; + UniTask.Awaiter resultAwaiter; + + public _ZipAwait(IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, Func> resultSelector, CancellationToken cancellationToken) + { + this.first = first; + this.second = second; + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + completionSource.Reset(); + + if (firstEnumerator == null) + { + firstEnumerator = first.GetAsyncEnumerator(cancellationToken); + secondEnumerator = second.GetAsyncEnumerator(cancellationToken); + } + + firstAwaiter = firstEnumerator.MoveNextAsync().GetAwaiter(); + + if (firstAwaiter.IsCompleted) + { + FirstMoveNextCore(this); + } + else + { + firstAwaiter.SourceOnCompleted(firstMoveNextCoreDelegate, this); + } + + return new UniTask(this, completionSource.Version); + } + + static void FirstMoveNextCore(object state) + { + var self = (_ZipAwait)state; + + if (self.TryGetResult(self.firstAwaiter, out var result)) + { + if (result) + { + try + { + self.secondAwaiter = self.secondEnumerator.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + + if (self.secondAwaiter.IsCompleted) + { + SecondMoveNextCore(self); + } + else + { + self.secondAwaiter.SourceOnCompleted(secondMoveNextCoreDelegate, self); + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + static void SecondMoveNextCore(object state) + { + var self = (_ZipAwait)state; + + if (self.TryGetResult(self.secondAwaiter, out var result)) + { + if (result) + { + try + { + self.resultAwaiter = self.resultSelector(self.firstEnumerator.Current, self.secondEnumerator.Current).GetAwaiter(); + if (self.resultAwaiter.IsCompleted) + { + ResultAwaitCore(self); + } + else + { + self.resultAwaiter.SourceOnCompleted(resultAwaitCoreDelegate, self); + } + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + static void ResultAwaitCore(object state) + { + var self = (_ZipAwait)state; + + if (self.TryGetResult(self.resultAwaiter, out var result)) + { + self.Current = result; + + if (self.cancellationToken.IsCancellationRequested) + { + self.completionSource.TrySetCanceled(self.cancellationToken); + } + else + { + self.completionSource.TrySetResult(true); + } + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (firstEnumerator != null) + { + await firstEnumerator.DisposeAsync(); + } + if (secondEnumerator != null) + { + await secondEnumerator.DisposeAsync(); + } + } + } + } + + internal sealed class ZipAwaitWithCancellation : IUniTaskAsyncEnumerable + { + readonly IUniTaskAsyncEnumerable first; + readonly IUniTaskAsyncEnumerable second; + readonly Func> resultSelector; + + public ZipAwaitWithCancellation(IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, Func> resultSelector) + { + this.first = first; + this.second = second; + this.resultSelector = resultSelector; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new _ZipAwaitWithCancellation(first, second, resultSelector, cancellationToken); + } + + sealed class _ZipAwaitWithCancellation : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action firstMoveNextCoreDelegate = FirstMoveNextCore; + static readonly Action secondMoveNextCoreDelegate = SecondMoveNextCore; + static readonly Action resultAwaitCoreDelegate = ResultAwaitCore; + + readonly IUniTaskAsyncEnumerable first; + readonly IUniTaskAsyncEnumerable second; + readonly Func> resultSelector; + + CancellationToken cancellationToken; + + IUniTaskAsyncEnumerator firstEnumerator; + IUniTaskAsyncEnumerator secondEnumerator; + + UniTask.Awaiter firstAwaiter; + UniTask.Awaiter secondAwaiter; + UniTask.Awaiter resultAwaiter; + + public _ZipAwaitWithCancellation(IUniTaskAsyncEnumerable first, IUniTaskAsyncEnumerable second, Func> resultSelector, CancellationToken cancellationToken) + { + this.first = first; + this.second = second; + this.resultSelector = resultSelector; + this.cancellationToken = cancellationToken; + TaskTracker.TrackActiveTask(this, 3); + } + + public TResult Current { get; private set; } + + public UniTask MoveNextAsync() + { + completionSource.Reset(); + + if (firstEnumerator == null) + { + firstEnumerator = first.GetAsyncEnumerator(cancellationToken); + secondEnumerator = second.GetAsyncEnumerator(cancellationToken); + } + + firstAwaiter = firstEnumerator.MoveNextAsync().GetAwaiter(); + + if (firstAwaiter.IsCompleted) + { + FirstMoveNextCore(this); + } + else + { + firstAwaiter.SourceOnCompleted(firstMoveNextCoreDelegate, this); + } + + return new UniTask(this, completionSource.Version); + } + + static void FirstMoveNextCore(object state) + { + var self = (_ZipAwaitWithCancellation)state; + + if (self.TryGetResult(self.firstAwaiter, out var result)) + { + if (result) + { + try + { + self.secondAwaiter = self.secondEnumerator.MoveNextAsync().GetAwaiter(); + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + return; + } + + if (self.secondAwaiter.IsCompleted) + { + SecondMoveNextCore(self); + } + else + { + self.secondAwaiter.SourceOnCompleted(secondMoveNextCoreDelegate, self); + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + static void SecondMoveNextCore(object state) + { + var self = (_ZipAwaitWithCancellation)state; + + if (self.TryGetResult(self.secondAwaiter, out var result)) + { + if (result) + { + try + { + self.resultAwaiter = self.resultSelector(self.firstEnumerator.Current, self.secondEnumerator.Current, self.cancellationToken).GetAwaiter(); + if (self.resultAwaiter.IsCompleted) + { + ResultAwaitCore(self); + } + else + { + self.resultAwaiter.SourceOnCompleted(resultAwaitCoreDelegate, self); + } + } + catch (Exception ex) + { + self.completionSource.TrySetException(ex); + } + } + else + { + self.completionSource.TrySetResult(false); + } + } + } + + static void ResultAwaitCore(object state) + { + var self = (_ZipAwaitWithCancellation)state; + + if (self.TryGetResult(self.resultAwaiter, out var result)) + { + self.Current = result; + + if (self.cancellationToken.IsCancellationRequested) + { + self.completionSource.TrySetCanceled(self.cancellationToken); + } + else + { + self.completionSource.TrySetResult(true); + } + } + } + + public async UniTask DisposeAsync() + { + TaskTracker.RemoveTracking(this); + if (firstEnumerator != null) + { + await firstEnumerator.DisposeAsync(); + } + if (secondEnumerator != null) + { + await secondEnumerator.DisposeAsync(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Linq/Zip.cs.meta b/Assets/Plugins/UniTask/Runtime/Linq/Zip.cs.meta new file mode 100644 index 0000000..bf12163 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Linq/Zip.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: acc1acff153e347418f0f30b1c535994 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/MoveNextSource.cs b/Assets/Plugins/UniTask/Runtime/MoveNextSource.cs new file mode 100644 index 0000000..3e9ca23 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/MoveNextSource.cs @@ -0,0 +1,63 @@ +using System; + +namespace Cysharp.Threading.Tasks +{ + public abstract class MoveNextSource : IUniTaskSource + { + protected UniTaskCompletionSourceCore completionSource; + + public bool GetResult(short token) + { + return completionSource.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return completionSource.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + completionSource.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return completionSource.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + completionSource.GetResult(token); + } + + protected bool TryGetResult(UniTask.Awaiter awaiter, out T result) + { + try + { + result = awaiter.GetResult(); + return true; + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + result = default; + return false; + } + } + + protected bool TryGetResult(UniTask.Awaiter awaiter) + { + try + { + awaiter.GetResult(); + return true; + } + catch (Exception ex) + { + completionSource.TrySetException(ex); + return false; + } + } + } +} diff --git a/Assets/Plugins/UniTask/Runtime/MoveNextSource.cs.meta b/Assets/Plugins/UniTask/Runtime/MoveNextSource.cs.meta new file mode 100644 index 0000000..60a0908 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/MoveNextSource.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dc4c5dc2a5f246e4f8df44cab735826c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs b/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs new file mode 100644 index 0000000..b17375e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs @@ -0,0 +1,581 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Linq; +using UnityEngine; +using Cysharp.Threading.Tasks.Internal; +using System.Threading; + +#if UNITY_2019_3_OR_NEWER +using UnityEngine.LowLevel; +using PlayerLoopType = UnityEngine.PlayerLoop; +#else +using UnityEngine.Experimental.LowLevel; +using PlayerLoopType = UnityEngine.Experimental.PlayerLoop; +#endif + +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace Cysharp.Threading.Tasks +{ + public static class UniTaskLoopRunners + { + public struct UniTaskLoopRunnerInitialization { }; + public struct UniTaskLoopRunnerEarlyUpdate { }; + public struct UniTaskLoopRunnerFixedUpdate { }; + public struct UniTaskLoopRunnerPreUpdate { }; + public struct UniTaskLoopRunnerUpdate { }; + public struct UniTaskLoopRunnerPreLateUpdate { }; + public struct UniTaskLoopRunnerPostLateUpdate { }; + + // Last + + public struct UniTaskLoopRunnerLastInitialization { }; + public struct UniTaskLoopRunnerLastEarlyUpdate { }; + public struct UniTaskLoopRunnerLastFixedUpdate { }; + public struct UniTaskLoopRunnerLastPreUpdate { }; + public struct UniTaskLoopRunnerLastUpdate { }; + public struct UniTaskLoopRunnerLastPreLateUpdate { }; + public struct UniTaskLoopRunnerLastPostLateUpdate { }; + + // Yield + + public struct UniTaskLoopRunnerYieldInitialization { }; + public struct UniTaskLoopRunnerYieldEarlyUpdate { }; + public struct UniTaskLoopRunnerYieldFixedUpdate { }; + public struct UniTaskLoopRunnerYieldPreUpdate { }; + public struct UniTaskLoopRunnerYieldUpdate { }; + public struct UniTaskLoopRunnerYieldPreLateUpdate { }; + public struct UniTaskLoopRunnerYieldPostLateUpdate { }; + + // Yield Last + + public struct UniTaskLoopRunnerLastYieldInitialization { }; + public struct UniTaskLoopRunnerLastYieldEarlyUpdate { }; + public struct UniTaskLoopRunnerLastYieldFixedUpdate { }; + public struct UniTaskLoopRunnerLastYieldPreUpdate { }; + public struct UniTaskLoopRunnerLastYieldUpdate { }; + public struct UniTaskLoopRunnerLastYieldPreLateUpdate { }; + public struct UniTaskLoopRunnerLastYieldPostLateUpdate { }; + +#if UNITY_2020_2_OR_NEWER + public struct UniTaskLoopRunnerTimeUpdate { }; + public struct UniTaskLoopRunnerLastTimeUpdate { }; + public struct UniTaskLoopRunnerYieldTimeUpdate { }; + public struct UniTaskLoopRunnerLastYieldTimeUpdate { }; +#endif + } + + public enum PlayerLoopTiming + { + Initialization = 0, + LastInitialization = 1, + + EarlyUpdate = 2, + LastEarlyUpdate = 3, + + FixedUpdate = 4, + LastFixedUpdate = 5, + + PreUpdate = 6, + LastPreUpdate = 7, + + Update = 8, + LastUpdate = 9, + + PreLateUpdate = 10, + LastPreLateUpdate = 11, + + PostLateUpdate = 12, + LastPostLateUpdate = 13, + +#if UNITY_2020_2_OR_NEWER + // Unity 2020.2 added TimeUpdate https://docs.unity3d.com/2020.2/Documentation/ScriptReference/PlayerLoop.TimeUpdate.html + TimeUpdate = 14, + LastTimeUpdate = 15, +#endif + } + + [Flags] + public enum InjectPlayerLoopTimings + { + /// + /// Preset: All loops(default). + /// + All = + Initialization | LastInitialization | + EarlyUpdate | LastEarlyUpdate | + FixedUpdate | LastFixedUpdate | + PreUpdate | LastPreUpdate | + Update | LastUpdate | + PreLateUpdate | LastPreLateUpdate | + PostLateUpdate | LastPostLateUpdate +#if UNITY_2020_2_OR_NEWER + | TimeUpdate | LastTimeUpdate, +#else + , +#endif + + /// + /// Preset: All without last except LastPostLateUpdate. + /// + Standard = + Initialization | + EarlyUpdate | + FixedUpdate | + PreUpdate | + Update | + PreLateUpdate | + PostLateUpdate | LastPostLateUpdate +#if UNITY_2020_2_OR_NEWER + | TimeUpdate +#endif + , + + /// + /// Preset: Minimum pattern, Update | FixedUpdate | LastPostLateUpdate + /// + Minimum = + Update | FixedUpdate | LastPostLateUpdate, + + // PlayerLoopTiming + + Initialization = 1, + LastInitialization = 2, + + EarlyUpdate = 4, + LastEarlyUpdate = 8, + + FixedUpdate = 16, + LastFixedUpdate = 32, + + PreUpdate = 64, + LastPreUpdate = 128, + + Update = 256, + LastUpdate = 512, + + PreLateUpdate = 1024, + LastPreLateUpdate = 2048, + + PostLateUpdate = 4096, + LastPostLateUpdate = 8192 + +#if UNITY_2020_2_OR_NEWER + , + // Unity 2020.2 added TimeUpdate https://docs.unity3d.com/2020.2/Documentation/ScriptReference/PlayerLoop.TimeUpdate.html + TimeUpdate = 16384, + LastTimeUpdate = 32768 +#endif + } + + public interface IPlayerLoopItem + { + bool MoveNext(); + } + + public static class PlayerLoopHelper + { + static readonly ContinuationQueue ThrowMarkerContinuationQueue = new ContinuationQueue(PlayerLoopTiming.Initialization); + static readonly PlayerLoopRunner ThrowMarkerPlayerLoopRunner = new PlayerLoopRunner(PlayerLoopTiming.Initialization); + + public static SynchronizationContext UnitySynchronizationContext => unitySynchronizationContext; + public static int MainThreadId => mainThreadId; + internal static string ApplicationDataPath => applicationDataPath; + + public static bool IsMainThread => Thread.CurrentThread.ManagedThreadId == mainThreadId; + + static int mainThreadId; + static string applicationDataPath; + static SynchronizationContext unitySynchronizationContext; + static ContinuationQueue[] yielders; + static PlayerLoopRunner[] runners; + internal static bool IsEditorApplicationQuitting { get; private set; } + static PlayerLoopSystem[] InsertRunner(PlayerLoopSystem loopSystem, + bool injectOnFirst, + Type loopRunnerYieldType, ContinuationQueue cq, + Type loopRunnerType, PlayerLoopRunner runner) + { + +#if UNITY_EDITOR + EditorApplication.playModeStateChanged += (state) => + { + if (state == PlayModeStateChange.EnteredEditMode || state == PlayModeStateChange.ExitingEditMode) + { + IsEditorApplicationQuitting = true; + // run rest action before clear. + if (runner != null) + { + runner.Run(); + runner.Clear(); + } + if (cq != null) + { + cq.Run(); + cq.Clear(); + } + IsEditorApplicationQuitting = false; + } + }; +#endif + + var yieldLoop = new PlayerLoopSystem + { + type = loopRunnerYieldType, + updateDelegate = cq.Run + }; + + var runnerLoop = new PlayerLoopSystem + { + type = loopRunnerType, + updateDelegate = runner.Run + }; + + // Remove items from previous initializations. + var source = RemoveRunner(loopSystem, loopRunnerYieldType, loopRunnerType); + var dest = new PlayerLoopSystem[source.Length + 2]; + + Array.Copy(source, 0, dest, injectOnFirst ? 2 : 0, source.Length); + if (injectOnFirst) + { + dest[0] = yieldLoop; + dest[1] = runnerLoop; + } + else + { + dest[dest.Length - 2] = yieldLoop; + dest[dest.Length - 1] = runnerLoop; + } + + return dest; + } + + static PlayerLoopSystem[] RemoveRunner(PlayerLoopSystem loopSystem, Type loopRunnerYieldType, Type loopRunnerType) + { + return loopSystem.subSystemList + .Where(ls => ls.type != loopRunnerYieldType && ls.type != loopRunnerType) + .ToArray(); + } + + static PlayerLoopSystem[] InsertUniTaskSynchronizationContext(PlayerLoopSystem loopSystem) + { + var loop = new PlayerLoopSystem + { + type = typeof(UniTaskSynchronizationContext), + updateDelegate = UniTaskSynchronizationContext.Run + }; + + // Remove items from previous initializations. + var source = loopSystem.subSystemList + .Where(ls => ls.type != typeof(UniTaskSynchronizationContext)) + .ToArray(); + + var dest = new System.Collections.Generic.List(source); + + var index = dest.FindIndex(x => x.type.Name == "ScriptRunDelayedTasks"); + if (index == -1) + { + index = dest.FindIndex(x => x.type.Name == "UniTaskLoopRunnerUpdate"); + } + + dest.Insert(index + 1, loop); + + return dest.ToArray(); + } + +#if UNITY_2020_1_OR_NEWER + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)] +#else + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] +#endif + static void Init() + { + // capture default(unity) sync-context. + unitySynchronizationContext = SynchronizationContext.Current; + mainThreadId = Thread.CurrentThread.ManagedThreadId; + try + { + applicationDataPath = Application.dataPath; + } + catch { } + +#if UNITY_EDITOR && UNITY_2019_3_OR_NEWER + // When domain reload is disabled, re-initialization is required when entering play mode; + // otherwise, pending tasks will leak between play mode sessions. + var domainReloadDisabled = UnityEditor.EditorSettings.enterPlayModeOptionsEnabled && + UnityEditor.EditorSettings.enterPlayModeOptions.HasFlag(UnityEditor.EnterPlayModeOptions.DisableDomainReload); + if (!domainReloadDisabled && runners != null) return; +#else + if (runners != null) return; // already initialized +#endif + + var playerLoop = +#if UNITY_2019_3_OR_NEWER + PlayerLoop.GetCurrentPlayerLoop(); +#else + PlayerLoop.GetDefaultPlayerLoop(); +#endif + + Initialize(ref playerLoop); + } + + +#if UNITY_EDITOR + + [InitializeOnLoadMethod] + static void InitOnEditor() + { + // Execute the play mode init method + Init(); + + // register an Editor update delegate, used to forcing playerLoop update + EditorApplication.update += ForceEditorPlayerLoopUpdate; + } + + private static void ForceEditorPlayerLoopUpdate() + { + if (EditorApplication.isPlayingOrWillChangePlaymode || EditorApplication.isCompiling || EditorApplication.isUpdating) + { + // Not in Edit mode, don't interfere + return; + } + + // EditorApplication.QueuePlayerLoopUpdate causes performance issue, don't call directly. + // EditorApplication.QueuePlayerLoopUpdate(); + + if (yielders != null) + { + foreach (var item in yielders) + { + if (item != null) item.Run(); + } + } + + if (runners != null) + { + foreach (var item in runners) + { + if (item != null) item.Run(); + } + } + + UniTaskSynchronizationContext.Run(); + } + +#endif + + private static int FindLoopSystemIndex(PlayerLoopSystem[] playerLoopList, Type systemType) + { + for (int i = 0; i < playerLoopList.Length; i++) + { + if (playerLoopList[i].type == systemType) + { + return i; + } + } + + throw new Exception("Target PlayerLoopSystem does not found. Type:" + systemType.FullName); + } + + static void InsertLoop(PlayerLoopSystem[] copyList, InjectPlayerLoopTimings injectTimings, Type loopType, InjectPlayerLoopTimings targetTimings, + int index, bool injectOnFirst, Type loopRunnerYieldType, Type loopRunnerType, PlayerLoopTiming playerLoopTiming) + { + var i = FindLoopSystemIndex(copyList, loopType); + if ((injectTimings & targetTimings) == targetTimings) + { + copyList[i].subSystemList = InsertRunner(copyList[i], injectOnFirst, + loopRunnerYieldType, yielders[index] = new ContinuationQueue(playerLoopTiming), + loopRunnerType, runners[index] = new PlayerLoopRunner(playerLoopTiming)); + } + else + { + copyList[i].subSystemList = RemoveRunner(copyList[i], loopRunnerYieldType, loopRunnerType); + } + } + + public static void Initialize(ref PlayerLoopSystem playerLoop, InjectPlayerLoopTimings injectTimings = InjectPlayerLoopTimings.All) + { +#if UNITY_2020_2_OR_NEWER + yielders = new ContinuationQueue[16]; + runners = new PlayerLoopRunner[16]; +#else + yielders = new ContinuationQueue[14]; + runners = new PlayerLoopRunner[14]; +#endif + + var copyList = playerLoop.subSystemList.ToArray(); + + // Initialization + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.Initialization), + InjectPlayerLoopTimings.Initialization, 0, true, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldInitialization), typeof(UniTaskLoopRunners.UniTaskLoopRunnerInitialization), PlayerLoopTiming.Initialization); + + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.Initialization), + InjectPlayerLoopTimings.LastInitialization, 1, false, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastYieldInitialization), typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastInitialization), PlayerLoopTiming.LastInitialization); + + // EarlyUpdate + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.EarlyUpdate), + InjectPlayerLoopTimings.EarlyUpdate, 2, true, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldEarlyUpdate), typeof(UniTaskLoopRunners.UniTaskLoopRunnerEarlyUpdate), PlayerLoopTiming.EarlyUpdate); + + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.EarlyUpdate), + InjectPlayerLoopTimings.LastEarlyUpdate, 3, false, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastYieldEarlyUpdate), typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastEarlyUpdate), PlayerLoopTiming.LastEarlyUpdate); + + // FixedUpdate + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.FixedUpdate), + InjectPlayerLoopTimings.FixedUpdate, 4, true, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldFixedUpdate), typeof(UniTaskLoopRunners.UniTaskLoopRunnerFixedUpdate), PlayerLoopTiming.FixedUpdate); + + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.FixedUpdate), + InjectPlayerLoopTimings.LastFixedUpdate, 5, false, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastYieldFixedUpdate), typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastFixedUpdate), PlayerLoopTiming.LastFixedUpdate); + + // PreUpdate + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.PreUpdate), + InjectPlayerLoopTimings.PreUpdate, 6, true, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldPreUpdate), typeof(UniTaskLoopRunners.UniTaskLoopRunnerPreUpdate), PlayerLoopTiming.PreUpdate); + + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.PreUpdate), + InjectPlayerLoopTimings.LastPreUpdate, 7, false, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastYieldPreUpdate), typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastPreUpdate), PlayerLoopTiming.LastPreUpdate); + + // Update + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.Update), + InjectPlayerLoopTimings.Update, 8, true, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldUpdate), typeof(UniTaskLoopRunners.UniTaskLoopRunnerUpdate), PlayerLoopTiming.Update); + + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.Update), + InjectPlayerLoopTimings.LastUpdate, 9, false, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastYieldUpdate), typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastUpdate), PlayerLoopTiming.LastUpdate); + + // PreLateUpdate + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.PreLateUpdate), + InjectPlayerLoopTimings.PreLateUpdate, 10, true, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldPreLateUpdate), typeof(UniTaskLoopRunners.UniTaskLoopRunnerPreLateUpdate), PlayerLoopTiming.PreLateUpdate); + + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.PreLateUpdate), + InjectPlayerLoopTimings.LastPreLateUpdate, 11, false, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastYieldPreLateUpdate), typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastPreLateUpdate), PlayerLoopTiming.LastPreLateUpdate); + + // PostLateUpdate + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.PostLateUpdate), + InjectPlayerLoopTimings.PostLateUpdate, 12, true, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldPostLateUpdate), typeof(UniTaskLoopRunners.UniTaskLoopRunnerPostLateUpdate), PlayerLoopTiming.PostLateUpdate); + + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.PostLateUpdate), + InjectPlayerLoopTimings.LastPostLateUpdate, 13, false, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastYieldPostLateUpdate), typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastPostLateUpdate), PlayerLoopTiming.LastPostLateUpdate); + +#if UNITY_2020_2_OR_NEWER + // TimeUpdate + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.TimeUpdate), + InjectPlayerLoopTimings.TimeUpdate, 14, true, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldTimeUpdate), typeof(UniTaskLoopRunners.UniTaskLoopRunnerTimeUpdate), PlayerLoopTiming.TimeUpdate); + + InsertLoop(copyList, injectTimings, typeof(PlayerLoopType.TimeUpdate), + InjectPlayerLoopTimings.LastTimeUpdate, 15, false, + typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastYieldTimeUpdate), typeof(UniTaskLoopRunners.UniTaskLoopRunnerLastTimeUpdate), PlayerLoopTiming.LastTimeUpdate); +#endif + + // Insert UniTaskSynchronizationContext to Update loop + var i = FindLoopSystemIndex(copyList, typeof(PlayerLoopType.Update)); + copyList[i].subSystemList = InsertUniTaskSynchronizationContext(copyList[i]); + + playerLoop.subSystemList = copyList; + PlayerLoop.SetPlayerLoop(playerLoop); + } + + public static void AddAction(PlayerLoopTiming timing, IPlayerLoopItem action) + { + var runner = runners[(int)timing]; + if (runner == null) + { + ThrowInvalidLoopTiming(timing); + } + runner.AddAction(action); + } + + static void ThrowInvalidLoopTiming(PlayerLoopTiming playerLoopTiming) + { + throw new InvalidOperationException("Target playerLoopTiming is not injected. Please check PlayerLoopHelper.Initialize. PlayerLoopTiming:" + playerLoopTiming); + } + + public static void AddContinuation(PlayerLoopTiming timing, Action continuation) + { + var q = yielders[(int)timing]; + if (q == null) + { + ThrowInvalidLoopTiming(timing); + } + q.Enqueue(continuation); + } + + // Diagnostics helper + +#if UNITY_2019_3_OR_NEWER + + public static void DumpCurrentPlayerLoop() + { + var playerLoop = UnityEngine.LowLevel.PlayerLoop.GetCurrentPlayerLoop(); + + var sb = new System.Text.StringBuilder(); + sb.AppendLine($"PlayerLoop List"); + foreach (var header in playerLoop.subSystemList) + { + sb.AppendFormat("------{0}------", header.type.Name); + sb.AppendLine(); + + if (header.subSystemList is null) + { + sb.AppendFormat("{0} has no subsystems!", header.ToString()); + sb.AppendLine(); + continue; + } + + foreach (var subSystem in header.subSystemList) + { + sb.AppendFormat("{0}", subSystem.type.Name); + sb.AppendLine(); + + if (subSystem.subSystemList != null) + { + UnityEngine.Debug.LogWarning("More Subsystem:" + subSystem.subSystemList.Length); + } + } + } + + UnityEngine.Debug.Log(sb.ToString()); + } + + public static bool IsInjectedUniTaskPlayerLoop() + { + var playerLoop = UnityEngine.LowLevel.PlayerLoop.GetCurrentPlayerLoop(); + + foreach (var header in playerLoop.subSystemList) + { + if (header.subSystemList is null) + { + continue; + } + + foreach (var subSystem in header.subSystemList) + { + if (subSystem.type == typeof(UniTaskLoopRunners.UniTaskLoopRunnerInitialization)) + { + return true; + } + } + } + + return false; + } + +#endif + + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs.meta b/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs.meta new file mode 100644 index 0000000..2487ef7 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 15fb5b85042f19640b973ce651795aca +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/PlayerLoopTimer.cs b/Assets/Plugins/UniTask/Runtime/PlayerLoopTimer.cs new file mode 100644 index 0000000..f8a877a --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/PlayerLoopTimer.cs @@ -0,0 +1,262 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System.Threading; +using System; +using Cysharp.Threading.Tasks.Internal; +using UnityEngine; + +namespace Cysharp.Threading.Tasks +{ + public abstract class PlayerLoopTimer : IDisposable, IPlayerLoopItem + { + readonly CancellationToken cancellationToken; + readonly Action timerCallback; + readonly object state; + readonly PlayerLoopTiming playerLoopTiming; + readonly bool periodic; + + bool isRunning; + bool tryStop; + bool isDisposed; + + protected PlayerLoopTimer(bool periodic, PlayerLoopTiming playerLoopTiming, CancellationToken cancellationToken, Action timerCallback, object state) + { + this.periodic = periodic; + this.playerLoopTiming = playerLoopTiming; + this.cancellationToken = cancellationToken; + this.timerCallback = timerCallback; + this.state = state; + } + + public static PlayerLoopTimer Create(TimeSpan interval, bool periodic, DelayType delayType, PlayerLoopTiming playerLoopTiming, CancellationToken cancellationToken, Action timerCallback, object state) + { +#if UNITY_EDITOR + // force use Realtime. + if (PlayerLoopHelper.IsMainThread && !UnityEditor.EditorApplication.isPlaying) + { + delayType = DelayType.Realtime; + } +#endif + + switch (delayType) + { + case DelayType.UnscaledDeltaTime: + return new IgnoreTimeScalePlayerLoopTimer(interval, periodic, playerLoopTiming, cancellationToken, timerCallback, state); + case DelayType.Realtime: + return new RealtimePlayerLoopTimer(interval, periodic, playerLoopTiming, cancellationToken, timerCallback, state); + case DelayType.DeltaTime: + default: + return new DeltaTimePlayerLoopTimer(interval, periodic, playerLoopTiming, cancellationToken, timerCallback, state); + } + } + + public static PlayerLoopTimer StartNew(TimeSpan interval, bool periodic, DelayType delayType, PlayerLoopTiming playerLoopTiming, CancellationToken cancellationToken, Action timerCallback, object state) + { + var timer = Create(interval, periodic, delayType, playerLoopTiming, cancellationToken, timerCallback, state); + timer.Restart(); + return timer; + } + + /// + /// Restart(Reset and Start) timer. + /// + public void Restart() + { + if (isDisposed) throw new ObjectDisposedException(null); + + ResetCore(null); // init state + if (!isRunning) + { + isRunning = true; + PlayerLoopHelper.AddAction(playerLoopTiming, this); + } + tryStop = false; + } + + /// + /// Restart(Reset and Start) and change interval. + /// + public void Restart(TimeSpan interval) + { + if (isDisposed) throw new ObjectDisposedException(null); + + ResetCore(interval); // init state + if (!isRunning) + { + isRunning = true; + PlayerLoopHelper.AddAction(playerLoopTiming, this); + } + tryStop = false; + } + + /// + /// Stop timer. + /// + public void Stop() + { + tryStop = true; + } + + protected abstract void ResetCore(TimeSpan? newInterval); + + public void Dispose() + { + isDisposed = true; + } + + bool IPlayerLoopItem.MoveNext() + { + if (isDisposed) + { + isRunning = false; + return false; + } + if (tryStop) + { + isRunning = false; + return false; + } + if (cancellationToken.IsCancellationRequested) + { + isRunning = false; + return false; + } + + if (!MoveNextCore()) + { + timerCallback(state); + + if (periodic) + { + ResetCore(null); + return true; + } + else + { + isRunning = false; + return false; + } + } + + return true; + } + + protected abstract bool MoveNextCore(); + } + + sealed class DeltaTimePlayerLoopTimer : PlayerLoopTimer + { + int initialFrame; + float elapsed; + float interval; + + public DeltaTimePlayerLoopTimer(TimeSpan interval, bool periodic, PlayerLoopTiming playerLoopTiming, CancellationToken cancellationToken, Action timerCallback, object state) + : base(periodic, playerLoopTiming, cancellationToken, timerCallback, state) + { + ResetCore(interval); + } + + protected override bool MoveNextCore() + { + if (elapsed == 0.0f) + { + if (initialFrame == Time.frameCount) + { + return true; + } + } + + elapsed += Time.deltaTime; + if (elapsed >= interval) + { + return false; + } + + return true; + } + + protected override void ResetCore(TimeSpan? interval) + { + this.elapsed = 0.0f; + this.initialFrame = PlayerLoopHelper.IsMainThread ? Time.frameCount : -1; + if (interval != null) + { + this.interval = (float)interval.Value.TotalSeconds; + } + } + } + + sealed class IgnoreTimeScalePlayerLoopTimer : PlayerLoopTimer + { + int initialFrame; + float elapsed; + float interval; + + public IgnoreTimeScalePlayerLoopTimer(TimeSpan interval, bool periodic, PlayerLoopTiming playerLoopTiming, CancellationToken cancellationToken, Action timerCallback, object state) + : base(periodic, playerLoopTiming, cancellationToken, timerCallback, state) + { + ResetCore(interval); + } + + protected override bool MoveNextCore() + { + if (elapsed == 0.0f) + { + if (initialFrame == Time.frameCount) + { + return true; + } + } + + elapsed += Time.unscaledDeltaTime; + if (elapsed >= interval) + { + return false; + } + + return true; + } + + protected override void ResetCore(TimeSpan? interval) + { + this.elapsed = 0.0f; + this.initialFrame = PlayerLoopHelper.IsMainThread ? Time.frameCount : -1; + if (interval != null) + { + this.interval = (float)interval.Value.TotalSeconds; + } + } + } + + sealed class RealtimePlayerLoopTimer : PlayerLoopTimer + { + ValueStopwatch stopwatch; + long intervalTicks; + + public RealtimePlayerLoopTimer(TimeSpan interval, bool periodic, PlayerLoopTiming playerLoopTiming, CancellationToken cancellationToken, Action timerCallback, object state) + : base(periodic, playerLoopTiming, cancellationToken, timerCallback, state) + { + ResetCore(interval); + } + + protected override bool MoveNextCore() + { + if (stopwatch.ElapsedTicks >= intervalTicks) + { + return false; + } + + return true; + } + + protected override void ResetCore(TimeSpan? interval) + { + this.stopwatch = ValueStopwatch.StartNew(); + if (interval != null) + { + this.intervalTicks = interval.Value.Ticks; + } + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/PlayerLoopTimer.cs.meta b/Assets/Plugins/UniTask/Runtime/PlayerLoopTimer.cs.meta new file mode 100644 index 0000000..eb2b50a --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/PlayerLoopTimer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 57095a17fdca7ee4380450910afc7f26 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Progress.cs b/Assets/Plugins/UniTask/Runtime/Progress.cs new file mode 100644 index 0000000..ed11290 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Progress.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks +{ + /// + /// Lightweight IProgress[T] factory. + /// + public static class Progress + { + public static IProgress Create(Action handler) + { + if (handler == null) return NullProgress.Instance; + return new AnonymousProgress(handler); + } + + public static IProgress CreateOnlyValueChanged(Action handler, IEqualityComparer comparer = null) + { + if (handler == null) return NullProgress.Instance; +#if UNITY_2018_3_OR_NEWER + return new OnlyValueChangedProgress(handler, comparer ?? UnityEqualityComparer.GetDefault()); +#else + return new OnlyValueChangedProgress(handler, comparer ?? EqualityComparer.Default); +#endif + } + + sealed class NullProgress : IProgress + { + public static readonly IProgress Instance = new NullProgress(); + + NullProgress() + { + + } + + public void Report(T value) + { + } + } + + sealed class AnonymousProgress : IProgress + { + readonly Action action; + + public AnonymousProgress(Action action) + { + this.action = action; + } + + public void Report(T value) + { + action(value); + } + } + + sealed class OnlyValueChangedProgress : IProgress + { + readonly Action action; + readonly IEqualityComparer comparer; + bool isFirstCall; + T latestValue; + + public OnlyValueChangedProgress(Action action, IEqualityComparer comparer) + { + this.action = action; + this.comparer = comparer; + this.isFirstCall = true; + } + + public void Report(T value) + { + if (isFirstCall) + { + isFirstCall = false; + } + else if (comparer.Equals(value, latestValue)) + { + return; + } + + latestValue = value; + action(value); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Progress.cs.meta b/Assets/Plugins/UniTask/Runtime/Progress.cs.meta new file mode 100644 index 0000000..f0e1f19 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Progress.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e3377e2ae934ed54fb8fd5388e2d9eb9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/TaskPool.cs b/Assets/Plugins/UniTask/Runtime/TaskPool.cs new file mode 100644 index 0000000..e103559 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/TaskPool.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + // internally used but public, allow to user create custom operator with pooling. + + public static class TaskPool + { + internal static int MaxPoolSize; + + // avoid to use ConcurrentDictionary for safety of WebGL build. + static Dictionary> sizes = new Dictionary>(); + + static TaskPool() + { + try + { + var value = Environment.GetEnvironmentVariable("UNITASK_MAX_POOLSIZE"); + if (value != null) + { + if (int.TryParse(value, out var size)) + { + MaxPoolSize = size; + return; + } + } + } + catch { } + + MaxPoolSize = int.MaxValue; + } + + public static void SetMaxPoolSize(int maxPoolSize) + { + MaxPoolSize = maxPoolSize; + } + + public static IEnumerable<(Type, int)> GetCacheSizeInfo() + { + lock (sizes) + { + foreach (var item in sizes) + { + yield return (item.Key, item.Value()); + } + } + } + + public static void RegisterSizeGetter(Type type, Func getSize) + { + lock (sizes) + { + sizes[type] = getSize; + } + } + } + + public interface ITaskPoolNode + { + ref T NextNode { get; } + } + + // mutable struct, don't mark readonly. + [StructLayout(LayoutKind.Auto)] + public struct TaskPool + where T : class, ITaskPoolNode + { + int gate; + int size; + T root; + + public int Size => size; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool TryPop(out T result) + { + if (Interlocked.CompareExchange(ref gate, 1, 0) == 0) + { + var v = root; + if (!(v is null)) + { + ref var nextNode = ref v.NextNode; + root = nextNode; + nextNode = null; + size--; + result = v; + Volatile.Write(ref gate, 0); + return true; + } + + Volatile.Write(ref gate, 0); + } + result = default; + return false; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool TryPush(T item) + { + if (Interlocked.CompareExchange(ref gate, 1, 0) == 0) + { + if (size < TaskPool.MaxPoolSize) + { + item.NextNode = root; + root = item; + size++; + Volatile.Write(ref gate, 0); + return true; + } + else + { + Volatile.Write(ref gate, 0); + } + } + return false; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/TaskPool.cs.meta b/Assets/Plugins/UniTask/Runtime/TaskPool.cs.meta new file mode 100644 index 0000000..94c7805 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/TaskPool.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 19f4e6575150765449cc99f25f06f25f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/TimeoutController.cs b/Assets/Plugins/UniTask/Runtime/TimeoutController.cs new file mode 100644 index 0000000..faca347 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/TimeoutController.cs @@ -0,0 +1,129 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + // CancellationTokenSource itself can not reuse but CancelAfter(Timeout.InfiniteTimeSpan) allows reuse if did not reach timeout. + // Similar discussion: + // https://github.com/dotnet/runtime/issues/4694 + // https://github.com/dotnet/runtime/issues/48492 + // This TimeoutController emulate similar implementation, using CancelAfterSlim; to achieve zero allocation timeout. + + public sealed class TimeoutController : IDisposable + { + readonly static Action CancelCancellationTokenSourceStateDelegate = new Action(CancelCancellationTokenSourceState); + + static void CancelCancellationTokenSourceState(object state) + { + var cts = (CancellationTokenSource)state; + cts.Cancel(); + } + + CancellationTokenSource timeoutSource; + CancellationTokenSource linkedSource; + PlayerLoopTimer timer; + bool isDisposed; + + readonly DelayType delayType; + readonly PlayerLoopTiming delayTiming; + readonly CancellationTokenSource originalLinkCancellationTokenSource; + + public TimeoutController(DelayType delayType = DelayType.DeltaTime, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update) + { + this.timeoutSource = new CancellationTokenSource(); + this.originalLinkCancellationTokenSource = null; + this.linkedSource = null; + this.delayType = delayType; + this.delayTiming = delayTiming; + } + + public TimeoutController(CancellationTokenSource linkCancellationTokenSource, DelayType delayType = DelayType.DeltaTime, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update) + { + this.timeoutSource = new CancellationTokenSource(); + this.originalLinkCancellationTokenSource = linkCancellationTokenSource; + this.linkedSource = CancellationTokenSource.CreateLinkedTokenSource(timeoutSource.Token, linkCancellationTokenSource.Token); + this.delayType = delayType; + this.delayTiming = delayTiming; + } + + public CancellationToken Timeout(int millisecondsTimeout) + { + return Timeout(TimeSpan.FromMilliseconds(millisecondsTimeout)); + } + + public CancellationToken Timeout(TimeSpan timeout) + { + if (originalLinkCancellationTokenSource != null && originalLinkCancellationTokenSource.IsCancellationRequested) + { + return originalLinkCancellationTokenSource.Token; + } + + // Timeouted, create new source and timer. + if (timeoutSource.IsCancellationRequested) + { + timeoutSource.Dispose(); + timeoutSource = new CancellationTokenSource(); + if (linkedSource != null) + { + this.linkedSource.Cancel(); + this.linkedSource.Dispose(); + this.linkedSource = CancellationTokenSource.CreateLinkedTokenSource(timeoutSource.Token, originalLinkCancellationTokenSource.Token); + } + + timer?.Dispose(); + timer = null; + } + + var useSource = (linkedSource != null) ? linkedSource : timeoutSource; + var token = useSource.Token; + if (timer == null) + { + // Timer complete => timeoutSource.Cancel() -> linkedSource will be canceled. + // (linked)token is canceled => stop timer + timer = PlayerLoopTimer.StartNew(timeout, false, delayType, delayTiming, token, CancelCancellationTokenSourceStateDelegate, timeoutSource); + } + else + { + timer.Restart(timeout); + } + + return token; + } + + public bool IsTimeout() + { + return timeoutSource.IsCancellationRequested; + } + + public void Reset() + { + timer?.Stop(); + } + + public void Dispose() + { + if (isDisposed) return; + + try + { + // stop timer. + timer?.Dispose(); + + // cancel and dispose. + timeoutSource.Cancel(); + timeoutSource.Dispose(); + if (linkedSource != null) + { + linkedSource.Cancel(); + linkedSource.Dispose(); + } + } + finally + { + isDisposed = true; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/TimeoutController.cs.meta b/Assets/Plugins/UniTask/Runtime/TimeoutController.cs.meta new file mode 100644 index 0000000..4f3d16d --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/TimeoutController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6347ab34d2db6d744a654e8d62d96b96 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/TriggerEvent.cs b/Assets/Plugins/UniTask/Runtime/TriggerEvent.cs new file mode 100644 index 0000000..0b817fe --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/TriggerEvent.cs @@ -0,0 +1,291 @@ +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + public interface ITriggerHandler + { + void OnNext(T value); + void OnError(Exception ex); + void OnCompleted(); + void OnCanceled(CancellationToken cancellationToken); + + // set/get from TriggerEvent + ITriggerHandler Prev { get; set; } + ITriggerHandler Next { get; set; } + } + + // be careful to use, itself is struct. + public struct TriggerEvent + { + ITriggerHandler head; // head.prev is last + ITriggerHandler iteratingHead; + ITriggerHandler iteratingNode; + + void LogError(Exception ex) + { +#if UNITY_2018_3_OR_NEWER + UnityEngine.Debug.LogException(ex); +#else + Console.WriteLine(ex); +#endif + } + + public void SetResult(T value) + { + if (iteratingNode != null) + { + throw new InvalidOperationException("Can not trigger itself in iterating."); + } + + var h = head; + while (h != null) + { + iteratingNode = h; + + try + { + h.OnNext(value); + } + catch (Exception ex) + { + LogError(ex); + Remove(h); + } + + // If `h` itself is removed by OnNext, h.Next is null. + // Therefore, instead of looking at h.Next, the `iteratingNode` reference itself is replaced. + h = h == iteratingNode ? h.Next : iteratingNode; + } + + iteratingNode = null; + if (iteratingHead != null) + { + Add(iteratingHead); + iteratingHead = null; + } + } + + public void SetCanceled(CancellationToken cancellationToken) + { + if (iteratingNode != null) + { + throw new InvalidOperationException("Can not trigger itself in iterating."); + } + + var h = head; + while (h != null) + { + iteratingNode = h; + try + { + h.OnCanceled(cancellationToken); + } + catch (Exception ex) + { + LogError(ex); + } + + var next = h == iteratingNode ? h.Next : iteratingNode; + iteratingNode = null; + Remove(h); + h = next; + } + + iteratingNode = null; + if (iteratingHead != null) + { + Add(iteratingHead); + iteratingHead = null; + } + } + + public void SetCompleted() + { + if (iteratingNode != null) + { + throw new InvalidOperationException("Can not trigger itself in iterating."); + } + + var h = head; + while (h != null) + { + iteratingNode = h; + try + { + h.OnCompleted(); + } + catch (Exception ex) + { + LogError(ex); + } + + var next = h == iteratingNode ? h.Next : iteratingNode; + iteratingNode = null; + Remove(h); + h = next; + } + + iteratingNode = null; + if (iteratingHead != null) + { + Add(iteratingHead); + iteratingHead = null; + } + } + + public void SetError(Exception exception) + { + if (iteratingNode != null) + { + throw new InvalidOperationException("Can not trigger itself in iterating."); + } + + var h = head; + while (h != null) + { + iteratingNode = h; + try + { + h.OnError(exception); + } + catch (Exception ex) + { + LogError(ex); + } + + var next = h == iteratingNode ? h.Next : iteratingNode; + iteratingNode = null; + Remove(h); + h = next; + } + + iteratingNode = null; + if (iteratingHead != null) + { + Add(iteratingHead); + iteratingHead = null; + } + } + + public void Add(ITriggerHandler handler) + { + if (handler == null) throw new ArgumentNullException(nameof(handler)); + + // zero node. + if (head == null) + { + head = handler; + return; + } + + if (iteratingNode != null) + { + if (iteratingHead == null) + { + iteratingHead = handler; + return; + } + + var last = iteratingHead.Prev; + if (last == null) + { + // single node. + iteratingHead.Prev = handler; + iteratingHead.Next = handler; + handler.Prev = iteratingHead; + } + else + { + // multi node + iteratingHead.Prev = handler; + last.Next = handler; + handler.Prev = last; + } + } + else + { + var last = head.Prev; + if (last == null) + { + // single node. + head.Prev = handler; + head.Next = handler; + handler.Prev = head; + } + else + { + // multi node + head.Prev = handler; + last.Next = handler; + handler.Prev = last; + } + } + } + + public void Remove(ITriggerHandler handler) + { + if (handler == null) throw new ArgumentNullException(nameof(handler)); + + var prev = handler.Prev; + var next = handler.Next; + + if (next != null) + { + next.Prev = prev; + } + + if (handler == head) + { + head = next; + } + // when handler is head, prev indicate last so don't use it. + else if (prev != null) + { + prev.Next = next; + } + + if (handler == iteratingNode) + { + iteratingNode = next; + } + if (handler == iteratingHead) + { + iteratingHead = next; + } + + if (head != null) + { + if (head.Prev == handler) + { + if (prev != head) + { + head.Prev = prev; + } + else + { + head.Prev = null; + } + } + } + + if (iteratingHead != null) + { + if (iteratingHead.Prev == handler) + { + if (prev != iteratingHead.Prev) + { + iteratingHead.Prev = prev; + } + else + { + iteratingHead.Prev = null; + } + } + } + + handler.Prev = null; + handler.Next = null; + } + } +} diff --git a/Assets/Plugins/UniTask/Runtime/TriggerEvent.cs.meta b/Assets/Plugins/UniTask/Runtime/TriggerEvent.cs.meta new file mode 100644 index 0000000..bbd47af --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/TriggerEvent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f68b22bb8f66f5c4885f9bd3c4fc43ed +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Triggers.meta b/Assets/Plugins/UniTask/Runtime/Triggers.meta new file mode 100644 index 0000000..c7e67c4 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Triggers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 91421c6cfab017c449a885af60818112 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Triggers/AsyncAwakeTrigger.cs b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncAwakeTrigger.cs new file mode 100644 index 0000000..a734f29 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncAwakeTrigger.cs @@ -0,0 +1,32 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System.Threading; +using UnityEngine; + +namespace Cysharp.Threading.Tasks.Triggers +{ + public static partial class AsyncTriggerExtensions + { + public static AsyncAwakeTrigger GetAsyncAwakeTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncAwakeTrigger GetAsyncAwakeTrigger(this Component component) + { + return component.gameObject.GetAsyncAwakeTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncAwakeTrigger : AsyncTriggerBase + { + public UniTask AwakeAsync() + { + if (calledAwake) return UniTask.CompletedTask; + + return ((IAsyncOneShotTrigger)new AsyncTriggerHandler(this, true)).OneShotAsync(); + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/Triggers/AsyncAwakeTrigger.cs.meta b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncAwakeTrigger.cs.meta new file mode 100644 index 0000000..097fdb6 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncAwakeTrigger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ef2840a2586894741a0ae211b8fd669b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Triggers/AsyncDestroyTrigger.cs b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncDestroyTrigger.cs new file mode 100644 index 0000000..77c9285 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncDestroyTrigger.cs @@ -0,0 +1,95 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System.Threading; +using UnityEngine; + +namespace Cysharp.Threading.Tasks.Triggers +{ + public static partial class AsyncTriggerExtensions + { + public static AsyncDestroyTrigger GetAsyncDestroyTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncDestroyTrigger GetAsyncDestroyTrigger(this Component component) + { + return component.gameObject.GetAsyncDestroyTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncDestroyTrigger : MonoBehaviour + { + bool awakeCalled = false; + bool called = false; + CancellationTokenSource cancellationTokenSource; + + public CancellationToken CancellationToken + { + get + { + if (cancellationTokenSource == null) + { + cancellationTokenSource = new CancellationTokenSource(); + if (!awakeCalled) + { + PlayerLoopHelper.AddAction(PlayerLoopTiming.Update, new AwakeMonitor(this)); + } + } + return cancellationTokenSource.Token; + } + } + + void Awake() + { + awakeCalled = true; + } + + void OnDestroy() + { + called = true; + + cancellationTokenSource?.Cancel(); + cancellationTokenSource?.Dispose(); + } + + public UniTask OnDestroyAsync() + { + if (called) return UniTask.CompletedTask; + + var tcs = new UniTaskCompletionSource(); + + // OnDestroy = Called Cancel. + CancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var tcs2 = (UniTaskCompletionSource)state; + tcs2.TrySetResult(); + }, tcs); + + return tcs.Task; + } + + class AwakeMonitor : IPlayerLoopItem + { + readonly AsyncDestroyTrigger trigger; + + public AwakeMonitor(AsyncDestroyTrigger trigger) + { + this.trigger = trigger; + } + + public bool MoveNext() + { + if (trigger.called || trigger.awakeCalled) return false; + if (trigger == null) + { + trigger.OnDestroy(); + return false; + } + return true; + } + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/Triggers/AsyncDestroyTrigger.cs.meta b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncDestroyTrigger.cs.meta new file mode 100644 index 0000000..6450049 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncDestroyTrigger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f4afdcb1cbadf954ba8b1cf465429e17 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Triggers/AsyncStartTrigger.cs b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncStartTrigger.cs new file mode 100644 index 0000000..63da82a --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncStartTrigger.cs @@ -0,0 +1,38 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using UnityEngine; + +namespace Cysharp.Threading.Tasks.Triggers +{ + public static partial class AsyncTriggerExtensions + { + public static AsyncStartTrigger GetAsyncStartTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncStartTrigger GetAsyncStartTrigger(this Component component) + { + return component.gameObject.GetAsyncStartTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncStartTrigger : AsyncTriggerBase + { + bool called; + + void Start() + { + called = true; + RaiseEvent(AsyncUnit.Default); + } + + public UniTask StartAsync() + { + if (called) return UniTask.CompletedTask; + + return ((IAsyncOneShotTrigger)new AsyncTriggerHandler(this, true)).OneShotAsync(); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Triggers/AsyncStartTrigger.cs.meta b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncStartTrigger.cs.meta new file mode 100644 index 0000000..9ef06e8 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncStartTrigger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b4fd0f75e54ec3d4fbcb7fc65b11646b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Triggers/AsyncTriggerBase.cs b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncTriggerBase.cs new file mode 100644 index 0000000..fb6ca6e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncTriggerBase.cs @@ -0,0 +1,310 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Threading; +using UnityEngine; + +namespace Cysharp.Threading.Tasks.Triggers +{ + public abstract class AsyncTriggerBase : MonoBehaviour, IUniTaskAsyncEnumerable + { + TriggerEvent triggerEvent; + + internal protected bool calledAwake; + internal protected bool calledDestroy; + + void Awake() + { + calledAwake = true; + } + + void OnDestroy() + { + if (calledDestroy) return; + calledDestroy = true; + + triggerEvent.SetCompleted(); + } + + internal void AddHandler(ITriggerHandler handler) + { + if (!calledAwake) + { + PlayerLoopHelper.AddAction(PlayerLoopTiming.Update, new AwakeMonitor(this)); + } + + triggerEvent.Add(handler); + } + + internal void RemoveHandler(ITriggerHandler handler) + { + if (!calledAwake) + { + PlayerLoopHelper.AddAction(PlayerLoopTiming.Update, new AwakeMonitor(this)); + } + + triggerEvent.Remove(handler); + } + + protected void RaiseEvent(T value) + { + triggerEvent.SetResult(value); + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + return new AsyncTriggerEnumerator(this, cancellationToken); + } + + sealed class AsyncTriggerEnumerator : MoveNextSource, IUniTaskAsyncEnumerator, ITriggerHandler + { + static Action cancellationCallback = CancellationCallback; + + readonly AsyncTriggerBase parent; + CancellationToken cancellationToken; + CancellationTokenRegistration registration; + bool called; + bool isDisposed; + + public AsyncTriggerEnumerator(AsyncTriggerBase parent, CancellationToken cancellationToken) + { + this.parent = parent; + this.cancellationToken = cancellationToken; + } + + public void OnCanceled(CancellationToken cancellationToken = default) + { + completionSource.TrySetCanceled(cancellationToken); + } + + public void OnNext(T value) + { + Current = value; + completionSource.TrySetResult(true); + } + + public void OnCompleted() + { + completionSource.TrySetResult(false); + } + + public void OnError(Exception ex) + { + completionSource.TrySetException(ex); + } + + static void CancellationCallback(object state) + { + var self = (AsyncTriggerEnumerator)state; + self.DisposeAsync().Forget(); // sync + + self.completionSource.TrySetCanceled(self.cancellationToken); + } + + public T Current { get; private set; } + ITriggerHandler ITriggerHandler.Prev { get; set; } + ITriggerHandler ITriggerHandler.Next { get; set; } + + public UniTask MoveNextAsync() + { + cancellationToken.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (!called) + { + called = true; + + TaskTracker.TrackActiveTask(this, 3); + parent.AddHandler(this); + if (cancellationToken.CanBeCanceled) + { + registration = cancellationToken.RegisterWithoutCaptureExecutionContext(cancellationCallback, this); + } + } + + return new UniTask(this, completionSource.Version); + } + + public UniTask DisposeAsync() + { + if (!isDisposed) + { + isDisposed = true; + TaskTracker.RemoveTracking(this); + registration.Dispose(); + parent.RemoveHandler(this); + } + + return default; + } + } + + class AwakeMonitor : IPlayerLoopItem + { + readonly AsyncTriggerBase trigger; + + public AwakeMonitor(AsyncTriggerBase trigger) + { + this.trigger = trigger; + } + + public bool MoveNext() + { + if (trigger.calledAwake) return false; + if (trigger == null) + { + trigger.OnDestroy(); + return false; + } + return true; + } + } + } + + public interface IAsyncOneShotTrigger + { + UniTask OneShotAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOneShotTrigger + { + UniTask IAsyncOneShotTrigger.OneShotAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)this, core.Version); + } + } + + public sealed partial class AsyncTriggerHandler : IUniTaskSource, ITriggerHandler, IDisposable + { + static Action cancellationCallback = CancellationCallback; + + readonly AsyncTriggerBase trigger; + + CancellationToken cancellationToken; + CancellationTokenRegistration registration; + bool isDisposed; + bool callOnce; + + UniTaskCompletionSourceCore core; + + internal CancellationToken CancellationToken => cancellationToken; + + ITriggerHandler ITriggerHandler.Prev { get; set; } + ITriggerHandler ITriggerHandler.Next { get; set; } + + internal AsyncTriggerHandler(AsyncTriggerBase trigger, bool callOnce) + { + if (cancellationToken.IsCancellationRequested) + { + isDisposed = true; + return; + } + + this.trigger = trigger; + this.cancellationToken = default; + this.registration = default; + this.callOnce = callOnce; + + trigger.AddHandler(this); + + TaskTracker.TrackActiveTask(this, 3); + } + + internal AsyncTriggerHandler(AsyncTriggerBase trigger, CancellationToken cancellationToken, bool callOnce) + { + if (cancellationToken.IsCancellationRequested) + { + isDisposed = true; + return; + } + + this.trigger = trigger; + this.cancellationToken = cancellationToken; + this.callOnce = callOnce; + + trigger.AddHandler(this); + + if (cancellationToken.CanBeCanceled) + { + registration = cancellationToken.RegisterWithoutCaptureExecutionContext(cancellationCallback, this); + } + + TaskTracker.TrackActiveTask(this, 3); + } + + static void CancellationCallback(object state) + { + var self = (AsyncTriggerHandler)state; + self.Dispose(); + + self.core.TrySetCanceled(self.cancellationToken); + } + + public void Dispose() + { + if (!isDisposed) + { + isDisposed = true; + TaskTracker.RemoveTracking(this); + registration.Dispose(); + trigger.RemoveHandler(this); + } + } + + T IUniTaskSource.GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { + if (callOnce) + { + Dispose(); + } + } + } + + void ITriggerHandler.OnNext(T value) + { + core.TrySetResult(value); + } + + void ITriggerHandler.OnCanceled(CancellationToken cancellationToken) + { + core.TrySetCanceled(cancellationToken); + } + + void ITriggerHandler.OnCompleted() + { + core.TrySetCanceled(CancellationToken.None); + } + + void ITriggerHandler.OnError(Exception ex) + { + core.TrySetException(ex); + } + + void IUniTaskSource.GetResult(short token) + { + ((IUniTaskSource)this).GetResult(token); + } + + UniTaskStatus IUniTaskSource.GetStatus(short token) + { + return core.GetStatus(token); + } + + UniTaskStatus IUniTaskSource.UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Triggers/AsyncTriggerBase.cs.meta b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncTriggerBase.cs.meta new file mode 100644 index 0000000..e101ea2 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncTriggerBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2c0c2bcee832c6641b25949c412f020f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Triggers/AsyncTriggerExtensions.cs b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncTriggerExtensions.cs new file mode 100644 index 0000000..bad5a04 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncTriggerExtensions.cs @@ -0,0 +1,102 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System.Threading; +using UnityEngine; +using Cysharp.Threading.Tasks.Triggers; + +namespace Cysharp.Threading.Tasks +{ + public static class UniTaskCancellationExtensions + { +#if UNITY_2022_2_OR_NEWER + + /// This CancellationToken is canceled when the MonoBehaviour will be destroyed. + public static CancellationToken GetCancellationTokenOnDestroy(this MonoBehaviour monoBehaviour) + { + return monoBehaviour.destroyCancellationToken; + } + +#endif + + /// This CancellationToken is canceled when the MonoBehaviour will be destroyed. + public static CancellationToken GetCancellationTokenOnDestroy(this GameObject gameObject) + { + return gameObject.GetAsyncDestroyTrigger().CancellationToken; + } + + /// This CancellationToken is canceled when the MonoBehaviour will be destroyed. + public static CancellationToken GetCancellationTokenOnDestroy(this Component component) + { +#if UNITY_2022_2_OR_NEWER + if (component is MonoBehaviour mb) + { + return mb.destroyCancellationToken; + } +#endif + + return component.GetAsyncDestroyTrigger().CancellationToken; + } + } +} + +namespace Cysharp.Threading.Tasks.Triggers +{ + public static partial class AsyncTriggerExtensions + { + // Util. + + static T GetOrAddComponent(GameObject gameObject) + where T : Component + { +#if UNITY_2019_2_OR_NEWER + if (!gameObject.TryGetComponent(out var component)) + { + component = gameObject.AddComponent(); + } +#else + var component = gameObject.GetComponent(); + if (component == null) + { + component = gameObject.AddComponent(); + } +#endif + + return component; + } + + // Special for single operation. + + /// This function is called when the MonoBehaviour will be destroyed. + public static UniTask OnDestroyAsync(this GameObject gameObject) + { + return gameObject.GetAsyncDestroyTrigger().OnDestroyAsync(); + } + + /// This function is called when the MonoBehaviour will be destroyed. + public static UniTask OnDestroyAsync(this Component component) + { + return component.GetAsyncDestroyTrigger().OnDestroyAsync(); + } + + public static UniTask StartAsync(this GameObject gameObject) + { + return gameObject.GetAsyncStartTrigger().StartAsync(); + } + + public static UniTask StartAsync(this Component component) + { + return component.GetAsyncStartTrigger().StartAsync(); + } + + public static UniTask AwakeAsync(this GameObject gameObject) + { + return gameObject.GetAsyncAwakeTrigger().AwakeAsync(); + } + + public static UniTask AwakeAsync(this Component component) + { + return component.GetAsyncAwakeTrigger().AwakeAsync(); + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/Triggers/AsyncTriggerExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncTriggerExtensions.cs.meta new file mode 100644 index 0000000..348783d --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Triggers/AsyncTriggerExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 59b61dbea1562a84fb7a38ae0a0a0f88 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/Triggers/MonoBehaviourMessagesTriggers.cs b/Assets/Plugins/UniTask/Runtime/Triggers/MonoBehaviourMessagesTriggers.cs new file mode 100644 index 0000000..6ef5014 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Triggers/MonoBehaviourMessagesTriggers.cs @@ -0,0 +1,4457 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System.Threading; +using UnityEngine; +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT +using UnityEngine.EventSystems; +#endif + +namespace Cysharp.Threading.Tasks.Triggers +{ +#region FixedUpdate + + public interface IAsyncFixedUpdateHandler + { + UniTask FixedUpdateAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncFixedUpdateHandler + { + UniTask IAsyncFixedUpdateHandler.FixedUpdateAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncFixedUpdateTrigger GetAsyncFixedUpdateTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncFixedUpdateTrigger GetAsyncFixedUpdateTrigger(this Component component) + { + return component.gameObject.GetAsyncFixedUpdateTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncFixedUpdateTrigger : AsyncTriggerBase + { + void FixedUpdate() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncFixedUpdateHandler GetFixedUpdateAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncFixedUpdateHandler GetFixedUpdateAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask FixedUpdateAsync() + { + return ((IAsyncFixedUpdateHandler)new AsyncTriggerHandler(this, true)).FixedUpdateAsync(); + } + + public UniTask FixedUpdateAsync(CancellationToken cancellationToken) + { + return ((IAsyncFixedUpdateHandler)new AsyncTriggerHandler(this, cancellationToken, true)).FixedUpdateAsync(); + } + } +#endregion + +#region LateUpdate + + public interface IAsyncLateUpdateHandler + { + UniTask LateUpdateAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncLateUpdateHandler + { + UniTask IAsyncLateUpdateHandler.LateUpdateAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncLateUpdateTrigger GetAsyncLateUpdateTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncLateUpdateTrigger GetAsyncLateUpdateTrigger(this Component component) + { + return component.gameObject.GetAsyncLateUpdateTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncLateUpdateTrigger : AsyncTriggerBase + { + void LateUpdate() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncLateUpdateHandler GetLateUpdateAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncLateUpdateHandler GetLateUpdateAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask LateUpdateAsync() + { + return ((IAsyncLateUpdateHandler)new AsyncTriggerHandler(this, true)).LateUpdateAsync(); + } + + public UniTask LateUpdateAsync(CancellationToken cancellationToken) + { + return ((IAsyncLateUpdateHandler)new AsyncTriggerHandler(this, cancellationToken, true)).LateUpdateAsync(); + } + } +#endregion + +#region AnimatorIK + + public interface IAsyncOnAnimatorIKHandler + { + UniTask OnAnimatorIKAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnAnimatorIKHandler + { + UniTask IAsyncOnAnimatorIKHandler.OnAnimatorIKAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncAnimatorIKTrigger GetAsyncAnimatorIKTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncAnimatorIKTrigger GetAsyncAnimatorIKTrigger(this Component component) + { + return component.gameObject.GetAsyncAnimatorIKTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncAnimatorIKTrigger : AsyncTriggerBase + { + void OnAnimatorIK(int layerIndex) + { + RaiseEvent((layerIndex)); + } + + public IAsyncOnAnimatorIKHandler GetOnAnimatorIKAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnAnimatorIKHandler GetOnAnimatorIKAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnAnimatorIKAsync() + { + return ((IAsyncOnAnimatorIKHandler)new AsyncTriggerHandler(this, true)).OnAnimatorIKAsync(); + } + + public UniTask OnAnimatorIKAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnAnimatorIKHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnAnimatorIKAsync(); + } + } +#endregion + +#region AnimatorMove + + public interface IAsyncOnAnimatorMoveHandler + { + UniTask OnAnimatorMoveAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnAnimatorMoveHandler + { + UniTask IAsyncOnAnimatorMoveHandler.OnAnimatorMoveAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncAnimatorMoveTrigger GetAsyncAnimatorMoveTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncAnimatorMoveTrigger GetAsyncAnimatorMoveTrigger(this Component component) + { + return component.gameObject.GetAsyncAnimatorMoveTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncAnimatorMoveTrigger : AsyncTriggerBase + { + void OnAnimatorMove() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnAnimatorMoveHandler GetOnAnimatorMoveAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnAnimatorMoveHandler GetOnAnimatorMoveAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnAnimatorMoveAsync() + { + return ((IAsyncOnAnimatorMoveHandler)new AsyncTriggerHandler(this, true)).OnAnimatorMoveAsync(); + } + + public UniTask OnAnimatorMoveAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnAnimatorMoveHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnAnimatorMoveAsync(); + } + } +#endregion + +#region ApplicationFocus + + public interface IAsyncOnApplicationFocusHandler + { + UniTask OnApplicationFocusAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnApplicationFocusHandler + { + UniTask IAsyncOnApplicationFocusHandler.OnApplicationFocusAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncApplicationFocusTrigger GetAsyncApplicationFocusTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncApplicationFocusTrigger GetAsyncApplicationFocusTrigger(this Component component) + { + return component.gameObject.GetAsyncApplicationFocusTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncApplicationFocusTrigger : AsyncTriggerBase + { + void OnApplicationFocus(bool hasFocus) + { + RaiseEvent((hasFocus)); + } + + public IAsyncOnApplicationFocusHandler GetOnApplicationFocusAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnApplicationFocusHandler GetOnApplicationFocusAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnApplicationFocusAsync() + { + return ((IAsyncOnApplicationFocusHandler)new AsyncTriggerHandler(this, true)).OnApplicationFocusAsync(); + } + + public UniTask OnApplicationFocusAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnApplicationFocusHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnApplicationFocusAsync(); + } + } +#endregion + +#region ApplicationPause + + public interface IAsyncOnApplicationPauseHandler + { + UniTask OnApplicationPauseAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnApplicationPauseHandler + { + UniTask IAsyncOnApplicationPauseHandler.OnApplicationPauseAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncApplicationPauseTrigger GetAsyncApplicationPauseTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncApplicationPauseTrigger GetAsyncApplicationPauseTrigger(this Component component) + { + return component.gameObject.GetAsyncApplicationPauseTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncApplicationPauseTrigger : AsyncTriggerBase + { + void OnApplicationPause(bool pauseStatus) + { + RaiseEvent((pauseStatus)); + } + + public IAsyncOnApplicationPauseHandler GetOnApplicationPauseAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnApplicationPauseHandler GetOnApplicationPauseAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnApplicationPauseAsync() + { + return ((IAsyncOnApplicationPauseHandler)new AsyncTriggerHandler(this, true)).OnApplicationPauseAsync(); + } + + public UniTask OnApplicationPauseAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnApplicationPauseHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnApplicationPauseAsync(); + } + } +#endregion + +#region ApplicationQuit + + public interface IAsyncOnApplicationQuitHandler + { + UniTask OnApplicationQuitAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnApplicationQuitHandler + { + UniTask IAsyncOnApplicationQuitHandler.OnApplicationQuitAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncApplicationQuitTrigger GetAsyncApplicationQuitTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncApplicationQuitTrigger GetAsyncApplicationQuitTrigger(this Component component) + { + return component.gameObject.GetAsyncApplicationQuitTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncApplicationQuitTrigger : AsyncTriggerBase + { + void OnApplicationQuit() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnApplicationQuitHandler GetOnApplicationQuitAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnApplicationQuitHandler GetOnApplicationQuitAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnApplicationQuitAsync() + { + return ((IAsyncOnApplicationQuitHandler)new AsyncTriggerHandler(this, true)).OnApplicationQuitAsync(); + } + + public UniTask OnApplicationQuitAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnApplicationQuitHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnApplicationQuitAsync(); + } + } +#endregion + +#region AudioFilterRead + + public interface IAsyncOnAudioFilterReadHandler + { + UniTask<(float[] data, int channels)> OnAudioFilterReadAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnAudioFilterReadHandler + { + UniTask<(float[] data, int channels)> IAsyncOnAudioFilterReadHandler.OnAudioFilterReadAsync() + { + core.Reset(); + return new UniTask<(float[] data, int channels)>((IUniTaskSource<(float[] data, int channels)>)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncAudioFilterReadTrigger GetAsyncAudioFilterReadTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncAudioFilterReadTrigger GetAsyncAudioFilterReadTrigger(this Component component) + { + return component.gameObject.GetAsyncAudioFilterReadTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncAudioFilterReadTrigger : AsyncTriggerBase<(float[] data, int channels)> + { + void OnAudioFilterRead(float[] data, int channels) + { + RaiseEvent((data, channels)); + } + + public IAsyncOnAudioFilterReadHandler GetOnAudioFilterReadAsyncHandler() + { + return new AsyncTriggerHandler<(float[] data, int channels)>(this, false); + } + + public IAsyncOnAudioFilterReadHandler GetOnAudioFilterReadAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler<(float[] data, int channels)>(this, cancellationToken, false); + } + + public UniTask<(float[] data, int channels)> OnAudioFilterReadAsync() + { + return ((IAsyncOnAudioFilterReadHandler)new AsyncTriggerHandler<(float[] data, int channels)>(this, true)).OnAudioFilterReadAsync(); + } + + public UniTask<(float[] data, int channels)> OnAudioFilterReadAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnAudioFilterReadHandler)new AsyncTriggerHandler<(float[] data, int channels)>(this, cancellationToken, true)).OnAudioFilterReadAsync(); + } + } +#endregion + +#region BecameInvisible + + public interface IAsyncOnBecameInvisibleHandler + { + UniTask OnBecameInvisibleAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnBecameInvisibleHandler + { + UniTask IAsyncOnBecameInvisibleHandler.OnBecameInvisibleAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncBecameInvisibleTrigger GetAsyncBecameInvisibleTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncBecameInvisibleTrigger GetAsyncBecameInvisibleTrigger(this Component component) + { + return component.gameObject.GetAsyncBecameInvisibleTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncBecameInvisibleTrigger : AsyncTriggerBase + { + void OnBecameInvisible() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnBecameInvisibleHandler GetOnBecameInvisibleAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnBecameInvisibleHandler GetOnBecameInvisibleAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnBecameInvisibleAsync() + { + return ((IAsyncOnBecameInvisibleHandler)new AsyncTriggerHandler(this, true)).OnBecameInvisibleAsync(); + } + + public UniTask OnBecameInvisibleAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnBecameInvisibleHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnBecameInvisibleAsync(); + } + } +#endregion + +#region BecameVisible + + public interface IAsyncOnBecameVisibleHandler + { + UniTask OnBecameVisibleAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnBecameVisibleHandler + { + UniTask IAsyncOnBecameVisibleHandler.OnBecameVisibleAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncBecameVisibleTrigger GetAsyncBecameVisibleTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncBecameVisibleTrigger GetAsyncBecameVisibleTrigger(this Component component) + { + return component.gameObject.GetAsyncBecameVisibleTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncBecameVisibleTrigger : AsyncTriggerBase + { + void OnBecameVisible() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnBecameVisibleHandler GetOnBecameVisibleAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnBecameVisibleHandler GetOnBecameVisibleAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnBecameVisibleAsync() + { + return ((IAsyncOnBecameVisibleHandler)new AsyncTriggerHandler(this, true)).OnBecameVisibleAsync(); + } + + public UniTask OnBecameVisibleAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnBecameVisibleHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnBecameVisibleAsync(); + } + } +#endregion + +#region BeforeTransformParentChanged + + public interface IAsyncOnBeforeTransformParentChangedHandler + { + UniTask OnBeforeTransformParentChangedAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnBeforeTransformParentChangedHandler + { + UniTask IAsyncOnBeforeTransformParentChangedHandler.OnBeforeTransformParentChangedAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncBeforeTransformParentChangedTrigger GetAsyncBeforeTransformParentChangedTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncBeforeTransformParentChangedTrigger GetAsyncBeforeTransformParentChangedTrigger(this Component component) + { + return component.gameObject.GetAsyncBeforeTransformParentChangedTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncBeforeTransformParentChangedTrigger : AsyncTriggerBase + { + void OnBeforeTransformParentChanged() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnBeforeTransformParentChangedHandler GetOnBeforeTransformParentChangedAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnBeforeTransformParentChangedHandler GetOnBeforeTransformParentChangedAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnBeforeTransformParentChangedAsync() + { + return ((IAsyncOnBeforeTransformParentChangedHandler)new AsyncTriggerHandler(this, true)).OnBeforeTransformParentChangedAsync(); + } + + public UniTask OnBeforeTransformParentChangedAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnBeforeTransformParentChangedHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnBeforeTransformParentChangedAsync(); + } + } +#endregion + +#region OnCanvasGroupChanged + + public interface IAsyncOnCanvasGroupChangedHandler + { + UniTask OnCanvasGroupChangedAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnCanvasGroupChangedHandler + { + UniTask IAsyncOnCanvasGroupChangedHandler.OnCanvasGroupChangedAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncOnCanvasGroupChangedTrigger GetAsyncOnCanvasGroupChangedTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncOnCanvasGroupChangedTrigger GetAsyncOnCanvasGroupChangedTrigger(this Component component) + { + return component.gameObject.GetAsyncOnCanvasGroupChangedTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncOnCanvasGroupChangedTrigger : AsyncTriggerBase + { + void OnCanvasGroupChanged() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnCanvasGroupChangedHandler GetOnCanvasGroupChangedAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnCanvasGroupChangedHandler GetOnCanvasGroupChangedAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnCanvasGroupChangedAsync() + { + return ((IAsyncOnCanvasGroupChangedHandler)new AsyncTriggerHandler(this, true)).OnCanvasGroupChangedAsync(); + } + + public UniTask OnCanvasGroupChangedAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnCanvasGroupChangedHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnCanvasGroupChangedAsync(); + } + } +#endregion + +#region CollisionEnter +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS_SUPPORT + + public interface IAsyncOnCollisionEnterHandler + { + UniTask OnCollisionEnterAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnCollisionEnterHandler + { + UniTask IAsyncOnCollisionEnterHandler.OnCollisionEnterAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncCollisionEnterTrigger GetAsyncCollisionEnterTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncCollisionEnterTrigger GetAsyncCollisionEnterTrigger(this Component component) + { + return component.gameObject.GetAsyncCollisionEnterTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncCollisionEnterTrigger : AsyncTriggerBase + { + void OnCollisionEnter(Collision coll) + { + RaiseEvent((coll)); + } + + public IAsyncOnCollisionEnterHandler GetOnCollisionEnterAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnCollisionEnterHandler GetOnCollisionEnterAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnCollisionEnterAsync() + { + return ((IAsyncOnCollisionEnterHandler)new AsyncTriggerHandler(this, true)).OnCollisionEnterAsync(); + } + + public UniTask OnCollisionEnterAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnCollisionEnterHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnCollisionEnterAsync(); + } + } +#endif +#endregion + +#region CollisionEnter2D +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS2D_SUPPORT + + public interface IAsyncOnCollisionEnter2DHandler + { + UniTask OnCollisionEnter2DAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnCollisionEnter2DHandler + { + UniTask IAsyncOnCollisionEnter2DHandler.OnCollisionEnter2DAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncCollisionEnter2DTrigger GetAsyncCollisionEnter2DTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncCollisionEnter2DTrigger GetAsyncCollisionEnter2DTrigger(this Component component) + { + return component.gameObject.GetAsyncCollisionEnter2DTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncCollisionEnter2DTrigger : AsyncTriggerBase + { + void OnCollisionEnter2D(Collision2D coll) + { + RaiseEvent((coll)); + } + + public IAsyncOnCollisionEnter2DHandler GetOnCollisionEnter2DAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnCollisionEnter2DHandler GetOnCollisionEnter2DAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnCollisionEnter2DAsync() + { + return ((IAsyncOnCollisionEnter2DHandler)new AsyncTriggerHandler(this, true)).OnCollisionEnter2DAsync(); + } + + public UniTask OnCollisionEnter2DAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnCollisionEnter2DHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnCollisionEnter2DAsync(); + } + } +#endif +#endregion + +#region CollisionExit +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS_SUPPORT + + public interface IAsyncOnCollisionExitHandler + { + UniTask OnCollisionExitAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnCollisionExitHandler + { + UniTask IAsyncOnCollisionExitHandler.OnCollisionExitAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncCollisionExitTrigger GetAsyncCollisionExitTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncCollisionExitTrigger GetAsyncCollisionExitTrigger(this Component component) + { + return component.gameObject.GetAsyncCollisionExitTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncCollisionExitTrigger : AsyncTriggerBase + { + void OnCollisionExit(Collision coll) + { + RaiseEvent((coll)); + } + + public IAsyncOnCollisionExitHandler GetOnCollisionExitAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnCollisionExitHandler GetOnCollisionExitAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnCollisionExitAsync() + { + return ((IAsyncOnCollisionExitHandler)new AsyncTriggerHandler(this, true)).OnCollisionExitAsync(); + } + + public UniTask OnCollisionExitAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnCollisionExitHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnCollisionExitAsync(); + } + } +#endif +#endregion + +#region CollisionExit2D +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS2D_SUPPORT + + public interface IAsyncOnCollisionExit2DHandler + { + UniTask OnCollisionExit2DAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnCollisionExit2DHandler + { + UniTask IAsyncOnCollisionExit2DHandler.OnCollisionExit2DAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncCollisionExit2DTrigger GetAsyncCollisionExit2DTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncCollisionExit2DTrigger GetAsyncCollisionExit2DTrigger(this Component component) + { + return component.gameObject.GetAsyncCollisionExit2DTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncCollisionExit2DTrigger : AsyncTriggerBase + { + void OnCollisionExit2D(Collision2D coll) + { + RaiseEvent((coll)); + } + + public IAsyncOnCollisionExit2DHandler GetOnCollisionExit2DAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnCollisionExit2DHandler GetOnCollisionExit2DAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnCollisionExit2DAsync() + { + return ((IAsyncOnCollisionExit2DHandler)new AsyncTriggerHandler(this, true)).OnCollisionExit2DAsync(); + } + + public UniTask OnCollisionExit2DAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnCollisionExit2DHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnCollisionExit2DAsync(); + } + } +#endif +#endregion + +#region CollisionStay +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS_SUPPORT + + public interface IAsyncOnCollisionStayHandler + { + UniTask OnCollisionStayAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnCollisionStayHandler + { + UniTask IAsyncOnCollisionStayHandler.OnCollisionStayAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncCollisionStayTrigger GetAsyncCollisionStayTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncCollisionStayTrigger GetAsyncCollisionStayTrigger(this Component component) + { + return component.gameObject.GetAsyncCollisionStayTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncCollisionStayTrigger : AsyncTriggerBase + { + void OnCollisionStay(Collision coll) + { + RaiseEvent((coll)); + } + + public IAsyncOnCollisionStayHandler GetOnCollisionStayAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnCollisionStayHandler GetOnCollisionStayAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnCollisionStayAsync() + { + return ((IAsyncOnCollisionStayHandler)new AsyncTriggerHandler(this, true)).OnCollisionStayAsync(); + } + + public UniTask OnCollisionStayAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnCollisionStayHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnCollisionStayAsync(); + } + } +#endif +#endregion + +#region CollisionStay2D +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS2D_SUPPORT + + public interface IAsyncOnCollisionStay2DHandler + { + UniTask OnCollisionStay2DAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnCollisionStay2DHandler + { + UniTask IAsyncOnCollisionStay2DHandler.OnCollisionStay2DAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncCollisionStay2DTrigger GetAsyncCollisionStay2DTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncCollisionStay2DTrigger GetAsyncCollisionStay2DTrigger(this Component component) + { + return component.gameObject.GetAsyncCollisionStay2DTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncCollisionStay2DTrigger : AsyncTriggerBase + { + void OnCollisionStay2D(Collision2D coll) + { + RaiseEvent((coll)); + } + + public IAsyncOnCollisionStay2DHandler GetOnCollisionStay2DAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnCollisionStay2DHandler GetOnCollisionStay2DAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnCollisionStay2DAsync() + { + return ((IAsyncOnCollisionStay2DHandler)new AsyncTriggerHandler(this, true)).OnCollisionStay2DAsync(); + } + + public UniTask OnCollisionStay2DAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnCollisionStay2DHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnCollisionStay2DAsync(); + } + } +#endif +#endregion + +#region ControllerColliderHit +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS_SUPPORT + + public interface IAsyncOnControllerColliderHitHandler + { + UniTask OnControllerColliderHitAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnControllerColliderHitHandler + { + UniTask IAsyncOnControllerColliderHitHandler.OnControllerColliderHitAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncControllerColliderHitTrigger GetAsyncControllerColliderHitTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncControllerColliderHitTrigger GetAsyncControllerColliderHitTrigger(this Component component) + { + return component.gameObject.GetAsyncControllerColliderHitTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncControllerColliderHitTrigger : AsyncTriggerBase + { + void OnControllerColliderHit(ControllerColliderHit hit) + { + RaiseEvent((hit)); + } + + public IAsyncOnControllerColliderHitHandler GetOnControllerColliderHitAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnControllerColliderHitHandler GetOnControllerColliderHitAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnControllerColliderHitAsync() + { + return ((IAsyncOnControllerColliderHitHandler)new AsyncTriggerHandler(this, true)).OnControllerColliderHitAsync(); + } + + public UniTask OnControllerColliderHitAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnControllerColliderHitHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnControllerColliderHitAsync(); + } + } +#endif +#endregion + +#region Disable + + public interface IAsyncOnDisableHandler + { + UniTask OnDisableAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnDisableHandler + { + UniTask IAsyncOnDisableHandler.OnDisableAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncDisableTrigger GetAsyncDisableTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncDisableTrigger GetAsyncDisableTrigger(this Component component) + { + return component.gameObject.GetAsyncDisableTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncDisableTrigger : AsyncTriggerBase + { + void OnDisable() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnDisableHandler GetOnDisableAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnDisableHandler GetOnDisableAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnDisableAsync() + { + return ((IAsyncOnDisableHandler)new AsyncTriggerHandler(this, true)).OnDisableAsync(); + } + + public UniTask OnDisableAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnDisableHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnDisableAsync(); + } + } +#endregion + +#region DrawGizmos + + public interface IAsyncOnDrawGizmosHandler + { + UniTask OnDrawGizmosAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnDrawGizmosHandler + { + UniTask IAsyncOnDrawGizmosHandler.OnDrawGizmosAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncDrawGizmosTrigger GetAsyncDrawGizmosTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncDrawGizmosTrigger GetAsyncDrawGizmosTrigger(this Component component) + { + return component.gameObject.GetAsyncDrawGizmosTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncDrawGizmosTrigger : AsyncTriggerBase + { + void OnDrawGizmos() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnDrawGizmosHandler GetOnDrawGizmosAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnDrawGizmosHandler GetOnDrawGizmosAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnDrawGizmosAsync() + { + return ((IAsyncOnDrawGizmosHandler)new AsyncTriggerHandler(this, true)).OnDrawGizmosAsync(); + } + + public UniTask OnDrawGizmosAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnDrawGizmosHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnDrawGizmosAsync(); + } + } +#endregion + +#region DrawGizmosSelected + + public interface IAsyncOnDrawGizmosSelectedHandler + { + UniTask OnDrawGizmosSelectedAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnDrawGizmosSelectedHandler + { + UniTask IAsyncOnDrawGizmosSelectedHandler.OnDrawGizmosSelectedAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncDrawGizmosSelectedTrigger GetAsyncDrawGizmosSelectedTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncDrawGizmosSelectedTrigger GetAsyncDrawGizmosSelectedTrigger(this Component component) + { + return component.gameObject.GetAsyncDrawGizmosSelectedTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncDrawGizmosSelectedTrigger : AsyncTriggerBase + { + void OnDrawGizmosSelected() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnDrawGizmosSelectedHandler GetOnDrawGizmosSelectedAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnDrawGizmosSelectedHandler GetOnDrawGizmosSelectedAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnDrawGizmosSelectedAsync() + { + return ((IAsyncOnDrawGizmosSelectedHandler)new AsyncTriggerHandler(this, true)).OnDrawGizmosSelectedAsync(); + } + + public UniTask OnDrawGizmosSelectedAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnDrawGizmosSelectedHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnDrawGizmosSelectedAsync(); + } + } +#endregion + +#region Enable + + public interface IAsyncOnEnableHandler + { + UniTask OnEnableAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnEnableHandler + { + UniTask IAsyncOnEnableHandler.OnEnableAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncEnableTrigger GetAsyncEnableTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncEnableTrigger GetAsyncEnableTrigger(this Component component) + { + return component.gameObject.GetAsyncEnableTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncEnableTrigger : AsyncTriggerBase + { + void OnEnable() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnEnableHandler GetOnEnableAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnEnableHandler GetOnEnableAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnEnableAsync() + { + return ((IAsyncOnEnableHandler)new AsyncTriggerHandler(this, true)).OnEnableAsync(); + } + + public UniTask OnEnableAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnEnableHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnEnableAsync(); + } + } +#endregion + +#region GUI + + public interface IAsyncOnGUIHandler + { + UniTask OnGUIAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnGUIHandler + { + UniTask IAsyncOnGUIHandler.OnGUIAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncGUITrigger GetAsyncGUITrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncGUITrigger GetAsyncGUITrigger(this Component component) + { + return component.gameObject.GetAsyncGUITrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncGUITrigger : AsyncTriggerBase + { + void OnGUI() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnGUIHandler GetOnGUIAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnGUIHandler GetOnGUIAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnGUIAsync() + { + return ((IAsyncOnGUIHandler)new AsyncTriggerHandler(this, true)).OnGUIAsync(); + } + + public UniTask OnGUIAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnGUIHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnGUIAsync(); + } + } +#endregion + +#region JointBreak +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS_SUPPORT + + public interface IAsyncOnJointBreakHandler + { + UniTask OnJointBreakAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnJointBreakHandler + { + UniTask IAsyncOnJointBreakHandler.OnJointBreakAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncJointBreakTrigger GetAsyncJointBreakTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncJointBreakTrigger GetAsyncJointBreakTrigger(this Component component) + { + return component.gameObject.GetAsyncJointBreakTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncJointBreakTrigger : AsyncTriggerBase + { + void OnJointBreak(float breakForce) + { + RaiseEvent((breakForce)); + } + + public IAsyncOnJointBreakHandler GetOnJointBreakAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnJointBreakHandler GetOnJointBreakAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnJointBreakAsync() + { + return ((IAsyncOnJointBreakHandler)new AsyncTriggerHandler(this, true)).OnJointBreakAsync(); + } + + public UniTask OnJointBreakAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnJointBreakHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnJointBreakAsync(); + } + } +#endif +#endregion + +#region JointBreak2D +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS2D_SUPPORT + + public interface IAsyncOnJointBreak2DHandler + { + UniTask OnJointBreak2DAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnJointBreak2DHandler + { + UniTask IAsyncOnJointBreak2DHandler.OnJointBreak2DAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncJointBreak2DTrigger GetAsyncJointBreak2DTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncJointBreak2DTrigger GetAsyncJointBreak2DTrigger(this Component component) + { + return component.gameObject.GetAsyncJointBreak2DTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncJointBreak2DTrigger : AsyncTriggerBase + { + void OnJointBreak2D(Joint2D brokenJoint) + { + RaiseEvent((brokenJoint)); + } + + public IAsyncOnJointBreak2DHandler GetOnJointBreak2DAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnJointBreak2DHandler GetOnJointBreak2DAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnJointBreak2DAsync() + { + return ((IAsyncOnJointBreak2DHandler)new AsyncTriggerHandler(this, true)).OnJointBreak2DAsync(); + } + + public UniTask OnJointBreak2DAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnJointBreak2DHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnJointBreak2DAsync(); + } + } +#endif +#endregion + +#region MouseDown +#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) + + public interface IAsyncOnMouseDownHandler + { + UniTask OnMouseDownAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnMouseDownHandler + { + UniTask IAsyncOnMouseDownHandler.OnMouseDownAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncMouseDownTrigger GetAsyncMouseDownTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncMouseDownTrigger GetAsyncMouseDownTrigger(this Component component) + { + return component.gameObject.GetAsyncMouseDownTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncMouseDownTrigger : AsyncTriggerBase + { + void OnMouseDown() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnMouseDownHandler GetOnMouseDownAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnMouseDownHandler GetOnMouseDownAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnMouseDownAsync() + { + return ((IAsyncOnMouseDownHandler)new AsyncTriggerHandler(this, true)).OnMouseDownAsync(); + } + + public UniTask OnMouseDownAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnMouseDownHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnMouseDownAsync(); + } + } +#endif +#endregion + +#region MouseDrag +#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) + + public interface IAsyncOnMouseDragHandler + { + UniTask OnMouseDragAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnMouseDragHandler + { + UniTask IAsyncOnMouseDragHandler.OnMouseDragAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncMouseDragTrigger GetAsyncMouseDragTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncMouseDragTrigger GetAsyncMouseDragTrigger(this Component component) + { + return component.gameObject.GetAsyncMouseDragTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncMouseDragTrigger : AsyncTriggerBase + { + void OnMouseDrag() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnMouseDragHandler GetOnMouseDragAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnMouseDragHandler GetOnMouseDragAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnMouseDragAsync() + { + return ((IAsyncOnMouseDragHandler)new AsyncTriggerHandler(this, true)).OnMouseDragAsync(); + } + + public UniTask OnMouseDragAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnMouseDragHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnMouseDragAsync(); + } + } +#endif +#endregion + +#region MouseEnter +#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) + + public interface IAsyncOnMouseEnterHandler + { + UniTask OnMouseEnterAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnMouseEnterHandler + { + UniTask IAsyncOnMouseEnterHandler.OnMouseEnterAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncMouseEnterTrigger GetAsyncMouseEnterTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncMouseEnterTrigger GetAsyncMouseEnterTrigger(this Component component) + { + return component.gameObject.GetAsyncMouseEnterTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncMouseEnterTrigger : AsyncTriggerBase + { + void OnMouseEnter() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnMouseEnterHandler GetOnMouseEnterAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnMouseEnterHandler GetOnMouseEnterAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnMouseEnterAsync() + { + return ((IAsyncOnMouseEnterHandler)new AsyncTriggerHandler(this, true)).OnMouseEnterAsync(); + } + + public UniTask OnMouseEnterAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnMouseEnterHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnMouseEnterAsync(); + } + } +#endif +#endregion + +#region MouseExit +#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) + + public interface IAsyncOnMouseExitHandler + { + UniTask OnMouseExitAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnMouseExitHandler + { + UniTask IAsyncOnMouseExitHandler.OnMouseExitAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncMouseExitTrigger GetAsyncMouseExitTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncMouseExitTrigger GetAsyncMouseExitTrigger(this Component component) + { + return component.gameObject.GetAsyncMouseExitTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncMouseExitTrigger : AsyncTriggerBase + { + void OnMouseExit() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnMouseExitHandler GetOnMouseExitAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnMouseExitHandler GetOnMouseExitAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnMouseExitAsync() + { + return ((IAsyncOnMouseExitHandler)new AsyncTriggerHandler(this, true)).OnMouseExitAsync(); + } + + public UniTask OnMouseExitAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnMouseExitHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnMouseExitAsync(); + } + } +#endif +#endregion + +#region MouseOver +#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) + + public interface IAsyncOnMouseOverHandler + { + UniTask OnMouseOverAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnMouseOverHandler + { + UniTask IAsyncOnMouseOverHandler.OnMouseOverAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncMouseOverTrigger GetAsyncMouseOverTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncMouseOverTrigger GetAsyncMouseOverTrigger(this Component component) + { + return component.gameObject.GetAsyncMouseOverTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncMouseOverTrigger : AsyncTriggerBase + { + void OnMouseOver() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnMouseOverHandler GetOnMouseOverAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnMouseOverHandler GetOnMouseOverAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnMouseOverAsync() + { + return ((IAsyncOnMouseOverHandler)new AsyncTriggerHandler(this, true)).OnMouseOverAsync(); + } + + public UniTask OnMouseOverAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnMouseOverHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnMouseOverAsync(); + } + } +#endif +#endregion + +#region MouseUp +#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) + + public interface IAsyncOnMouseUpHandler + { + UniTask OnMouseUpAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnMouseUpHandler + { + UniTask IAsyncOnMouseUpHandler.OnMouseUpAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncMouseUpTrigger GetAsyncMouseUpTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncMouseUpTrigger GetAsyncMouseUpTrigger(this Component component) + { + return component.gameObject.GetAsyncMouseUpTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncMouseUpTrigger : AsyncTriggerBase + { + void OnMouseUp() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnMouseUpHandler GetOnMouseUpAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnMouseUpHandler GetOnMouseUpAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnMouseUpAsync() + { + return ((IAsyncOnMouseUpHandler)new AsyncTriggerHandler(this, true)).OnMouseUpAsync(); + } + + public UniTask OnMouseUpAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnMouseUpHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnMouseUpAsync(); + } + } +#endif +#endregion + +#region MouseUpAsButton +#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) + + public interface IAsyncOnMouseUpAsButtonHandler + { + UniTask OnMouseUpAsButtonAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnMouseUpAsButtonHandler + { + UniTask IAsyncOnMouseUpAsButtonHandler.OnMouseUpAsButtonAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncMouseUpAsButtonTrigger GetAsyncMouseUpAsButtonTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncMouseUpAsButtonTrigger GetAsyncMouseUpAsButtonTrigger(this Component component) + { + return component.gameObject.GetAsyncMouseUpAsButtonTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncMouseUpAsButtonTrigger : AsyncTriggerBase + { + void OnMouseUpAsButton() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnMouseUpAsButtonHandler GetOnMouseUpAsButtonAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnMouseUpAsButtonHandler GetOnMouseUpAsButtonAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnMouseUpAsButtonAsync() + { + return ((IAsyncOnMouseUpAsButtonHandler)new AsyncTriggerHandler(this, true)).OnMouseUpAsButtonAsync(); + } + + public UniTask OnMouseUpAsButtonAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnMouseUpAsButtonHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnMouseUpAsButtonAsync(); + } + } +#endif +#endregion + +#region ParticleCollision + + public interface IAsyncOnParticleCollisionHandler + { + UniTask OnParticleCollisionAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnParticleCollisionHandler + { + UniTask IAsyncOnParticleCollisionHandler.OnParticleCollisionAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncParticleCollisionTrigger GetAsyncParticleCollisionTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncParticleCollisionTrigger GetAsyncParticleCollisionTrigger(this Component component) + { + return component.gameObject.GetAsyncParticleCollisionTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncParticleCollisionTrigger : AsyncTriggerBase + { + void OnParticleCollision(GameObject other) + { + RaiseEvent((other)); + } + + public IAsyncOnParticleCollisionHandler GetOnParticleCollisionAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnParticleCollisionHandler GetOnParticleCollisionAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnParticleCollisionAsync() + { + return ((IAsyncOnParticleCollisionHandler)new AsyncTriggerHandler(this, true)).OnParticleCollisionAsync(); + } + + public UniTask OnParticleCollisionAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnParticleCollisionHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnParticleCollisionAsync(); + } + } +#endregion + +#region ParticleSystemStopped + + public interface IAsyncOnParticleSystemStoppedHandler + { + UniTask OnParticleSystemStoppedAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnParticleSystemStoppedHandler + { + UniTask IAsyncOnParticleSystemStoppedHandler.OnParticleSystemStoppedAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncParticleSystemStoppedTrigger GetAsyncParticleSystemStoppedTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncParticleSystemStoppedTrigger GetAsyncParticleSystemStoppedTrigger(this Component component) + { + return component.gameObject.GetAsyncParticleSystemStoppedTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncParticleSystemStoppedTrigger : AsyncTriggerBase + { + void OnParticleSystemStopped() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnParticleSystemStoppedHandler GetOnParticleSystemStoppedAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnParticleSystemStoppedHandler GetOnParticleSystemStoppedAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnParticleSystemStoppedAsync() + { + return ((IAsyncOnParticleSystemStoppedHandler)new AsyncTriggerHandler(this, true)).OnParticleSystemStoppedAsync(); + } + + public UniTask OnParticleSystemStoppedAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnParticleSystemStoppedHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnParticleSystemStoppedAsync(); + } + } +#endregion + +#region ParticleTrigger + + public interface IAsyncOnParticleTriggerHandler + { + UniTask OnParticleTriggerAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnParticleTriggerHandler + { + UniTask IAsyncOnParticleTriggerHandler.OnParticleTriggerAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncParticleTriggerTrigger GetAsyncParticleTriggerTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncParticleTriggerTrigger GetAsyncParticleTriggerTrigger(this Component component) + { + return component.gameObject.GetAsyncParticleTriggerTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncParticleTriggerTrigger : AsyncTriggerBase + { + void OnParticleTrigger() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnParticleTriggerHandler GetOnParticleTriggerAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnParticleTriggerHandler GetOnParticleTriggerAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnParticleTriggerAsync() + { + return ((IAsyncOnParticleTriggerHandler)new AsyncTriggerHandler(this, true)).OnParticleTriggerAsync(); + } + + public UniTask OnParticleTriggerAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnParticleTriggerHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnParticleTriggerAsync(); + } + } +#endregion + +#region ParticleUpdateJobScheduled +#if UNITY_2019_3_OR_NEWER && (!UNITY_2019_1_OR_NEWER || UNITASK_PARTICLESYSTEM_SUPPORT) + + public interface IAsyncOnParticleUpdateJobScheduledHandler + { + UniTask OnParticleUpdateJobScheduledAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnParticleUpdateJobScheduledHandler + { + UniTask IAsyncOnParticleUpdateJobScheduledHandler.OnParticleUpdateJobScheduledAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncParticleUpdateJobScheduledTrigger GetAsyncParticleUpdateJobScheduledTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncParticleUpdateJobScheduledTrigger GetAsyncParticleUpdateJobScheduledTrigger(this Component component) + { + return component.gameObject.GetAsyncParticleUpdateJobScheduledTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncParticleUpdateJobScheduledTrigger : AsyncTriggerBase + { + void OnParticleUpdateJobScheduled(UnityEngine.ParticleSystemJobs.ParticleSystemJobData particles) + { + RaiseEvent((particles)); + } + + public IAsyncOnParticleUpdateJobScheduledHandler GetOnParticleUpdateJobScheduledAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnParticleUpdateJobScheduledHandler GetOnParticleUpdateJobScheduledAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnParticleUpdateJobScheduledAsync() + { + return ((IAsyncOnParticleUpdateJobScheduledHandler)new AsyncTriggerHandler(this, true)).OnParticleUpdateJobScheduledAsync(); + } + + public UniTask OnParticleUpdateJobScheduledAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnParticleUpdateJobScheduledHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnParticleUpdateJobScheduledAsync(); + } + } +#endif +#endregion + +#region PostRender + + public interface IAsyncOnPostRenderHandler + { + UniTask OnPostRenderAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnPostRenderHandler + { + UniTask IAsyncOnPostRenderHandler.OnPostRenderAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncPostRenderTrigger GetAsyncPostRenderTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncPostRenderTrigger GetAsyncPostRenderTrigger(this Component component) + { + return component.gameObject.GetAsyncPostRenderTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncPostRenderTrigger : AsyncTriggerBase + { + void OnPostRender() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnPostRenderHandler GetOnPostRenderAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnPostRenderHandler GetOnPostRenderAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnPostRenderAsync() + { + return ((IAsyncOnPostRenderHandler)new AsyncTriggerHandler(this, true)).OnPostRenderAsync(); + } + + public UniTask OnPostRenderAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnPostRenderHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnPostRenderAsync(); + } + } +#endregion + +#region PreCull + + public interface IAsyncOnPreCullHandler + { + UniTask OnPreCullAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnPreCullHandler + { + UniTask IAsyncOnPreCullHandler.OnPreCullAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncPreCullTrigger GetAsyncPreCullTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncPreCullTrigger GetAsyncPreCullTrigger(this Component component) + { + return component.gameObject.GetAsyncPreCullTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncPreCullTrigger : AsyncTriggerBase + { + void OnPreCull() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnPreCullHandler GetOnPreCullAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnPreCullHandler GetOnPreCullAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnPreCullAsync() + { + return ((IAsyncOnPreCullHandler)new AsyncTriggerHandler(this, true)).OnPreCullAsync(); + } + + public UniTask OnPreCullAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnPreCullHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnPreCullAsync(); + } + } +#endregion + +#region PreRender + + public interface IAsyncOnPreRenderHandler + { + UniTask OnPreRenderAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnPreRenderHandler + { + UniTask IAsyncOnPreRenderHandler.OnPreRenderAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncPreRenderTrigger GetAsyncPreRenderTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncPreRenderTrigger GetAsyncPreRenderTrigger(this Component component) + { + return component.gameObject.GetAsyncPreRenderTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncPreRenderTrigger : AsyncTriggerBase + { + void OnPreRender() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnPreRenderHandler GetOnPreRenderAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnPreRenderHandler GetOnPreRenderAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnPreRenderAsync() + { + return ((IAsyncOnPreRenderHandler)new AsyncTriggerHandler(this, true)).OnPreRenderAsync(); + } + + public UniTask OnPreRenderAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnPreRenderHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnPreRenderAsync(); + } + } +#endregion + +#region RectTransformDimensionsChange + + public interface IAsyncOnRectTransformDimensionsChangeHandler + { + UniTask OnRectTransformDimensionsChangeAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnRectTransformDimensionsChangeHandler + { + UniTask IAsyncOnRectTransformDimensionsChangeHandler.OnRectTransformDimensionsChangeAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncRectTransformDimensionsChangeTrigger GetAsyncRectTransformDimensionsChangeTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncRectTransformDimensionsChangeTrigger GetAsyncRectTransformDimensionsChangeTrigger(this Component component) + { + return component.gameObject.GetAsyncRectTransformDimensionsChangeTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncRectTransformDimensionsChangeTrigger : AsyncTriggerBase + { + void OnRectTransformDimensionsChange() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnRectTransformDimensionsChangeHandler GetOnRectTransformDimensionsChangeAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnRectTransformDimensionsChangeHandler GetOnRectTransformDimensionsChangeAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnRectTransformDimensionsChangeAsync() + { + return ((IAsyncOnRectTransformDimensionsChangeHandler)new AsyncTriggerHandler(this, true)).OnRectTransformDimensionsChangeAsync(); + } + + public UniTask OnRectTransformDimensionsChangeAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnRectTransformDimensionsChangeHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnRectTransformDimensionsChangeAsync(); + } + } +#endregion + +#region RectTransformRemoved + + public interface IAsyncOnRectTransformRemovedHandler + { + UniTask OnRectTransformRemovedAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnRectTransformRemovedHandler + { + UniTask IAsyncOnRectTransformRemovedHandler.OnRectTransformRemovedAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncRectTransformRemovedTrigger GetAsyncRectTransformRemovedTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncRectTransformRemovedTrigger GetAsyncRectTransformRemovedTrigger(this Component component) + { + return component.gameObject.GetAsyncRectTransformRemovedTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncRectTransformRemovedTrigger : AsyncTriggerBase + { + void OnRectTransformRemoved() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnRectTransformRemovedHandler GetOnRectTransformRemovedAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnRectTransformRemovedHandler GetOnRectTransformRemovedAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnRectTransformRemovedAsync() + { + return ((IAsyncOnRectTransformRemovedHandler)new AsyncTriggerHandler(this, true)).OnRectTransformRemovedAsync(); + } + + public UniTask OnRectTransformRemovedAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnRectTransformRemovedHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnRectTransformRemovedAsync(); + } + } +#endregion + +#region RenderImage + + public interface IAsyncOnRenderImageHandler + { + UniTask<(RenderTexture source, RenderTexture destination)> OnRenderImageAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnRenderImageHandler + { + UniTask<(RenderTexture source, RenderTexture destination)> IAsyncOnRenderImageHandler.OnRenderImageAsync() + { + core.Reset(); + return new UniTask<(RenderTexture source, RenderTexture destination)>((IUniTaskSource<(RenderTexture source, RenderTexture destination)>)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncRenderImageTrigger GetAsyncRenderImageTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncRenderImageTrigger GetAsyncRenderImageTrigger(this Component component) + { + return component.gameObject.GetAsyncRenderImageTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncRenderImageTrigger : AsyncTriggerBase<(RenderTexture source, RenderTexture destination)> + { + void OnRenderImage(RenderTexture source, RenderTexture destination) + { + RaiseEvent((source, destination)); + } + + public IAsyncOnRenderImageHandler GetOnRenderImageAsyncHandler() + { + return new AsyncTriggerHandler<(RenderTexture source, RenderTexture destination)>(this, false); + } + + public IAsyncOnRenderImageHandler GetOnRenderImageAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler<(RenderTexture source, RenderTexture destination)>(this, cancellationToken, false); + } + + public UniTask<(RenderTexture source, RenderTexture destination)> OnRenderImageAsync() + { + return ((IAsyncOnRenderImageHandler)new AsyncTriggerHandler<(RenderTexture source, RenderTexture destination)>(this, true)).OnRenderImageAsync(); + } + + public UniTask<(RenderTexture source, RenderTexture destination)> OnRenderImageAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnRenderImageHandler)new AsyncTriggerHandler<(RenderTexture source, RenderTexture destination)>(this, cancellationToken, true)).OnRenderImageAsync(); + } + } +#endregion + +#region RenderObject + + public interface IAsyncOnRenderObjectHandler + { + UniTask OnRenderObjectAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnRenderObjectHandler + { + UniTask IAsyncOnRenderObjectHandler.OnRenderObjectAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncRenderObjectTrigger GetAsyncRenderObjectTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncRenderObjectTrigger GetAsyncRenderObjectTrigger(this Component component) + { + return component.gameObject.GetAsyncRenderObjectTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncRenderObjectTrigger : AsyncTriggerBase + { + void OnRenderObject() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnRenderObjectHandler GetOnRenderObjectAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnRenderObjectHandler GetOnRenderObjectAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnRenderObjectAsync() + { + return ((IAsyncOnRenderObjectHandler)new AsyncTriggerHandler(this, true)).OnRenderObjectAsync(); + } + + public UniTask OnRenderObjectAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnRenderObjectHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnRenderObjectAsync(); + } + } +#endregion + +#region ServerInitialized + + public interface IAsyncOnServerInitializedHandler + { + UniTask OnServerInitializedAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnServerInitializedHandler + { + UniTask IAsyncOnServerInitializedHandler.OnServerInitializedAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncServerInitializedTrigger GetAsyncServerInitializedTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncServerInitializedTrigger GetAsyncServerInitializedTrigger(this Component component) + { + return component.gameObject.GetAsyncServerInitializedTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncServerInitializedTrigger : AsyncTriggerBase + { + void OnServerInitialized() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnServerInitializedHandler GetOnServerInitializedAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnServerInitializedHandler GetOnServerInitializedAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnServerInitializedAsync() + { + return ((IAsyncOnServerInitializedHandler)new AsyncTriggerHandler(this, true)).OnServerInitializedAsync(); + } + + public UniTask OnServerInitializedAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnServerInitializedHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnServerInitializedAsync(); + } + } +#endregion + +#region TransformChildrenChanged + + public interface IAsyncOnTransformChildrenChangedHandler + { + UniTask OnTransformChildrenChangedAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnTransformChildrenChangedHandler + { + UniTask IAsyncOnTransformChildrenChangedHandler.OnTransformChildrenChangedAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncTransformChildrenChangedTrigger GetAsyncTransformChildrenChangedTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncTransformChildrenChangedTrigger GetAsyncTransformChildrenChangedTrigger(this Component component) + { + return component.gameObject.GetAsyncTransformChildrenChangedTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncTransformChildrenChangedTrigger : AsyncTriggerBase + { + void OnTransformChildrenChanged() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnTransformChildrenChangedHandler GetOnTransformChildrenChangedAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnTransformChildrenChangedHandler GetOnTransformChildrenChangedAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnTransformChildrenChangedAsync() + { + return ((IAsyncOnTransformChildrenChangedHandler)new AsyncTriggerHandler(this, true)).OnTransformChildrenChangedAsync(); + } + + public UniTask OnTransformChildrenChangedAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnTransformChildrenChangedHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnTransformChildrenChangedAsync(); + } + } +#endregion + +#region TransformParentChanged + + public interface IAsyncOnTransformParentChangedHandler + { + UniTask OnTransformParentChangedAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnTransformParentChangedHandler + { + UniTask IAsyncOnTransformParentChangedHandler.OnTransformParentChangedAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncTransformParentChangedTrigger GetAsyncTransformParentChangedTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncTransformParentChangedTrigger GetAsyncTransformParentChangedTrigger(this Component component) + { + return component.gameObject.GetAsyncTransformParentChangedTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncTransformParentChangedTrigger : AsyncTriggerBase + { + void OnTransformParentChanged() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnTransformParentChangedHandler GetOnTransformParentChangedAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnTransformParentChangedHandler GetOnTransformParentChangedAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnTransformParentChangedAsync() + { + return ((IAsyncOnTransformParentChangedHandler)new AsyncTriggerHandler(this, true)).OnTransformParentChangedAsync(); + } + + public UniTask OnTransformParentChangedAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnTransformParentChangedHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnTransformParentChangedAsync(); + } + } +#endregion + +#region TriggerEnter +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS_SUPPORT + + public interface IAsyncOnTriggerEnterHandler + { + UniTask OnTriggerEnterAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnTriggerEnterHandler + { + UniTask IAsyncOnTriggerEnterHandler.OnTriggerEnterAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncTriggerEnterTrigger GetAsyncTriggerEnterTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncTriggerEnterTrigger GetAsyncTriggerEnterTrigger(this Component component) + { + return component.gameObject.GetAsyncTriggerEnterTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncTriggerEnterTrigger : AsyncTriggerBase + { + void OnTriggerEnter(Collider other) + { + RaiseEvent((other)); + } + + public IAsyncOnTriggerEnterHandler GetOnTriggerEnterAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnTriggerEnterHandler GetOnTriggerEnterAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnTriggerEnterAsync() + { + return ((IAsyncOnTriggerEnterHandler)new AsyncTriggerHandler(this, true)).OnTriggerEnterAsync(); + } + + public UniTask OnTriggerEnterAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnTriggerEnterHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnTriggerEnterAsync(); + } + } +#endif +#endregion + +#region TriggerEnter2D +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS2D_SUPPORT + + public interface IAsyncOnTriggerEnter2DHandler + { + UniTask OnTriggerEnter2DAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnTriggerEnter2DHandler + { + UniTask IAsyncOnTriggerEnter2DHandler.OnTriggerEnter2DAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncTriggerEnter2DTrigger GetAsyncTriggerEnter2DTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncTriggerEnter2DTrigger GetAsyncTriggerEnter2DTrigger(this Component component) + { + return component.gameObject.GetAsyncTriggerEnter2DTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncTriggerEnter2DTrigger : AsyncTriggerBase + { + void OnTriggerEnter2D(Collider2D other) + { + RaiseEvent((other)); + } + + public IAsyncOnTriggerEnter2DHandler GetOnTriggerEnter2DAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnTriggerEnter2DHandler GetOnTriggerEnter2DAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnTriggerEnter2DAsync() + { + return ((IAsyncOnTriggerEnter2DHandler)new AsyncTriggerHandler(this, true)).OnTriggerEnter2DAsync(); + } + + public UniTask OnTriggerEnter2DAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnTriggerEnter2DHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnTriggerEnter2DAsync(); + } + } +#endif +#endregion + +#region TriggerExit +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS_SUPPORT + + public interface IAsyncOnTriggerExitHandler + { + UniTask OnTriggerExitAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnTriggerExitHandler + { + UniTask IAsyncOnTriggerExitHandler.OnTriggerExitAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncTriggerExitTrigger GetAsyncTriggerExitTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncTriggerExitTrigger GetAsyncTriggerExitTrigger(this Component component) + { + return component.gameObject.GetAsyncTriggerExitTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncTriggerExitTrigger : AsyncTriggerBase + { + void OnTriggerExit(Collider other) + { + RaiseEvent((other)); + } + + public IAsyncOnTriggerExitHandler GetOnTriggerExitAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnTriggerExitHandler GetOnTriggerExitAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnTriggerExitAsync() + { + return ((IAsyncOnTriggerExitHandler)new AsyncTriggerHandler(this, true)).OnTriggerExitAsync(); + } + + public UniTask OnTriggerExitAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnTriggerExitHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnTriggerExitAsync(); + } + } +#endif +#endregion + +#region TriggerExit2D +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS2D_SUPPORT + + public interface IAsyncOnTriggerExit2DHandler + { + UniTask OnTriggerExit2DAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnTriggerExit2DHandler + { + UniTask IAsyncOnTriggerExit2DHandler.OnTriggerExit2DAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncTriggerExit2DTrigger GetAsyncTriggerExit2DTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncTriggerExit2DTrigger GetAsyncTriggerExit2DTrigger(this Component component) + { + return component.gameObject.GetAsyncTriggerExit2DTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncTriggerExit2DTrigger : AsyncTriggerBase + { + void OnTriggerExit2D(Collider2D other) + { + RaiseEvent((other)); + } + + public IAsyncOnTriggerExit2DHandler GetOnTriggerExit2DAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnTriggerExit2DHandler GetOnTriggerExit2DAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnTriggerExit2DAsync() + { + return ((IAsyncOnTriggerExit2DHandler)new AsyncTriggerHandler(this, true)).OnTriggerExit2DAsync(); + } + + public UniTask OnTriggerExit2DAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnTriggerExit2DHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnTriggerExit2DAsync(); + } + } +#endif +#endregion + +#region TriggerStay +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS_SUPPORT + + public interface IAsyncOnTriggerStayHandler + { + UniTask OnTriggerStayAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnTriggerStayHandler + { + UniTask IAsyncOnTriggerStayHandler.OnTriggerStayAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncTriggerStayTrigger GetAsyncTriggerStayTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncTriggerStayTrigger GetAsyncTriggerStayTrigger(this Component component) + { + return component.gameObject.GetAsyncTriggerStayTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncTriggerStayTrigger : AsyncTriggerBase + { + void OnTriggerStay(Collider other) + { + RaiseEvent((other)); + } + + public IAsyncOnTriggerStayHandler GetOnTriggerStayAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnTriggerStayHandler GetOnTriggerStayAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnTriggerStayAsync() + { + return ((IAsyncOnTriggerStayHandler)new AsyncTriggerHandler(this, true)).OnTriggerStayAsync(); + } + + public UniTask OnTriggerStayAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnTriggerStayHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnTriggerStayAsync(); + } + } +#endif +#endregion + +#region TriggerStay2D +#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS2D_SUPPORT + + public interface IAsyncOnTriggerStay2DHandler + { + UniTask OnTriggerStay2DAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnTriggerStay2DHandler + { + UniTask IAsyncOnTriggerStay2DHandler.OnTriggerStay2DAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncTriggerStay2DTrigger GetAsyncTriggerStay2DTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncTriggerStay2DTrigger GetAsyncTriggerStay2DTrigger(this Component component) + { + return component.gameObject.GetAsyncTriggerStay2DTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncTriggerStay2DTrigger : AsyncTriggerBase + { + void OnTriggerStay2D(Collider2D other) + { + RaiseEvent((other)); + } + + public IAsyncOnTriggerStay2DHandler GetOnTriggerStay2DAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnTriggerStay2DHandler GetOnTriggerStay2DAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnTriggerStay2DAsync() + { + return ((IAsyncOnTriggerStay2DHandler)new AsyncTriggerHandler(this, true)).OnTriggerStay2DAsync(); + } + + public UniTask OnTriggerStay2DAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnTriggerStay2DHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnTriggerStay2DAsync(); + } + } +#endif +#endregion + +#region Validate + + public interface IAsyncOnValidateHandler + { + UniTask OnValidateAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnValidateHandler + { + UniTask IAsyncOnValidateHandler.OnValidateAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncValidateTrigger GetAsyncValidateTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncValidateTrigger GetAsyncValidateTrigger(this Component component) + { + return component.gameObject.GetAsyncValidateTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncValidateTrigger : AsyncTriggerBase + { + void OnValidate() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnValidateHandler GetOnValidateAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnValidateHandler GetOnValidateAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnValidateAsync() + { + return ((IAsyncOnValidateHandler)new AsyncTriggerHandler(this, true)).OnValidateAsync(); + } + + public UniTask OnValidateAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnValidateHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnValidateAsync(); + } + } +#endregion + +#region WillRenderObject + + public interface IAsyncOnWillRenderObjectHandler + { + UniTask OnWillRenderObjectAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnWillRenderObjectHandler + { + UniTask IAsyncOnWillRenderObjectHandler.OnWillRenderObjectAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncWillRenderObjectTrigger GetAsyncWillRenderObjectTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncWillRenderObjectTrigger GetAsyncWillRenderObjectTrigger(this Component component) + { + return component.gameObject.GetAsyncWillRenderObjectTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncWillRenderObjectTrigger : AsyncTriggerBase + { + void OnWillRenderObject() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncOnWillRenderObjectHandler GetOnWillRenderObjectAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnWillRenderObjectHandler GetOnWillRenderObjectAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnWillRenderObjectAsync() + { + return ((IAsyncOnWillRenderObjectHandler)new AsyncTriggerHandler(this, true)).OnWillRenderObjectAsync(); + } + + public UniTask OnWillRenderObjectAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnWillRenderObjectHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnWillRenderObjectAsync(); + } + } +#endregion + +#region Reset + + public interface IAsyncResetHandler + { + UniTask ResetAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncResetHandler + { + UniTask IAsyncResetHandler.ResetAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncResetTrigger GetAsyncResetTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncResetTrigger GetAsyncResetTrigger(this Component component) + { + return component.gameObject.GetAsyncResetTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncResetTrigger : AsyncTriggerBase + { + void Reset() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncResetHandler GetResetAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncResetHandler GetResetAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask ResetAsync() + { + return ((IAsyncResetHandler)new AsyncTriggerHandler(this, true)).ResetAsync(); + } + + public UniTask ResetAsync(CancellationToken cancellationToken) + { + return ((IAsyncResetHandler)new AsyncTriggerHandler(this, cancellationToken, true)).ResetAsync(); + } + } +#endregion + +#region Update + + public interface IAsyncUpdateHandler + { + UniTask UpdateAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncUpdateHandler + { + UniTask IAsyncUpdateHandler.UpdateAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncUpdateTrigger GetAsyncUpdateTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncUpdateTrigger GetAsyncUpdateTrigger(this Component component) + { + return component.gameObject.GetAsyncUpdateTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncUpdateTrigger : AsyncTriggerBase + { + void Update() + { + RaiseEvent(AsyncUnit.Default); + } + + public IAsyncUpdateHandler GetUpdateAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncUpdateHandler GetUpdateAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask UpdateAsync() + { + return ((IAsyncUpdateHandler)new AsyncTriggerHandler(this, true)).UpdateAsync(); + } + + public UniTask UpdateAsync(CancellationToken cancellationToken) + { + return ((IAsyncUpdateHandler)new AsyncTriggerHandler(this, cancellationToken, true)).UpdateAsync(); + } + } +#endregion + +#region BeginDrag +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnBeginDragHandler + { + UniTask OnBeginDragAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnBeginDragHandler + { + UniTask IAsyncOnBeginDragHandler.OnBeginDragAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncBeginDragTrigger GetAsyncBeginDragTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncBeginDragTrigger GetAsyncBeginDragTrigger(this Component component) + { + return component.gameObject.GetAsyncBeginDragTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncBeginDragTrigger : AsyncTriggerBase, IBeginDragHandler + { + void IBeginDragHandler.OnBeginDrag(PointerEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnBeginDragHandler GetOnBeginDragAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnBeginDragHandler GetOnBeginDragAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnBeginDragAsync() + { + return ((IAsyncOnBeginDragHandler)new AsyncTriggerHandler(this, true)).OnBeginDragAsync(); + } + + public UniTask OnBeginDragAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnBeginDragHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnBeginDragAsync(); + } + } +#endif +#endregion + +#region Cancel +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnCancelHandler + { + UniTask OnCancelAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnCancelHandler + { + UniTask IAsyncOnCancelHandler.OnCancelAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncCancelTrigger GetAsyncCancelTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncCancelTrigger GetAsyncCancelTrigger(this Component component) + { + return component.gameObject.GetAsyncCancelTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncCancelTrigger : AsyncTriggerBase, ICancelHandler + { + void ICancelHandler.OnCancel(BaseEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnCancelHandler GetOnCancelAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnCancelHandler GetOnCancelAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnCancelAsync() + { + return ((IAsyncOnCancelHandler)new AsyncTriggerHandler(this, true)).OnCancelAsync(); + } + + public UniTask OnCancelAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnCancelHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnCancelAsync(); + } + } +#endif +#endregion + +#region Deselect +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnDeselectHandler + { + UniTask OnDeselectAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnDeselectHandler + { + UniTask IAsyncOnDeselectHandler.OnDeselectAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncDeselectTrigger GetAsyncDeselectTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncDeselectTrigger GetAsyncDeselectTrigger(this Component component) + { + return component.gameObject.GetAsyncDeselectTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncDeselectTrigger : AsyncTriggerBase, IDeselectHandler + { + void IDeselectHandler.OnDeselect(BaseEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnDeselectHandler GetOnDeselectAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnDeselectHandler GetOnDeselectAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnDeselectAsync() + { + return ((IAsyncOnDeselectHandler)new AsyncTriggerHandler(this, true)).OnDeselectAsync(); + } + + public UniTask OnDeselectAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnDeselectHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnDeselectAsync(); + } + } +#endif +#endregion + +#region Drag +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnDragHandler + { + UniTask OnDragAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnDragHandler + { + UniTask IAsyncOnDragHandler.OnDragAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncDragTrigger GetAsyncDragTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncDragTrigger GetAsyncDragTrigger(this Component component) + { + return component.gameObject.GetAsyncDragTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncDragTrigger : AsyncTriggerBase, IDragHandler + { + void IDragHandler.OnDrag(PointerEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnDragHandler GetOnDragAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnDragHandler GetOnDragAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnDragAsync() + { + return ((IAsyncOnDragHandler)new AsyncTriggerHandler(this, true)).OnDragAsync(); + } + + public UniTask OnDragAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnDragHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnDragAsync(); + } + } +#endif +#endregion + +#region Drop +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnDropHandler + { + UniTask OnDropAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnDropHandler + { + UniTask IAsyncOnDropHandler.OnDropAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncDropTrigger GetAsyncDropTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncDropTrigger GetAsyncDropTrigger(this Component component) + { + return component.gameObject.GetAsyncDropTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncDropTrigger : AsyncTriggerBase, IDropHandler + { + void IDropHandler.OnDrop(PointerEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnDropHandler GetOnDropAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnDropHandler GetOnDropAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnDropAsync() + { + return ((IAsyncOnDropHandler)new AsyncTriggerHandler(this, true)).OnDropAsync(); + } + + public UniTask OnDropAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnDropHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnDropAsync(); + } + } +#endif +#endregion + +#region EndDrag +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnEndDragHandler + { + UniTask OnEndDragAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnEndDragHandler + { + UniTask IAsyncOnEndDragHandler.OnEndDragAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncEndDragTrigger GetAsyncEndDragTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncEndDragTrigger GetAsyncEndDragTrigger(this Component component) + { + return component.gameObject.GetAsyncEndDragTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncEndDragTrigger : AsyncTriggerBase, IEndDragHandler + { + void IEndDragHandler.OnEndDrag(PointerEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnEndDragHandler GetOnEndDragAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnEndDragHandler GetOnEndDragAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnEndDragAsync() + { + return ((IAsyncOnEndDragHandler)new AsyncTriggerHandler(this, true)).OnEndDragAsync(); + } + + public UniTask OnEndDragAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnEndDragHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnEndDragAsync(); + } + } +#endif +#endregion + +#region InitializePotentialDrag +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnInitializePotentialDragHandler + { + UniTask OnInitializePotentialDragAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnInitializePotentialDragHandler + { + UniTask IAsyncOnInitializePotentialDragHandler.OnInitializePotentialDragAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncInitializePotentialDragTrigger GetAsyncInitializePotentialDragTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncInitializePotentialDragTrigger GetAsyncInitializePotentialDragTrigger(this Component component) + { + return component.gameObject.GetAsyncInitializePotentialDragTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncInitializePotentialDragTrigger : AsyncTriggerBase, IInitializePotentialDragHandler + { + void IInitializePotentialDragHandler.OnInitializePotentialDrag(PointerEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnInitializePotentialDragHandler GetOnInitializePotentialDragAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnInitializePotentialDragHandler GetOnInitializePotentialDragAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnInitializePotentialDragAsync() + { + return ((IAsyncOnInitializePotentialDragHandler)new AsyncTriggerHandler(this, true)).OnInitializePotentialDragAsync(); + } + + public UniTask OnInitializePotentialDragAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnInitializePotentialDragHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnInitializePotentialDragAsync(); + } + } +#endif +#endregion + +#region Move +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnMoveHandler + { + UniTask OnMoveAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnMoveHandler + { + UniTask IAsyncOnMoveHandler.OnMoveAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncMoveTrigger GetAsyncMoveTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncMoveTrigger GetAsyncMoveTrigger(this Component component) + { + return component.gameObject.GetAsyncMoveTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncMoveTrigger : AsyncTriggerBase, IMoveHandler + { + void IMoveHandler.OnMove(AxisEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnMoveHandler GetOnMoveAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnMoveHandler GetOnMoveAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnMoveAsync() + { + return ((IAsyncOnMoveHandler)new AsyncTriggerHandler(this, true)).OnMoveAsync(); + } + + public UniTask OnMoveAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnMoveHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnMoveAsync(); + } + } +#endif +#endregion + +#region PointerClick +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnPointerClickHandler + { + UniTask OnPointerClickAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnPointerClickHandler + { + UniTask IAsyncOnPointerClickHandler.OnPointerClickAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncPointerClickTrigger GetAsyncPointerClickTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncPointerClickTrigger GetAsyncPointerClickTrigger(this Component component) + { + return component.gameObject.GetAsyncPointerClickTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncPointerClickTrigger : AsyncTriggerBase, IPointerClickHandler + { + void IPointerClickHandler.OnPointerClick(PointerEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnPointerClickHandler GetOnPointerClickAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnPointerClickHandler GetOnPointerClickAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnPointerClickAsync() + { + return ((IAsyncOnPointerClickHandler)new AsyncTriggerHandler(this, true)).OnPointerClickAsync(); + } + + public UniTask OnPointerClickAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnPointerClickHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnPointerClickAsync(); + } + } +#endif +#endregion + +#region PointerDown +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnPointerDownHandler + { + UniTask OnPointerDownAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnPointerDownHandler + { + UniTask IAsyncOnPointerDownHandler.OnPointerDownAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncPointerDownTrigger GetAsyncPointerDownTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncPointerDownTrigger GetAsyncPointerDownTrigger(this Component component) + { + return component.gameObject.GetAsyncPointerDownTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncPointerDownTrigger : AsyncTriggerBase, IPointerDownHandler + { + void IPointerDownHandler.OnPointerDown(PointerEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnPointerDownHandler GetOnPointerDownAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnPointerDownHandler GetOnPointerDownAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnPointerDownAsync() + { + return ((IAsyncOnPointerDownHandler)new AsyncTriggerHandler(this, true)).OnPointerDownAsync(); + } + + public UniTask OnPointerDownAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnPointerDownHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnPointerDownAsync(); + } + } +#endif +#endregion + +#region PointerEnter +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnPointerEnterHandler + { + UniTask OnPointerEnterAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnPointerEnterHandler + { + UniTask IAsyncOnPointerEnterHandler.OnPointerEnterAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncPointerEnterTrigger GetAsyncPointerEnterTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncPointerEnterTrigger GetAsyncPointerEnterTrigger(this Component component) + { + return component.gameObject.GetAsyncPointerEnterTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncPointerEnterTrigger : AsyncTriggerBase, IPointerEnterHandler + { + void IPointerEnterHandler.OnPointerEnter(PointerEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnPointerEnterHandler GetOnPointerEnterAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnPointerEnterHandler GetOnPointerEnterAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnPointerEnterAsync() + { + return ((IAsyncOnPointerEnterHandler)new AsyncTriggerHandler(this, true)).OnPointerEnterAsync(); + } + + public UniTask OnPointerEnterAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnPointerEnterHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnPointerEnterAsync(); + } + } +#endif +#endregion + +#region PointerExit +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnPointerExitHandler + { + UniTask OnPointerExitAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnPointerExitHandler + { + UniTask IAsyncOnPointerExitHandler.OnPointerExitAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncPointerExitTrigger GetAsyncPointerExitTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncPointerExitTrigger GetAsyncPointerExitTrigger(this Component component) + { + return component.gameObject.GetAsyncPointerExitTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncPointerExitTrigger : AsyncTriggerBase, IPointerExitHandler + { + void IPointerExitHandler.OnPointerExit(PointerEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnPointerExitHandler GetOnPointerExitAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnPointerExitHandler GetOnPointerExitAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnPointerExitAsync() + { + return ((IAsyncOnPointerExitHandler)new AsyncTriggerHandler(this, true)).OnPointerExitAsync(); + } + + public UniTask OnPointerExitAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnPointerExitHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnPointerExitAsync(); + } + } +#endif +#endregion + +#region PointerUp +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnPointerUpHandler + { + UniTask OnPointerUpAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnPointerUpHandler + { + UniTask IAsyncOnPointerUpHandler.OnPointerUpAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncPointerUpTrigger GetAsyncPointerUpTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncPointerUpTrigger GetAsyncPointerUpTrigger(this Component component) + { + return component.gameObject.GetAsyncPointerUpTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncPointerUpTrigger : AsyncTriggerBase, IPointerUpHandler + { + void IPointerUpHandler.OnPointerUp(PointerEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnPointerUpHandler GetOnPointerUpAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnPointerUpHandler GetOnPointerUpAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnPointerUpAsync() + { + return ((IAsyncOnPointerUpHandler)new AsyncTriggerHandler(this, true)).OnPointerUpAsync(); + } + + public UniTask OnPointerUpAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnPointerUpHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnPointerUpAsync(); + } + } +#endif +#endregion + +#region Scroll +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnScrollHandler + { + UniTask OnScrollAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnScrollHandler + { + UniTask IAsyncOnScrollHandler.OnScrollAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncScrollTrigger GetAsyncScrollTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncScrollTrigger GetAsyncScrollTrigger(this Component component) + { + return component.gameObject.GetAsyncScrollTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncScrollTrigger : AsyncTriggerBase, IScrollHandler + { + void IScrollHandler.OnScroll(PointerEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnScrollHandler GetOnScrollAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnScrollHandler GetOnScrollAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnScrollAsync() + { + return ((IAsyncOnScrollHandler)new AsyncTriggerHandler(this, true)).OnScrollAsync(); + } + + public UniTask OnScrollAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnScrollHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnScrollAsync(); + } + } +#endif +#endregion + +#region Select +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnSelectHandler + { + UniTask OnSelectAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnSelectHandler + { + UniTask IAsyncOnSelectHandler.OnSelectAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncSelectTrigger GetAsyncSelectTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncSelectTrigger GetAsyncSelectTrigger(this Component component) + { + return component.gameObject.GetAsyncSelectTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncSelectTrigger : AsyncTriggerBase, ISelectHandler + { + void ISelectHandler.OnSelect(BaseEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnSelectHandler GetOnSelectAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnSelectHandler GetOnSelectAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnSelectAsync() + { + return ((IAsyncOnSelectHandler)new AsyncTriggerHandler(this, true)).OnSelectAsync(); + } + + public UniTask OnSelectAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnSelectHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnSelectAsync(); + } + } +#endif +#endregion + +#region Submit +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnSubmitHandler + { + UniTask OnSubmitAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnSubmitHandler + { + UniTask IAsyncOnSubmitHandler.OnSubmitAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncSubmitTrigger GetAsyncSubmitTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncSubmitTrigger GetAsyncSubmitTrigger(this Component component) + { + return component.gameObject.GetAsyncSubmitTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncSubmitTrigger : AsyncTriggerBase, ISubmitHandler + { + void ISubmitHandler.OnSubmit(BaseEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnSubmitHandler GetOnSubmitAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnSubmitHandler GetOnSubmitAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnSubmitAsync() + { + return ((IAsyncOnSubmitHandler)new AsyncTriggerHandler(this, true)).OnSubmitAsync(); + } + + public UniTask OnSubmitAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnSubmitHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnSubmitAsync(); + } + } +#endif +#endregion + +#region UpdateSelected +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + + public interface IAsyncOnUpdateSelectedHandler + { + UniTask OnUpdateSelectedAsync(); + } + + public partial class AsyncTriggerHandler : IAsyncOnUpdateSelectedHandler + { + UniTask IAsyncOnUpdateSelectedHandler.OnUpdateSelectedAsync() + { + core.Reset(); + return new UniTask((IUniTaskSource)(object)this, core.Version); + } + } + + public static partial class AsyncTriggerExtensions + { + public static AsyncUpdateSelectedTrigger GetAsyncUpdateSelectedTrigger(this GameObject gameObject) + { + return GetOrAddComponent(gameObject); + } + + public static AsyncUpdateSelectedTrigger GetAsyncUpdateSelectedTrigger(this Component component) + { + return component.gameObject.GetAsyncUpdateSelectedTrigger(); + } + } + + [DisallowMultipleComponent] + public sealed class AsyncUpdateSelectedTrigger : AsyncTriggerBase, IUpdateSelectedHandler + { + void IUpdateSelectedHandler.OnUpdateSelected(BaseEventData eventData) + { + RaiseEvent((eventData)); + } + + public IAsyncOnUpdateSelectedHandler GetOnUpdateSelectedAsyncHandler() + { + return new AsyncTriggerHandler(this, false); + } + + public IAsyncOnUpdateSelectedHandler GetOnUpdateSelectedAsyncHandler(CancellationToken cancellationToken) + { + return new AsyncTriggerHandler(this, cancellationToken, false); + } + + public UniTask OnUpdateSelectedAsync() + { + return ((IAsyncOnUpdateSelectedHandler)new AsyncTriggerHandler(this, true)).OnUpdateSelectedAsync(); + } + + public UniTask OnUpdateSelectedAsync(CancellationToken cancellationToken) + { + return ((IAsyncOnUpdateSelectedHandler)new AsyncTriggerHandler(this, cancellationToken, true)).OnUpdateSelectedAsync(); + } + } +#endif +#endregion + +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/Triggers/MonoBehaviourMessagesTriggers.cs.meta b/Assets/Plugins/UniTask/Runtime/Triggers/MonoBehaviourMessagesTriggers.cs.meta new file mode 100644 index 0000000..82aa679 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/Triggers/MonoBehaviourMessagesTriggers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c30655636c35c3d4da44064af3d2d9a7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.AsValueTask.cs b/Assets/Plugins/UniTask/Runtime/UniTask.AsValueTask.cs new file mode 100644 index 0000000..ab1e913 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.AsValueTask.cs @@ -0,0 +1,104 @@ +#pragma warning disable 0649 + +#if UNITASK_NETCORE || UNITY_2022_3_OR_NEWER +#define SUPPORT_VALUETASK +#endif + +#if SUPPORT_VALUETASK + +using System; +using System.Threading.Tasks; +using System.Threading.Tasks.Sources; + +namespace Cysharp.Threading.Tasks +{ + public static class UniTaskValueTaskExtensions + { + public static ValueTask AsValueTask(this in UniTask task) + { +#if (UNITASK_NETCORE && NETSTANDARD2_0) + return new ValueTask(new UniTaskValueTaskSource(task), 0); +#else + return task; +#endif + } + + public static ValueTask AsValueTask(this in UniTask task) + { +#if (UNITASK_NETCORE && NETSTANDARD2_0) + return new ValueTask(new UniTaskValueTaskSource(task), 0); +#else + return task; +#endif + } + + public static async UniTask AsUniTask(this ValueTask task) + { + return await task; + } + + public static async UniTask AsUniTask(this ValueTask task) + { + await task; + } + +#if (UNITASK_NETCORE && NETSTANDARD2_0) + + class UniTaskValueTaskSource : IValueTaskSource + { + readonly UniTask task; + readonly UniTask.Awaiter awaiter; + + public UniTaskValueTaskSource(UniTask task) + { + this.task = task; + this.awaiter = task.GetAwaiter(); + } + + public void GetResult(short token) + { + awaiter.GetResult(); + } + + public ValueTaskSourceStatus GetStatus(short token) + { + return (ValueTaskSourceStatus)task.Status; + } + + public void OnCompleted(Action continuation, object state, short token, ValueTaskSourceOnCompletedFlags flags) + { + awaiter.SourceOnCompleted(continuation, state); + } + } + + class UniTaskValueTaskSource : IValueTaskSource + { + readonly UniTask task; + readonly UniTask.Awaiter awaiter; + + public UniTaskValueTaskSource(UniTask task) + { + this.task = task; + this.awaiter = task.GetAwaiter(); + } + + public T GetResult(short token) + { + return awaiter.GetResult(); + } + + public ValueTaskSourceStatus GetStatus(short token) + { + return (ValueTaskSourceStatus)task.Status; + } + + public void OnCompleted(Action continuation, object state, short token, ValueTaskSourceOnCompletedFlags flags) + { + awaiter.SourceOnCompleted(continuation, state); + } + } + +#endif + } +} +#endif diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.AsValueTask.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTask.AsValueTask.cs.meta new file mode 100644 index 0000000..801bce1 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.AsValueTask.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d38f0478933be42d895c37b862540a1c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.Bridge.cs b/Assets/Plugins/UniTask/Runtime/UniTask.Bridge.cs new file mode 100644 index 0000000..c904299 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.Bridge.cs @@ -0,0 +1,18 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Collections; + +namespace Cysharp.Threading.Tasks +{ + // UnityEngine Bridges. + + public partial struct UniTask + { + public static IEnumerator ToCoroutine(Func taskFactory) + { + return taskFactory().ToCoroutine(); + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.Bridge.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTask.Bridge.cs.meta new file mode 100644 index 0000000..6f8da80 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.Bridge.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bd6beac8e0ebd264e9ba246c39429c72 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs b/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs new file mode 100644 index 0000000..8ac8a29 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs @@ -0,0 +1,1104 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Threading; +using UnityEngine; + +namespace Cysharp.Threading.Tasks +{ + public enum DelayType + { + /// use Time.deltaTime. + DeltaTime, + /// Ignore timescale, use Time.unscaledDeltaTime. + UnscaledDeltaTime, + /// use Stopwatch.GetTimestamp(). + Realtime + } + + public partial struct UniTask + { + public static YieldAwaitable Yield() + { + // optimized for single continuation + return new YieldAwaitable(PlayerLoopTiming.Update); + } + + public static YieldAwaitable Yield(PlayerLoopTiming timing) + { + // optimized for single continuation + return new YieldAwaitable(timing); + } + + public static UniTask Yield(CancellationToken cancellationToken, bool cancelImmediately = false) + { + return new UniTask(YieldPromise.Create(PlayerLoopTiming.Update, cancellationToken, cancelImmediately, out var token), token); + } + + public static UniTask Yield(PlayerLoopTiming timing, CancellationToken cancellationToken, bool cancelImmediately = false) + { + return new UniTask(YieldPromise.Create(timing, cancellationToken, cancelImmediately, out var token), token); + } + + /// + /// Similar as UniTask.Yield but guaranteed run on next frame. + /// + public static UniTask NextFrame() + { + return new UniTask(NextFramePromise.Create(PlayerLoopTiming.Update, CancellationToken.None, false, out var token), token); + } + + /// + /// Similar as UniTask.Yield but guaranteed run on next frame. + /// + public static UniTask NextFrame(PlayerLoopTiming timing) + { + return new UniTask(NextFramePromise.Create(timing, CancellationToken.None, false, out var token), token); + } + + /// + /// Similar as UniTask.Yield but guaranteed run on next frame. + /// + public static UniTask NextFrame(CancellationToken cancellationToken, bool cancelImmediately = false) + { + return new UniTask(NextFramePromise.Create(PlayerLoopTiming.Update, cancellationToken, cancelImmediately, out var token), token); + } + + /// + /// Similar as UniTask.Yield but guaranteed run on next frame. + /// + public static UniTask NextFrame(PlayerLoopTiming timing, CancellationToken cancellationToken, bool cancelImmediately = false) + { + return new UniTask(NextFramePromise.Create(timing, cancellationToken, cancelImmediately, out var token), token); + } + +#if UNITY_2023_1_OR_NEWER + public static async UniTask WaitForEndOfFrame(CancellationToken cancellationToken = default) + { + await Awaitable.EndOfFrameAsync(cancellationToken); + } +#else + [Obsolete("Use WaitForEndOfFrame(MonoBehaviour) instead or UniTask.Yield(PlayerLoopTiming.LastPostLateUpdate). Equivalent for coroutine's WaitForEndOfFrame requires MonoBehaviour(runner of Coroutine).")] + public static YieldAwaitable WaitForEndOfFrame() + { + return UniTask.Yield(PlayerLoopTiming.LastPostLateUpdate); + } + + [Obsolete("Use WaitForEndOfFrame(MonoBehaviour) instead or UniTask.Yield(PlayerLoopTiming.LastPostLateUpdate). Equivalent for coroutine's WaitForEndOfFrame requires MonoBehaviour(runner of Coroutine).")] + public static UniTask WaitForEndOfFrame(CancellationToken cancellationToken, bool cancelImmediately = false) + { + return UniTask.Yield(PlayerLoopTiming.LastPostLateUpdate, cancellationToken, cancelImmediately); + } +#endif + + public static UniTask WaitForEndOfFrame(MonoBehaviour coroutineRunner) + { + var source = WaitForEndOfFramePromise.Create(coroutineRunner, CancellationToken.None, false, out var token); + return new UniTask(source, token); + } + + public static UniTask WaitForEndOfFrame(MonoBehaviour coroutineRunner, CancellationToken cancellationToken, bool cancelImmediately = false) + { + var source = WaitForEndOfFramePromise.Create(coroutineRunner, cancellationToken, cancelImmediately, out var token); + return new UniTask(source, token); + } + + /// + /// Same as UniTask.Yield(PlayerLoopTiming.LastFixedUpdate). + /// + public static YieldAwaitable WaitForFixedUpdate() + { + // use LastFixedUpdate instead of FixedUpdate + // https://github.com/Cysharp/UniTask/issues/377 + return UniTask.Yield(PlayerLoopTiming.LastFixedUpdate); + } + + /// + /// Same as UniTask.Yield(PlayerLoopTiming.LastFixedUpdate, cancellationToken). + /// + public static UniTask WaitForFixedUpdate(CancellationToken cancellationToken, bool cancelImmediately = false) + { + return UniTask.Yield(PlayerLoopTiming.LastFixedUpdate, cancellationToken, cancelImmediately); + } + + public static UniTask WaitForSeconds(float duration, bool ignoreTimeScale = false, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + return Delay(Mathf.RoundToInt(1000 * duration), ignoreTimeScale, delayTiming, cancellationToken, cancelImmediately); + } + + public static UniTask WaitForSeconds(int duration, bool ignoreTimeScale = false, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + return Delay(1000 * duration, ignoreTimeScale, delayTiming, cancellationToken, cancelImmediately); + } + + public static UniTask DelayFrame(int delayFrameCount, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + if (delayFrameCount < 0) + { + throw new ArgumentOutOfRangeException("Delay does not allow minus delayFrameCount. delayFrameCount:" + delayFrameCount); + } + + return new UniTask(DelayFramePromise.Create(delayFrameCount, delayTiming, cancellationToken, cancelImmediately, out var token), token); + } + + public static UniTask Delay(int millisecondsDelay, bool ignoreTimeScale = false, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + var delayTimeSpan = TimeSpan.FromMilliseconds(millisecondsDelay); + return Delay(delayTimeSpan, ignoreTimeScale, delayTiming, cancellationToken, cancelImmediately); + } + + public static UniTask Delay(TimeSpan delayTimeSpan, bool ignoreTimeScale = false, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + var delayType = ignoreTimeScale ? DelayType.UnscaledDeltaTime : DelayType.DeltaTime; + return Delay(delayTimeSpan, delayType, delayTiming, cancellationToken, cancelImmediately); + } + + public static UniTask Delay(int millisecondsDelay, DelayType delayType, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + var delayTimeSpan = TimeSpan.FromMilliseconds(millisecondsDelay); + return Delay(delayTimeSpan, delayType, delayTiming, cancellationToken, cancelImmediately); + } + + public static UniTask Delay(TimeSpan delayTimeSpan, DelayType delayType, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + if (delayTimeSpan < TimeSpan.Zero) + { + throw new ArgumentOutOfRangeException("Delay does not allow minus delayTimeSpan. delayTimeSpan:" + delayTimeSpan); + } + +#if UNITY_EDITOR + // force use Realtime. + if (PlayerLoopHelper.IsMainThread && !UnityEditor.EditorApplication.isPlaying) + { + delayType = DelayType.Realtime; + } +#endif + + switch (delayType) + { + case DelayType.UnscaledDeltaTime: + { + return new UniTask(DelayIgnoreTimeScalePromise.Create(delayTimeSpan, delayTiming, cancellationToken, cancelImmediately, out var token), token); + } + case DelayType.Realtime: + { + return new UniTask(DelayRealtimePromise.Create(delayTimeSpan, delayTiming, cancellationToken, cancelImmediately, out var token), token); + } + case DelayType.DeltaTime: + default: + { + return new UniTask(DelayPromise.Create(delayTimeSpan, delayTiming, cancellationToken, cancelImmediately, out var token), token); + } + } + } + + sealed class YieldPromise : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + YieldPromise nextNode; + public ref YieldPromise NextNode => ref nextNode; + + static YieldPromise() + { + TaskPool.RegisterSizeGetter(typeof(YieldPromise), () => pool.Size); + } + + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + UniTaskCompletionSourceCore core; + + YieldPromise() + { + } + + public static IUniTaskSource Create(PlayerLoopTiming timing, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new YieldPromise(); + } + + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (YieldPromise)state; + promise.core.TrySetCanceled(promise.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + core.TrySetResult(null); + return false; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + } + + sealed class NextFramePromise : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + NextFramePromise nextNode; + public ref NextFramePromise NextNode => ref nextNode; + + static NextFramePromise() + { + TaskPool.RegisterSizeGetter(typeof(NextFramePromise), () => pool.Size); + } + + int frameCount; + UniTaskCompletionSourceCore core; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + + NextFramePromise() + { + } + + public static IUniTaskSource Create(PlayerLoopTiming timing, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new NextFramePromise(); + } + + result.frameCount = PlayerLoopHelper.IsMainThread ? Time.frameCount : -1; + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (NextFramePromise)state; + promise.core.TrySetCanceled(promise.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + if (frameCount == Time.frameCount) + { + return true; + } + + core.TrySetResult(AsyncUnit.Default); + return false; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + return pool.TryPush(this); + } + } + + sealed class WaitForEndOfFramePromise : IUniTaskSource, ITaskPoolNode, System.Collections.IEnumerator + { + static TaskPool pool; + WaitForEndOfFramePromise nextNode; + public ref WaitForEndOfFramePromise NextNode => ref nextNode; + + static WaitForEndOfFramePromise() + { + TaskPool.RegisterSizeGetter(typeof(WaitForEndOfFramePromise), () => pool.Size); + } + + UniTaskCompletionSourceCore core; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + + WaitForEndOfFramePromise() + { + } + + public static IUniTaskSource Create(MonoBehaviour coroutineRunner, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new WaitForEndOfFramePromise(); + } + + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (WaitForEndOfFramePromise)state; + promise.core.TrySetCanceled(promise.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + coroutineRunner.StartCoroutine(result); + + token = result.core.Version; + return result; + } + + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + Reset(); // Reset Enumerator + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + return pool.TryPush(this); + } + + // Coroutine Runner implementation + + static readonly WaitForEndOfFrame waitForEndOfFrameYieldInstruction = new WaitForEndOfFrame(); + bool isFirst = true; + + object IEnumerator.Current => waitForEndOfFrameYieldInstruction; + + bool IEnumerator.MoveNext() + { + if (isFirst) + { + isFirst = false; + return true; // start WaitForEndOfFrame + } + + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + core.TrySetResult(null); + return false; + } + + public void Reset() + { + isFirst = true; + } + } + + sealed class DelayFramePromise : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + DelayFramePromise nextNode; + public ref DelayFramePromise NextNode => ref nextNode; + + static DelayFramePromise() + { + TaskPool.RegisterSizeGetter(typeof(DelayFramePromise), () => pool.Size); + } + + int initialFrame; + int delayFrameCount; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + + int currentFrameCount; + UniTaskCompletionSourceCore core; + + DelayFramePromise() + { + } + + public static IUniTaskSource Create(int delayFrameCount, PlayerLoopTiming timing, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new DelayFramePromise(); + } + + result.delayFrameCount = delayFrameCount; + result.cancellationToken = cancellationToken; + result.initialFrame = PlayerLoopHelper.IsMainThread ? Time.frameCount : -1; + result.cancelImmediately = cancelImmediately; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (DelayFramePromise)state; + promise.core.TrySetCanceled(promise.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + if (currentFrameCount == 0) + { + if (delayFrameCount == 0) // same as Yield + { + core.TrySetResult(AsyncUnit.Default); + return false; + } + + // skip in initial frame. + if (initialFrame == Time.frameCount) + { +#if UNITY_EDITOR + // force use Realtime. + if (PlayerLoopHelper.IsMainThread && !UnityEditor.EditorApplication.isPlaying) + { + //goto ++currentFrameCount + } + else + { + return true; + } +#else + return true; +#endif + } + } + + if (++currentFrameCount >= delayFrameCount) + { + core.TrySetResult(AsyncUnit.Default); + return false; + } + + return true; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + currentFrameCount = default; + delayFrameCount = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + } + + sealed class DelayPromise : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + DelayPromise nextNode; + public ref DelayPromise NextNode => ref nextNode; + + static DelayPromise() + { + TaskPool.RegisterSizeGetter(typeof(DelayPromise), () => pool.Size); + } + + int initialFrame; + float delayTimeSpan; + float elapsed; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + + UniTaskCompletionSourceCore core; + + DelayPromise() + { + } + + public static IUniTaskSource Create(TimeSpan delayTimeSpan, PlayerLoopTiming timing, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new DelayPromise(); + } + + result.elapsed = 0.0f; + result.delayTimeSpan = (float)delayTimeSpan.TotalSeconds; + result.cancellationToken = cancellationToken; + result.initialFrame = PlayerLoopHelper.IsMainThread ? Time.frameCount : -1; + result.cancelImmediately = cancelImmediately; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (DelayPromise)state; + promise.core.TrySetCanceled(promise.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + if (elapsed == 0.0f) + { + if (initialFrame == Time.frameCount) + { + return true; + } + } + + elapsed += Time.deltaTime; + if (elapsed >= delayTimeSpan) + { + core.TrySetResult(null); + return false; + } + + return true; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + delayTimeSpan = default; + elapsed = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + } + + sealed class DelayIgnoreTimeScalePromise : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + DelayIgnoreTimeScalePromise nextNode; + public ref DelayIgnoreTimeScalePromise NextNode => ref nextNode; + + static DelayIgnoreTimeScalePromise() + { + TaskPool.RegisterSizeGetter(typeof(DelayIgnoreTimeScalePromise), () => pool.Size); + } + + float delayFrameTimeSpan; + float elapsed; + int initialFrame; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + + UniTaskCompletionSourceCore core; + + DelayIgnoreTimeScalePromise() + { + } + + public static IUniTaskSource Create(TimeSpan delayFrameTimeSpan, PlayerLoopTiming timing, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new DelayIgnoreTimeScalePromise(); + } + + result.elapsed = 0.0f; + result.delayFrameTimeSpan = (float)delayFrameTimeSpan.TotalSeconds; + result.initialFrame = PlayerLoopHelper.IsMainThread ? Time.frameCount : -1; + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (DelayIgnoreTimeScalePromise)state; + promise.core.TrySetCanceled(promise.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + if (elapsed == 0.0f) + { + if (initialFrame == Time.frameCount) + { + return true; + } + } + + elapsed += Time.unscaledDeltaTime; + if (elapsed >= delayFrameTimeSpan) + { + core.TrySetResult(null); + return false; + } + + return true; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + delayFrameTimeSpan = default; + elapsed = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + } + + sealed class DelayRealtimePromise : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + DelayRealtimePromise nextNode; + public ref DelayRealtimePromise NextNode => ref nextNode; + + static DelayRealtimePromise() + { + TaskPool.RegisterSizeGetter(typeof(DelayRealtimePromise), () => pool.Size); + } + + long delayTimeSpanTicks; + ValueStopwatch stopwatch; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + + UniTaskCompletionSourceCore core; + + DelayRealtimePromise() + { + } + + public static IUniTaskSource Create(TimeSpan delayTimeSpan, PlayerLoopTiming timing, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new DelayRealtimePromise(); + } + + result.stopwatch = ValueStopwatch.StartNew(); + result.delayTimeSpanTicks = delayTimeSpan.Ticks; + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (DelayRealtimePromise)state; + promise.core.TrySetCanceled(promise.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + if (stopwatch.IsInvalid) + { + core.TrySetResult(AsyncUnit.Default); + return false; + } + + if (stopwatch.ElapsedTicks >= delayTimeSpanTicks) + { + core.TrySetResult(AsyncUnit.Default); + return false; + } + + return true; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + stopwatch = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + } + } + + public readonly struct YieldAwaitable + { + readonly PlayerLoopTiming timing; + + public YieldAwaitable(PlayerLoopTiming timing) + { + this.timing = timing; + } + + public Awaiter GetAwaiter() + { + return new Awaiter(timing); + } + + public UniTask ToUniTask() + { + return UniTask.Yield(timing, CancellationToken.None); + } + + public readonly struct Awaiter : ICriticalNotifyCompletion + { + readonly PlayerLoopTiming timing; + + public Awaiter(PlayerLoopTiming timing) + { + this.timing = timing; + } + + public bool IsCompleted => false; + + public void GetResult() { } + + public void OnCompleted(Action continuation) + { + PlayerLoopHelper.AddContinuation(timing, continuation); + } + + public void UnsafeOnCompleted(Action continuation) + { + PlayerLoopHelper.AddContinuation(timing, continuation); + } + } + } +} diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs.meta new file mode 100644 index 0000000..08ce579 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ecff7972251de0848b2c0fa89bbd3489 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.Factory.cs b/Assets/Plugins/UniTask/Runtime/UniTask.Factory.cs new file mode 100644 index 0000000..2f6a6a9 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.Factory.cs @@ -0,0 +1,499 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Runtime.CompilerServices; +using System.Runtime.ExceptionServices; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + public partial struct UniTask + { + static readonly UniTask CanceledUniTask = new Func(() => + { + return new UniTask(new CanceledResultSource(CancellationToken.None), 0); + })(); + + static class CanceledUniTaskCache + { + public static readonly UniTask Task; + + static CanceledUniTaskCache() + { + Task = new UniTask(new CanceledResultSource(CancellationToken.None), 0); + } + } + + public static readonly UniTask CompletedTask = new UniTask(); + + public static UniTask FromException(Exception ex) + { + if (ex is OperationCanceledException oce) + { + return FromCanceled(oce.CancellationToken); + } + + return new UniTask(new ExceptionResultSource(ex), 0); + } + + public static UniTask FromException(Exception ex) + { + if (ex is OperationCanceledException oce) + { + return FromCanceled(oce.CancellationToken); + } + + return new UniTask(new ExceptionResultSource(ex), 0); + } + + public static UniTask FromResult(T value) + { + return new UniTask(value); + } + + public static UniTask FromCanceled(CancellationToken cancellationToken = default) + { + if (cancellationToken == CancellationToken.None) + { + return CanceledUniTask; + } + else + { + return new UniTask(new CanceledResultSource(cancellationToken), 0); + } + } + + public static UniTask FromCanceled(CancellationToken cancellationToken = default) + { + if (cancellationToken == CancellationToken.None) + { + return CanceledUniTaskCache.Task; + } + else + { + return new UniTask(new CanceledResultSource(cancellationToken), 0); + } + } + + public static UniTask Create(Func factory) + { + return factory(); + } + + public static UniTask Create(Func> factory) + { + return factory(); + } + + public static AsyncLazy Lazy(Func factory) + { + return new AsyncLazy(factory); + } + + public static AsyncLazy Lazy(Func> factory) + { + return new AsyncLazy(factory); + } + + /// + /// helper of fire and forget void action. + /// + public static void Void(Func asyncAction) + { + asyncAction().Forget(); + } + + /// + /// helper of fire and forget void action. + /// + public static void Void(Func asyncAction, CancellationToken cancellationToken) + { + asyncAction(cancellationToken).Forget(); + } + + /// + /// helper of fire and forget void action. + /// + public static void Void(Func asyncAction, T state) + { + asyncAction(state).Forget(); + } + + /// + /// helper of create add UniTaskVoid to delegate. + /// For example: FooAction = UniTask.Action(async () => { /* */ }) + /// + public static Action Action(Func asyncAction) + { + return () => asyncAction().Forget(); + } + + /// + /// helper of create add UniTaskVoid to delegate. + /// + public static Action Action(Func asyncAction, CancellationToken cancellationToken) + { + return () => asyncAction(cancellationToken).Forget(); + } + +#if UNITY_2018_3_OR_NEWER + + /// + /// Create async void(UniTaskVoid) UnityAction. + /// For exampe: onClick.AddListener(UniTask.UnityAction(async () => { /* */ } )) + /// + public static UnityEngine.Events.UnityAction UnityAction(Func asyncAction) + { + return () => asyncAction().Forget(); + } + + /// + /// Create async void(UniTaskVoid) UnityAction. + /// For exampe: onClick.AddListener(UniTask.UnityAction(FooAsync, this.GetCancellationTokenOnDestroy())) + /// + public static UnityEngine.Events.UnityAction UnityAction(Func asyncAction, CancellationToken cancellationToken) + { + return () => asyncAction(cancellationToken).Forget(); + } + +#endif + + /// + /// Defer the task creation just before call await. + /// + public static UniTask Defer(Func factory) + { + return new UniTask(new DeferPromise(factory), 0); + } + + /// + /// Defer the task creation just before call await. + /// + public static UniTask Defer(Func> factory) + { + return new UniTask(new DeferPromise(factory), 0); + } + + /// + /// Never complete. + /// + public static UniTask Never(CancellationToken cancellationToken) + { + return new UniTask(new NeverPromise(cancellationToken), 0); + } + + /// + /// Never complete. + /// + public static UniTask Never(CancellationToken cancellationToken) + { + return new UniTask(new NeverPromise(cancellationToken), 0); + } + + sealed class ExceptionResultSource : IUniTaskSource + { + readonly ExceptionDispatchInfo exception; + bool calledGet; + + public ExceptionResultSource(Exception exception) + { + this.exception = ExceptionDispatchInfo.Capture(exception); + } + + public void GetResult(short token) + { + if (!calledGet) + { + calledGet = true; + GC.SuppressFinalize(this); + } + exception.Throw(); + } + + public UniTaskStatus GetStatus(short token) + { + return UniTaskStatus.Faulted; + } + + public UniTaskStatus UnsafeGetStatus() + { + return UniTaskStatus.Faulted; + } + + public void OnCompleted(Action continuation, object state, short token) + { + continuation(state); + } + + ~ExceptionResultSource() + { + if (!calledGet) + { + UniTaskScheduler.PublishUnobservedTaskException(exception.SourceException); + } + } + } + + sealed class ExceptionResultSource : IUniTaskSource + { + readonly ExceptionDispatchInfo exception; + bool calledGet; + + public ExceptionResultSource(Exception exception) + { + this.exception = ExceptionDispatchInfo.Capture(exception); + } + + public T GetResult(short token) + { + if (!calledGet) + { + calledGet = true; + GC.SuppressFinalize(this); + } + exception.Throw(); + return default; + } + + void IUniTaskSource.GetResult(short token) + { + if (!calledGet) + { + calledGet = true; + GC.SuppressFinalize(this); + } + exception.Throw(); + } + + public UniTaskStatus GetStatus(short token) + { + return UniTaskStatus.Faulted; + } + + public UniTaskStatus UnsafeGetStatus() + { + return UniTaskStatus.Faulted; + } + + public void OnCompleted(Action continuation, object state, short token) + { + continuation(state); + } + + ~ExceptionResultSource() + { + if (!calledGet) + { + UniTaskScheduler.PublishUnobservedTaskException(exception.SourceException); + } + } + } + + sealed class CanceledResultSource : IUniTaskSource + { + readonly CancellationToken cancellationToken; + + public CanceledResultSource(CancellationToken cancellationToken) + { + this.cancellationToken = cancellationToken; + } + + public void GetResult(short token) + { + throw new OperationCanceledException(cancellationToken); + } + + public UniTaskStatus GetStatus(short token) + { + return UniTaskStatus.Canceled; + } + + public UniTaskStatus UnsafeGetStatus() + { + return UniTaskStatus.Canceled; + } + + public void OnCompleted(Action continuation, object state, short token) + { + continuation(state); + } + } + + sealed class CanceledResultSource : IUniTaskSource + { + readonly CancellationToken cancellationToken; + + public CanceledResultSource(CancellationToken cancellationToken) + { + this.cancellationToken = cancellationToken; + } + + public T GetResult(short token) + { + throw new OperationCanceledException(cancellationToken); + } + + void IUniTaskSource.GetResult(short token) + { + throw new OperationCanceledException(cancellationToken); + } + + public UniTaskStatus GetStatus(short token) + { + return UniTaskStatus.Canceled; + } + + public UniTaskStatus UnsafeGetStatus() + { + return UniTaskStatus.Canceled; + } + + public void OnCompleted(Action continuation, object state, short token) + { + continuation(state); + } + } + + sealed class DeferPromise : IUniTaskSource + { + Func factory; + UniTask task; + UniTask.Awaiter awaiter; + + public DeferPromise(Func factory) + { + this.factory = factory; + } + + public void GetResult(short token) + { + awaiter.GetResult(); + } + + public UniTaskStatus GetStatus(short token) + { + var f = Interlocked.Exchange(ref factory, null); + if (f != null) + { + task = f(); + awaiter = task.GetAwaiter(); + } + + return task.Status; + } + + public void OnCompleted(Action continuation, object state, short token) + { + awaiter.SourceOnCompleted(continuation, state); + } + + public UniTaskStatus UnsafeGetStatus() + { + return task.Status; + } + } + + sealed class DeferPromise : IUniTaskSource + { + Func> factory; + UniTask task; + UniTask.Awaiter awaiter; + + public DeferPromise(Func> factory) + { + this.factory = factory; + } + + public T GetResult(short token) + { + return awaiter.GetResult(); + } + + void IUniTaskSource.GetResult(short token) + { + awaiter.GetResult(); + } + + public UniTaskStatus GetStatus(short token) + { + var f = Interlocked.Exchange(ref factory, null); + if (f != null) + { + task = f(); + awaiter = task.GetAwaiter(); + } + + return task.Status; + } + + public void OnCompleted(Action continuation, object state, short token) + { + awaiter.SourceOnCompleted(continuation, state); + } + + public UniTaskStatus UnsafeGetStatus() + { + return task.Status; + } + } + + sealed class NeverPromise : IUniTaskSource + { + static readonly Action cancellationCallback = CancellationCallback; + + CancellationToken cancellationToken; + UniTaskCompletionSourceCore core; + + public NeverPromise(CancellationToken cancellationToken) + { + this.cancellationToken = cancellationToken; + if (this.cancellationToken.CanBeCanceled) + { + this.cancellationToken.RegisterWithoutCaptureExecutionContext(cancellationCallback, this); + } + } + + static void CancellationCallback(object state) + { + var self = (NeverPromise)state; + self.core.TrySetCanceled(self.cancellationToken); + } + + public T GetResult(short token) + { + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + void IUniTaskSource.GetResult(short token) + { + core.GetResult(token); + } + } + } + + internal static class CompletedTasks + { + public static readonly UniTask AsyncUnit = UniTask.FromResult(Cysharp.Threading.Tasks.AsyncUnit.Default); + public static readonly UniTask True = UniTask.FromResult(true); + public static readonly UniTask False = UniTask.FromResult(false); + public static readonly UniTask Zero = UniTask.FromResult(0); + public static readonly UniTask MinusOne = UniTask.FromResult(-1); + public static readonly UniTask One = UniTask.FromResult(1); + } +} diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.Factory.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTask.Factory.cs.meta new file mode 100644 index 0000000..31bc0c9 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.Factory.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4e12b66d6b9bd7845b04a594cbe386b4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.Run.cs b/Assets/Plugins/UniTask/Runtime/UniTask.Run.cs new file mode 100644 index 0000000..ac3e795 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.Run.cs @@ -0,0 +1,289 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + public partial struct UniTask + { + #region OBSOLETE_RUN + + [Obsolete("UniTask.Run is similar as Task.Run, it uses ThreadPool. For equivalent behaviour, use UniTask.RunOnThreadPool instead. If you don't want to use ThreadPool, you can use UniTask.Void(async void) or UniTask.Create(async UniTask) too.")] + public static UniTask Run(Action action, bool configureAwait = true, CancellationToken cancellationToken = default) + { + return RunOnThreadPool(action, configureAwait, cancellationToken); + } + + [Obsolete("UniTask.Run is similar as Task.Run, it uses ThreadPool. For equivalent behaviour, use UniTask.RunOnThreadPool instead. If you don't want to use ThreadPool, you can use UniTask.Void(async void) or UniTask.Create(async UniTask) too.")] + public static UniTask Run(Action action, object state, bool configureAwait = true, CancellationToken cancellationToken = default) + { + return RunOnThreadPool(action, state, configureAwait, cancellationToken); + } + + [Obsolete("UniTask.Run is similar as Task.Run, it uses ThreadPool. For equivalent behaviour, use UniTask.RunOnThreadPool instead. If you don't want to use ThreadPool, you can use UniTask.Void(async void) or UniTask.Create(async UniTask) too.")] + public static UniTask Run(Func action, bool configureAwait = true, CancellationToken cancellationToken = default) + { + return RunOnThreadPool(action, configureAwait, cancellationToken); + } + + [Obsolete("UniTask.Run is similar as Task.Run, it uses ThreadPool. For equivalent behaviour, use UniTask.RunOnThreadPool instead. If you don't want to use ThreadPool, you can use UniTask.Void(async void) or UniTask.Create(async UniTask) too.")] + public static UniTask Run(Func action, object state, bool configureAwait = true, CancellationToken cancellationToken = default) + { + return RunOnThreadPool(action, state, configureAwait, cancellationToken); + } + + [Obsolete("UniTask.Run is similar as Task.Run, it uses ThreadPool. For equivalent behaviour, use UniTask.RunOnThreadPool instead. If you don't want to use ThreadPool, you can use UniTask.Void(async void) or UniTask.Create(async UniTask) too.")] + public static UniTask Run(Func func, bool configureAwait = true, CancellationToken cancellationToken = default) + { + return RunOnThreadPool(func, configureAwait, cancellationToken); + } + + [Obsolete("UniTask.Run is similar as Task.Run, it uses ThreadPool. For equivalent behaviour, use UniTask.RunOnThreadPool instead. If you don't want to use ThreadPool, you can use UniTask.Void(async void) or UniTask.Create(async UniTask) too.")] + public static UniTask Run(Func> func, bool configureAwait = true, CancellationToken cancellationToken = default) + { + return RunOnThreadPool(func, configureAwait, cancellationToken); + } + + [Obsolete("UniTask.Run is similar as Task.Run, it uses ThreadPool. For equivalent behaviour, use UniTask.RunOnThreadPool instead. If you don't want to use ThreadPool, you can use UniTask.Void(async void) or UniTask.Create(async UniTask) too.")] + public static UniTask Run(Func func, object state, bool configureAwait = true, CancellationToken cancellationToken = default) + { + return RunOnThreadPool(func, state, configureAwait, cancellationToken); + } + + [Obsolete("UniTask.Run is similar as Task.Run, it uses ThreadPool. For equivalent behaviour, use UniTask.RunOnThreadPool instead. If you don't want to use ThreadPool, you can use UniTask.Void(async void) or UniTask.Create(async UniTask) too.")] + public static UniTask Run(Func> func, object state, bool configureAwait = true, CancellationToken cancellationToken = default) + { + return RunOnThreadPool(func, state, configureAwait, cancellationToken); + } + + #endregion + + /// Run action on the threadPool and return to main thread if configureAwait = true. + public static async UniTask RunOnThreadPool(Action action, bool configureAwait = true, CancellationToken cancellationToken = default) + { + cancellationToken.ThrowIfCancellationRequested(); + + await UniTask.SwitchToThreadPool(); + + cancellationToken.ThrowIfCancellationRequested(); + + if (configureAwait) + { + try + { + action(); + } + finally + { + await UniTask.Yield(); + } + } + else + { + action(); + } + + cancellationToken.ThrowIfCancellationRequested(); + } + + /// Run action on the threadPool and return to main thread if configureAwait = true. + public static async UniTask RunOnThreadPool(Action action, object state, bool configureAwait = true, CancellationToken cancellationToken = default) + { + cancellationToken.ThrowIfCancellationRequested(); + + await UniTask.SwitchToThreadPool(); + + cancellationToken.ThrowIfCancellationRequested(); + + if (configureAwait) + { + try + { + action(state); + } + finally + { + await UniTask.Yield(); + } + } + else + { + action(state); + } + + cancellationToken.ThrowIfCancellationRequested(); + } + + /// Run action on the threadPool and return to main thread if configureAwait = true. + public static async UniTask RunOnThreadPool(Func action, bool configureAwait = true, CancellationToken cancellationToken = default) + { + cancellationToken.ThrowIfCancellationRequested(); + + await UniTask.SwitchToThreadPool(); + + cancellationToken.ThrowIfCancellationRequested(); + + if (configureAwait) + { + try + { + await action(); + } + finally + { + await UniTask.Yield(); + } + } + else + { + await action(); + } + + cancellationToken.ThrowIfCancellationRequested(); + } + + /// Run action on the threadPool and return to main thread if configureAwait = true. + public static async UniTask RunOnThreadPool(Func action, object state, bool configureAwait = true, CancellationToken cancellationToken = default) + { + cancellationToken.ThrowIfCancellationRequested(); + + await UniTask.SwitchToThreadPool(); + + cancellationToken.ThrowIfCancellationRequested(); + + if (configureAwait) + { + try + { + await action(state); + } + finally + { + await UniTask.Yield(); + } + } + else + { + await action(state); + } + + cancellationToken.ThrowIfCancellationRequested(); + } + + /// Run action on the threadPool and return to main thread if configureAwait = true. + public static async UniTask RunOnThreadPool(Func func, bool configureAwait = true, CancellationToken cancellationToken = default) + { + cancellationToken.ThrowIfCancellationRequested(); + + await UniTask.SwitchToThreadPool(); + + cancellationToken.ThrowIfCancellationRequested(); + + if (configureAwait) + { + try + { + return func(); + } + finally + { + await UniTask.Yield(); + cancellationToken.ThrowIfCancellationRequested(); + } + } + else + { + return func(); + } + } + + /// Run action on the threadPool and return to main thread if configureAwait = true. + public static async UniTask RunOnThreadPool(Func> func, bool configureAwait = true, CancellationToken cancellationToken = default) + { + cancellationToken.ThrowIfCancellationRequested(); + + await UniTask.SwitchToThreadPool(); + + cancellationToken.ThrowIfCancellationRequested(); + + if (configureAwait) + { + try + { + return await func(); + } + finally + { + cancellationToken.ThrowIfCancellationRequested(); + await UniTask.Yield(); + cancellationToken.ThrowIfCancellationRequested(); + } + } + else + { + var result = await func(); + cancellationToken.ThrowIfCancellationRequested(); + return result; + } + } + + /// Run action on the threadPool and return to main thread if configureAwait = true. + public static async UniTask RunOnThreadPool(Func func, object state, bool configureAwait = true, CancellationToken cancellationToken = default) + { + cancellationToken.ThrowIfCancellationRequested(); + + await UniTask.SwitchToThreadPool(); + + cancellationToken.ThrowIfCancellationRequested(); + + if (configureAwait) + { + try + { + return func(state); + } + finally + { + await UniTask.Yield(); + cancellationToken.ThrowIfCancellationRequested(); + } + } + else + { + return func(state); + } + } + + /// Run action on the threadPool and return to main thread if configureAwait = true. + public static async UniTask RunOnThreadPool(Func> func, object state, bool configureAwait = true, CancellationToken cancellationToken = default) + { + cancellationToken.ThrowIfCancellationRequested(); + + await UniTask.SwitchToThreadPool(); + + cancellationToken.ThrowIfCancellationRequested(); + + if (configureAwait) + { + try + { + return await func(state); + } + finally + { + cancellationToken.ThrowIfCancellationRequested(); + await UniTask.Yield(); + cancellationToken.ThrowIfCancellationRequested(); + } + } + else + { + var result = await func(state); + cancellationToken.ThrowIfCancellationRequested(); + return result; + } + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.Run.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTask.Run.cs.meta new file mode 100644 index 0000000..9a780ae --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.Run.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8473162fc285a5f44bcca90f7da073e7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.Threading.cs b/Assets/Plugins/UniTask/Runtime/UniTask.Threading.cs new file mode 100644 index 0000000..71d6aec --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.Threading.cs @@ -0,0 +1,412 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Runtime.CompilerServices; +using System.Threading; +using System.Threading.Tasks; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks +{ + public partial struct UniTask + { +#if UNITY_2018_3_OR_NEWER + + /// + /// If running on mainthread, do nothing. Otherwise, same as UniTask.Yield(PlayerLoopTiming.Update). + /// + public static SwitchToMainThreadAwaitable SwitchToMainThread(CancellationToken cancellationToken = default) + { + return new SwitchToMainThreadAwaitable(PlayerLoopTiming.Update, cancellationToken); + } + + /// + /// If running on mainthread, do nothing. Otherwise, same as UniTask.Yield(timing). + /// + public static SwitchToMainThreadAwaitable SwitchToMainThread(PlayerLoopTiming timing, CancellationToken cancellationToken = default) + { + return new SwitchToMainThreadAwaitable(timing, cancellationToken); + } + + /// + /// Return to mainthread(same as await SwitchToMainThread) after using scope is closed. + /// + public static ReturnToMainThread ReturnToMainThread(CancellationToken cancellationToken = default) + { + return new ReturnToMainThread(PlayerLoopTiming.Update, cancellationToken); + } + + /// + /// Return to mainthread(same as await SwitchToMainThread) after using scope is closed. + /// + public static ReturnToMainThread ReturnToMainThread(PlayerLoopTiming timing, CancellationToken cancellationToken = default) + { + return new ReturnToMainThread(timing, cancellationToken); + } + + /// + /// Queue the action to PlayerLoop. + /// + public static void Post(Action action, PlayerLoopTiming timing = PlayerLoopTiming.Update) + { + PlayerLoopHelper.AddContinuation(timing, action); + } + +#endif + + public static SwitchToThreadPoolAwaitable SwitchToThreadPool() + { + return new SwitchToThreadPoolAwaitable(); + } + + /// + /// Note: use SwitchToThreadPool is recommended. + /// + public static SwitchToTaskPoolAwaitable SwitchToTaskPool() + { + return new SwitchToTaskPoolAwaitable(); + } + + public static SwitchToSynchronizationContextAwaitable SwitchToSynchronizationContext(SynchronizationContext synchronizationContext, CancellationToken cancellationToken = default) + { + Error.ThrowArgumentNullException(synchronizationContext, nameof(synchronizationContext)); + return new SwitchToSynchronizationContextAwaitable(synchronizationContext, cancellationToken); + } + + public static ReturnToSynchronizationContext ReturnToSynchronizationContext(SynchronizationContext synchronizationContext, CancellationToken cancellationToken = default) + { + return new ReturnToSynchronizationContext(synchronizationContext, false, cancellationToken); + } + + public static ReturnToSynchronizationContext ReturnToCurrentSynchronizationContext(bool dontPostWhenSameContext = true, CancellationToken cancellationToken = default) + { + return new ReturnToSynchronizationContext(SynchronizationContext.Current, dontPostWhenSameContext, cancellationToken); + } + } + +#if UNITY_2018_3_OR_NEWER + + public struct SwitchToMainThreadAwaitable + { + readonly PlayerLoopTiming playerLoopTiming; + readonly CancellationToken cancellationToken; + + public SwitchToMainThreadAwaitable(PlayerLoopTiming playerLoopTiming, CancellationToken cancellationToken) + { + this.playerLoopTiming = playerLoopTiming; + this.cancellationToken = cancellationToken; + } + + public Awaiter GetAwaiter() => new Awaiter(playerLoopTiming, cancellationToken); + + public struct Awaiter : ICriticalNotifyCompletion + { + readonly PlayerLoopTiming playerLoopTiming; + readonly CancellationToken cancellationToken; + + public Awaiter(PlayerLoopTiming playerLoopTiming, CancellationToken cancellationToken) + { + this.playerLoopTiming = playerLoopTiming; + this.cancellationToken = cancellationToken; + } + + public bool IsCompleted + { + get + { + var currentThreadId = System.Threading.Thread.CurrentThread.ManagedThreadId; + if (PlayerLoopHelper.MainThreadId == currentThreadId) + { + return true; // run immediate. + } + else + { + return false; // register continuation. + } + } + } + + public void GetResult() { cancellationToken.ThrowIfCancellationRequested(); } + + public void OnCompleted(Action continuation) + { + PlayerLoopHelper.AddContinuation(playerLoopTiming, continuation); + } + + public void UnsafeOnCompleted(Action continuation) + { + PlayerLoopHelper.AddContinuation(playerLoopTiming, continuation); + } + } + } + + public struct ReturnToMainThread + { + readonly PlayerLoopTiming playerLoopTiming; + readonly CancellationToken cancellationToken; + + public ReturnToMainThread(PlayerLoopTiming playerLoopTiming, CancellationToken cancellationToken) + { + this.playerLoopTiming = playerLoopTiming; + this.cancellationToken = cancellationToken; + } + + public Awaiter DisposeAsync() + { + return new Awaiter(playerLoopTiming, cancellationToken); // run immediate. + } + + public readonly struct Awaiter : ICriticalNotifyCompletion + { + readonly PlayerLoopTiming timing; + readonly CancellationToken cancellationToken; + + public Awaiter(PlayerLoopTiming timing, CancellationToken cancellationToken) + { + this.timing = timing; + this.cancellationToken = cancellationToken; + } + + public Awaiter GetAwaiter() => this; + + public bool IsCompleted => PlayerLoopHelper.MainThreadId == System.Threading.Thread.CurrentThread.ManagedThreadId; + + public void GetResult() { cancellationToken.ThrowIfCancellationRequested(); } + + public void OnCompleted(Action continuation) + { + PlayerLoopHelper.AddContinuation(timing, continuation); + } + + public void UnsafeOnCompleted(Action continuation) + { + PlayerLoopHelper.AddContinuation(timing, continuation); + } + } + } + +#endif + + public struct SwitchToThreadPoolAwaitable + { + public Awaiter GetAwaiter() => new Awaiter(); + + public struct Awaiter : ICriticalNotifyCompletion + { + static readonly WaitCallback switchToCallback = Callback; + + public bool IsCompleted => false; + public void GetResult() { } + + public void OnCompleted(Action continuation) + { + ThreadPool.QueueUserWorkItem(switchToCallback, continuation); + } + + public void UnsafeOnCompleted(Action continuation) + { +#if NETCOREAPP3_1 + ThreadPool.UnsafeQueueUserWorkItem(ThreadPoolWorkItem.Create(continuation), false); +#else + ThreadPool.UnsafeQueueUserWorkItem(switchToCallback, continuation); +#endif + } + + static void Callback(object state) + { + var continuation = (Action)state; + continuation(); + } + } + +#if NETCOREAPP3_1 + + sealed class ThreadPoolWorkItem : IThreadPoolWorkItem, ITaskPoolNode + { + static TaskPool pool; + ThreadPoolWorkItem nextNode; + public ref ThreadPoolWorkItem NextNode => ref nextNode; + + static ThreadPoolWorkItem() + { + TaskPool.RegisterSizeGetter(typeof(ThreadPoolWorkItem), () => pool.Size); + } + + Action continuation; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ThreadPoolWorkItem Create(Action continuation) + { + if (!pool.TryPop(out var item)) + { + item = new ThreadPoolWorkItem(); + } + + item.continuation = continuation; + return item; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Execute() + { + var call = continuation; + continuation = null; + if (call != null) + { + pool.TryPush(this); + call.Invoke(); + } + } + } + +#endif + } + + public struct SwitchToTaskPoolAwaitable + { + public Awaiter GetAwaiter() => new Awaiter(); + + public struct Awaiter : ICriticalNotifyCompletion + { + static readonly Action switchToCallback = Callback; + + public bool IsCompleted => false; + public void GetResult() { } + + public void OnCompleted(Action continuation) + { + Task.Factory.StartNew(switchToCallback, continuation, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); + } + + public void UnsafeOnCompleted(Action continuation) + { + Task.Factory.StartNew(switchToCallback, continuation, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); + } + + static void Callback(object state) + { + var continuation = (Action)state; + continuation(); + } + } + } + + public struct SwitchToSynchronizationContextAwaitable + { + readonly SynchronizationContext synchronizationContext; + readonly CancellationToken cancellationToken; + + public SwitchToSynchronizationContextAwaitable(SynchronizationContext synchronizationContext, CancellationToken cancellationToken) + { + this.synchronizationContext = synchronizationContext; + this.cancellationToken = cancellationToken; + } + + public Awaiter GetAwaiter() => new Awaiter(synchronizationContext, cancellationToken); + + public struct Awaiter : ICriticalNotifyCompletion + { + static readonly SendOrPostCallback switchToCallback = Callback; + readonly SynchronizationContext synchronizationContext; + readonly CancellationToken cancellationToken; + + public Awaiter(SynchronizationContext synchronizationContext, CancellationToken cancellationToken) + { + this.synchronizationContext = synchronizationContext; + this.cancellationToken = cancellationToken; + } + + public bool IsCompleted => false; + public void GetResult() { cancellationToken.ThrowIfCancellationRequested(); } + + public void OnCompleted(Action continuation) + { + synchronizationContext.Post(switchToCallback, continuation); + } + + public void UnsafeOnCompleted(Action continuation) + { + synchronizationContext.Post(switchToCallback, continuation); + } + + static void Callback(object state) + { + var continuation = (Action)state; + continuation(); + } + } + } + + public struct ReturnToSynchronizationContext + { + readonly SynchronizationContext syncContext; + readonly bool dontPostWhenSameContext; + readonly CancellationToken cancellationToken; + + public ReturnToSynchronizationContext(SynchronizationContext syncContext, bool dontPostWhenSameContext, CancellationToken cancellationToken) + { + this.syncContext = syncContext; + this.dontPostWhenSameContext = dontPostWhenSameContext; + this.cancellationToken = cancellationToken; + } + + public Awaiter DisposeAsync() + { + return new Awaiter(syncContext, dontPostWhenSameContext, cancellationToken); + } + + public struct Awaiter : ICriticalNotifyCompletion + { + static readonly SendOrPostCallback switchToCallback = Callback; + + readonly SynchronizationContext synchronizationContext; + readonly bool dontPostWhenSameContext; + readonly CancellationToken cancellationToken; + + public Awaiter(SynchronizationContext synchronizationContext, bool dontPostWhenSameContext, CancellationToken cancellationToken) + { + this.synchronizationContext = synchronizationContext; + this.dontPostWhenSameContext = dontPostWhenSameContext; + this.cancellationToken = cancellationToken; + } + + public Awaiter GetAwaiter() => this; + + public bool IsCompleted + { + get + { + if (!dontPostWhenSameContext) return false; + + var current = SynchronizationContext.Current; + if (current == synchronizationContext) + { + return true; + } + else + { + return false; + } + } + } + + public void GetResult() { cancellationToken.ThrowIfCancellationRequested(); } + + public void OnCompleted(Action continuation) + { + synchronizationContext.Post(switchToCallback, continuation); + } + + public void UnsafeOnCompleted(Action continuation) + { + synchronizationContext.Post(switchToCallback, continuation); + } + + static void Callback(object state) + { + var continuation = (Action)state; + continuation(); + } + } + } +} diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.Threading.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTask.Threading.cs.meta new file mode 100644 index 0000000..fa512b8 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.Threading.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4132ea600454134439fa2c7eb931b5e6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.WaitUntil.cs b/Assets/Plugins/UniTask/Runtime/UniTask.WaitUntil.cs new file mode 100644 index 0000000..d126199 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.WaitUntil.cs @@ -0,0 +1,666 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Collections.Generic; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks +{ + public partial struct UniTask + { + public static UniTask WaitUntil(Func predicate, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + return new UniTask(WaitUntilPromise.Create(predicate, timing, cancellationToken, cancelImmediately, out var token), token); + } + + public static UniTask WaitWhile(Func predicate, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + return new UniTask(WaitWhilePromise.Create(predicate, timing, cancellationToken, cancelImmediately, out var token), token); + } + + public static UniTask WaitUntilCanceled(CancellationToken cancellationToken, PlayerLoopTiming timing = PlayerLoopTiming.Update, bool completeImmediately = false) + { + return new UniTask(WaitUntilCanceledPromise.Create(cancellationToken, timing, completeImmediately, out var token), token); + } + + public static UniTask WaitUntilValueChanged(T target, Func monitorFunction, PlayerLoopTiming monitorTiming = PlayerLoopTiming.Update, IEqualityComparer equalityComparer = null, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + where T : class + { + var unityObject = target as UnityEngine.Object; + var isUnityObject = target is UnityEngine.Object; // don't use (unityObject == null) + + return new UniTask(isUnityObject + ? WaitUntilValueChangedUnityObjectPromise.Create(target, monitorFunction, equalityComparer, monitorTiming, cancellationToken, cancelImmediately, out var token) + : WaitUntilValueChangedStandardObjectPromise.Create(target, monitorFunction, equalityComparer, monitorTiming, cancellationToken, cancelImmediately, out token), token); + } + + sealed class WaitUntilPromise : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + WaitUntilPromise nextNode; + public ref WaitUntilPromise NextNode => ref nextNode; + + static WaitUntilPromise() + { + TaskPool.RegisterSizeGetter(typeof(WaitUntilPromise), () => pool.Size); + } + + Func predicate; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + + UniTaskCompletionSourceCore core; + + WaitUntilPromise() + { + } + + public static IUniTaskSource Create(Func predicate, PlayerLoopTiming timing, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new WaitUntilPromise(); + } + + result.predicate = predicate; + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (WaitUntilPromise)state; + promise.core.TrySetCanceled(promise.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + try + { + if (!predicate()) + { + return true; + } + } + catch (Exception ex) + { + core.TrySetException(ex); + return false; + } + + core.TrySetResult(null); + return false; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + predicate = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + } + + sealed class WaitWhilePromise : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + WaitWhilePromise nextNode; + public ref WaitWhilePromise NextNode => ref nextNode; + + static WaitWhilePromise() + { + TaskPool.RegisterSizeGetter(typeof(WaitWhilePromise), () => pool.Size); + } + + Func predicate; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + + UniTaskCompletionSourceCore core; + + WaitWhilePromise() + { + } + + public static IUniTaskSource Create(Func predicate, PlayerLoopTiming timing, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new WaitWhilePromise(); + } + + result.predicate = predicate; + result.cancellationToken = cancellationToken; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (WaitWhilePromise)state; + promise.core.TrySetCanceled(promise.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + try + { + if (predicate()) + { + return true; + } + } + catch (Exception ex) + { + core.TrySetException(ex); + return false; + } + + core.TrySetResult(null); + return false; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + predicate = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + } + + sealed class WaitUntilCanceledPromise : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + WaitUntilCanceledPromise nextNode; + public ref WaitUntilCanceledPromise NextNode => ref nextNode; + + static WaitUntilCanceledPromise() + { + TaskPool.RegisterSizeGetter(typeof(WaitUntilCanceledPromise), () => pool.Size); + } + + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + + UniTaskCompletionSourceCore core; + + WaitUntilCanceledPromise() + { + } + + public static IUniTaskSource Create(CancellationToken cancellationToken, PlayerLoopTiming timing, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new WaitUntilCanceledPromise(); + } + + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (WaitUntilCanceledPromise)state; + promise.core.TrySetResult(null); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (cancellationToken.IsCancellationRequested) + { + core.TrySetResult(null); + return false; + } + + return true; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + } + + // where T : UnityEngine.Object, can not add constraint + sealed class WaitUntilValueChangedUnityObjectPromise : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode> + { + static TaskPool> pool; + WaitUntilValueChangedUnityObjectPromise nextNode; + public ref WaitUntilValueChangedUnityObjectPromise NextNode => ref nextNode; + + static WaitUntilValueChangedUnityObjectPromise() + { + TaskPool.RegisterSizeGetter(typeof(WaitUntilValueChangedUnityObjectPromise), () => pool.Size); + } + + T target; + UnityEngine.Object targetAsUnityObject; + U currentValue; + Func monitorFunction; + IEqualityComparer equalityComparer; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + + UniTaskCompletionSourceCore core; + + WaitUntilValueChangedUnityObjectPromise() + { + } + + public static IUniTaskSource Create(T target, Func monitorFunction, IEqualityComparer equalityComparer, PlayerLoopTiming timing, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new WaitUntilValueChangedUnityObjectPromise(); + } + + result.target = target; + result.targetAsUnityObject = target as UnityEngine.Object; + result.monitorFunction = monitorFunction; + result.currentValue = monitorFunction(target); + result.equalityComparer = equalityComparer ?? UnityEqualityComparer.GetDefault(); + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (WaitUntilValueChangedUnityObjectPromise)state; + promise.core.TrySetCanceled(promise.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public U GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (cancellationToken.IsCancellationRequested || targetAsUnityObject == null) // destroyed = cancel. + { + core.TrySetCanceled(cancellationToken); + return false; + } + + U nextValue = default(U); + try + { + nextValue = monitorFunction(target); + if (equalityComparer.Equals(currentValue, nextValue)) + { + return true; + } + } + catch (Exception ex) + { + core.TrySetException(ex); + return false; + } + + core.TrySetResult(nextValue); + return false; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + target = default; + currentValue = default; + monitorFunction = default; + equalityComparer = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + } + + sealed class WaitUntilValueChangedStandardObjectPromise : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode> + where T : class + { + static TaskPool> pool; + WaitUntilValueChangedStandardObjectPromise nextNode; + public ref WaitUntilValueChangedStandardObjectPromise NextNode => ref nextNode; + + static WaitUntilValueChangedStandardObjectPromise() + { + TaskPool.RegisterSizeGetter(typeof(WaitUntilValueChangedStandardObjectPromise), () => pool.Size); + } + + WeakReference target; + U currentValue; + Func monitorFunction; + IEqualityComparer equalityComparer; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + + UniTaskCompletionSourceCore core; + + WaitUntilValueChangedStandardObjectPromise() + { + } + + public static IUniTaskSource Create(T target, Func monitorFunction, IEqualityComparer equalityComparer, PlayerLoopTiming timing, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new WaitUntilValueChangedStandardObjectPromise(); + } + + result.target = new WeakReference(target, false); // wrap in WeakReference. + result.monitorFunction = monitorFunction; + result.currentValue = monitorFunction(target); + result.equalityComparer = equalityComparer ?? UnityEqualityComparer.GetDefault(); + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (WaitUntilValueChangedStandardObjectPromise)state; + promise.core.TrySetCanceled(promise.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public U GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (cancellationToken.IsCancellationRequested || !target.TryGetTarget(out var t)) // doesn't find = cancel. + { + core.TrySetCanceled(cancellationToken); + return false; + } + + U nextValue = default(U); + try + { + nextValue = monitorFunction(t); + if (equalityComparer.Equals(currentValue, nextValue)) + { + return true; + } + } + catch (Exception ex) + { + core.TrySetException(ex); + return false; + } + + core.TrySetResult(nextValue); + return false; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + target = default; + currentValue = default; + monitorFunction = default; + equalityComparer = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + } + } +} diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.WaitUntil.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTask.WaitUntil.cs.meta new file mode 100644 index 0000000..6e64dc7 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.WaitUntil.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 87c9c533491903a4288536b5ac173db8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.Generated.cs b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.Generated.cs new file mode 100644 index 0000000..9ef07d6 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.Generated.cs @@ -0,0 +1,5011 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member +using System; +using System.Runtime.CompilerServices; +using System.Runtime.ExceptionServices; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks +{ + public partial struct UniTask + { + + public static UniTask<(T1, T2)> WhenAll(UniTask task1, UniTask task2) + { + if (task1.Status.IsCompletedSuccessfully() && task2.Status.IsCompletedSuccessfully()) + { + return new UniTask<(T1, T2)>((task1.GetAwaiter().GetResult(), task2.GetAwaiter().GetResult())); + } + + return new UniTask<(T1, T2)>(new WhenAllPromise(task1, task2), 0); + } + + sealed class WhenAllPromise : IUniTaskSource<(T1, T2)> + { + T1 t1 = default; + T2 t2 = default; + int completedCount; + UniTaskCompletionSourceCore<(T1, T2)> core; + + public WhenAllPromise(UniTask task1, UniTask task2) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t1 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 2) + { + self.core.TrySetResult((self.t1, self.t2)); + } + } + + static void TryInvokeContinuationT2(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t2 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 2) + { + self.core.TrySetResult((self.t1, self.t2)); + } + } + + + public (T1, T2) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public static UniTask<(T1, T2, T3)> WhenAll(UniTask task1, UniTask task2, UniTask task3) + { + if (task1.Status.IsCompletedSuccessfully() && task2.Status.IsCompletedSuccessfully() && task3.Status.IsCompletedSuccessfully()) + { + return new UniTask<(T1, T2, T3)>((task1.GetAwaiter().GetResult(), task2.GetAwaiter().GetResult(), task3.GetAwaiter().GetResult())); + } + + return new UniTask<(T1, T2, T3)>(new WhenAllPromise(task1, task2, task3), 0); + } + + sealed class WhenAllPromise : IUniTaskSource<(T1, T2, T3)> + { + T1 t1 = default; + T2 t2 = default; + T3 t3 = default; + int completedCount; + UniTaskCompletionSourceCore<(T1, T2, T3)> core; + + public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t1 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 3) + { + self.core.TrySetResult((self.t1, self.t2, self.t3)); + } + } + + static void TryInvokeContinuationT2(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t2 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 3) + { + self.core.TrySetResult((self.t1, self.t2, self.t3)); + } + } + + static void TryInvokeContinuationT3(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t3 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 3) + { + self.core.TrySetResult((self.t1, self.t2, self.t3)); + } + } + + + public (T1, T2, T3) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public static UniTask<(T1, T2, T3, T4)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4) + { + if (task1.Status.IsCompletedSuccessfully() && task2.Status.IsCompletedSuccessfully() && task3.Status.IsCompletedSuccessfully() && task4.Status.IsCompletedSuccessfully()) + { + return new UniTask<(T1, T2, T3, T4)>((task1.GetAwaiter().GetResult(), task2.GetAwaiter().GetResult(), task3.GetAwaiter().GetResult(), task4.GetAwaiter().GetResult())); + } + + return new UniTask<(T1, T2, T3, T4)>(new WhenAllPromise(task1, task2, task3, task4), 0); + } + + sealed class WhenAllPromise : IUniTaskSource<(T1, T2, T3, T4)> + { + T1 t1 = default; + T2 t2 = default; + T3 t3 = default; + T4 t4 = default; + int completedCount; + UniTaskCompletionSourceCore<(T1, T2, T3, T4)> core; + + public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t1 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 4) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4)); + } + } + + static void TryInvokeContinuationT2(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t2 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 4) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4)); + } + } + + static void TryInvokeContinuationT3(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t3 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 4) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4)); + } + } + + static void TryInvokeContinuationT4(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t4 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 4) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4)); + } + } + + + public (T1, T2, T3, T4) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public static UniTask<(T1, T2, T3, T4, T5)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5) + { + if (task1.Status.IsCompletedSuccessfully() && task2.Status.IsCompletedSuccessfully() && task3.Status.IsCompletedSuccessfully() && task4.Status.IsCompletedSuccessfully() && task5.Status.IsCompletedSuccessfully()) + { + return new UniTask<(T1, T2, T3, T4, T5)>((task1.GetAwaiter().GetResult(), task2.GetAwaiter().GetResult(), task3.GetAwaiter().GetResult(), task4.GetAwaiter().GetResult(), task5.GetAwaiter().GetResult())); + } + + return new UniTask<(T1, T2, T3, T4, T5)>(new WhenAllPromise(task1, task2, task3, task4, task5), 0); + } + + sealed class WhenAllPromise : IUniTaskSource<(T1, T2, T3, T4, T5)> + { + T1 t1 = default; + T2 t2 = default; + T3 t3 = default; + T4 t4 = default; + T5 t5 = default; + int completedCount; + UniTaskCompletionSourceCore<(T1, T2, T3, T4, T5)> core; + + public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t1 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 5) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5)); + } + } + + static void TryInvokeContinuationT2(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t2 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 5) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5)); + } + } + + static void TryInvokeContinuationT3(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t3 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 5) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5)); + } + } + + static void TryInvokeContinuationT4(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t4 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 5) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5)); + } + } + + static void TryInvokeContinuationT5(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t5 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 5) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5)); + } + } + + + public (T1, T2, T3, T4, T5) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public static UniTask<(T1, T2, T3, T4, T5, T6)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6) + { + if (task1.Status.IsCompletedSuccessfully() && task2.Status.IsCompletedSuccessfully() && task3.Status.IsCompletedSuccessfully() && task4.Status.IsCompletedSuccessfully() && task5.Status.IsCompletedSuccessfully() && task6.Status.IsCompletedSuccessfully()) + { + return new UniTask<(T1, T2, T3, T4, T5, T6)>((task1.GetAwaiter().GetResult(), task2.GetAwaiter().GetResult(), task3.GetAwaiter().GetResult(), task4.GetAwaiter().GetResult(), task5.GetAwaiter().GetResult(), task6.GetAwaiter().GetResult())); + } + + return new UniTask<(T1, T2, T3, T4, T5, T6)>(new WhenAllPromise(task1, task2, task3, task4, task5, task6), 0); + } + + sealed class WhenAllPromise : IUniTaskSource<(T1, T2, T3, T4, T5, T6)> + { + T1 t1 = default; + T2 t2 = default; + T3 t3 = default; + T4 t4 = default; + T5 t5 = default; + T6 t6 = default; + int completedCount; + UniTaskCompletionSourceCore<(T1, T2, T3, T4, T5, T6)> core; + + public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t1 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 6) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6)); + } + } + + static void TryInvokeContinuationT2(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t2 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 6) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6)); + } + } + + static void TryInvokeContinuationT3(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t3 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 6) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6)); + } + } + + static void TryInvokeContinuationT4(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t4 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 6) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6)); + } + } + + static void TryInvokeContinuationT5(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t5 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 6) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6)); + } + } + + static void TryInvokeContinuationT6(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t6 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 6) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6)); + } + } + + + public (T1, T2, T3, T4, T5, T6) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7) + { + if (task1.Status.IsCompletedSuccessfully() && task2.Status.IsCompletedSuccessfully() && task3.Status.IsCompletedSuccessfully() && task4.Status.IsCompletedSuccessfully() && task5.Status.IsCompletedSuccessfully() && task6.Status.IsCompletedSuccessfully() && task7.Status.IsCompletedSuccessfully()) + { + return new UniTask<(T1, T2, T3, T4, T5, T6, T7)>((task1.GetAwaiter().GetResult(), task2.GetAwaiter().GetResult(), task3.GetAwaiter().GetResult(), task4.GetAwaiter().GetResult(), task5.GetAwaiter().GetResult(), task6.GetAwaiter().GetResult(), task7.GetAwaiter().GetResult())); + } + + return new UniTask<(T1, T2, T3, T4, T5, T6, T7)>(new WhenAllPromise(task1, task2, task3, task4, task5, task6, task7), 0); + } + + sealed class WhenAllPromise : IUniTaskSource<(T1, T2, T3, T4, T5, T6, T7)> + { + T1 t1 = default; + T2 t2 = default; + T3 t3 = default; + T4 t4 = default; + T5 t5 = default; + T6 t6 = default; + T7 t7 = default; + int completedCount; + UniTaskCompletionSourceCore<(T1, T2, T3, T4, T5, T6, T7)> core; + + public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t1 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 7) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7)); + } + } + + static void TryInvokeContinuationT2(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t2 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 7) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7)); + } + } + + static void TryInvokeContinuationT3(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t3 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 7) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7)); + } + } + + static void TryInvokeContinuationT4(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t4 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 7) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7)); + } + } + + static void TryInvokeContinuationT5(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t5 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 7) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7)); + } + } + + static void TryInvokeContinuationT6(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t6 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 7) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7)); + } + } + + static void TryInvokeContinuationT7(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t7 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 7) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7)); + } + } + + + public (T1, T2, T3, T4, T5, T6, T7) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8) + { + if (task1.Status.IsCompletedSuccessfully() && task2.Status.IsCompletedSuccessfully() && task3.Status.IsCompletedSuccessfully() && task4.Status.IsCompletedSuccessfully() && task5.Status.IsCompletedSuccessfully() && task6.Status.IsCompletedSuccessfully() && task7.Status.IsCompletedSuccessfully() && task8.Status.IsCompletedSuccessfully()) + { + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8)>((task1.GetAwaiter().GetResult(), task2.GetAwaiter().GetResult(), task3.GetAwaiter().GetResult(), task4.GetAwaiter().GetResult(), task5.GetAwaiter().GetResult(), task6.GetAwaiter().GetResult(), task7.GetAwaiter().GetResult(), task8.GetAwaiter().GetResult())); + } + + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8)>(new WhenAllPromise(task1, task2, task3, task4, task5, task6, task7, task8), 0); + } + + sealed class WhenAllPromise : IUniTaskSource<(T1, T2, T3, T4, T5, T6, T7, T8)> + { + T1 t1 = default; + T2 t2 = default; + T3 t3 = default; + T4 t4 = default; + T5 t5 = default; + T6 t6 = default; + T7 t7 = default; + T8 t8 = default; + int completedCount; + UniTaskCompletionSourceCore<(T1, T2, T3, T4, T5, T6, T7, T8)> core; + + public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t1 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 8) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8)); + } + } + + static void TryInvokeContinuationT2(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t2 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 8) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8)); + } + } + + static void TryInvokeContinuationT3(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t3 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 8) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8)); + } + } + + static void TryInvokeContinuationT4(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t4 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 8) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8)); + } + } + + static void TryInvokeContinuationT5(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t5 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 8) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8)); + } + } + + static void TryInvokeContinuationT6(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t6 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 8) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8)); + } + } + + static void TryInvokeContinuationT7(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t7 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 8) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8)); + } + } + + static void TryInvokeContinuationT8(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t8 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 8) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8)); + } + } + + + public (T1, T2, T3, T4, T5, T6, T7, T8) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9) + { + if (task1.Status.IsCompletedSuccessfully() && task2.Status.IsCompletedSuccessfully() && task3.Status.IsCompletedSuccessfully() && task4.Status.IsCompletedSuccessfully() && task5.Status.IsCompletedSuccessfully() && task6.Status.IsCompletedSuccessfully() && task7.Status.IsCompletedSuccessfully() && task8.Status.IsCompletedSuccessfully() && task9.Status.IsCompletedSuccessfully()) + { + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9)>((task1.GetAwaiter().GetResult(), task2.GetAwaiter().GetResult(), task3.GetAwaiter().GetResult(), task4.GetAwaiter().GetResult(), task5.GetAwaiter().GetResult(), task6.GetAwaiter().GetResult(), task7.GetAwaiter().GetResult(), task8.GetAwaiter().GetResult(), task9.GetAwaiter().GetResult())); + } + + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9)>(new WhenAllPromise(task1, task2, task3, task4, task5, task6, task7, task8, task9), 0); + } + + sealed class WhenAllPromise : IUniTaskSource<(T1, T2, T3, T4, T5, T6, T7, T8, T9)> + { + T1 t1 = default; + T2 t2 = default; + T3 t3 = default; + T4 t4 = default; + T5 t5 = default; + T6 t6 = default; + T7 t7 = default; + T8 t8 = default; + T9 t9 = default; + int completedCount; + UniTaskCompletionSourceCore<(T1, T2, T3, T4, T5, T6, T7, T8, T9)> core; + + public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task9.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT9(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT9(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t1 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 9) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9)); + } + } + + static void TryInvokeContinuationT2(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t2 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 9) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9)); + } + } + + static void TryInvokeContinuationT3(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t3 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 9) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9)); + } + } + + static void TryInvokeContinuationT4(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t4 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 9) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9)); + } + } + + static void TryInvokeContinuationT5(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t5 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 9) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9)); + } + } + + static void TryInvokeContinuationT6(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t6 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 9) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9)); + } + } + + static void TryInvokeContinuationT7(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t7 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 9) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9)); + } + } + + static void TryInvokeContinuationT8(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t8 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 9) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9)); + } + } + + static void TryInvokeContinuationT9(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t9 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 9) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9)); + } + } + + + public (T1, T2, T3, T4, T5, T6, T7, T8, T9) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10) + { + if (task1.Status.IsCompletedSuccessfully() && task2.Status.IsCompletedSuccessfully() && task3.Status.IsCompletedSuccessfully() && task4.Status.IsCompletedSuccessfully() && task5.Status.IsCompletedSuccessfully() && task6.Status.IsCompletedSuccessfully() && task7.Status.IsCompletedSuccessfully() && task8.Status.IsCompletedSuccessfully() && task9.Status.IsCompletedSuccessfully() && task10.Status.IsCompletedSuccessfully()) + { + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>((task1.GetAwaiter().GetResult(), task2.GetAwaiter().GetResult(), task3.GetAwaiter().GetResult(), task4.GetAwaiter().GetResult(), task5.GetAwaiter().GetResult(), task6.GetAwaiter().GetResult(), task7.GetAwaiter().GetResult(), task8.GetAwaiter().GetResult(), task9.GetAwaiter().GetResult(), task10.GetAwaiter().GetResult())); + } + + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>(new WhenAllPromise(task1, task2, task3, task4, task5, task6, task7, task8, task9, task10), 0); + } + + sealed class WhenAllPromise : IUniTaskSource<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> + { + T1 t1 = default; + T2 t2 = default; + T3 t3 = default; + T4 t4 = default; + T5 t5 = default; + T6 t6 = default; + T7 t7 = default; + T8 t8 = default; + T9 t9 = default; + T10 t10 = default; + int completedCount; + UniTaskCompletionSourceCore<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> core; + + public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task9.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT9(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT9(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task10.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT10(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT10(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t1 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 10) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10)); + } + } + + static void TryInvokeContinuationT2(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t2 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 10) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10)); + } + } + + static void TryInvokeContinuationT3(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t3 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 10) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10)); + } + } + + static void TryInvokeContinuationT4(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t4 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 10) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10)); + } + } + + static void TryInvokeContinuationT5(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t5 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 10) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10)); + } + } + + static void TryInvokeContinuationT6(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t6 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 10) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10)); + } + } + + static void TryInvokeContinuationT7(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t7 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 10) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10)); + } + } + + static void TryInvokeContinuationT8(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t8 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 10) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10)); + } + } + + static void TryInvokeContinuationT9(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t9 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 10) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10)); + } + } + + static void TryInvokeContinuationT10(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t10 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 10) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10)); + } + } + + + public (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11) + { + if (task1.Status.IsCompletedSuccessfully() && task2.Status.IsCompletedSuccessfully() && task3.Status.IsCompletedSuccessfully() && task4.Status.IsCompletedSuccessfully() && task5.Status.IsCompletedSuccessfully() && task6.Status.IsCompletedSuccessfully() && task7.Status.IsCompletedSuccessfully() && task8.Status.IsCompletedSuccessfully() && task9.Status.IsCompletedSuccessfully() && task10.Status.IsCompletedSuccessfully() && task11.Status.IsCompletedSuccessfully()) + { + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)>((task1.GetAwaiter().GetResult(), task2.GetAwaiter().GetResult(), task3.GetAwaiter().GetResult(), task4.GetAwaiter().GetResult(), task5.GetAwaiter().GetResult(), task6.GetAwaiter().GetResult(), task7.GetAwaiter().GetResult(), task8.GetAwaiter().GetResult(), task9.GetAwaiter().GetResult(), task10.GetAwaiter().GetResult(), task11.GetAwaiter().GetResult())); + } + + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)>(new WhenAllPromise(task1, task2, task3, task4, task5, task6, task7, task8, task9, task10, task11), 0); + } + + sealed class WhenAllPromise : IUniTaskSource<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> + { + T1 t1 = default; + T2 t2 = default; + T3 t3 = default; + T4 t4 = default; + T5 t5 = default; + T6 t6 = default; + T7 t7 = default; + T8 t8 = default; + T9 t9 = default; + T10 t10 = default; + T11 t11 = default; + int completedCount; + UniTaskCompletionSourceCore<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> core; + + public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task9.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT9(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT9(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task10.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT10(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT10(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task11.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT11(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT11(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t1 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 11) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11)); + } + } + + static void TryInvokeContinuationT2(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t2 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 11) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11)); + } + } + + static void TryInvokeContinuationT3(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t3 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 11) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11)); + } + } + + static void TryInvokeContinuationT4(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t4 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 11) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11)); + } + } + + static void TryInvokeContinuationT5(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t5 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 11) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11)); + } + } + + static void TryInvokeContinuationT6(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t6 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 11) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11)); + } + } + + static void TryInvokeContinuationT7(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t7 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 11) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11)); + } + } + + static void TryInvokeContinuationT8(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t8 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 11) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11)); + } + } + + static void TryInvokeContinuationT9(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t9 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 11) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11)); + } + } + + static void TryInvokeContinuationT10(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t10 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 11) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11)); + } + } + + static void TryInvokeContinuationT11(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t11 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 11) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11)); + } + } + + + public (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12) + { + if (task1.Status.IsCompletedSuccessfully() && task2.Status.IsCompletedSuccessfully() && task3.Status.IsCompletedSuccessfully() && task4.Status.IsCompletedSuccessfully() && task5.Status.IsCompletedSuccessfully() && task6.Status.IsCompletedSuccessfully() && task7.Status.IsCompletedSuccessfully() && task8.Status.IsCompletedSuccessfully() && task9.Status.IsCompletedSuccessfully() && task10.Status.IsCompletedSuccessfully() && task11.Status.IsCompletedSuccessfully() && task12.Status.IsCompletedSuccessfully()) + { + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)>((task1.GetAwaiter().GetResult(), task2.GetAwaiter().GetResult(), task3.GetAwaiter().GetResult(), task4.GetAwaiter().GetResult(), task5.GetAwaiter().GetResult(), task6.GetAwaiter().GetResult(), task7.GetAwaiter().GetResult(), task8.GetAwaiter().GetResult(), task9.GetAwaiter().GetResult(), task10.GetAwaiter().GetResult(), task11.GetAwaiter().GetResult(), task12.GetAwaiter().GetResult())); + } + + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)>(new WhenAllPromise(task1, task2, task3, task4, task5, task6, task7, task8, task9, task10, task11, task12), 0); + } + + sealed class WhenAllPromise : IUniTaskSource<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> + { + T1 t1 = default; + T2 t2 = default; + T3 t3 = default; + T4 t4 = default; + T5 t5 = default; + T6 t6 = default; + T7 t7 = default; + T8 t8 = default; + T9 t9 = default; + T10 t10 = default; + T11 t11 = default; + T12 t12 = default; + int completedCount; + UniTaskCompletionSourceCore<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> core; + + public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task9.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT9(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT9(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task10.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT10(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT10(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task11.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT11(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT11(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task12.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT12(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT12(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t1 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 12) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12)); + } + } + + static void TryInvokeContinuationT2(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t2 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 12) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12)); + } + } + + static void TryInvokeContinuationT3(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t3 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 12) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12)); + } + } + + static void TryInvokeContinuationT4(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t4 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 12) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12)); + } + } + + static void TryInvokeContinuationT5(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t5 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 12) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12)); + } + } + + static void TryInvokeContinuationT6(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t6 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 12) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12)); + } + } + + static void TryInvokeContinuationT7(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t7 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 12) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12)); + } + } + + static void TryInvokeContinuationT8(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t8 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 12) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12)); + } + } + + static void TryInvokeContinuationT9(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t9 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 12) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12)); + } + } + + static void TryInvokeContinuationT10(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t10 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 12) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12)); + } + } + + static void TryInvokeContinuationT11(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t11 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 12) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12)); + } + } + + static void TryInvokeContinuationT12(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t12 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 12) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12)); + } + } + + + public (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13) + { + if (task1.Status.IsCompletedSuccessfully() && task2.Status.IsCompletedSuccessfully() && task3.Status.IsCompletedSuccessfully() && task4.Status.IsCompletedSuccessfully() && task5.Status.IsCompletedSuccessfully() && task6.Status.IsCompletedSuccessfully() && task7.Status.IsCompletedSuccessfully() && task8.Status.IsCompletedSuccessfully() && task9.Status.IsCompletedSuccessfully() && task10.Status.IsCompletedSuccessfully() && task11.Status.IsCompletedSuccessfully() && task12.Status.IsCompletedSuccessfully() && task13.Status.IsCompletedSuccessfully()) + { + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)>((task1.GetAwaiter().GetResult(), task2.GetAwaiter().GetResult(), task3.GetAwaiter().GetResult(), task4.GetAwaiter().GetResult(), task5.GetAwaiter().GetResult(), task6.GetAwaiter().GetResult(), task7.GetAwaiter().GetResult(), task8.GetAwaiter().GetResult(), task9.GetAwaiter().GetResult(), task10.GetAwaiter().GetResult(), task11.GetAwaiter().GetResult(), task12.GetAwaiter().GetResult(), task13.GetAwaiter().GetResult())); + } + + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)>(new WhenAllPromise(task1, task2, task3, task4, task5, task6, task7, task8, task9, task10, task11, task12, task13), 0); + } + + sealed class WhenAllPromise : IUniTaskSource<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)> + { + T1 t1 = default; + T2 t2 = default; + T3 t3 = default; + T4 t4 = default; + T5 t5 = default; + T6 t6 = default; + T7 t7 = default; + T8 t8 = default; + T9 t9 = default; + T10 t10 = default; + T11 t11 = default; + T12 t12 = default; + T13 t13 = default; + int completedCount; + UniTaskCompletionSourceCore<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)> core; + + public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task9.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT9(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT9(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task10.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT10(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT10(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task11.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT11(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT11(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task12.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT12(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT12(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task13.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT13(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT13(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t1 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 13) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13)); + } + } + + static void TryInvokeContinuationT2(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t2 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 13) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13)); + } + } + + static void TryInvokeContinuationT3(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t3 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 13) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13)); + } + } + + static void TryInvokeContinuationT4(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t4 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 13) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13)); + } + } + + static void TryInvokeContinuationT5(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t5 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 13) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13)); + } + } + + static void TryInvokeContinuationT6(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t6 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 13) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13)); + } + } + + static void TryInvokeContinuationT7(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t7 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 13) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13)); + } + } + + static void TryInvokeContinuationT8(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t8 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 13) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13)); + } + } + + static void TryInvokeContinuationT9(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t9 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 13) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13)); + } + } + + static void TryInvokeContinuationT10(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t10 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 13) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13)); + } + } + + static void TryInvokeContinuationT11(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t11 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 13) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13)); + } + } + + static void TryInvokeContinuationT12(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t12 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 13) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13)); + } + } + + static void TryInvokeContinuationT13(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t13 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 13) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13)); + } + } + + + public (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14) + { + if (task1.Status.IsCompletedSuccessfully() && task2.Status.IsCompletedSuccessfully() && task3.Status.IsCompletedSuccessfully() && task4.Status.IsCompletedSuccessfully() && task5.Status.IsCompletedSuccessfully() && task6.Status.IsCompletedSuccessfully() && task7.Status.IsCompletedSuccessfully() && task8.Status.IsCompletedSuccessfully() && task9.Status.IsCompletedSuccessfully() && task10.Status.IsCompletedSuccessfully() && task11.Status.IsCompletedSuccessfully() && task12.Status.IsCompletedSuccessfully() && task13.Status.IsCompletedSuccessfully() && task14.Status.IsCompletedSuccessfully()) + { + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)>((task1.GetAwaiter().GetResult(), task2.GetAwaiter().GetResult(), task3.GetAwaiter().GetResult(), task4.GetAwaiter().GetResult(), task5.GetAwaiter().GetResult(), task6.GetAwaiter().GetResult(), task7.GetAwaiter().GetResult(), task8.GetAwaiter().GetResult(), task9.GetAwaiter().GetResult(), task10.GetAwaiter().GetResult(), task11.GetAwaiter().GetResult(), task12.GetAwaiter().GetResult(), task13.GetAwaiter().GetResult(), task14.GetAwaiter().GetResult())); + } + + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)>(new WhenAllPromise(task1, task2, task3, task4, task5, task6, task7, task8, task9, task10, task11, task12, task13, task14), 0); + } + + sealed class WhenAllPromise : IUniTaskSource<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)> + { + T1 t1 = default; + T2 t2 = default; + T3 t3 = default; + T4 t4 = default; + T5 t5 = default; + T6 t6 = default; + T7 t7 = default; + T8 t8 = default; + T9 t9 = default; + T10 t10 = default; + T11 t11 = default; + T12 t12 = default; + T13 t13 = default; + T14 t14 = default; + int completedCount; + UniTaskCompletionSourceCore<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)> core; + + public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task9.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT9(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT9(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task10.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT10(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT10(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task11.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT11(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT11(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task12.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT12(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT12(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task13.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT13(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT13(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task14.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT14(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT14(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t1 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 14) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14)); + } + } + + static void TryInvokeContinuationT2(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t2 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 14) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14)); + } + } + + static void TryInvokeContinuationT3(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t3 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 14) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14)); + } + } + + static void TryInvokeContinuationT4(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t4 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 14) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14)); + } + } + + static void TryInvokeContinuationT5(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t5 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 14) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14)); + } + } + + static void TryInvokeContinuationT6(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t6 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 14) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14)); + } + } + + static void TryInvokeContinuationT7(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t7 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 14) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14)); + } + } + + static void TryInvokeContinuationT8(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t8 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 14) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14)); + } + } + + static void TryInvokeContinuationT9(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t9 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 14) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14)); + } + } + + static void TryInvokeContinuationT10(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t10 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 14) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14)); + } + } + + static void TryInvokeContinuationT11(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t11 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 14) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14)); + } + } + + static void TryInvokeContinuationT12(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t12 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 14) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14)); + } + } + + static void TryInvokeContinuationT13(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t13 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 14) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14)); + } + } + + static void TryInvokeContinuationT14(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t14 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 14) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14)); + } + } + + + public (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14, UniTask task15) + { + if (task1.Status.IsCompletedSuccessfully() && task2.Status.IsCompletedSuccessfully() && task3.Status.IsCompletedSuccessfully() && task4.Status.IsCompletedSuccessfully() && task5.Status.IsCompletedSuccessfully() && task6.Status.IsCompletedSuccessfully() && task7.Status.IsCompletedSuccessfully() && task8.Status.IsCompletedSuccessfully() && task9.Status.IsCompletedSuccessfully() && task10.Status.IsCompletedSuccessfully() && task11.Status.IsCompletedSuccessfully() && task12.Status.IsCompletedSuccessfully() && task13.Status.IsCompletedSuccessfully() && task14.Status.IsCompletedSuccessfully() && task15.Status.IsCompletedSuccessfully()) + { + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)>((task1.GetAwaiter().GetResult(), task2.GetAwaiter().GetResult(), task3.GetAwaiter().GetResult(), task4.GetAwaiter().GetResult(), task5.GetAwaiter().GetResult(), task6.GetAwaiter().GetResult(), task7.GetAwaiter().GetResult(), task8.GetAwaiter().GetResult(), task9.GetAwaiter().GetResult(), task10.GetAwaiter().GetResult(), task11.GetAwaiter().GetResult(), task12.GetAwaiter().GetResult(), task13.GetAwaiter().GetResult(), task14.GetAwaiter().GetResult(), task15.GetAwaiter().GetResult())); + } + + return new UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)>(new WhenAllPromise(task1, task2, task3, task4, task5, task6, task7, task8, task9, task10, task11, task12, task13, task14, task15), 0); + } + + sealed class WhenAllPromise : IUniTaskSource<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)> + { + T1 t1 = default; + T2 t2 = default; + T3 t3 = default; + T4 t4 = default; + T5 t5 = default; + T6 t6 = default; + T7 t7 = default; + T8 t8 = default; + T9 t9 = default; + T10 t10 = default; + T11 t11 = default; + T12 t12 = default; + T13 t13 = default; + T14 t14 = default; + T15 t15 = default; + int completedCount; + UniTaskCompletionSourceCore<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)> core; + + public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14, UniTask task15) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task9.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT9(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT9(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task10.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT10(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT10(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task11.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT11(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT11(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task12.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT12(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT12(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task13.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT13(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT13(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task14.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT14(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT14(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task15.GetAwaiter(); + if (awaiter.IsCompleted) + { + TryInvokeContinuationT15(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT15(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t1 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + static void TryInvokeContinuationT2(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t2 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + static void TryInvokeContinuationT3(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t3 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + static void TryInvokeContinuationT4(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t4 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + static void TryInvokeContinuationT5(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t5 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + static void TryInvokeContinuationT6(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t6 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + static void TryInvokeContinuationT7(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t7 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + static void TryInvokeContinuationT8(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t8 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + static void TryInvokeContinuationT9(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t9 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + static void TryInvokeContinuationT10(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t10 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + static void TryInvokeContinuationT11(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t11 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + static void TryInvokeContinuationT12(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t12 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + static void TryInvokeContinuationT13(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t13 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + static void TryInvokeContinuationT14(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t14 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + static void TryInvokeContinuationT15(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + self.t15 = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 15) + { + self.core.TrySetResult((self.t1, self.t2, self.t3, self.t4, self.t5, self.t6, self.t7, self.t8, self.t9, self.t10, self.t11, self.t12, self.t13, self.t14, self.t15)); + } + } + + + public (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.Generated.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.Generated.cs.meta new file mode 100644 index 0000000..40ed46c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.Generated.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5110117231c8a6d4095fd0cbd3f4c142 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.cs b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.cs new file mode 100644 index 0000000..39f6a9a --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.cs @@ -0,0 +1,237 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Collections.Generic; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks +{ + public partial struct UniTask + { + public static UniTask WhenAll(params UniTask[] tasks) + { + if (tasks.Length == 0) + { + return UniTask.FromResult(Array.Empty()); + } + + return new UniTask(new WhenAllPromise(tasks, tasks.Length), 0); + } + + public static UniTask WhenAll(IEnumerable> tasks) + { + using (var span = ArrayPoolUtil.Materialize(tasks)) + { + var promise = new WhenAllPromise(span.Array, span.Length); // consumed array in constructor. + return new UniTask(promise, 0); + } + } + + public static UniTask WhenAll(params UniTask[] tasks) + { + if (tasks.Length == 0) + { + return UniTask.CompletedTask; + } + + return new UniTask(new WhenAllPromise(tasks, tasks.Length), 0); + } + + public static UniTask WhenAll(IEnumerable tasks) + { + using (var span = ArrayPoolUtil.Materialize(tasks)) + { + var promise = new WhenAllPromise(span.Array, span.Length); // consumed array in constructor. + return new UniTask(promise, 0); + } + } + + sealed class WhenAllPromise : IUniTaskSource + { + T[] result; + int completeCount; + UniTaskCompletionSourceCore core; // don't reset(called after GetResult, will invoke TrySetException.) + + public WhenAllPromise(UniTask[] tasks, int tasksLength) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completeCount = 0; + + if (tasksLength == 0) + { + this.result = Array.Empty(); + core.TrySetResult(result); + return; + } + + this.result = new T[tasksLength]; + + for (int i = 0; i < tasksLength; i++) + { + UniTask.Awaiter awaiter; + try + { + awaiter = tasks[i].GetAwaiter(); + } + catch (Exception ex) + { + core.TrySetException(ex); + continue; + } + + if (awaiter.IsCompleted) + { + TryInvokeContinuation(this, awaiter, i); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter, int>)state) + { + TryInvokeContinuation(t.Item1, t.Item2, t.Item3); + } + }, StateTuple.Create(this, awaiter, i)); + } + } + } + + static void TryInvokeContinuation(WhenAllPromise self, in UniTask.Awaiter awaiter, int i) + { + try + { + self.result[i] = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completeCount) == self.result.Length) + { + self.core.TrySetResult(self.result); + } + } + + public T[] GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + sealed class WhenAllPromise : IUniTaskSource + { + int completeCount; + int tasksLength; + UniTaskCompletionSourceCore core; // don't reset(called after GetResult, will invoke TrySetException.) + + public WhenAllPromise(UniTask[] tasks, int tasksLength) + { + TaskTracker.TrackActiveTask(this, 3); + + this.tasksLength = tasksLength; + this.completeCount = 0; + + if (tasksLength == 0) + { + core.TrySetResult(AsyncUnit.Default); + return; + } + + for (int i = 0; i < tasksLength; i++) + { + UniTask.Awaiter awaiter; + try + { + awaiter = tasks[i].GetAwaiter(); + } + catch (Exception ex) + { + core.TrySetException(ex); + continue; + } + + if (awaiter.IsCompleted) + { + TryInvokeContinuation(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple)state) + { + TryInvokeContinuation(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuation(WhenAllPromise self, in UniTask.Awaiter awaiter) + { + try + { + awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completeCount) == self.tasksLength) + { + self.core.TrySetResult(AsyncUnit.Default); + } + } + + public void GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + } +} diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.cs.meta new file mode 100644 index 0000000..0366aa8 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 355997a305ba64248822eec34998a1a0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.Generated.cs b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.Generated.cs new file mode 100644 index 0000000..09b98e6 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.Generated.cs @@ -0,0 +1,5060 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member +using System; +using System.Runtime.CompilerServices; +using System.Runtime.ExceptionServices; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks +{ + public partial struct UniTask + { + public static UniTask<(int winArgumentIndex, T1 result1, T2 result2)> WhenAny(UniTask task1, UniTask task2) + { + return new UniTask<(int winArgumentIndex, T1 result1, T2 result2)>(new WhenAnyPromise(task1, task2), 0); + } + + sealed class WhenAnyPromise : IUniTaskSource<(int, T1 result1, T2 result2)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T1 result1, T2 result2)> core; + + public WhenAnyPromise(UniTask task1, UniTask task2) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T1 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((0, result, default)); + } + } + + static void TryInvokeContinuationT2(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T2 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((1, default, result)); + } + } + + + public (int, T1 result1, T2 result2) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + public static UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3)> WhenAny(UniTask task1, UniTask task2, UniTask task3) + { + return new UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3)>(new WhenAnyPromise(task1, task2, task3), 0); + } + + sealed class WhenAnyPromise : IUniTaskSource<(int, T1 result1, T2 result2, T3 result3)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T1 result1, T2 result2, T3 result3)> core; + + public WhenAnyPromise(UniTask task1, UniTask task2, UniTask task3) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T1 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((0, result, default, default)); + } + } + + static void TryInvokeContinuationT2(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T2 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((1, default, result, default)); + } + } + + static void TryInvokeContinuationT3(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T3 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((2, default, default, result)); + } + } + + + public (int, T1 result1, T2 result2, T3 result3) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + public static UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4)> WhenAny(UniTask task1, UniTask task2, UniTask task3, UniTask task4) + { + return new UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4)>(new WhenAnyPromise(task1, task2, task3, task4), 0); + } + + sealed class WhenAnyPromise : IUniTaskSource<(int, T1 result1, T2 result2, T3 result3, T4 result4)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T1 result1, T2 result2, T3 result3, T4 result4)> core; + + public WhenAnyPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T1 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((0, result, default, default, default)); + } + } + + static void TryInvokeContinuationT2(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T2 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((1, default, result, default, default)); + } + } + + static void TryInvokeContinuationT3(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T3 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((2, default, default, result, default)); + } + } + + static void TryInvokeContinuationT4(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T4 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((3, default, default, default, result)); + } + } + + + public (int, T1 result1, T2 result2, T3 result3, T4 result4) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + public static UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5)> WhenAny(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5) + { + return new UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5)>(new WhenAnyPromise(task1, task2, task3, task4, task5), 0); + } + + sealed class WhenAnyPromise : IUniTaskSource<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5)> core; + + public WhenAnyPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T1 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((0, result, default, default, default, default)); + } + } + + static void TryInvokeContinuationT2(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T2 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((1, default, result, default, default, default)); + } + } + + static void TryInvokeContinuationT3(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T3 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((2, default, default, result, default, default)); + } + } + + static void TryInvokeContinuationT4(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T4 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((3, default, default, default, result, default)); + } + } + + static void TryInvokeContinuationT5(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T5 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((4, default, default, default, default, result)); + } + } + + + public (int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + public static UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6)> WhenAny(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6) + { + return new UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6)>(new WhenAnyPromise(task1, task2, task3, task4, task5, task6), 0); + } + + sealed class WhenAnyPromise : IUniTaskSource<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6)> core; + + public WhenAnyPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T1 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((0, result, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT2(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T2 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((1, default, result, default, default, default, default)); + } + } + + static void TryInvokeContinuationT3(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T3 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((2, default, default, result, default, default, default)); + } + } + + static void TryInvokeContinuationT4(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T4 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((3, default, default, default, result, default, default)); + } + } + + static void TryInvokeContinuationT5(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T5 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((4, default, default, default, default, result, default)); + } + } + + static void TryInvokeContinuationT6(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T6 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((5, default, default, default, default, default, result)); + } + } + + + public (int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + public static UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7)> WhenAny(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7) + { + return new UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7)>(new WhenAnyPromise(task1, task2, task3, task4, task5, task6, task7), 0); + } + + sealed class WhenAnyPromise : IUniTaskSource<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7)> core; + + public WhenAnyPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T1 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((0, result, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT2(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T2 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((1, default, result, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT3(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T3 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((2, default, default, result, default, default, default, default)); + } + } + + static void TryInvokeContinuationT4(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T4 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((3, default, default, default, result, default, default, default)); + } + } + + static void TryInvokeContinuationT5(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T5 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((4, default, default, default, default, result, default, default)); + } + } + + static void TryInvokeContinuationT6(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T6 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((5, default, default, default, default, default, result, default)); + } + } + + static void TryInvokeContinuationT7(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T7 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((6, default, default, default, default, default, default, result)); + } + } + + + public (int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + public static UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8)> WhenAny(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8) + { + return new UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8)>(new WhenAnyPromise(task1, task2, task3, task4, task5, task6, task7, task8), 0); + } + + sealed class WhenAnyPromise : IUniTaskSource<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8)> core; + + public WhenAnyPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T1 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((0, result, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT2(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T2 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((1, default, result, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT3(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T3 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((2, default, default, result, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT4(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T4 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((3, default, default, default, result, default, default, default, default)); + } + } + + static void TryInvokeContinuationT5(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T5 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((4, default, default, default, default, result, default, default, default)); + } + } + + static void TryInvokeContinuationT6(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T6 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((5, default, default, default, default, default, result, default, default)); + } + } + + static void TryInvokeContinuationT7(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T7 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((6, default, default, default, default, default, default, result, default)); + } + } + + static void TryInvokeContinuationT8(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T8 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((7, default, default, default, default, default, default, default, result)); + } + } + + + public (int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + public static UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9)> WhenAny(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9) + { + return new UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9)>(new WhenAnyPromise(task1, task2, task3, task4, task5, task6, task7, task8, task9), 0); + } + + sealed class WhenAnyPromise : IUniTaskSource<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9)> core; + + public WhenAnyPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task9.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT9(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT9(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T1 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((0, result, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT2(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T2 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((1, default, result, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT3(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T3 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((2, default, default, result, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT4(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T4 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((3, default, default, default, result, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT5(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T5 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((4, default, default, default, default, result, default, default, default, default)); + } + } + + static void TryInvokeContinuationT6(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T6 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((5, default, default, default, default, default, result, default, default, default)); + } + } + + static void TryInvokeContinuationT7(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T7 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((6, default, default, default, default, default, default, result, default, default)); + } + } + + static void TryInvokeContinuationT8(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T8 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((7, default, default, default, default, default, default, default, result, default)); + } + } + + static void TryInvokeContinuationT9(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T9 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((8, default, default, default, default, default, default, default, default, result)); + } + } + + + public (int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + public static UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10)> WhenAny(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10) + { + return new UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10)>(new WhenAnyPromise(task1, task2, task3, task4, task5, task6, task7, task8, task9, task10), 0); + } + + sealed class WhenAnyPromise : IUniTaskSource<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10)> core; + + public WhenAnyPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task9.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT9(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT9(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task10.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT10(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT10(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T1 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((0, result, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT2(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T2 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((1, default, result, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT3(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T3 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((2, default, default, result, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT4(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T4 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((3, default, default, default, result, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT5(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T5 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((4, default, default, default, default, result, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT6(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T6 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((5, default, default, default, default, default, result, default, default, default, default)); + } + } + + static void TryInvokeContinuationT7(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T7 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((6, default, default, default, default, default, default, result, default, default, default)); + } + } + + static void TryInvokeContinuationT8(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T8 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((7, default, default, default, default, default, default, default, result, default, default)); + } + } + + static void TryInvokeContinuationT9(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T9 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((8, default, default, default, default, default, default, default, default, result, default)); + } + } + + static void TryInvokeContinuationT10(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T10 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((9, default, default, default, default, default, default, default, default, default, result)); + } + } + + + public (int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + public static UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11)> WhenAny(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11) + { + return new UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11)>(new WhenAnyPromise(task1, task2, task3, task4, task5, task6, task7, task8, task9, task10, task11), 0); + } + + sealed class WhenAnyPromise : IUniTaskSource<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11)> core; + + public WhenAnyPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task9.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT9(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT9(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task10.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT10(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT10(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task11.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT11(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT11(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T1 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((0, result, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT2(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T2 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((1, default, result, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT3(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T3 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((2, default, default, result, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT4(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T4 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((3, default, default, default, result, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT5(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T5 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((4, default, default, default, default, result, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT6(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T6 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((5, default, default, default, default, default, result, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT7(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T7 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((6, default, default, default, default, default, default, result, default, default, default, default)); + } + } + + static void TryInvokeContinuationT8(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T8 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((7, default, default, default, default, default, default, default, result, default, default, default)); + } + } + + static void TryInvokeContinuationT9(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T9 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((8, default, default, default, default, default, default, default, default, result, default, default)); + } + } + + static void TryInvokeContinuationT10(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T10 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((9, default, default, default, default, default, default, default, default, default, result, default)); + } + } + + static void TryInvokeContinuationT11(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T11 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((10, default, default, default, default, default, default, default, default, default, default, result)); + } + } + + + public (int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + public static UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12)> WhenAny(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12) + { + return new UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12)>(new WhenAnyPromise(task1, task2, task3, task4, task5, task6, task7, task8, task9, task10, task11, task12), 0); + } + + sealed class WhenAnyPromise : IUniTaskSource<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12)> core; + + public WhenAnyPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task9.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT9(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT9(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task10.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT10(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT10(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task11.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT11(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT11(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task12.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT12(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT12(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T1 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((0, result, default, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT2(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T2 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((1, default, result, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT3(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T3 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((2, default, default, result, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT4(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T4 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((3, default, default, default, result, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT5(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T5 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((4, default, default, default, default, result, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT6(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T6 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((5, default, default, default, default, default, result, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT7(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T7 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((6, default, default, default, default, default, default, result, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT8(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T8 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((7, default, default, default, default, default, default, default, result, default, default, default, default)); + } + } + + static void TryInvokeContinuationT9(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T9 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((8, default, default, default, default, default, default, default, default, result, default, default, default)); + } + } + + static void TryInvokeContinuationT10(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T10 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((9, default, default, default, default, default, default, default, default, default, result, default, default)); + } + } + + static void TryInvokeContinuationT11(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T11 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((10, default, default, default, default, default, default, default, default, default, default, result, default)); + } + } + + static void TryInvokeContinuationT12(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T12 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((11, default, default, default, default, default, default, default, default, default, default, default, result)); + } + } + + + public (int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + public static UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13)> WhenAny(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13) + { + return new UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13)>(new WhenAnyPromise(task1, task2, task3, task4, task5, task6, task7, task8, task9, task10, task11, task12, task13), 0); + } + + sealed class WhenAnyPromise : IUniTaskSource<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13)> core; + + public WhenAnyPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task9.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT9(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT9(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task10.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT10(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT10(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task11.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT11(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT11(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task12.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT12(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT12(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task13.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT13(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT13(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T1 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((0, result, default, default, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT2(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T2 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((1, default, result, default, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT3(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T3 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((2, default, default, result, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT4(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T4 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((3, default, default, default, result, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT5(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T5 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((4, default, default, default, default, result, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT6(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T6 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((5, default, default, default, default, default, result, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT7(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T7 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((6, default, default, default, default, default, default, result, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT8(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T8 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((7, default, default, default, default, default, default, default, result, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT9(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T9 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((8, default, default, default, default, default, default, default, default, result, default, default, default, default)); + } + } + + static void TryInvokeContinuationT10(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T10 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((9, default, default, default, default, default, default, default, default, default, result, default, default, default)); + } + } + + static void TryInvokeContinuationT11(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T11 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((10, default, default, default, default, default, default, default, default, default, default, result, default, default)); + } + } + + static void TryInvokeContinuationT12(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T12 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((11, default, default, default, default, default, default, default, default, default, default, default, result, default)); + } + } + + static void TryInvokeContinuationT13(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T13 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((12, default, default, default, default, default, default, default, default, default, default, default, default, result)); + } + } + + + public (int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + public static UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13, T14 result14)> WhenAny(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14) + { + return new UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13, T14 result14)>(new WhenAnyPromise(task1, task2, task3, task4, task5, task6, task7, task8, task9, task10, task11, task12, task13, task14), 0); + } + + sealed class WhenAnyPromise : IUniTaskSource<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13, T14 result14)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13, T14 result14)> core; + + public WhenAnyPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task9.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT9(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT9(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task10.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT10(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT10(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task11.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT11(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT11(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task12.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT12(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT12(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task13.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT13(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT13(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task14.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT14(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT14(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T1 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((0, result, default, default, default, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT2(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T2 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((1, default, result, default, default, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT3(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T3 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((2, default, default, result, default, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT4(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T4 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((3, default, default, default, result, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT5(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T5 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((4, default, default, default, default, result, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT6(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T6 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((5, default, default, default, default, default, result, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT7(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T7 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((6, default, default, default, default, default, default, result, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT8(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T8 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((7, default, default, default, default, default, default, default, result, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT9(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T9 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((8, default, default, default, default, default, default, default, default, result, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT10(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T10 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((9, default, default, default, default, default, default, default, default, default, result, default, default, default, default)); + } + } + + static void TryInvokeContinuationT11(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T11 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((10, default, default, default, default, default, default, default, default, default, default, result, default, default, default)); + } + } + + static void TryInvokeContinuationT12(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T12 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((11, default, default, default, default, default, default, default, default, default, default, default, result, default, default)); + } + } + + static void TryInvokeContinuationT13(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T13 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((12, default, default, default, default, default, default, default, default, default, default, default, default, result, default)); + } + } + + static void TryInvokeContinuationT14(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T14 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((13, default, default, default, default, default, default, default, default, default, default, default, default, default, result)); + } + } + + + public (int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13, T14 result14) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + public static UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13, T14 result14, T15 result15)> WhenAny(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14, UniTask task15) + { + return new UniTask<(int winArgumentIndex, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13, T14 result14, T15 result15)>(new WhenAnyPromise(task1, task2, task3, task4, task5, task6, task7, task8, task9, task10, task11, task12, task13, task14, task15), 0); + } + + sealed class WhenAnyPromise : IUniTaskSource<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13, T14 result14, T15 result15)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13, T14 result14, T15 result15)> core; + + public WhenAnyPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14, UniTask task15) + { + TaskTracker.TrackActiveTask(this, 3); + + this.completedCount = 0; + { + var awaiter = task1.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT1(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT1(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task2.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT2(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT2(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task3.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT3(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT3(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task4.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT4(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT4(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task5.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT5(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT5(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task6.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT6(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT6(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task7.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT7(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT7(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task8.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT8(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT8(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task9.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT9(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT9(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task10.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT10(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT10(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task11.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT11(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT11(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task12.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT12(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT12(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task13.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT13(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT13(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task14.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT14(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT14(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + { + var awaiter = task15.GetAwaiter(); + + if (awaiter.IsCompleted) + { + TryInvokeContinuationT15(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryInvokeContinuationT15(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryInvokeContinuationT1(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T1 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((0, result, default, default, default, default, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT2(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T2 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((1, default, result, default, default, default, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT3(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T3 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((2, default, default, result, default, default, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT4(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T4 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((3, default, default, default, result, default, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT5(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T5 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((4, default, default, default, default, result, default, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT6(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T6 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((5, default, default, default, default, default, result, default, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT7(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T7 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((6, default, default, default, default, default, default, result, default, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT8(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T8 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((7, default, default, default, default, default, default, default, result, default, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT9(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T9 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((8, default, default, default, default, default, default, default, default, result, default, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT10(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T10 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((9, default, default, default, default, default, default, default, default, default, result, default, default, default, default, default)); + } + } + + static void TryInvokeContinuationT11(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T11 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((10, default, default, default, default, default, default, default, default, default, default, result, default, default, default, default)); + } + } + + static void TryInvokeContinuationT12(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T12 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((11, default, default, default, default, default, default, default, default, default, default, default, result, default, default, default)); + } + } + + static void TryInvokeContinuationT13(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T13 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((12, default, default, default, default, default, default, default, default, default, default, default, default, result, default, default)); + } + } + + static void TryInvokeContinuationT14(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T14 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((13, default, default, default, default, default, default, default, default, default, default, default, default, default, result, default)); + } + } + + static void TryInvokeContinuationT15(WhenAnyPromise self, in UniTask.Awaiter awaiter) + { + T15 result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((14, default, default, default, default, default, default, default, default, default, default, default, default, default, default, result)); + } + } + + + public (int, T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7, T8 result8, T9 result9, T10 result10, T11 result11, T12 result12, T13 result13, T14 result14, T15 result15) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.Generated.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.Generated.cs.meta new file mode 100644 index 0000000..49a2c3f --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.Generated.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 13d604ac281570c4eac9962429f19ca9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.cs b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.cs new file mode 100644 index 0000000..09eb32d --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.cs @@ -0,0 +1,359 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Collections.Generic; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks +{ + public partial struct UniTask + { + public static UniTask<(bool hasResultLeft, T result)> WhenAny(UniTask leftTask, UniTask rightTask) + { + return new UniTask<(bool, T)>(new WhenAnyLRPromise(leftTask, rightTask), 0); + } + + public static UniTask<(int winArgumentIndex, T result)> WhenAny(params UniTask[] tasks) + { + return new UniTask<(int, T)>(new WhenAnyPromise(tasks, tasks.Length), 0); + } + + public static UniTask<(int winArgumentIndex, T result)> WhenAny(IEnumerable> tasks) + { + using (var span = ArrayPoolUtil.Materialize(tasks)) + { + return new UniTask<(int, T)>(new WhenAnyPromise(span.Array, span.Length), 0); + } + } + + /// Return value is winArgumentIndex + public static UniTask WhenAny(params UniTask[] tasks) + { + return new UniTask(new WhenAnyPromise(tasks, tasks.Length), 0); + } + + /// Return value is winArgumentIndex + public static UniTask WhenAny(IEnumerable tasks) + { + using (var span = ArrayPoolUtil.Materialize(tasks)) + { + return new UniTask(new WhenAnyPromise(span.Array, span.Length), 0); + } + } + + sealed class WhenAnyLRPromise : IUniTaskSource<(bool, T)> + { + int completedCount; + UniTaskCompletionSourceCore<(bool, T)> core; + + public WhenAnyLRPromise(UniTask leftTask, UniTask rightTask) + { + TaskTracker.TrackActiveTask(this, 3); + + { + UniTask.Awaiter awaiter; + try + { + awaiter = leftTask.GetAwaiter(); + } + catch (Exception ex) + { + core.TrySetException(ex); + goto RIGHT; + } + + if (awaiter.IsCompleted) + { + TryLeftInvokeContinuation(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryLeftInvokeContinuation(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + RIGHT: + { + UniTask.Awaiter awaiter; + try + { + awaiter = rightTask.GetAwaiter(); + } + catch (Exception ex) + { + core.TrySetException(ex); + return; + } + + if (awaiter.IsCompleted) + { + TryRightInvokeContinuation(this, awaiter); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter>)state) + { + TryRightInvokeContinuation(t.Item1, t.Item2); + } + }, StateTuple.Create(this, awaiter)); + } + } + } + + static void TryLeftInvokeContinuation(WhenAnyLRPromise self, in UniTask.Awaiter awaiter) + { + T result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((true, result)); + } + } + + static void TryRightInvokeContinuation(WhenAnyLRPromise self, in UniTask.Awaiter awaiter) + { + try + { + awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((false, default)); + } + } + + public (bool, T) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + + sealed class WhenAnyPromise : IUniTaskSource<(int, T)> + { + int completedCount; + UniTaskCompletionSourceCore<(int, T)> core; + + public WhenAnyPromise(UniTask[] tasks, int tasksLength) + { + if (tasksLength == 0) + { + throw new ArgumentException("The tasks argument contains no tasks."); + } + + TaskTracker.TrackActiveTask(this, 3); + + for (int i = 0; i < tasksLength; i++) + { + UniTask.Awaiter awaiter; + try + { + awaiter = tasks[i].GetAwaiter(); + } + catch (Exception ex) + { + core.TrySetException(ex); + continue; // consume others. + } + + if (awaiter.IsCompleted) + { + TryInvokeContinuation(this, awaiter, i); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple, UniTask.Awaiter, int>)state) + { + TryInvokeContinuation(t.Item1, t.Item2, t.Item3); + } + }, StateTuple.Create(this, awaiter, i)); + } + } + } + + static void TryInvokeContinuation(WhenAnyPromise self, in UniTask.Awaiter awaiter, int i) + { + T result; + try + { + result = awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult((i, result)); + } + } + + public (int, T) GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + sealed class WhenAnyPromise : IUniTaskSource + { + int completedCount; + UniTaskCompletionSourceCore core; + + public WhenAnyPromise(UniTask[] tasks, int tasksLength) + { + if (tasksLength == 0) + { + throw new ArgumentException("The tasks argument contains no tasks."); + } + + TaskTracker.TrackActiveTask(this, 3); + + for (int i = 0; i < tasksLength; i++) + { + UniTask.Awaiter awaiter; + try + { + awaiter = tasks[i].GetAwaiter(); + } + catch (Exception ex) + { + core.TrySetException(ex); + continue; // consume others. + } + + if (awaiter.IsCompleted) + { + TryInvokeContinuation(this, awaiter, i); + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple)state) + { + TryInvokeContinuation(t.Item1, t.Item2, t.Item3); + } + }, StateTuple.Create(this, awaiter, i)); + } + } + } + + static void TryInvokeContinuation(WhenAnyPromise self, in UniTask.Awaiter awaiter, int i) + { + try + { + awaiter.GetResult(); + } + catch (Exception ex) + { + self.core.TrySetException(ex); + return; + } + + if (Interlocked.Increment(ref self.completedCount) == 1) + { + self.core.TrySetResult(i); + } + } + + public int GetResult(short token) + { + TaskTracker.RemoveTracking(this); + GC.SuppressFinalize(this); + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.cs.meta new file mode 100644 index 0000000..c10f762 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c32578978c37eaf41bdd90e1b034637d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.asmdef b/Assets/Plugins/UniTask/Runtime/UniTask.asmdef new file mode 100644 index 0000000..a5c594d --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.asmdef @@ -0,0 +1,45 @@ +{ + "name": "UniTask", + "rootNamespace": "", + "references": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [ + { + "name": "com.unity.modules.assetbundle", + "expression": "", + "define": "UNITASK_ASSETBUNDLE_SUPPORT" + }, + { + "name": "com.unity.modules.physics", + "expression": "", + "define": "UNITASK_PHYSICS_SUPPORT" + }, + { + "name": "com.unity.modules.physics2d", + "expression": "", + "define": "UNITASK_PHYSICS2D_SUPPORT" + }, + { + "name": "com.unity.modules.particlesystem", + "expression": "", + "define": "UNITASK_PARTICLESYSTEM_SUPPORT" + }, + { + "name": "com.unity.ugui", + "expression": "", + "define": "UNITASK_UGUI_SUPPORT" + }, + { + "name": "com.unity.modules.unitywebrequest", + "expression": "", + "define": "UNITASK_WEBREQUEST_SUPPORT" + } + ], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.asmdef.meta b/Assets/Plugins/UniTask/Runtime/UniTask.asmdef.meta new file mode 100644 index 0000000..e497045 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f51ebe6a0ceec4240a699833d6309b23 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.cs b/Assets/Plugins/UniTask/Runtime/UniTask.cs new file mode 100644 index 0000000..56a8d1f --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.cs @@ -0,0 +1,711 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member +#pragma warning disable CS0436 + +#if UNITASK_NETCORE || UNITY_2022_3_OR_NEWER +#define SUPPORT_VALUETASK +#endif + +using Cysharp.Threading.Tasks.CompilerServices; +using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.ExceptionServices; +using System.Runtime.InteropServices; + +namespace Cysharp.Threading.Tasks +{ + internal static class AwaiterActions + { + internal static readonly Action InvokeContinuationDelegate = Continuation; + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static void Continuation(object state) + { + ((Action)state).Invoke(); + } + } + + /// + /// Lightweight unity specified task-like object. + /// + [AsyncMethodBuilder(typeof(AsyncUniTaskMethodBuilder))] + [StructLayout(LayoutKind.Auto)] + public readonly partial struct UniTask + { + readonly IUniTaskSource source; + readonly short token; + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public UniTask(IUniTaskSource source, short token) + { + this.source = source; + this.token = token; + } + + public UniTaskStatus Status + { + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + if (source == null) return UniTaskStatus.Succeeded; + return source.GetStatus(token); + } + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Awaiter GetAwaiter() + { + return new Awaiter(this); + } + + /// + /// returns (bool IsCanceled) instead of throws OperationCanceledException. + /// + public UniTask SuppressCancellationThrow() + { + var status = Status; + if (status == UniTaskStatus.Succeeded) return CompletedTasks.False; + if (status == UniTaskStatus.Canceled) return CompletedTasks.True; + return new UniTask(new IsCanceledSource(source), token); + } + +#if SUPPORT_VALUETASK + + public static implicit operator System.Threading.Tasks.ValueTask(in UniTask self) + { + if (self.source == null) + { + return default; + } + +#if (UNITASK_NETCORE && NETSTANDARD2_0) + return self.AsValueTask(); +#else + return new System.Threading.Tasks.ValueTask(self.source, self.token); +#endif + } + +#endif + + public override string ToString() + { + if (source == null) return "()"; + return "(" + source.UnsafeGetStatus() + ")"; + } + + /// + /// Memoizing inner IValueTaskSource. The result UniTask can await multiple. + /// + public UniTask Preserve() + { + if (source == null) + { + return this; + } + else + { + return new UniTask(new MemoizeSource(source), token); + } + } + + public UniTask AsAsyncUnitUniTask() + { + if (this.source == null) return CompletedTasks.AsyncUnit; + + var status = this.source.GetStatus(this.token); + if (status.IsCompletedSuccessfully()) + { + this.source.GetResult(this.token); + return CompletedTasks.AsyncUnit; + } + else if (this.source is IUniTaskSource asyncUnitSource) + { + return new UniTask(asyncUnitSource, this.token); + } + + return new UniTask(new AsyncUnitSource(this.source), this.token); + } + + sealed class AsyncUnitSource : IUniTaskSource + { + readonly IUniTaskSource source; + + public AsyncUnitSource(IUniTaskSource source) + { + this.source = source; + } + + public AsyncUnit GetResult(short token) + { + source.GetResult(token); + return AsyncUnit.Default; + } + + public UniTaskStatus GetStatus(short token) + { + return source.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + source.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return source.UnsafeGetStatus(); + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + } + + sealed class IsCanceledSource : IUniTaskSource + { + readonly IUniTaskSource source; + + public IsCanceledSource(IUniTaskSource source) + { + this.source = source; + } + + public bool GetResult(short token) + { + if (source.GetStatus(token) == UniTaskStatus.Canceled) + { + return true; + } + + source.GetResult(token); + return false; + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return source.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return source.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + source.OnCompleted(continuation, state, token); + } + } + + sealed class MemoizeSource : IUniTaskSource + { + IUniTaskSource source; + ExceptionDispatchInfo exception; + UniTaskStatus status; + + public MemoizeSource(IUniTaskSource source) + { + this.source = source; + } + + public void GetResult(short token) + { + if (source == null) + { + if (exception != null) + { + exception.Throw(); + } + } + else + { + try + { + source.GetResult(token); + status = UniTaskStatus.Succeeded; + } + catch (Exception ex) + { + exception = ExceptionDispatchInfo.Capture(ex); + if (ex is OperationCanceledException) + { + status = UniTaskStatus.Canceled; + } + else + { + status = UniTaskStatus.Faulted; + } + throw; + } + finally + { + source = null; + } + } + } + + public UniTaskStatus GetStatus(short token) + { + if (source == null) + { + return status; + } + + return source.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + if (source == null) + { + continuation(state); + } + else + { + source.OnCompleted(continuation, state, token); + } + } + + public UniTaskStatus UnsafeGetStatus() + { + if (source == null) + { + return status; + } + + return source.UnsafeGetStatus(); + } + } + + public readonly struct Awaiter : ICriticalNotifyCompletion + { + readonly UniTask task; + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Awaiter(in UniTask task) + { + this.task = task; + } + + public bool IsCompleted + { + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return task.Status.IsCompleted(); + } + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void GetResult() + { + if (task.source == null) return; + task.source.GetResult(task.token); + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void OnCompleted(Action continuation) + { + if (task.source == null) + { + continuation(); + } + else + { + task.source.OnCompleted(AwaiterActions.InvokeContinuationDelegate, continuation, task.token); + } + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void UnsafeOnCompleted(Action continuation) + { + if (task.source == null) + { + continuation(); + } + else + { + task.source.OnCompleted(AwaiterActions.InvokeContinuationDelegate, continuation, task.token); + } + } + + /// + /// If register manually continuation, you can use it instead of for compiler OnCompleted methods. + /// + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SourceOnCompleted(Action continuation, object state) + { + if (task.source == null) + { + continuation(state); + } + else + { + task.source.OnCompleted(continuation, state, task.token); + } + } + } + } + + /// + /// Lightweight unity specified task-like object. + /// + [AsyncMethodBuilder(typeof(AsyncUniTaskMethodBuilder<>))] + [StructLayout(LayoutKind.Auto)] + public readonly struct UniTask + { + readonly IUniTaskSource source; + readonly T result; + readonly short token; + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public UniTask(T result) + { + this.source = default; + this.token = default; + this.result = result; + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public UniTask(IUniTaskSource source, short token) + { + this.source = source; + this.token = token; + this.result = default; + } + + public UniTaskStatus Status + { + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (source == null) ? UniTaskStatus.Succeeded : source.GetStatus(token); + } + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Awaiter GetAwaiter() + { + return new Awaiter(this); + } + + /// + /// Memoizing inner IValueTaskSource. The result UniTask can await multiple. + /// + public UniTask Preserve() + { + if (source == null) + { + return this; + } + else + { + return new UniTask(new MemoizeSource(source), token); + } + } + + public UniTask AsUniTask() + { + if (this.source == null) return UniTask.CompletedTask; + + var status = this.source.GetStatus(this.token); + if (status.IsCompletedSuccessfully()) + { + this.source.GetResult(this.token); + return UniTask.CompletedTask; + } + + // Converting UniTask -> UniTask is zero overhead. + return new UniTask(this.source, this.token); + } + + public static implicit operator UniTask(UniTask self) + { + return self.AsUniTask(); + } + +#if SUPPORT_VALUETASK + + public static implicit operator System.Threading.Tasks.ValueTask(in UniTask self) + { + if (self.source == null) + { + return new System.Threading.Tasks.ValueTask(self.result); + } + +#if (UNITASK_NETCORE && NETSTANDARD2_0) + return self.AsValueTask(); +#else + return new System.Threading.Tasks.ValueTask(self.source, self.token); +#endif + } + +#endif + + /// + /// returns (bool IsCanceled, T Result) instead of throws OperationCanceledException. + /// + public UniTask<(bool IsCanceled, T Result)> SuppressCancellationThrow() + { + if (source == null) + { + return new UniTask<(bool IsCanceled, T Result)>((false, result)); + } + + return new UniTask<(bool, T)>(new IsCanceledSource(source), token); + } + + public override string ToString() + { + return (this.source == null) ? result?.ToString() + : "(" + this.source.UnsafeGetStatus() + ")"; + } + + sealed class IsCanceledSource : IUniTaskSource<(bool, T)> + { + readonly IUniTaskSource source; + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public IsCanceledSource(IUniTaskSource source) + { + this.source = source; + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public (bool, T) GetResult(short token) + { + if (source.GetStatus(token) == UniTaskStatus.Canceled) + { + return (true, default); + } + + var result = source.GetResult(token); + return (false, result); + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public UniTaskStatus GetStatus(short token) + { + return source.GetStatus(token); + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public UniTaskStatus UnsafeGetStatus() + { + return source.UnsafeGetStatus(); + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void OnCompleted(Action continuation, object state, short token) + { + source.OnCompleted(continuation, state, token); + } + } + + sealed class MemoizeSource : IUniTaskSource + { + IUniTaskSource source; + T result; + ExceptionDispatchInfo exception; + UniTaskStatus status; + + public MemoizeSource(IUniTaskSource source) + { + this.source = source; + } + + public T GetResult(short token) + { + if (source == null) + { + if (exception != null) + { + exception.Throw(); + } + return result; + } + else + { + try + { + result = source.GetResult(token); + status = UniTaskStatus.Succeeded; + return result; + } + catch (Exception ex) + { + exception = ExceptionDispatchInfo.Capture(ex); + if (ex is OperationCanceledException) + { + status = UniTaskStatus.Canceled; + } + else + { + status = UniTaskStatus.Faulted; + } + throw; + } + finally + { + source = null; + } + } + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + if (source == null) + { + return status; + } + + return source.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + if (source == null) + { + continuation(state); + } + else + { + source.OnCompleted(continuation, state, token); + } + } + + public UniTaskStatus UnsafeGetStatus() + { + if (source == null) + { + return status; + } + + return source.UnsafeGetStatus(); + } + } + + public readonly struct Awaiter : ICriticalNotifyCompletion + { + readonly UniTask task; + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Awaiter(in UniTask task) + { + this.task = task; + } + + public bool IsCompleted + { + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return task.Status.IsCompleted(); + } + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public T GetResult() + { + var s = task.source; + if (s == null) + { + return task.result; + } + else + { + return s.GetResult(task.token); + } + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void OnCompleted(Action continuation) + { + var s = task.source; + if (s == null) + { + continuation(); + } + else + { + s.OnCompleted(AwaiterActions.InvokeContinuationDelegate, continuation, task.token); + } + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void UnsafeOnCompleted(Action continuation) + { + var s = task.source; + if (s == null) + { + continuation(); + } + else + { + s.OnCompleted(AwaiterActions.InvokeContinuationDelegate, continuation, task.token); + } + } + + /// + /// If register manually continuation, you can use it instead of for compiler OnCompleted methods. + /// + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SourceOnCompleted(Action continuation, object state) + { + var s = task.source; + if (s == null) + { + continuation(state); + } + else + { + s.OnCompleted(continuation, state, task.token); + } + } + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/UniTask.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTask.cs.meta new file mode 100644 index 0000000..04eb6b6 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTask.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8947adf23181ff04db73829df217ca94 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs b/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs new file mode 100644 index 0000000..bf2d054 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs @@ -0,0 +1,944 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.ExceptionServices; +using System.Runtime.InteropServices; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks +{ + public interface IResolvePromise + { + bool TrySetResult(); + } + + public interface IResolvePromise + { + bool TrySetResult(T value); + } + + public interface IRejectPromise + { + bool TrySetException(Exception exception); + } + + public interface ICancelPromise + { + bool TrySetCanceled(CancellationToken cancellationToken = default); + } + + public interface IPromise : IResolvePromise, IRejectPromise, ICancelPromise + { + } + + public interface IPromise : IResolvePromise, IRejectPromise, ICancelPromise + { + } + + internal class ExceptionHolder + { + ExceptionDispatchInfo exception; + bool calledGet = false; + + public ExceptionHolder(ExceptionDispatchInfo exception) + { + this.exception = exception; + } + + public ExceptionDispatchInfo GetException() + { + if (!calledGet) + { + calledGet = true; + GC.SuppressFinalize(this); + } + return exception; + } + + ~ExceptionHolder() + { + if (!calledGet) + { + UniTaskScheduler.PublishUnobservedTaskException(exception.SourceException); + } + } + } + + [StructLayout(LayoutKind.Auto)] + public struct UniTaskCompletionSourceCore + { + // Struct Size: TResult + (8 + 2 + 1 + 1 + 8 + 8) + + TResult result; + object error; // ExceptionHolder or OperationCanceledException + short version; + bool hasUnhandledError; + int completedCount; // 0: completed == false + Action continuation; + object continuationState; + + [DebuggerHidden] + public void Reset() + { + ReportUnhandledError(); + + unchecked + { + version += 1; // incr version. + } + completedCount = 0; + result = default; + error = null; + hasUnhandledError = false; + continuation = null; + continuationState = null; + } + + void ReportUnhandledError() + { + if (hasUnhandledError) + { + try + { + if (error is OperationCanceledException oc) + { + UniTaskScheduler.PublishUnobservedTaskException(oc); + } + else if (error is ExceptionHolder e) + { + UniTaskScheduler.PublishUnobservedTaskException(e.GetException().SourceException); + } + } + catch + { + } + } + } + + internal void MarkHandled() + { + hasUnhandledError = false; + } + + /// Completes with a successful result. + /// The result. + [DebuggerHidden] + public bool TrySetResult(TResult result) + { + if (Interlocked.Increment(ref completedCount) == 1) + { + // setup result + this.result = result; + + if (continuation != null || Interlocked.CompareExchange(ref this.continuation, UniTaskCompletionSourceCoreShared.s_sentinel, null) != null) + { + continuation(continuationState); + } + return true; + } + + return false; + } + + /// Completes with an error. + /// The exception. + [DebuggerHidden] + public bool TrySetException(Exception error) + { + if (Interlocked.Increment(ref completedCount) == 1) + { + // setup result + this.hasUnhandledError = true; + if (error is OperationCanceledException) + { + this.error = error; + } + else + { + this.error = new ExceptionHolder(ExceptionDispatchInfo.Capture(error)); + } + + if (continuation != null || Interlocked.CompareExchange(ref this.continuation, UniTaskCompletionSourceCoreShared.s_sentinel, null) != null) + { + continuation(continuationState); + } + return true; + } + + return false; + } + + [DebuggerHidden] + public bool TrySetCanceled(CancellationToken cancellationToken = default) + { + if (Interlocked.Increment(ref completedCount) == 1) + { + // setup result + this.hasUnhandledError = true; + this.error = new OperationCanceledException(cancellationToken); + + if (continuation != null || Interlocked.CompareExchange(ref this.continuation, UniTaskCompletionSourceCoreShared.s_sentinel, null) != null) + { + continuation(continuationState); + } + return true; + } + + return false; + } + + /// Gets the operation version. + [DebuggerHidden] + public short Version => version; + + /// Gets the status of the operation. + /// Opaque value that was provided to the 's constructor. + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public UniTaskStatus GetStatus(short token) + { + ValidateToken(token); + return (continuation == null || (completedCount == 0)) ? UniTaskStatus.Pending + : (error == null) ? UniTaskStatus.Succeeded + : (error is OperationCanceledException) ? UniTaskStatus.Canceled + : UniTaskStatus.Faulted; + } + + /// Gets the status of the operation without token validation. + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public UniTaskStatus UnsafeGetStatus() + { + return (continuation == null || (completedCount == 0)) ? UniTaskStatus.Pending + : (error == null) ? UniTaskStatus.Succeeded + : (error is OperationCanceledException) ? UniTaskStatus.Canceled + : UniTaskStatus.Faulted; + } + + /// Gets the result of the operation. + /// Opaque value that was provided to the 's constructor. + // [StackTraceHidden] + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public TResult GetResult(short token) + { + ValidateToken(token); + if (completedCount == 0) + { + throw new InvalidOperationException("Not yet completed, UniTask only allow to use await."); + } + + if (error != null) + { + hasUnhandledError = false; + if (error is OperationCanceledException oce) + { + throw oce; + } + else if (error is ExceptionHolder eh) + { + eh.GetException().Throw(); + } + + throw new InvalidOperationException("Critical: invalid exception type was held."); + } + + return result; + } + + /// Schedules the continuation action for this operation. + /// The continuation to invoke when the operation has completed. + /// The state object to pass to when it's invoked. + /// Opaque value that was provided to the 's constructor. + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void OnCompleted(Action continuation, object state, short token /*, ValueTaskSourceOnCompletedFlags flags */) + { + if (continuation == null) + { + throw new ArgumentNullException(nameof(continuation)); + } + ValidateToken(token); + + /* no use ValueTaskSourceOnCOmpletedFlags, always no capture ExecutionContext and SynchronizationContext. */ + + /* + PatternA: GetStatus=Pending => OnCompleted => TrySet*** => GetResult + PatternB: TrySet*** => GetStatus=!Pending => GetResult + PatternC: GetStatus=Pending => TrySet/OnCompleted(race condition) => GetResult + C.1: win OnCompleted -> TrySet invoke saved continuation + C.2: win TrySet -> should invoke continuation here. + */ + + // not set continuation yet. + object oldContinuation = this.continuation; + if (oldContinuation == null) + { + continuationState = state; + oldContinuation = Interlocked.CompareExchange(ref this.continuation, continuation, null); + } + + if (oldContinuation != null) + { + // already running continuation in TrySet. + // It will cause call OnCompleted multiple time, invalid. + if (!ReferenceEquals(oldContinuation, UniTaskCompletionSourceCoreShared.s_sentinel)) + { + throw new InvalidOperationException("Already continuation registered, can not await twice or get Status after await."); + } + + continuation(state); + } + } + + [DebuggerHidden] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void ValidateToken(short token) + { + if (token != version) + { + throw new InvalidOperationException("Token version is not matched, can not await twice or get Status after await."); + } + } + } + + internal static class UniTaskCompletionSourceCoreShared // separated out of generic to avoid unnecessary duplication + { + internal static readonly Action s_sentinel = CompletionSentinel; + + private static void CompletionSentinel(object _) // named method to aid debugging + { + throw new InvalidOperationException("The sentinel delegate should never be invoked."); + } + } + + public class AutoResetUniTaskCompletionSource : IUniTaskSource, ITaskPoolNode, IPromise + { + static TaskPool pool; + AutoResetUniTaskCompletionSource nextNode; + public ref AutoResetUniTaskCompletionSource NextNode => ref nextNode; + + static AutoResetUniTaskCompletionSource() + { + TaskPool.RegisterSizeGetter(typeof(AutoResetUniTaskCompletionSource), () => pool.Size); + } + + UniTaskCompletionSourceCore core; + short version; + + AutoResetUniTaskCompletionSource() + { + } + + [DebuggerHidden] + public static AutoResetUniTaskCompletionSource Create() + { + if (!pool.TryPop(out var result)) + { + result = new AutoResetUniTaskCompletionSource(); + } + result.version = result.core.Version; + TaskTracker.TrackActiveTask(result, 2); + return result; + } + + [DebuggerHidden] + public static AutoResetUniTaskCompletionSource CreateFromCanceled(CancellationToken cancellationToken, out short token) + { + var source = Create(); + source.TrySetCanceled(cancellationToken); + token = source.core.Version; + return source; + } + + [DebuggerHidden] + public static AutoResetUniTaskCompletionSource CreateFromException(Exception exception, out short token) + { + var source = Create(); + source.TrySetException(exception); + token = source.core.Version; + return source; + } + + [DebuggerHidden] + public static AutoResetUniTaskCompletionSource CreateCompleted(out short token) + { + var source = Create(); + source.TrySetResult(); + token = source.core.Version; + return source; + } + + public UniTask Task + { + [DebuggerHidden] + get + { + return new UniTask(this, core.Version); + } + } + + [DebuggerHidden] + public bool TrySetResult() + { + return version == core.Version && core.TrySetResult(AsyncUnit.Default); + } + + [DebuggerHidden] + public bool TrySetCanceled(CancellationToken cancellationToken = default) + { + return version == core.Version && core.TrySetCanceled(cancellationToken); + } + + [DebuggerHidden] + public bool TrySetException(Exception exception) + { + return version == core.Version && core.TrySetException(exception); + } + + [DebuggerHidden] + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + TryReturn(); + } + } + + [DebuggerHidden] + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + [DebuggerHidden] + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + [DebuggerHidden] + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + [DebuggerHidden] + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + return pool.TryPush(this); + } + } + + public class AutoResetUniTaskCompletionSource : IUniTaskSource, ITaskPoolNode>, IPromise + { + static TaskPool> pool; + AutoResetUniTaskCompletionSource nextNode; + public ref AutoResetUniTaskCompletionSource NextNode => ref nextNode; + + static AutoResetUniTaskCompletionSource() + { + TaskPool.RegisterSizeGetter(typeof(AutoResetUniTaskCompletionSource), () => pool.Size); + } + + UniTaskCompletionSourceCore core; + short version; + + AutoResetUniTaskCompletionSource() + { + } + + [DebuggerHidden] + public static AutoResetUniTaskCompletionSource Create() + { + if (!pool.TryPop(out var result)) + { + result = new AutoResetUniTaskCompletionSource(); + } + result.version = result.core.Version; + TaskTracker.TrackActiveTask(result, 2); + return result; + } + + [DebuggerHidden] + public static AutoResetUniTaskCompletionSource CreateFromCanceled(CancellationToken cancellationToken, out short token) + { + var source = Create(); + source.TrySetCanceled(cancellationToken); + token = source.core.Version; + return source; + } + + [DebuggerHidden] + public static AutoResetUniTaskCompletionSource CreateFromException(Exception exception, out short token) + { + var source = Create(); + source.TrySetException(exception); + token = source.core.Version; + return source; + } + + [DebuggerHidden] + public static AutoResetUniTaskCompletionSource CreateFromResult(T result, out short token) + { + var source = Create(); + source.TrySetResult(result); + token = source.core.Version; + return source; + } + + public UniTask Task + { + [DebuggerHidden] + get + { + return new UniTask(this, core.Version); + } + } + + [DebuggerHidden] + public bool TrySetResult(T result) + { + return version == core.Version && core.TrySetResult(result); + } + + [DebuggerHidden] + public bool TrySetCanceled(CancellationToken cancellationToken = default) + { + return version == core.Version && core.TrySetCanceled(cancellationToken); + } + + [DebuggerHidden] + public bool TrySetException(Exception exception) + { + return version == core.Version && core.TrySetException(exception); + } + + [DebuggerHidden] + public T GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { + TryReturn(); + } + } + + [DebuggerHidden] + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + [DebuggerHidden] + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + [DebuggerHidden] + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + [DebuggerHidden] + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + [DebuggerHidden] + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + return pool.TryPush(this); + } + } + + public class UniTaskCompletionSource : IUniTaskSource, IPromise + { + CancellationToken cancellationToken; + ExceptionHolder exception; + object gate; + Action singleContinuation; + object singleState; + List<(Action, object)> secondaryContinuationList; + + int intStatus; // UniTaskStatus + bool handled = false; + + public UniTaskCompletionSource() + { + TaskTracker.TrackActiveTask(this, 2); + } + + [DebuggerHidden] + internal void MarkHandled() + { + if (!handled) + { + handled = true; + TaskTracker.RemoveTracking(this); + } + } + + public UniTask Task + { + [DebuggerHidden] + get + { + return new UniTask(this, 0); + } + } + + [DebuggerHidden] + public bool TrySetResult() + { + return TrySignalCompletion(UniTaskStatus.Succeeded); + } + + [DebuggerHidden] + public bool TrySetCanceled(CancellationToken cancellationToken = default) + { + if (UnsafeGetStatus() != UniTaskStatus.Pending) return false; + + this.cancellationToken = cancellationToken; + return TrySignalCompletion(UniTaskStatus.Canceled); + } + + [DebuggerHidden] + public bool TrySetException(Exception exception) + { + if (exception is OperationCanceledException oce) + { + return TrySetCanceled(oce.CancellationToken); + } + + if (UnsafeGetStatus() != UniTaskStatus.Pending) return false; + + this.exception = new ExceptionHolder(ExceptionDispatchInfo.Capture(exception)); + return TrySignalCompletion(UniTaskStatus.Faulted); + } + + [DebuggerHidden] + public void GetResult(short token) + { + MarkHandled(); + + var status = (UniTaskStatus)intStatus; + switch (status) + { + case UniTaskStatus.Succeeded: + return; + case UniTaskStatus.Faulted: + exception.GetException().Throw(); + return; + case UniTaskStatus.Canceled: + throw new OperationCanceledException(cancellationToken); + default: + case UniTaskStatus.Pending: + throw new InvalidOperationException("not yet completed."); + } + } + + [DebuggerHidden] + public UniTaskStatus GetStatus(short token) + { + return (UniTaskStatus)intStatus; + } + + [DebuggerHidden] + public UniTaskStatus UnsafeGetStatus() + { + return (UniTaskStatus)intStatus; + } + + [DebuggerHidden] + public void OnCompleted(Action continuation, object state, short token) + { + if (gate == null) + { + Interlocked.CompareExchange(ref gate, new object(), null); + } + + var lockGate = Thread.VolatileRead(ref gate); + lock (lockGate) // wait TrySignalCompletion, after status is not pending. + { + if ((UniTaskStatus)intStatus != UniTaskStatus.Pending) + { + continuation(state); + return; + } + + if (singleContinuation == null) + { + singleContinuation = continuation; + singleState = state; + } + else + { + if (secondaryContinuationList == null) + { + secondaryContinuationList = new List<(Action, object)>(); + } + secondaryContinuationList.Add((continuation, state)); + } + } + } + + [DebuggerHidden] + bool TrySignalCompletion(UniTaskStatus status) + { + if (Interlocked.CompareExchange(ref intStatus, (int)status, (int)UniTaskStatus.Pending) == (int)UniTaskStatus.Pending) + { + if (gate == null) + { + Interlocked.CompareExchange(ref gate, new object(), null); + } + + var lockGate = Thread.VolatileRead(ref gate); + lock (lockGate) // wait OnCompleted. + { + if (singleContinuation != null) + { + try + { + singleContinuation(singleState); + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + } + + if (secondaryContinuationList != null) + { + foreach (var (c, state) in secondaryContinuationList) + { + try + { + c(state); + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + } + } + + singleContinuation = null; + singleState = null; + secondaryContinuationList = null; + } + return true; + } + return false; + } + } + + public class UniTaskCompletionSource : IUniTaskSource, IPromise + { + CancellationToken cancellationToken; + T result; + ExceptionHolder exception; + object gate; + Action singleContinuation; + object singleState; + List<(Action, object)> secondaryContinuationList; + + int intStatus; // UniTaskStatus + bool handled = false; + + public UniTaskCompletionSource() + { + TaskTracker.TrackActiveTask(this, 2); + } + + [DebuggerHidden] + internal void MarkHandled() + { + if (!handled) + { + handled = true; + TaskTracker.RemoveTracking(this); + } + } + + public UniTask Task + { + [DebuggerHidden] + get + { + return new UniTask(this, 0); + } + } + + [DebuggerHidden] + public bool TrySetResult(T result) + { + if (UnsafeGetStatus() != UniTaskStatus.Pending) return false; + + this.result = result; + return TrySignalCompletion(UniTaskStatus.Succeeded); + } + + [DebuggerHidden] + public bool TrySetCanceled(CancellationToken cancellationToken = default) + { + if (UnsafeGetStatus() != UniTaskStatus.Pending) return false; + + this.cancellationToken = cancellationToken; + return TrySignalCompletion(UniTaskStatus.Canceled); + } + + [DebuggerHidden] + public bool TrySetException(Exception exception) + { + if (exception is OperationCanceledException oce) + { + return TrySetCanceled(oce.CancellationToken); + } + + if (UnsafeGetStatus() != UniTaskStatus.Pending) return false; + + this.exception = new ExceptionHolder(ExceptionDispatchInfo.Capture(exception)); + return TrySignalCompletion(UniTaskStatus.Faulted); + } + + [DebuggerHidden] + public T GetResult(short token) + { + MarkHandled(); + + var status = (UniTaskStatus)intStatus; + switch (status) + { + case UniTaskStatus.Succeeded: + return result; + case UniTaskStatus.Faulted: + exception.GetException().Throw(); + return default; + case UniTaskStatus.Canceled: + throw new OperationCanceledException(cancellationToken); + default: + case UniTaskStatus.Pending: + throw new InvalidOperationException("not yet completed."); + } + } + + [DebuggerHidden] + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + [DebuggerHidden] + public UniTaskStatus GetStatus(short token) + { + return (UniTaskStatus)intStatus; + } + + [DebuggerHidden] + public UniTaskStatus UnsafeGetStatus() + { + return (UniTaskStatus)intStatus; + } + + [DebuggerHidden] + public void OnCompleted(Action continuation, object state, short token) + { + if (gate == null) + { + Interlocked.CompareExchange(ref gate, new object(), null); + } + + var lockGate = Thread.VolatileRead(ref gate); + lock (lockGate) // wait TrySignalCompletion, after status is not pending. + { + if ((UniTaskStatus)intStatus != UniTaskStatus.Pending) + { + continuation(state); + return; + } + + if (singleContinuation == null) + { + singleContinuation = continuation; + singleState = state; + } + else + { + if (secondaryContinuationList == null) + { + secondaryContinuationList = new List<(Action, object)>(); + } + secondaryContinuationList.Add((continuation, state)); + } + } + } + + [DebuggerHidden] + bool TrySignalCompletion(UniTaskStatus status) + { + if (Interlocked.CompareExchange(ref intStatus, (int)status, (int)UniTaskStatus.Pending) == (int)UniTaskStatus.Pending) + { + if (gate == null) + { + Interlocked.CompareExchange(ref gate, new object(), null); + } + + var lockGate = Thread.VolatileRead(ref gate); + lock (lockGate) // wait OnCompleted. + { + if (singleContinuation != null) + { + try + { + singleContinuation(singleState); + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + } + + if (secondaryContinuationList != null) + { + foreach (var (c, state) in secondaryContinuationList) + { + try + { + c(state); + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + } + } + + singleContinuation = null; + singleState = null; + secondaryContinuationList = null; + } + return true; + } + return false; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs.meta new file mode 100644 index 0000000..2ae5ee3 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ed03524d09e7eb24a9fb9137198feb84 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.Shorthand.cs b/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.Shorthand.cs new file mode 100644 index 0000000..0e51a45 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.Shorthand.cs @@ -0,0 +1,187 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member +using System.Collections.Generic; + +namespace Cysharp.Threading.Tasks +{ + public static partial class UniTaskExtensions + { + // shorthand of WhenAll + + public static UniTask.Awaiter GetAwaiter(this UniTask[] tasks) + { + return UniTask.WhenAll(tasks).GetAwaiter(); + } + + public static UniTask.Awaiter GetAwaiter(this IEnumerable tasks) + { + return UniTask.WhenAll(tasks).GetAwaiter(); + } + + public static UniTask.Awaiter GetAwaiter(this UniTask[] tasks) + { + return UniTask.WhenAll(tasks).GetAwaiter(); + } + + public static UniTask.Awaiter GetAwaiter(this IEnumerable> tasks) + { + return UniTask.WhenAll(tasks).GetAwaiter(); + } + + public static UniTask<(T1, T2)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2).GetAwaiter(); + } + + public static UniTask<(T1, T2, T3)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3).GetAwaiter(); + } + + public static UniTask<(T1, T2, T3, T4)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4).GetAwaiter(); + } + + public static UniTask<(T1, T2, T3, T4, T5)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5).GetAwaiter(); + } + + public static UniTask<(T1, T2, T3, T4, T5, T6)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6).GetAwaiter(); + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7).GetAwaiter(); + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8).GetAwaiter(); + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8, tasks.Item9).GetAwaiter(); + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8, tasks.Item9, tasks.Item10).GetAwaiter(); + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8, tasks.Item9, tasks.Item10, tasks.Item11).GetAwaiter(); + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8, tasks.Item9, tasks.Item10, tasks.Item11, tasks.Item12).GetAwaiter(); + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8, tasks.Item9, tasks.Item10, tasks.Item11, tasks.Item12, tasks.Item13).GetAwaiter(); + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8, tasks.Item9, tasks.Item10, tasks.Item11, tasks.Item12, tasks.Item13, tasks.Item14).GetAwaiter(); + } + + public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14, UniTask task15) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8, tasks.Item9, tasks.Item10, tasks.Item11, tasks.Item12, tasks.Item13, tasks.Item14, tasks.Item15).GetAwaiter(); + } + + + + public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2).GetAwaiter(); + } + + + public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3).GetAwaiter(); + } + + + public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4).GetAwaiter(); + } + + + public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5).GetAwaiter(); + } + + + public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6).GetAwaiter(); + } + + + public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7).GetAwaiter(); + } + + + public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8).GetAwaiter(); + } + + + public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8, tasks.Item9).GetAwaiter(); + } + + + public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8, tasks.Item9, tasks.Item10).GetAwaiter(); + } + + + public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8, tasks.Item9, tasks.Item10, tasks.Item11).GetAwaiter(); + } + + + public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8, tasks.Item9, tasks.Item10, tasks.Item11, tasks.Item12).GetAwaiter(); + } + + + public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8, tasks.Item9, tasks.Item10, tasks.Item11, tasks.Item12, tasks.Item13).GetAwaiter(); + } + + + public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8, tasks.Item9, tasks.Item10, tasks.Item11, tasks.Item12, tasks.Item13, tasks.Item14).GetAwaiter(); + } + + + public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14, UniTask task15) tasks) + { + return UniTask.WhenAll(tasks.Item1, tasks.Item2, tasks.Item3, tasks.Item4, tasks.Item5, tasks.Item6, tasks.Item7, tasks.Item8, tasks.Item9, tasks.Item10, tasks.Item11, tasks.Item12, tasks.Item13, tasks.Item14, tasks.Item15).GetAwaiter(); + } + + + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.Shorthand.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.Shorthand.cs.meta new file mode 100644 index 0000000..e2dcc14 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.Shorthand.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4b4ff020f73dc6d4b8ebd4760d61fb43 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.cs b/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.cs new file mode 100644 index 0000000..1e4faa1 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.cs @@ -0,0 +1,921 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Collections; +using System.Runtime.ExceptionServices; +using System.Threading; +using System.Threading.Tasks; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks +{ + public static partial class UniTaskExtensions + { + /// + /// Convert Task[T] -> UniTask[T]. + /// + public static UniTask AsUniTask(this Task task, bool useCurrentSynchronizationContext = true) + { + var promise = new UniTaskCompletionSource(); + + task.ContinueWith((x, state) => + { + var p = (UniTaskCompletionSource)state; + + switch (x.Status) + { + case TaskStatus.Canceled: + p.TrySetCanceled(); + break; + case TaskStatus.Faulted: + p.TrySetException(x.Exception.InnerException ?? x.Exception); + break; + case TaskStatus.RanToCompletion: + p.TrySetResult(x.Result); + break; + default: + throw new NotSupportedException(); + } + }, promise, useCurrentSynchronizationContext ? TaskScheduler.FromCurrentSynchronizationContext() : TaskScheduler.Current); + + return promise.Task; + } + + /// + /// Convert Task -> UniTask. + /// + public static UniTask AsUniTask(this Task task, bool useCurrentSynchronizationContext = true) + { + var promise = new UniTaskCompletionSource(); + + task.ContinueWith((x, state) => + { + var p = (UniTaskCompletionSource)state; + + switch (x.Status) + { + case TaskStatus.Canceled: + p.TrySetCanceled(); + break; + case TaskStatus.Faulted: + p.TrySetException(x.Exception.InnerException ?? x.Exception); + break; + case TaskStatus.RanToCompletion: + p.TrySetResult(); + break; + default: + throw new NotSupportedException(); + } + }, promise, useCurrentSynchronizationContext ? TaskScheduler.FromCurrentSynchronizationContext() : TaskScheduler.Current); + + return promise.Task; + } + + public static Task AsTask(this UniTask task) + { + try + { + UniTask.Awaiter awaiter; + try + { + awaiter = task.GetAwaiter(); + } + catch (Exception ex) + { + return Task.FromException(ex); + } + + if (awaiter.IsCompleted) + { + try + { + var result = awaiter.GetResult(); + return Task.FromResult(result); + } + catch (Exception ex) + { + return Task.FromException(ex); + } + } + + var tcs = new TaskCompletionSource(); + + awaiter.SourceOnCompleted(state => + { + using (var tuple = (StateTuple, UniTask.Awaiter>)state) + { + var (inTcs, inAwaiter) = tuple; + try + { + var result = inAwaiter.GetResult(); + inTcs.SetResult(result); + } + catch (Exception ex) + { + inTcs.SetException(ex); + } + } + }, StateTuple.Create(tcs, awaiter)); + + return tcs.Task; + } + catch (Exception ex) + { + return Task.FromException(ex); + } + } + + public static Task AsTask(this UniTask task) + { + try + { + UniTask.Awaiter awaiter; + try + { + awaiter = task.GetAwaiter(); + } + catch (Exception ex) + { + return Task.FromException(ex); + } + + if (awaiter.IsCompleted) + { + try + { + awaiter.GetResult(); // check token valid on Succeeded + return Task.CompletedTask; + } + catch (Exception ex) + { + return Task.FromException(ex); + } + } + + var tcs = new TaskCompletionSource(); + + awaiter.SourceOnCompleted(state => + { + using (var tuple = (StateTuple, UniTask.Awaiter>)state) + { + var (inTcs, inAwaiter) = tuple; + try + { + inAwaiter.GetResult(); + inTcs.SetResult(null); + } + catch (Exception ex) + { + inTcs.SetException(ex); + } + } + }, StateTuple.Create(tcs, awaiter)); + + return tcs.Task; + } + catch (Exception ex) + { + return Task.FromException(ex); + } + } + + public static AsyncLazy ToAsyncLazy(this UniTask task) + { + return new AsyncLazy(task); + } + + public static AsyncLazy ToAsyncLazy(this UniTask task) + { + return new AsyncLazy(task); + } + + /// + /// Ignore task result when cancel raised first. + /// + public static UniTask AttachExternalCancellation(this UniTask task, CancellationToken cancellationToken) + { + if (!cancellationToken.CanBeCanceled) + { + return task; + } + + if (cancellationToken.IsCancellationRequested) + { + return UniTask.FromCanceled(cancellationToken); + } + + if (task.Status.IsCompleted()) + { + return task; + } + + return new UniTask(new AttachExternalCancellationSource(task, cancellationToken), 0); + } + + /// + /// Ignore task result when cancel raised first. + /// + public static UniTask AttachExternalCancellation(this UniTask task, CancellationToken cancellationToken) + { + if (!cancellationToken.CanBeCanceled) + { + return task; + } + + if (cancellationToken.IsCancellationRequested) + { + return UniTask.FromCanceled(cancellationToken); + } + + if (task.Status.IsCompleted()) + { + return task; + } + + return new UniTask(new AttachExternalCancellationSource(task, cancellationToken), 0); + } + + sealed class AttachExternalCancellationSource : IUniTaskSource + { + static readonly Action cancellationCallbackDelegate = CancellationCallback; + + CancellationToken cancellationToken; + CancellationTokenRegistration tokenRegistration; + UniTaskCompletionSourceCore core; + + public AttachExternalCancellationSource(UniTask task, CancellationToken cancellationToken) + { + this.cancellationToken = cancellationToken; + this.tokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(cancellationCallbackDelegate, this); + RunTask(task).Forget(); + } + + async UniTaskVoid RunTask(UniTask task) + { + try + { + await task; + core.TrySetResult(AsyncUnit.Default); + } + catch (Exception ex) + { + core.TrySetException(ex); + } + finally + { + tokenRegistration.Dispose(); + } + } + + static void CancellationCallback(object state) + { + var self = (AttachExternalCancellationSource)state; + self.core.TrySetCanceled(self.cancellationToken); + } + + public void GetResult(short token) + { + core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + } + + sealed class AttachExternalCancellationSource : IUniTaskSource + { + static readonly Action cancellationCallbackDelegate = CancellationCallback; + + CancellationToken cancellationToken; + CancellationTokenRegistration tokenRegistration; + UniTaskCompletionSourceCore core; + + public AttachExternalCancellationSource(UniTask task, CancellationToken cancellationToken) + { + this.cancellationToken = cancellationToken; + this.tokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(cancellationCallbackDelegate, this); + RunTask(task).Forget(); + } + + async UniTaskVoid RunTask(UniTask task) + { + try + { + core.TrySetResult(await task); + } + catch (Exception ex) + { + core.TrySetException(ex); + } + finally + { + tokenRegistration.Dispose(); + } + } + + static void CancellationCallback(object state) + { + var self = (AttachExternalCancellationSource)state; + self.core.TrySetCanceled(self.cancellationToken); + } + + void IUniTaskSource.GetResult(short token) + { + core.GetResult(token); + } + + public T GetResult(short token) + { + return core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + } + +#if UNITY_2018_3_OR_NEWER + + public static IEnumerator ToCoroutine(this UniTask task, Action resultHandler = null, Action exceptionHandler = null) + { + return new ToCoroutineEnumerator(task, resultHandler, exceptionHandler); + } + + public static IEnumerator ToCoroutine(this UniTask task, Action exceptionHandler = null) + { + return new ToCoroutineEnumerator(task, exceptionHandler); + } + + public static async UniTask Timeout(this UniTask task, TimeSpan timeout, DelayType delayType = DelayType.DeltaTime, PlayerLoopTiming timeoutCheckTiming = PlayerLoopTiming.Update, CancellationTokenSource taskCancellationTokenSource = null) + { + var delayCancellationTokenSource = new CancellationTokenSource(); + var timeoutTask = UniTask.Delay(timeout, delayType, timeoutCheckTiming, delayCancellationTokenSource.Token).SuppressCancellationThrow(); + + int winArgIndex; + bool taskResultIsCanceled; + try + { + (winArgIndex, taskResultIsCanceled, _) = await UniTask.WhenAny(task.SuppressCancellationThrow(), timeoutTask); + } + catch + { + delayCancellationTokenSource.Cancel(); + delayCancellationTokenSource.Dispose(); + throw; + } + + // timeout + if (winArgIndex == 1) + { + if (taskCancellationTokenSource != null) + { + taskCancellationTokenSource.Cancel(); + taskCancellationTokenSource.Dispose(); + } + + throw new TimeoutException("Exceed Timeout:" + timeout); + } + else + { + delayCancellationTokenSource.Cancel(); + delayCancellationTokenSource.Dispose(); + } + + if (taskResultIsCanceled) + { + Error.ThrowOperationCanceledException(); + } + } + + public static async UniTask Timeout(this UniTask task, TimeSpan timeout, DelayType delayType = DelayType.DeltaTime, PlayerLoopTiming timeoutCheckTiming = PlayerLoopTiming.Update, CancellationTokenSource taskCancellationTokenSource = null) + { + var delayCancellationTokenSource = new CancellationTokenSource(); + var timeoutTask = UniTask.Delay(timeout, delayType, timeoutCheckTiming, delayCancellationTokenSource.Token).SuppressCancellationThrow(); + + int winArgIndex; + (bool IsCanceled, T Result) taskResult; + try + { + (winArgIndex, taskResult, _) = await UniTask.WhenAny(task.SuppressCancellationThrow(), timeoutTask); + } + catch + { + delayCancellationTokenSource.Cancel(); + delayCancellationTokenSource.Dispose(); + throw; + } + + // timeout + if (winArgIndex == 1) + { + if (taskCancellationTokenSource != null) + { + taskCancellationTokenSource.Cancel(); + taskCancellationTokenSource.Dispose(); + } + + throw new TimeoutException("Exceed Timeout:" + timeout); + } + else + { + delayCancellationTokenSource.Cancel(); + delayCancellationTokenSource.Dispose(); + } + + if (taskResult.IsCanceled) + { + Error.ThrowOperationCanceledException(); + } + + return taskResult.Result; + } + + /// + /// Timeout with suppress OperationCanceledException. Returns (bool, IsCanceled). + /// + public static async UniTask TimeoutWithoutException(this UniTask task, TimeSpan timeout, DelayType delayType = DelayType.DeltaTime, PlayerLoopTiming timeoutCheckTiming = PlayerLoopTiming.Update, CancellationTokenSource taskCancellationTokenSource = null) + { + var delayCancellationTokenSource = new CancellationTokenSource(); + var timeoutTask = UniTask.Delay(timeout, delayType, timeoutCheckTiming, delayCancellationTokenSource.Token).SuppressCancellationThrow(); + + int winArgIndex; + bool taskResultIsCanceled; + try + { + (winArgIndex, taskResultIsCanceled, _) = await UniTask.WhenAny(task.SuppressCancellationThrow(), timeoutTask); + } + catch + { + delayCancellationTokenSource.Cancel(); + delayCancellationTokenSource.Dispose(); + return true; + } + + // timeout + if (winArgIndex == 1) + { + if (taskCancellationTokenSource != null) + { + taskCancellationTokenSource.Cancel(); + taskCancellationTokenSource.Dispose(); + } + + return true; + } + else + { + delayCancellationTokenSource.Cancel(); + delayCancellationTokenSource.Dispose(); + } + + if (taskResultIsCanceled) + { + return true; + } + + return false; + } + + /// + /// Timeout with suppress OperationCanceledException. Returns (bool IsTimeout, T Result). + /// + public static async UniTask<(bool IsTimeout, T Result)> TimeoutWithoutException(this UniTask task, TimeSpan timeout, DelayType delayType = DelayType.DeltaTime, PlayerLoopTiming timeoutCheckTiming = PlayerLoopTiming.Update, CancellationTokenSource taskCancellationTokenSource = null) + { + var delayCancellationTokenSource = new CancellationTokenSource(); + var timeoutTask = UniTask.Delay(timeout, delayType, timeoutCheckTiming, delayCancellationTokenSource.Token).SuppressCancellationThrow(); + + int winArgIndex; + (bool IsCanceled, T Result) taskResult; + try + { + (winArgIndex, taskResult, _) = await UniTask.WhenAny(task.SuppressCancellationThrow(), timeoutTask); + } + catch + { + delayCancellationTokenSource.Cancel(); + delayCancellationTokenSource.Dispose(); + return (true, default); + } + + // timeout + if (winArgIndex == 1) + { + if (taskCancellationTokenSource != null) + { + taskCancellationTokenSource.Cancel(); + taskCancellationTokenSource.Dispose(); + } + + return (true, default); + } + else + { + delayCancellationTokenSource.Cancel(); + delayCancellationTokenSource.Dispose(); + } + + if (taskResult.IsCanceled) + { + return (true, default); + } + + return (false, taskResult.Result); + } + +#endif + + public static void Forget(this UniTask task) + { + var awaiter = task.GetAwaiter(); + if (awaiter.IsCompleted) + { + try + { + awaiter.GetResult(); + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple)state) + { + try + { + t.Item1.GetResult(); + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + } + }, StateTuple.Create(awaiter)); + } + } + + public static void Forget(this UniTask task, Action exceptionHandler, bool handleExceptionOnMainThread = true) + { + if (exceptionHandler == null) + { + Forget(task); + } + else + { + ForgetCoreWithCatch(task, exceptionHandler, handleExceptionOnMainThread).Forget(); + } + } + + static async UniTaskVoid ForgetCoreWithCatch(UniTask task, Action exceptionHandler, bool handleExceptionOnMainThread) + { + try + { + await task; + } + catch (Exception ex) + { + try + { + if (handleExceptionOnMainThread) + { +#if UNITY_2018_3_OR_NEWER + await UniTask.SwitchToMainThread(); +#endif + } + exceptionHandler(ex); + } + catch (Exception ex2) + { + UniTaskScheduler.PublishUnobservedTaskException(ex2); + } + } + } + + public static void Forget(this UniTask task) + { + var awaiter = task.GetAwaiter(); + if (awaiter.IsCompleted) + { + try + { + awaiter.GetResult(); + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + } + else + { + awaiter.SourceOnCompleted(state => + { + using (var t = (StateTuple.Awaiter>)state) + { + try + { + t.Item1.GetResult(); + } + catch (Exception ex) + { + UniTaskScheduler.PublishUnobservedTaskException(ex); + } + } + }, StateTuple.Create(awaiter)); + } + } + + public static void Forget(this UniTask task, Action exceptionHandler, bool handleExceptionOnMainThread = true) + { + if (exceptionHandler == null) + { + task.Forget(); + } + else + { + ForgetCoreWithCatch(task, exceptionHandler, handleExceptionOnMainThread).Forget(); + } + } + + static async UniTaskVoid ForgetCoreWithCatch(UniTask task, Action exceptionHandler, bool handleExceptionOnMainThread) + { + try + { + await task; + } + catch (Exception ex) + { + try + { + if (handleExceptionOnMainThread) + { +#if UNITY_2018_3_OR_NEWER + await UniTask.SwitchToMainThread(); +#endif + } + exceptionHandler(ex); + } + catch (Exception ex2) + { + UniTaskScheduler.PublishUnobservedTaskException(ex2); + } + } + } + + public static async UniTask ContinueWith(this UniTask task, Action continuationFunction) + { + continuationFunction(await task); + } + + public static async UniTask ContinueWith(this UniTask task, Func continuationFunction) + { + await continuationFunction(await task); + } + + public static async UniTask ContinueWith(this UniTask task, Func continuationFunction) + { + return continuationFunction(await task); + } + + public static async UniTask ContinueWith(this UniTask task, Func> continuationFunction) + { + return await continuationFunction(await task); + } + + public static async UniTask ContinueWith(this UniTask task, Action continuationFunction) + { + await task; + continuationFunction(); + } + + public static async UniTask ContinueWith(this UniTask task, Func continuationFunction) + { + await task; + await continuationFunction(); + } + + public static async UniTask ContinueWith(this UniTask task, Func continuationFunction) + { + await task; + return continuationFunction(); + } + + public static async UniTask ContinueWith(this UniTask task, Func> continuationFunction) + { + await task; + return await continuationFunction(); + } + + public static async UniTask Unwrap(this UniTask> task) + { + return await await task; + } + + public static async UniTask Unwrap(this UniTask task) + { + await await task; + } + + public static async UniTask Unwrap(this Task> task) + { + return await await task; + } + + public static async UniTask Unwrap(this Task> task, bool continueOnCapturedContext) + { + return await await task.ConfigureAwait(continueOnCapturedContext); + } + + public static async UniTask Unwrap(this Task task) + { + await await task; + } + + public static async UniTask Unwrap(this Task task, bool continueOnCapturedContext) + { + await await task.ConfigureAwait(continueOnCapturedContext); + } + + public static async UniTask Unwrap(this UniTask> task) + { + return await await task; + } + + public static async UniTask Unwrap(this UniTask> task, bool continueOnCapturedContext) + { + return await (await task).ConfigureAwait(continueOnCapturedContext); + } + + public static async UniTask Unwrap(this UniTask task) + { + await await task; + } + + public static async UniTask Unwrap(this UniTask task, bool continueOnCapturedContext) + { + await (await task).ConfigureAwait(continueOnCapturedContext); + } + +#if UNITY_2018_3_OR_NEWER + + sealed class ToCoroutineEnumerator : IEnumerator + { + bool completed; + UniTask task; + Action exceptionHandler = null; + bool isStarted = false; + ExceptionDispatchInfo exception; + + public ToCoroutineEnumerator(UniTask task, Action exceptionHandler) + { + completed = false; + this.exceptionHandler = exceptionHandler; + this.task = task; + } + + async UniTaskVoid RunTask(UniTask task) + { + try + { + await task; + } + catch (Exception ex) + { + if (exceptionHandler != null) + { + exceptionHandler(ex); + } + else + { + this.exception = ExceptionDispatchInfo.Capture(ex); + } + } + finally + { + completed = true; + } + } + + public object Current => null; + + public bool MoveNext() + { + if (!isStarted) + { + isStarted = true; + RunTask(task).Forget(); + } + + if (exception != null) + { + exception.Throw(); + return false; + } + + return !completed; + } + + void IEnumerator.Reset() + { + } + } + + sealed class ToCoroutineEnumerator : IEnumerator + { + bool completed; + Action resultHandler = null; + Action exceptionHandler = null; + bool isStarted = false; + UniTask task; + object current = null; + ExceptionDispatchInfo exception; + + public ToCoroutineEnumerator(UniTask task, Action resultHandler, Action exceptionHandler) + { + completed = false; + this.task = task; + this.resultHandler = resultHandler; + this.exceptionHandler = exceptionHandler; + } + + async UniTaskVoid RunTask(UniTask task) + { + try + { + var value = await task; + current = value; // boxed if T is struct... + if (resultHandler != null) + { + resultHandler(value); + } + } + catch (Exception ex) + { + if (exceptionHandler != null) + { + exceptionHandler(ex); + } + else + { + this.exception = ExceptionDispatchInfo.Capture(ex); + } + } + finally + { + completed = true; + } + } + + public object Current => current; + + public bool MoveNext() + { + if (!isStarted) + { + isStarted = true; + RunTask(task).Forget(); + } + + if (exception != null) + { + exception.Throw(); + return false; + } + + return !completed; + } + + void IEnumerator.Reset() + { + } + } + +#endif + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.cs.meta new file mode 100644 index 0000000..0d22946 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTaskExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 05460c617dae1e440861a7438535389f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTaskObservableExtensions.cs b/Assets/Plugins/UniTask/Runtime/UniTaskObservableExtensions.cs new file mode 100644 index 0000000..d2bd961 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTaskObservableExtensions.cs @@ -0,0 +1,750 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Runtime.ExceptionServices; +using System.Threading; +using Cysharp.Threading.Tasks.Internal; + +namespace Cysharp.Threading.Tasks +{ + public static class UniTaskObservableExtensions + { + public static UniTask ToUniTask(this IObservable source, bool useFirstValue = false, CancellationToken cancellationToken = default) + { + var promise = new UniTaskCompletionSource(); + var disposable = new SingleAssignmentDisposable(); + + var observer = useFirstValue + ? (IObserver)new FirstValueToUniTaskObserver(promise, disposable, cancellationToken) + : (IObserver)new ToUniTaskObserver(promise, disposable, cancellationToken); + + try + { + disposable.Disposable = source.Subscribe(observer); + } + catch (Exception ex) + { + promise.TrySetException(ex); + } + + return promise.Task; + } + + public static IObservable ToObservable(this UniTask task) + { + if (task.Status.IsCompleted()) + { + try + { + return new ReturnObservable(task.GetAwaiter().GetResult()); + } + catch (Exception ex) + { + return new ThrowObservable(ex); + } + } + + var subject = new AsyncSubject(); + Fire(subject, task).Forget(); + return subject; + } + + /// + /// Ideally returns IObservabl[Unit] is best but Cysharp.Threading.Tasks does not have Unit so return AsyncUnit instead. + /// + public static IObservable ToObservable(this UniTask task) + { + if (task.Status.IsCompleted()) + { + try + { + task.GetAwaiter().GetResult(); + return new ReturnObservable(AsyncUnit.Default); + } + catch (Exception ex) + { + return new ThrowObservable(ex); + } + } + + var subject = new AsyncSubject(); + Fire(subject, task).Forget(); + return subject; + } + + static async UniTaskVoid Fire(AsyncSubject subject, UniTask task) + { + T value; + try + { + value = await task; + } + catch (Exception ex) + { + subject.OnError(ex); + return; + } + + subject.OnNext(value); + subject.OnCompleted(); + } + + static async UniTaskVoid Fire(AsyncSubject subject, UniTask task) + { + try + { + await task; + } + catch (Exception ex) + { + subject.OnError(ex); + return; + } + + subject.OnNext(AsyncUnit.Default); + subject.OnCompleted(); + } + + class ToUniTaskObserver : IObserver + { + static readonly Action callback = OnCanceled; + + readonly UniTaskCompletionSource promise; + readonly SingleAssignmentDisposable disposable; + readonly CancellationToken cancellationToken; + readonly CancellationTokenRegistration registration; + + bool hasValue; + T latestValue; + + public ToUniTaskObserver(UniTaskCompletionSource promise, SingleAssignmentDisposable disposable, CancellationToken cancellationToken) + { + this.promise = promise; + this.disposable = disposable; + this.cancellationToken = cancellationToken; + + if (this.cancellationToken.CanBeCanceled) + { + this.registration = this.cancellationToken.RegisterWithoutCaptureExecutionContext(callback, this); + } + } + + static void OnCanceled(object state) + { + var self = (ToUniTaskObserver)state; + self.disposable.Dispose(); + self.promise.TrySetCanceled(self.cancellationToken); + } + + public void OnNext(T value) + { + hasValue = true; + latestValue = value; + } + + public void OnError(Exception error) + { + try + { + promise.TrySetException(error); + } + finally + { + registration.Dispose(); + disposable.Dispose(); + } + } + + public void OnCompleted() + { + try + { + if (hasValue) + { + promise.TrySetResult(latestValue); + } + else + { + promise.TrySetException(new InvalidOperationException("Sequence has no elements")); + } + } + finally + { + registration.Dispose(); + disposable.Dispose(); + } + } + } + + class FirstValueToUniTaskObserver : IObserver + { + static readonly Action callback = OnCanceled; + + readonly UniTaskCompletionSource promise; + readonly SingleAssignmentDisposable disposable; + readonly CancellationToken cancellationToken; + readonly CancellationTokenRegistration registration; + + bool hasValue; + + public FirstValueToUniTaskObserver(UniTaskCompletionSource promise, SingleAssignmentDisposable disposable, CancellationToken cancellationToken) + { + this.promise = promise; + this.disposable = disposable; + this.cancellationToken = cancellationToken; + + if (this.cancellationToken.CanBeCanceled) + { + this.registration = this.cancellationToken.RegisterWithoutCaptureExecutionContext(callback, this); + } + } + + static void OnCanceled(object state) + { + var self = (FirstValueToUniTaskObserver)state; + self.disposable.Dispose(); + self.promise.TrySetCanceled(self.cancellationToken); + } + + public void OnNext(T value) + { + hasValue = true; + try + { + promise.TrySetResult(value); + } + finally + { + registration.Dispose(); + disposable.Dispose(); + } + } + + public void OnError(Exception error) + { + try + { + promise.TrySetException(error); + } + finally + { + registration.Dispose(); + disposable.Dispose(); + } + } + + public void OnCompleted() + { + try + { + if (!hasValue) + { + promise.TrySetException(new InvalidOperationException("Sequence has no elements")); + } + } + finally + { + registration.Dispose(); + disposable.Dispose(); + } + } + } + + class ReturnObservable : IObservable + { + readonly T value; + + public ReturnObservable(T value) + { + this.value = value; + } + + public IDisposable Subscribe(IObserver observer) + { + observer.OnNext(value); + observer.OnCompleted(); + return EmptyDisposable.Instance; + } + } + + class ThrowObservable : IObservable + { + readonly Exception value; + + public ThrowObservable(Exception value) + { + this.value = value; + } + + public IDisposable Subscribe(IObserver observer) + { + observer.OnError(value); + return EmptyDisposable.Instance; + } + } + } +} + +namespace Cysharp.Threading.Tasks.Internal +{ + // Bridges for Rx. + + internal class EmptyDisposable : IDisposable + { + public static EmptyDisposable Instance = new EmptyDisposable(); + + EmptyDisposable() + { + + } + + public void Dispose() + { + } + } + + internal sealed class SingleAssignmentDisposable : IDisposable + { + readonly object gate = new object(); + IDisposable current; + bool disposed; + + public bool IsDisposed { get { lock (gate) { return disposed; } } } + + public IDisposable Disposable + { + get + { + return current; + } + set + { + var old = default(IDisposable); + bool alreadyDisposed; + lock (gate) + { + alreadyDisposed = disposed; + old = current; + if (!alreadyDisposed) + { + if (value == null) return; + current = value; + } + } + + if (alreadyDisposed && value != null) + { + value.Dispose(); + return; + } + + if (old != null) throw new InvalidOperationException("Disposable is already set"); + } + } + + + public void Dispose() + { + IDisposable old = null; + + lock (gate) + { + if (!disposed) + { + disposed = true; + old = current; + current = null; + } + } + + if (old != null) old.Dispose(); + } + } + + internal sealed class AsyncSubject : IObservable, IObserver + { + object observerLock = new object(); + + T lastValue; + bool hasValue; + bool isStopped; + bool isDisposed; + Exception lastError; + IObserver outObserver = EmptyObserver.Instance; + + public T Value + { + get + { + ThrowIfDisposed(); + if (!isStopped) throw new InvalidOperationException("AsyncSubject is not completed yet"); + if (lastError != null) ExceptionDispatchInfo.Capture(lastError).Throw(); + return lastValue; + } + } + + public bool HasObservers + { + get + { + return !(outObserver is EmptyObserver) && !isStopped && !isDisposed; + } + } + + public bool IsCompleted { get { return isStopped; } } + + public void OnCompleted() + { + IObserver old; + T v; + bool hv; + lock (observerLock) + { + ThrowIfDisposed(); + if (isStopped) return; + + old = outObserver; + outObserver = EmptyObserver.Instance; + isStopped = true; + v = lastValue; + hv = hasValue; + } + + if (hv) + { + old.OnNext(v); + old.OnCompleted(); + } + else + { + old.OnCompleted(); + } + } + + public void OnError(Exception error) + { + if (error == null) throw new ArgumentNullException("error"); + + IObserver old; + lock (observerLock) + { + ThrowIfDisposed(); + if (isStopped) return; + + old = outObserver; + outObserver = EmptyObserver.Instance; + isStopped = true; + lastError = error; + } + + old.OnError(error); + } + + public void OnNext(T value) + { + lock (observerLock) + { + ThrowIfDisposed(); + if (isStopped) return; + + this.hasValue = true; + this.lastValue = value; + } + } + + public IDisposable Subscribe(IObserver observer) + { + if (observer == null) throw new ArgumentNullException("observer"); + + var ex = default(Exception); + var v = default(T); + var hv = false; + + lock (observerLock) + { + ThrowIfDisposed(); + if (!isStopped) + { + var listObserver = outObserver as ListObserver; + if (listObserver != null) + { + outObserver = listObserver.Add(observer); + } + else + { + var current = outObserver; + if (current is EmptyObserver) + { + outObserver = observer; + } + else + { + outObserver = new ListObserver(new ImmutableList>(new[] { current, observer })); + } + } + + return new Subscription(this, observer); + } + + ex = lastError; + v = lastValue; + hv = hasValue; + } + + if (ex != null) + { + observer.OnError(ex); + } + else if (hv) + { + observer.OnNext(v); + observer.OnCompleted(); + } + else + { + observer.OnCompleted(); + } + + return EmptyDisposable.Instance; + } + + public void Dispose() + { + lock (observerLock) + { + isDisposed = true; + outObserver = DisposedObserver.Instance; + lastError = null; + lastValue = default(T); + } + } + + void ThrowIfDisposed() + { + if (isDisposed) throw new ObjectDisposedException(""); + } + + class Subscription : IDisposable + { + readonly object gate = new object(); + AsyncSubject parent; + IObserver unsubscribeTarget; + + public Subscription(AsyncSubject parent, IObserver unsubscribeTarget) + { + this.parent = parent; + this.unsubscribeTarget = unsubscribeTarget; + } + + public void Dispose() + { + lock (gate) + { + if (parent != null) + { + lock (parent.observerLock) + { + var listObserver = parent.outObserver as ListObserver; + if (listObserver != null) + { + parent.outObserver = listObserver.Remove(unsubscribeTarget); + } + else + { + parent.outObserver = EmptyObserver.Instance; + } + + unsubscribeTarget = null; + parent = null; + } + } + } + } + } + } + + internal class ListObserver : IObserver + { + private readonly ImmutableList> _observers; + + public ListObserver(ImmutableList> observers) + { + _observers = observers; + } + + public void OnCompleted() + { + var targetObservers = _observers.Data; + for (int i = 0; i < targetObservers.Length; i++) + { + targetObservers[i].OnCompleted(); + } + } + + public void OnError(Exception error) + { + var targetObservers = _observers.Data; + for (int i = 0; i < targetObservers.Length; i++) + { + targetObservers[i].OnError(error); + } + } + + public void OnNext(T value) + { + var targetObservers = _observers.Data; + for (int i = 0; i < targetObservers.Length; i++) + { + targetObservers[i].OnNext(value); + } + } + + internal IObserver Add(IObserver observer) + { + return new ListObserver(_observers.Add(observer)); + } + + internal IObserver Remove(IObserver observer) + { + var i = Array.IndexOf(_observers.Data, observer); + if (i < 0) + return this; + + if (_observers.Data.Length == 2) + { + return _observers.Data[1 - i]; + } + else + { + return new ListObserver(_observers.Remove(observer)); + } + } + } + + internal class EmptyObserver : IObserver + { + public static readonly EmptyObserver Instance = new EmptyObserver(); + + EmptyObserver() + { + + } + + public void OnCompleted() + { + } + + public void OnError(Exception error) + { + } + + public void OnNext(T value) + { + } + } + + internal class ThrowObserver : IObserver + { + public static readonly ThrowObserver Instance = new ThrowObserver(); + + ThrowObserver() + { + + } + + public void OnCompleted() + { + } + + public void OnError(Exception error) + { + ExceptionDispatchInfo.Capture(error).Throw(); + } + + public void OnNext(T value) + { + } + } + + internal class DisposedObserver : IObserver + { + public static readonly DisposedObserver Instance = new DisposedObserver(); + + DisposedObserver() + { + + } + + public void OnCompleted() + { + throw new ObjectDisposedException(""); + } + + public void OnError(Exception error) + { + throw new ObjectDisposedException(""); + } + + public void OnNext(T value) + { + throw new ObjectDisposedException(""); + } + } + + internal class ImmutableList + { + public static readonly ImmutableList Empty = new ImmutableList(); + + T[] data; + + public T[] Data + { + get { return data; } + } + + ImmutableList() + { + data = new T[0]; + } + + public ImmutableList(T[] data) + { + this.data = data; + } + + public ImmutableList Add(T value) + { + var newData = new T[data.Length + 1]; + Array.Copy(data, newData, data.Length); + newData[data.Length] = value; + return new ImmutableList(newData); + } + + public ImmutableList Remove(T value) + { + var i = IndexOf(value); + if (i < 0) return this; + + var length = data.Length; + if (length == 1) return Empty; + + var newData = new T[length - 1]; + + Array.Copy(data, 0, newData, 0, i); + Array.Copy(data, i + 1, newData, i, length - i - 1); + + return new ImmutableList(newData); + } + + public int IndexOf(T value) + { + for (var i = 0; i < data.Length; ++i) + { + // ImmutableList only use for IObserver(no worry for boxed) + if (object.Equals(data[i], value)) return i; + } + return -1; + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/UniTaskObservableExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTaskObservableExtensions.cs.meta new file mode 100644 index 0000000..527a49f --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTaskObservableExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: eaea262a5ad393d419c15b3b2901d664 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTaskScheduler.cs b/Assets/Plugins/UniTask/Runtime/UniTaskScheduler.cs new file mode 100644 index 0000000..2f91f2a --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTaskScheduler.cs @@ -0,0 +1,103 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + // UniTask has no scheduler like TaskScheduler. + // Only handle unobserved exception. + + public static class UniTaskScheduler + { + public static event Action UnobservedTaskException; + + /// + /// Propagate OperationCanceledException to UnobservedTaskException when true. Default is false. + /// + public static bool PropagateOperationCanceledException = false; + +#if UNITY_2018_3_OR_NEWER + + /// + /// Write log type when catch unobserved exception and not registered UnobservedTaskException. Default is Exception. + /// + public static UnityEngine.LogType UnobservedExceptionWriteLogType = UnityEngine.LogType.Exception; + + /// + /// Dispatch exception event to Unity MainThread. Default is true. + /// + public static bool DispatchUnityMainThread = true; + + // cache delegate. + static readonly SendOrPostCallback handleExceptionInvoke = InvokeUnobservedTaskException; + + static void InvokeUnobservedTaskException(object state) + { + UnobservedTaskException((Exception)state); + } +#endif + + internal static void PublishUnobservedTaskException(Exception ex) + { + if (ex != null) + { + if (!PropagateOperationCanceledException && ex is OperationCanceledException) + { + return; + } + + if (UnobservedTaskException != null) + { +#if UNITY_2018_3_OR_NEWER + if (!DispatchUnityMainThread || Thread.CurrentThread.ManagedThreadId == PlayerLoopHelper.MainThreadId) + { + // allows inlining call. + UnobservedTaskException.Invoke(ex); + } + else + { + // Post to MainThread. + PlayerLoopHelper.UnitySynchronizationContext.Post(handleExceptionInvoke, ex); + } +#else + UnobservedTaskException.Invoke(ex); +#endif + } + else + { +#if UNITY_2018_3_OR_NEWER + string msg = null; + if (UnobservedExceptionWriteLogType != UnityEngine.LogType.Exception) + { + msg = "UnobservedTaskException: " + ex.ToString(); + } + switch (UnobservedExceptionWriteLogType) + { + case UnityEngine.LogType.Error: + UnityEngine.Debug.LogError(msg); + break; + case UnityEngine.LogType.Assert: + UnityEngine.Debug.LogAssertion(msg); + break; + case UnityEngine.LogType.Warning: + UnityEngine.Debug.LogWarning(msg); + break; + case UnityEngine.LogType.Log: + UnityEngine.Debug.Log(msg); + break; + case UnityEngine.LogType.Exception: + UnityEngine.Debug.LogException(ex); + break; + default: + break; + } +#else + Console.WriteLine("UnobservedTaskException: " + ex.ToString()); +#endif + } + } + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/UniTaskScheduler.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTaskScheduler.cs.meta new file mode 100644 index 0000000..5e29191 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTaskScheduler.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d6cad69921702d5488d96b5ef30df1b0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs b/Assets/Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs new file mode 100644 index 0000000..450e019 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs @@ -0,0 +1,158 @@ +using System; +using System.Runtime.InteropServices; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + public class UniTaskSynchronizationContext : SynchronizationContext + { + const int MaxArrayLength = 0X7FEFFFFF; + const int InitialSize = 16; + + static SpinLock gate = new SpinLock(false); + static bool dequing = false; + + static int actionListCount = 0; + static Callback[] actionList = new Callback[InitialSize]; + + static int waitingListCount = 0; + static Callback[] waitingList = new Callback[InitialSize]; + + static int opCount; + + public override void Send(SendOrPostCallback d, object state) + { + d(state); + } + + public override void Post(SendOrPostCallback d, object state) + { + bool lockTaken = false; + try + { + gate.Enter(ref lockTaken); + + if (dequing) + { + // Ensure Capacity + if (waitingList.Length == waitingListCount) + { + var newLength = waitingListCount * 2; + if ((uint)newLength > MaxArrayLength) newLength = MaxArrayLength; + + var newArray = new Callback[newLength]; + Array.Copy(waitingList, newArray, waitingListCount); + waitingList = newArray; + } + waitingList[waitingListCount] = new Callback(d, state); + waitingListCount++; + } + else + { + // Ensure Capacity + if (actionList.Length == actionListCount) + { + var newLength = actionListCount * 2; + if ((uint)newLength > MaxArrayLength) newLength = MaxArrayLength; + + var newArray = new Callback[newLength]; + Array.Copy(actionList, newArray, actionListCount); + actionList = newArray; + } + actionList[actionListCount] = new Callback(d, state); + actionListCount++; + } + } + finally + { + if (lockTaken) gate.Exit(false); + } + } + + public override void OperationStarted() + { + Interlocked.Increment(ref opCount); + } + + public override void OperationCompleted() + { + Interlocked.Decrement(ref opCount); + } + + public override SynchronizationContext CreateCopy() + { + return this; + } + + // delegate entrypoint. + internal static void Run() + { + { + bool lockTaken = false; + try + { + gate.Enter(ref lockTaken); + if (actionListCount == 0) return; + dequing = true; + } + finally + { + if (lockTaken) gate.Exit(false); + } + } + + for (int i = 0; i < actionListCount; i++) + { + var action = actionList[i]; + actionList[i] = default; + action.Invoke(); + } + + { + bool lockTaken = false; + try + { + gate.Enter(ref lockTaken); + dequing = false; + + var swapTempActionList = actionList; + + actionListCount = waitingListCount; + actionList = waitingList; + + waitingListCount = 0; + waitingList = swapTempActionList; + } + finally + { + if (lockTaken) gate.Exit(false); + } + } + } + + [StructLayout(LayoutKind.Auto)] + readonly struct Callback + { + readonly SendOrPostCallback callback; + readonly object state; + + public Callback(SendOrPostCallback callback, object state) + { + this.callback = callback; + this.state = state; + } + + public void Invoke() + { + try + { + callback(state); + } + catch (Exception ex) + { + UnityEngine.Debug.LogException(ex); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs.meta new file mode 100644 index 0000000..9828c89 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: abf3aae9813db2849bce518f8596e920 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UniTaskVoid.cs b/Assets/Plugins/UniTask/Runtime/UniTaskVoid.cs new file mode 100644 index 0000000..c7e9ed9 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTaskVoid.cs @@ -0,0 +1,19 @@ +#pragma warning disable CS1591 +#pragma warning disable CS0436 + +using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using Cysharp.Threading.Tasks.CompilerServices; + +namespace Cysharp.Threading.Tasks +{ + [AsyncMethodBuilder(typeof(AsyncUniTaskVoidMethodBuilder))] + public readonly struct UniTaskVoid + { + public void Forget() + { + } + } +} + diff --git a/Assets/Plugins/UniTask/Runtime/UniTaskVoid.cs.meta b/Assets/Plugins/UniTask/Runtime/UniTaskVoid.cs.meta new file mode 100644 index 0000000..01f7156 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UniTaskVoid.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e9f28cd922179634d863011548f89ae7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.AssetBundleRequestAllAssets.cs b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.AssetBundleRequestAllAssets.cs new file mode 100644 index 0000000..043e1b8 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.AssetBundleRequestAllAssets.cs @@ -0,0 +1,250 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +#if UNITY_2018_4 || UNITY_2019_4_OR_NEWER +#if UNITASK_ASSETBUNDLE_SUPPORT + +using Cysharp.Threading.Tasks.Internal; +using System; +using System.Runtime.CompilerServices; +using System.Threading; +using UnityEngine; + +namespace Cysharp.Threading.Tasks +{ + public static partial class UnityAsyncExtensions + { + public static AssetBundleRequestAllAssetsAwaiter AwaitForAllAssets(this AssetBundleRequest asyncOperation) + { + Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); + return new AssetBundleRequestAllAssetsAwaiter(asyncOperation); + } + + public static UniTask AwaitForAllAssets(this AssetBundleRequest asyncOperation, CancellationToken cancellationToken) + { + return AwaitForAllAssets(asyncOperation, null, PlayerLoopTiming.Update, cancellationToken: cancellationToken); + } + + public static UniTask AwaitForAllAssets(this AssetBundleRequest asyncOperation, CancellationToken cancellationToken, bool cancelImmediately) + { + return AwaitForAllAssets(asyncOperation, progress: null, cancellationToken: cancellationToken, cancelImmediately: cancelImmediately); + } + + public static UniTask AwaitForAllAssets(this AssetBundleRequest asyncOperation, IProgress progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); + if (cancellationToken.IsCancellationRequested) return UniTask.FromCanceled(cancellationToken); + if (asyncOperation.isDone) return UniTask.FromResult(asyncOperation.allAssets); + return new UniTask(AssetBundleRequestAllAssetsConfiguredSource.Create(asyncOperation, timing, progress, cancellationToken, cancelImmediately, out var token), token); + } + + public struct AssetBundleRequestAllAssetsAwaiter : ICriticalNotifyCompletion + { + AssetBundleRequest asyncOperation; + Action continuationAction; + + public AssetBundleRequestAllAssetsAwaiter(AssetBundleRequest asyncOperation) + { + this.asyncOperation = asyncOperation; + this.continuationAction = null; + } + + public AssetBundleRequestAllAssetsAwaiter GetAwaiter() + { + return this; + } + + public bool IsCompleted => asyncOperation.isDone; + + public UnityEngine.Object[] GetResult() + { + if (continuationAction != null) + { + asyncOperation.completed -= continuationAction; + continuationAction = null; + var result = asyncOperation.allAssets; + asyncOperation = null; + return result; + } + else + { + var result = asyncOperation.allAssets; + asyncOperation = null; + return result; + } + } + + public void OnCompleted(Action continuation) + { + UnsafeOnCompleted(continuation); + } + + public void UnsafeOnCompleted(Action continuation) + { + Error.ThrowWhenContinuationIsAlreadyRegistered(continuationAction); + continuationAction = PooledDelegate.Create(continuation); + asyncOperation.completed += continuationAction; + } + } + + sealed class AssetBundleRequestAllAssetsConfiguredSource : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + AssetBundleRequestAllAssetsConfiguredSource nextNode; + public ref AssetBundleRequestAllAssetsConfiguredSource NextNode => ref nextNode; + + static AssetBundleRequestAllAssetsConfiguredSource() + { + TaskPool.RegisterSizeGetter(typeof(AssetBundleRequestAllAssetsConfiguredSource), () => pool.Size); + } + + AssetBundleRequest asyncOperation; + IProgress progress; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + bool completed; + + UniTaskCompletionSourceCore core; + + Action continuationAction; + + AssetBundleRequestAllAssetsConfiguredSource() + { + continuationAction = Continuation; + } + + public static IUniTaskSource Create(AssetBundleRequest asyncOperation, PlayerLoopTiming timing, IProgress progress, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new AssetBundleRequestAllAssetsConfiguredSource(); + } + + result.asyncOperation = asyncOperation; + result.progress = progress; + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + result.completed = false; + + asyncOperation.completed += result.continuationAction; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var source = (AssetBundleRequestAllAssetsConfiguredSource)state; + source.core.TrySetCanceled(source.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public UnityEngine.Object[] GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + // Already completed + if (completed || asyncOperation == null) + { + return false; + } + + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + if (progress != null) + { + progress.Report(asyncOperation.progress); + } + + if (asyncOperation.isDone) + { + core.TrySetResult(asyncOperation.allAssets); + return false; + } + + return true; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + asyncOperation = default; + progress = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + + void Continuation(AsyncOperation _) + { + if (completed) + { + return; + } + + completed = true; + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + } + else + { + core.TrySetResult(asyncOperation.allAssets); + } + } + } + } +} + +#endif +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.AssetBundleRequestAllAssets.cs.meta b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.AssetBundleRequestAllAssets.cs.meta new file mode 100644 index 0000000..79be923 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.AssetBundleRequestAllAssets.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e9147caba40da434da95b39709c13784 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.AsyncGPUReadback.cs b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.AsyncGPUReadback.cs new file mode 100644 index 0000000..a363be7 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.AsyncGPUReadback.cs @@ -0,0 +1,160 @@ + #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Threading; +using UnityEngine.Rendering; + +namespace Cysharp.Threading.Tasks +{ + public static partial class UnityAsyncExtensions + { + #region AsyncGPUReadbackRequest + + public static UniTask.Awaiter GetAwaiter(this AsyncGPUReadbackRequest asyncOperation) + { + return ToUniTask(asyncOperation).GetAwaiter(); + } + + public static UniTask WithCancellation(this AsyncGPUReadbackRequest asyncOperation, CancellationToken cancellationToken) + { + return ToUniTask(asyncOperation, cancellationToken: cancellationToken); + } + + public static UniTask WithCancellation(this AsyncGPUReadbackRequest asyncOperation, CancellationToken cancellationToken, bool cancelImmediately) + { + return ToUniTask(asyncOperation, cancellationToken: cancellationToken, cancelImmediately: cancelImmediately); + } + + public static UniTask ToUniTask(this AsyncGPUReadbackRequest asyncOperation, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + if (asyncOperation.done) return UniTask.FromResult(asyncOperation); + return new UniTask(AsyncGPUReadbackRequestAwaiterConfiguredSource.Create(asyncOperation, timing, cancellationToken, cancelImmediately, out var token), token); + } + + sealed class AsyncGPUReadbackRequestAwaiterConfiguredSource : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + AsyncGPUReadbackRequestAwaiterConfiguredSource nextNode; + public ref AsyncGPUReadbackRequestAwaiterConfiguredSource NextNode => ref nextNode; + + static AsyncGPUReadbackRequestAwaiterConfiguredSource() + { + TaskPool.RegisterSizeGetter(typeof(AsyncGPUReadbackRequestAwaiterConfiguredSource), () => pool.Size); + } + + AsyncGPUReadbackRequest asyncOperation; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + UniTaskCompletionSourceCore core; + + AsyncGPUReadbackRequestAwaiterConfiguredSource() + { + } + + public static IUniTaskSource Create(AsyncGPUReadbackRequest asyncOperation, PlayerLoopTiming timing, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new AsyncGPUReadbackRequestAwaiterConfiguredSource(); + } + + result.asyncOperation = asyncOperation; + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var promise = (AsyncGPUReadbackRequestAwaiterConfiguredSource)state; + promise.core.TrySetCanceled(promise.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public AsyncGPUReadbackRequest GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + if (asyncOperation.hasError) + { + core.TrySetException(new Exception("AsyncGPUReadbackRequest.hasError = true")); + return false; + } + + if (asyncOperation.done) + { + core.TrySetResult(asyncOperation); + return false; + } + + return true; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + asyncOperation = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.AsyncGPUReadback.cs.meta b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.AsyncGPUReadback.cs.meta new file mode 100644 index 0000000..510c49e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.AsyncGPUReadback.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 98f5fedb44749ab4688674d79126b46a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.Jobs.cs b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.Jobs.cs new file mode 100644 index 0000000..db0a892 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.Jobs.cs @@ -0,0 +1,102 @@ +#if ENABLE_MANAGED_JOBS +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Threading; +using Unity.Jobs; +using UnityEngine; + +namespace Cysharp.Threading.Tasks +{ + public static partial class UnityAsyncExtensions + { + public static async UniTask WaitAsync(this JobHandle jobHandle, PlayerLoopTiming waitTiming, CancellationToken cancellationToken = default) + { + await UniTask.Yield(waitTiming); + jobHandle.Complete(); + cancellationToken.ThrowIfCancellationRequested(); // call cancel after Complete. + } + + public static UniTask.Awaiter GetAwaiter(this JobHandle jobHandle) + { + var handler = JobHandlePromise.Create(jobHandle, out var token); + { + PlayerLoopHelper.AddAction(PlayerLoopTiming.EarlyUpdate, handler); + PlayerLoopHelper.AddAction(PlayerLoopTiming.PreUpdate, handler); + PlayerLoopHelper.AddAction(PlayerLoopTiming.Update, handler); + PlayerLoopHelper.AddAction(PlayerLoopTiming.PreLateUpdate, handler); + PlayerLoopHelper.AddAction(PlayerLoopTiming.PostLateUpdate, handler); + } + + return new UniTask(handler, token).GetAwaiter(); + } + + // can not pass CancellationToken because can't handle JobHandle's Complete and NativeArray.Dispose. + + public static UniTask ToUniTask(this JobHandle jobHandle, PlayerLoopTiming waitTiming) + { + var handler = JobHandlePromise.Create(jobHandle, out var token); + { + PlayerLoopHelper.AddAction(waitTiming, handler); + } + + return new UniTask(handler, token); + } + + sealed class JobHandlePromise : IUniTaskSource, IPlayerLoopItem + { + JobHandle jobHandle; + + UniTaskCompletionSourceCore core; + + // Cancellation is not supported. + public static JobHandlePromise Create(JobHandle jobHandle, out short token) + { + // not use pool. + var result = new JobHandlePromise(); + + result.jobHandle = jobHandle; + + TaskTracker.TrackActiveTask(result, 3); + + token = result.core.Version; + return result; + } + + public void GetResult(short token) + { + TaskTracker.RemoveTracking(this); + core.GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + if (jobHandle.IsCompleted | PlayerLoopHelper.IsEditorApplicationQuitting) + { + jobHandle.Complete(); + core.TrySetResult(AsyncUnit.Default); + return false; + } + + return true; + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.Jobs.cs.meta b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.Jobs.cs.meta new file mode 100644 index 0000000..c07df0b --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.Jobs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 30979a768fbd4b94f8694eee8a305c99 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.MonoBehaviour.cs b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.MonoBehaviour.cs new file mode 100644 index 0000000..fdfe55c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.MonoBehaviour.cs @@ -0,0 +1,14 @@ +using System; +using System.Threading; + +namespace Cysharp.Threading.Tasks +{ + public static partial class UnityAsyncExtensions + { + public static UniTask StartAsyncCoroutine(this UnityEngine.MonoBehaviour monoBehaviour, Func asyncCoroutine) + { + var token = monoBehaviour.GetCancellationTokenOnDestroy(); + return asyncCoroutine(token); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.MonoBehaviour.cs.meta b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.MonoBehaviour.cs.meta new file mode 100644 index 0000000..6e45863 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.MonoBehaviour.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2edd588bb09eb0a4695d039d6a1f02b2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.cs b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.cs new file mode 100644 index 0000000..5a5ea1c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.cs @@ -0,0 +1,1196 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; +using System.Runtime.CompilerServices; +using System.Threading; +using UnityEngine; +using Cysharp.Threading.Tasks.Internal; +#if ENABLE_UNITYWEBREQUEST && (!UNITY_2019_1_OR_NEWER || UNITASK_WEBREQUEST_SUPPORT) +using UnityEngine.Networking; +#endif + +namespace Cysharp.Threading.Tasks +{ + public static partial class UnityAsyncExtensions + { + #region AsyncOperation + +#if !UNITY_2023_1_OR_NEWER + // from Unity2023.1.0a15, AsyncOperationAwaitableExtensions.GetAwaiter is defined in UnityEngine. + public static AsyncOperationAwaiter GetAwaiter(this AsyncOperation asyncOperation) + { + Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); + return new AsyncOperationAwaiter(asyncOperation); + } +#endif + + public static UniTask WithCancellation(this AsyncOperation asyncOperation, CancellationToken cancellationToken) + { + return ToUniTask(asyncOperation, cancellationToken: cancellationToken); + } + + public static UniTask WithCancellation(this AsyncOperation asyncOperation, CancellationToken cancellationToken, bool cancelImmediately) + { + return ToUniTask(asyncOperation, cancellationToken: cancellationToken, cancelImmediately: cancelImmediately); + } + + public static UniTask ToUniTask(this AsyncOperation asyncOperation, IProgress progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); + if (cancellationToken.IsCancellationRequested) return UniTask.FromCanceled(cancellationToken); + if (asyncOperation.isDone) return UniTask.CompletedTask; + return new UniTask(AsyncOperationConfiguredSource.Create(asyncOperation, timing, progress, cancellationToken, cancelImmediately, out var token), token); + } + + public struct AsyncOperationAwaiter : ICriticalNotifyCompletion + { + AsyncOperation asyncOperation; + Action continuationAction; + + public AsyncOperationAwaiter(AsyncOperation asyncOperation) + { + this.asyncOperation = asyncOperation; + this.continuationAction = null; + } + + public bool IsCompleted => asyncOperation.isDone; + + public void GetResult() + { + if (continuationAction != null) + { + asyncOperation.completed -= continuationAction; + continuationAction = null; + asyncOperation = null; + } + else + { + asyncOperation = null; + } + } + + public void OnCompleted(Action continuation) + { + UnsafeOnCompleted(continuation); + } + + public void UnsafeOnCompleted(Action continuation) + { + Error.ThrowWhenContinuationIsAlreadyRegistered(continuationAction); + continuationAction = PooledDelegate.Create(continuation); + asyncOperation.completed += continuationAction; + } + } + + sealed class AsyncOperationConfiguredSource : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + AsyncOperationConfiguredSource nextNode; + public ref AsyncOperationConfiguredSource NextNode => ref nextNode; + + static AsyncOperationConfiguredSource() + { + TaskPool.RegisterSizeGetter(typeof(AsyncOperationConfiguredSource), () => pool.Size); + } + + AsyncOperation asyncOperation; + IProgress progress; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + bool completed; + + UniTaskCompletionSourceCore core; + + Action continuationAction; + + AsyncOperationConfiguredSource() + { + continuationAction = Continuation; + } + + public static IUniTaskSource Create(AsyncOperation asyncOperation, PlayerLoopTiming timing, IProgress progress, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new AsyncOperationConfiguredSource(); + } + + result.asyncOperation = asyncOperation; + result.progress = progress; + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + result.completed = false; + + asyncOperation.completed += result.continuationAction; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var source = (AsyncOperationConfiguredSource)state; + source.core.TrySetCanceled(source.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public void GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + // Already completed + if (completed || asyncOperation == null) + { + return false; + } + + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + if (progress != null) + { + progress.Report(asyncOperation.progress); + } + + if (asyncOperation.isDone) + { + core.TrySetResult(AsyncUnit.Default); + return false; + } + + return true; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + asyncOperation.completed -= continuationAction; + asyncOperation = default; + progress = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + + void Continuation(AsyncOperation _) + { + if (completed) + { + return; + } + completed = true; + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + } + else + { + core.TrySetResult(AsyncUnit.Default); + } + } + } + + #endregion + + #region ResourceRequest + + public static ResourceRequestAwaiter GetAwaiter(this ResourceRequest asyncOperation) + { + Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); + return new ResourceRequestAwaiter(asyncOperation); + } + + public static UniTask WithCancellation(this ResourceRequest asyncOperation, CancellationToken cancellationToken) + { + return ToUniTask(asyncOperation, cancellationToken: cancellationToken); + } + + public static UniTask WithCancellation(this ResourceRequest asyncOperation, CancellationToken cancellationToken, bool cancelImmediately) + { + return ToUniTask(asyncOperation, cancellationToken: cancellationToken, cancelImmediately: cancelImmediately); + } + + public static UniTask ToUniTask(this ResourceRequest asyncOperation, IProgress progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); + if (cancellationToken.IsCancellationRequested) return UniTask.FromCanceled(cancellationToken); + if (asyncOperation.isDone) return UniTask.FromResult(asyncOperation.asset); + return new UniTask(ResourceRequestConfiguredSource.Create(asyncOperation, timing, progress, cancellationToken, cancelImmediately, out var token), token); + } + + public struct ResourceRequestAwaiter : ICriticalNotifyCompletion + { + ResourceRequest asyncOperation; + Action continuationAction; + + public ResourceRequestAwaiter(ResourceRequest asyncOperation) + { + this.asyncOperation = asyncOperation; + this.continuationAction = null; + } + + public bool IsCompleted => asyncOperation.isDone; + + public UnityEngine.Object GetResult() + { + if (continuationAction != null) + { + asyncOperation.completed -= continuationAction; + continuationAction = null; + var result = asyncOperation.asset; + asyncOperation = null; + return result; + } + else + { + var result = asyncOperation.asset; + asyncOperation = null; + return result; + } + } + + public void OnCompleted(Action continuation) + { + UnsafeOnCompleted(continuation); + } + + public void UnsafeOnCompleted(Action continuation) + { + Error.ThrowWhenContinuationIsAlreadyRegistered(continuationAction); + continuationAction = PooledDelegate.Create(continuation); + asyncOperation.completed += continuationAction; + } + } + + sealed class ResourceRequestConfiguredSource : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + ResourceRequestConfiguredSource nextNode; + public ref ResourceRequestConfiguredSource NextNode => ref nextNode; + + static ResourceRequestConfiguredSource() + { + TaskPool.RegisterSizeGetter(typeof(ResourceRequestConfiguredSource), () => pool.Size); + } + + ResourceRequest asyncOperation; + IProgress progress; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + bool completed; + + UniTaskCompletionSourceCore core; + + Action continuationAction; + + ResourceRequestConfiguredSource() + { + continuationAction = Continuation; + } + + public static IUniTaskSource Create(ResourceRequest asyncOperation, PlayerLoopTiming timing, IProgress progress, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new ResourceRequestConfiguredSource(); + } + + result.asyncOperation = asyncOperation; + result.progress = progress; + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + result.completed = false; + + asyncOperation.completed += result.continuationAction; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var source = (ResourceRequestConfiguredSource)state; + source.core.TrySetCanceled(source.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public UnityEngine.Object GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + // Already completed + if (completed || asyncOperation == null) + { + return false; + } + + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + if (progress != null) + { + progress.Report(asyncOperation.progress); + } + + if (asyncOperation.isDone) + { + core.TrySetResult(asyncOperation.asset); + return false; + } + + return true; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + asyncOperation.completed -= continuationAction; + asyncOperation = default; + progress = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + + void Continuation(AsyncOperation _) + { + if (completed) + { + return; + } + completed = true; + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + } + else + { + core.TrySetResult(asyncOperation.asset); + } + } + } + + #endregion + +#if UNITASK_ASSETBUNDLE_SUPPORT + #region AssetBundleRequest + + public static AssetBundleRequestAwaiter GetAwaiter(this AssetBundleRequest asyncOperation) + { + Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); + return new AssetBundleRequestAwaiter(asyncOperation); + } + + public static UniTask WithCancellation(this AssetBundleRequest asyncOperation, CancellationToken cancellationToken) + { + return ToUniTask(asyncOperation, cancellationToken: cancellationToken); + } + + public static UniTask WithCancellation(this AssetBundleRequest asyncOperation, CancellationToken cancellationToken, bool cancelImmediately) + { + return ToUniTask(asyncOperation, cancellationToken: cancellationToken, cancelImmediately: cancelImmediately); + } + + public static UniTask ToUniTask(this AssetBundleRequest asyncOperation, IProgress progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); + if (cancellationToken.IsCancellationRequested) return UniTask.FromCanceled(cancellationToken); + if (asyncOperation.isDone) return UniTask.FromResult(asyncOperation.asset); + return new UniTask(AssetBundleRequestConfiguredSource.Create(asyncOperation, timing, progress, cancellationToken, cancelImmediately, out var token), token); + } + + public struct AssetBundleRequestAwaiter : ICriticalNotifyCompletion + { + AssetBundleRequest asyncOperation; + Action continuationAction; + + public AssetBundleRequestAwaiter(AssetBundleRequest asyncOperation) + { + this.asyncOperation = asyncOperation; + this.continuationAction = null; + } + + public bool IsCompleted => asyncOperation.isDone; + + public UnityEngine.Object GetResult() + { + if (continuationAction != null) + { + asyncOperation.completed -= continuationAction; + continuationAction = null; + var result = asyncOperation.asset; + asyncOperation = null; + return result; + } + else + { + var result = asyncOperation.asset; + asyncOperation = null; + return result; + } + } + + public void OnCompleted(Action continuation) + { + UnsafeOnCompleted(continuation); + } + + public void UnsafeOnCompleted(Action continuation) + { + Error.ThrowWhenContinuationIsAlreadyRegistered(continuationAction); + continuationAction = PooledDelegate.Create(continuation); + asyncOperation.completed += continuationAction; + } + } + + sealed class AssetBundleRequestConfiguredSource : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + AssetBundleRequestConfiguredSource nextNode; + public ref AssetBundleRequestConfiguredSource NextNode => ref nextNode; + + static AssetBundleRequestConfiguredSource() + { + TaskPool.RegisterSizeGetter(typeof(AssetBundleRequestConfiguredSource), () => pool.Size); + } + + AssetBundleRequest asyncOperation; + IProgress progress; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + bool completed; + + UniTaskCompletionSourceCore core; + + Action continuationAction; + + AssetBundleRequestConfiguredSource() + { + continuationAction = Continuation; + } + + public static IUniTaskSource Create(AssetBundleRequest asyncOperation, PlayerLoopTiming timing, IProgress progress, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new AssetBundleRequestConfiguredSource(); + } + + result.asyncOperation = asyncOperation; + result.progress = progress; + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + result.completed = false; + + asyncOperation.completed += result.continuationAction; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var source = (AssetBundleRequestConfiguredSource)state; + source.core.TrySetCanceled(source.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public UnityEngine.Object GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + // Already completed + if (completed || asyncOperation == null) + { + return false; + } + + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + if (progress != null) + { + progress.Report(asyncOperation.progress); + } + + if (asyncOperation.isDone) + { + core.TrySetResult(asyncOperation.asset); + return false; + } + + return true; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + asyncOperation.completed -= continuationAction; + asyncOperation = default; + progress = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + + void Continuation(AsyncOperation _) + { + if (completed) + { + return; + } + completed = true; + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + } + else + { + core.TrySetResult(asyncOperation.asset); + } + } + } + + #endregion +#endif + +#if UNITASK_ASSETBUNDLE_SUPPORT + #region AssetBundleCreateRequest + + public static AssetBundleCreateRequestAwaiter GetAwaiter(this AssetBundleCreateRequest asyncOperation) + { + Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); + return new AssetBundleCreateRequestAwaiter(asyncOperation); + } + + public static UniTask WithCancellation(this AssetBundleCreateRequest asyncOperation, CancellationToken cancellationToken) + { + return ToUniTask(asyncOperation, cancellationToken: cancellationToken); + } + + public static UniTask WithCancellation(this AssetBundleCreateRequest asyncOperation, CancellationToken cancellationToken, bool cancelImmediately) + { + return ToUniTask(asyncOperation, cancellationToken: cancellationToken, cancelImmediately: cancelImmediately); + } + + public static UniTask ToUniTask(this AssetBundleCreateRequest asyncOperation, IProgress progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); + if (cancellationToken.IsCancellationRequested) return UniTask.FromCanceled(cancellationToken); + if (asyncOperation.isDone) return UniTask.FromResult(asyncOperation.assetBundle); + return new UniTask(AssetBundleCreateRequestConfiguredSource.Create(asyncOperation, timing, progress, cancellationToken, cancelImmediately, out var token), token); + } + + public struct AssetBundleCreateRequestAwaiter : ICriticalNotifyCompletion + { + AssetBundleCreateRequest asyncOperation; + Action continuationAction; + + public AssetBundleCreateRequestAwaiter(AssetBundleCreateRequest asyncOperation) + { + this.asyncOperation = asyncOperation; + this.continuationAction = null; + } + + public bool IsCompleted => asyncOperation.isDone; + + public AssetBundle GetResult() + { + if (continuationAction != null) + { + asyncOperation.completed -= continuationAction; + continuationAction = null; + var result = asyncOperation.assetBundle; + asyncOperation = null; + return result; + } + else + { + var result = asyncOperation.assetBundle; + asyncOperation = null; + return result; + } + } + + public void OnCompleted(Action continuation) + { + UnsafeOnCompleted(continuation); + } + + public void UnsafeOnCompleted(Action continuation) + { + Error.ThrowWhenContinuationIsAlreadyRegistered(continuationAction); + continuationAction = PooledDelegate.Create(continuation); + asyncOperation.completed += continuationAction; + } + } + + sealed class AssetBundleCreateRequestConfiguredSource : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + AssetBundleCreateRequestConfiguredSource nextNode; + public ref AssetBundleCreateRequestConfiguredSource NextNode => ref nextNode; + + static AssetBundleCreateRequestConfiguredSource() + { + TaskPool.RegisterSizeGetter(typeof(AssetBundleCreateRequestConfiguredSource), () => pool.Size); + } + + AssetBundleCreateRequest asyncOperation; + IProgress progress; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + bool completed; + + UniTaskCompletionSourceCore core; + + Action continuationAction; + + AssetBundleCreateRequestConfiguredSource() + { + continuationAction = Continuation; + } + + public static IUniTaskSource Create(AssetBundleCreateRequest asyncOperation, PlayerLoopTiming timing, IProgress progress, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new AssetBundleCreateRequestConfiguredSource(); + } + + result.asyncOperation = asyncOperation; + result.progress = progress; + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + result.completed = false; + + asyncOperation.completed += result.continuationAction; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var source = (AssetBundleCreateRequestConfiguredSource)state; + source.core.TrySetCanceled(source.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public AssetBundle GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + // Already completed + if (completed || asyncOperation == null) + { + return false; + } + + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + return false; + } + + if (progress != null) + { + progress.Report(asyncOperation.progress); + } + + if (asyncOperation.isDone) + { + core.TrySetResult(asyncOperation.assetBundle); + return false; + } + + return true; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + asyncOperation.completed -= continuationAction; + asyncOperation = default; + progress = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + + void Continuation(AsyncOperation _) + { + if (completed) + { + return; + } + completed = true; + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + } + else + { + core.TrySetResult(asyncOperation.assetBundle); + } + } + } + + #endregion +#endif + +#if ENABLE_UNITYWEBREQUEST && (!UNITY_2019_1_OR_NEWER || UNITASK_WEBREQUEST_SUPPORT) + #region UnityWebRequestAsyncOperation + + public static UnityWebRequestAsyncOperationAwaiter GetAwaiter(this UnityWebRequestAsyncOperation asyncOperation) + { + Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); + return new UnityWebRequestAsyncOperationAwaiter(asyncOperation); + } + + public static UniTask WithCancellation(this UnityWebRequestAsyncOperation asyncOperation, CancellationToken cancellationToken) + { + return ToUniTask(asyncOperation, cancellationToken: cancellationToken); + } + + public static UniTask WithCancellation(this UnityWebRequestAsyncOperation asyncOperation, CancellationToken cancellationToken, bool cancelImmediately) + { + return ToUniTask(asyncOperation, cancellationToken: cancellationToken, cancelImmediately: cancelImmediately); + } + + public static UniTask ToUniTask(this UnityWebRequestAsyncOperation asyncOperation, IProgress progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) + { + Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); + if (cancellationToken.IsCancellationRequested) return UniTask.FromCanceled(cancellationToken); + if (asyncOperation.isDone) + { + if (asyncOperation.webRequest.IsError()) + { + return UniTask.FromException(new UnityWebRequestException(asyncOperation.webRequest)); + } + return UniTask.FromResult(asyncOperation.webRequest); + } + return new UniTask(UnityWebRequestAsyncOperationConfiguredSource.Create(asyncOperation, timing, progress, cancellationToken, cancelImmediately, out var token), token); + } + + public struct UnityWebRequestAsyncOperationAwaiter : ICriticalNotifyCompletion + { + UnityWebRequestAsyncOperation asyncOperation; + Action continuationAction; + + public UnityWebRequestAsyncOperationAwaiter(UnityWebRequestAsyncOperation asyncOperation) + { + this.asyncOperation = asyncOperation; + this.continuationAction = null; + } + + public bool IsCompleted => asyncOperation.isDone; + + public UnityWebRequest GetResult() + { + if (continuationAction != null) + { + asyncOperation.completed -= continuationAction; + continuationAction = null; + var result = asyncOperation.webRequest; + asyncOperation = null; + if (result.IsError()) + { + throw new UnityWebRequestException(result); + } + return result; + } + else + { + var result = asyncOperation.webRequest; + asyncOperation = null; + if (result.IsError()) + { + throw new UnityWebRequestException(result); + } + return result; + } + } + + public void OnCompleted(Action continuation) + { + UnsafeOnCompleted(continuation); + } + + public void UnsafeOnCompleted(Action continuation) + { + Error.ThrowWhenContinuationIsAlreadyRegistered(continuationAction); + continuationAction = PooledDelegate.Create(continuation); + asyncOperation.completed += continuationAction; + } + } + + sealed class UnityWebRequestAsyncOperationConfiguredSource : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode + { + static TaskPool pool; + UnityWebRequestAsyncOperationConfiguredSource nextNode; + public ref UnityWebRequestAsyncOperationConfiguredSource NextNode => ref nextNode; + + static UnityWebRequestAsyncOperationConfiguredSource() + { + TaskPool.RegisterSizeGetter(typeof(UnityWebRequestAsyncOperationConfiguredSource), () => pool.Size); + } + + UnityWebRequestAsyncOperation asyncOperation; + IProgress progress; + CancellationToken cancellationToken; + CancellationTokenRegistration cancellationTokenRegistration; + bool cancelImmediately; + bool completed; + + UniTaskCompletionSourceCore core; + + Action continuationAction; + + UnityWebRequestAsyncOperationConfiguredSource() + { + continuationAction = Continuation; + } + + public static IUniTaskSource Create(UnityWebRequestAsyncOperation asyncOperation, PlayerLoopTiming timing, IProgress progress, CancellationToken cancellationToken, bool cancelImmediately, out short token) + { + if (cancellationToken.IsCancellationRequested) + { + return AutoResetUniTaskCompletionSource.CreateFromCanceled(cancellationToken, out token); + } + + if (!pool.TryPop(out var result)) + { + result = new UnityWebRequestAsyncOperationConfiguredSource(); + } + + result.asyncOperation = asyncOperation; + result.progress = progress; + result.cancellationToken = cancellationToken; + result.cancelImmediately = cancelImmediately; + result.completed = false; + + asyncOperation.completed += result.continuationAction; + + if (cancelImmediately && cancellationToken.CanBeCanceled) + { + result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => + { + var source = (UnityWebRequestAsyncOperationConfiguredSource)state; + source.asyncOperation.webRequest.Abort(); + source.core.TrySetCanceled(source.cancellationToken); + }, result); + } + + TaskTracker.TrackActiveTask(result, 3); + + PlayerLoopHelper.AddAction(timing, result); + + token = result.core.Version; + return result; + } + + public UnityWebRequest GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { + if (!(cancelImmediately && cancellationToken.IsCancellationRequested)) + { + TryReturn(); + } + } + } + + void IUniTaskSource.GetResult(short token) + { + GetResult(token); + } + + public UniTaskStatus GetStatus(short token) + { + return core.GetStatus(token); + } + + public UniTaskStatus UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + public void OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + + public bool MoveNext() + { + // Already completed + if (completed || asyncOperation == null) + { + return false; + } + + if (cancellationToken.IsCancellationRequested) + { + asyncOperation.webRequest.Abort(); + core.TrySetCanceled(cancellationToken); + return false; + } + + if (progress != null) + { + progress.Report(asyncOperation.progress); + } + + if (asyncOperation.isDone) + { + if (asyncOperation.webRequest.IsError()) + { + core.TrySetException(new UnityWebRequestException(asyncOperation.webRequest)); + } + else + { + core.TrySetResult(asyncOperation.webRequest); + } + return false; + } + + return true; + } + + bool TryReturn() + { + TaskTracker.RemoveTracking(this); + core.Reset(); + asyncOperation.completed -= continuationAction; + asyncOperation = default; + progress = default; + cancellationToken = default; + cancellationTokenRegistration.Dispose(); + cancelImmediately = default; + return pool.TryPush(this); + } + + void Continuation(AsyncOperation _) + { + if (completed) + { + return; + } + completed = true; + if (cancellationToken.IsCancellationRequested) + { + core.TrySetCanceled(cancellationToken); + } + else if (asyncOperation.webRequest.IsError()) + { + core.TrySetException(new UnityWebRequestException(asyncOperation.webRequest)); + } + else + { + core.TrySetResult(asyncOperation.webRequest); + } + } + } + + #endregion +#endif + + } +} \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.cs.meta new file mode 100644 index 0000000..6dfab81 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8cc7fd65dd1433e419be4764aeb51391 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.uGUI.cs b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.uGUI.cs new file mode 100644 index 0000000..7f1a90c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.uGUI.cs @@ -0,0 +1,858 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT +using System; +using System.Threading; +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.UI; + +namespace Cysharp.Threading.Tasks +{ + public static partial class UnityAsyncExtensions + { + public static AsyncUnityEventHandler GetAsyncEventHandler(this UnityEvent unityEvent, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(unityEvent, cancellationToken, false); + } + + public static UniTask OnInvokeAsync(this UnityEvent unityEvent, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(unityEvent, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnInvokeAsAsyncEnumerable(this UnityEvent unityEvent, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(unityEvent, cancellationToken); + } + + public static AsyncUnityEventHandler GetAsyncEventHandler(this UnityEvent unityEvent, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(unityEvent, cancellationToken, false); + } + + public static UniTask OnInvokeAsync(this UnityEvent unityEvent, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(unityEvent, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnInvokeAsAsyncEnumerable(this UnityEvent unityEvent, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(unityEvent, cancellationToken); + } + + public static IAsyncClickEventHandler GetAsyncClickEventHandler(this Button button) + { + return new AsyncUnityEventHandler(button.onClick, button.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncClickEventHandler GetAsyncClickEventHandler(this Button button, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(button.onClick, cancellationToken, false); + } + + public static UniTask OnClickAsync(this Button button) + { + return new AsyncUnityEventHandler(button.onClick, button.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask OnClickAsync(this Button button, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(button.onClick, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnClickAsAsyncEnumerable(this Button button) + { + return new UnityEventHandlerAsyncEnumerable(button.onClick, button.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable OnClickAsAsyncEnumerable(this Button button, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(button.onClick, cancellationToken); + } + + public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Toggle toggle) + { + return new AsyncUnityEventHandler(toggle.onValueChanged, toggle.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Toggle toggle, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(toggle.onValueChanged, cancellationToken, false); + } + + public static UniTask OnValueChangedAsync(this Toggle toggle) + { + return new AsyncUnityEventHandler(toggle.onValueChanged, toggle.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask OnValueChangedAsync(this Toggle toggle, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(toggle.onValueChanged, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnValueChangedAsAsyncEnumerable(this Toggle toggle) + { + return new UnityEventHandlerAsyncEnumerable(toggle.onValueChanged, toggle.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable OnValueChangedAsAsyncEnumerable(this Toggle toggle, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(toggle.onValueChanged, cancellationToken); + } + + public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Scrollbar scrollbar) + { + return new AsyncUnityEventHandler(scrollbar.onValueChanged, scrollbar.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Scrollbar scrollbar, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(scrollbar.onValueChanged, cancellationToken, false); + } + + public static UniTask OnValueChangedAsync(this Scrollbar scrollbar) + { + return new AsyncUnityEventHandler(scrollbar.onValueChanged, scrollbar.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask OnValueChangedAsync(this Scrollbar scrollbar, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(scrollbar.onValueChanged, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnValueChangedAsAsyncEnumerable(this Scrollbar scrollbar) + { + return new UnityEventHandlerAsyncEnumerable(scrollbar.onValueChanged, scrollbar.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable OnValueChangedAsAsyncEnumerable(this Scrollbar scrollbar, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(scrollbar.onValueChanged, cancellationToken); + } + + public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this ScrollRect scrollRect) + { + return new AsyncUnityEventHandler(scrollRect.onValueChanged, scrollRect.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this ScrollRect scrollRect, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(scrollRect.onValueChanged, cancellationToken, false); + } + + public static UniTask OnValueChangedAsync(this ScrollRect scrollRect) + { + return new AsyncUnityEventHandler(scrollRect.onValueChanged, scrollRect.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask OnValueChangedAsync(this ScrollRect scrollRect, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(scrollRect.onValueChanged, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnValueChangedAsAsyncEnumerable(this ScrollRect scrollRect) + { + return new UnityEventHandlerAsyncEnumerable(scrollRect.onValueChanged, scrollRect.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable OnValueChangedAsAsyncEnumerable(this ScrollRect scrollRect, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(scrollRect.onValueChanged, cancellationToken); + } + + public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Slider slider) + { + return new AsyncUnityEventHandler(slider.onValueChanged, slider.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Slider slider, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(slider.onValueChanged, cancellationToken, false); + } + + public static UniTask OnValueChangedAsync(this Slider slider) + { + return new AsyncUnityEventHandler(slider.onValueChanged, slider.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask OnValueChangedAsync(this Slider slider, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(slider.onValueChanged, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnValueChangedAsAsyncEnumerable(this Slider slider) + { + return new UnityEventHandlerAsyncEnumerable(slider.onValueChanged, slider.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable OnValueChangedAsAsyncEnumerable(this Slider slider, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(slider.onValueChanged, cancellationToken); + } + + public static IAsyncEndEditEventHandler GetAsyncEndEditEventHandler(this InputField inputField) + { + return new AsyncUnityEventHandler(inputField.onEndEdit, inputField.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncEndEditEventHandler GetAsyncEndEditEventHandler(this InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(inputField.onEndEdit, cancellationToken, false); + } + + public static UniTask OnEndEditAsync(this InputField inputField) + { + return new AsyncUnityEventHandler(inputField.onEndEdit, inputField.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask OnEndEditAsync(this InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(inputField.onEndEdit, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnEndEditAsAsyncEnumerable(this InputField inputField) + { + return new UnityEventHandlerAsyncEnumerable(inputField.onEndEdit, inputField.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable OnEndEditAsAsyncEnumerable(this InputField inputField, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(inputField.onEndEdit, cancellationToken); + } + + public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this InputField inputField) + { + return new AsyncUnityEventHandler(inputField.onValueChanged, inputField.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(inputField.onValueChanged, cancellationToken, false); + } + + public static UniTask OnValueChangedAsync(this InputField inputField) + { + return new AsyncUnityEventHandler(inputField.onValueChanged, inputField.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask OnValueChangedAsync(this InputField inputField, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(inputField.onValueChanged, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnValueChangedAsAsyncEnumerable(this InputField inputField) + { + return new UnityEventHandlerAsyncEnumerable(inputField.onValueChanged, inputField.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable OnValueChangedAsAsyncEnumerable(this InputField inputField, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(inputField.onValueChanged, cancellationToken); + } + + public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Dropdown dropdown) + { + return new AsyncUnityEventHandler(dropdown.onValueChanged, dropdown.GetCancellationTokenOnDestroy(), false); + } + + public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Dropdown dropdown, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(dropdown.onValueChanged, cancellationToken, false); + } + + public static UniTask OnValueChangedAsync(this Dropdown dropdown) + { + return new AsyncUnityEventHandler(dropdown.onValueChanged, dropdown.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); + } + + public static UniTask OnValueChangedAsync(this Dropdown dropdown, CancellationToken cancellationToken) + { + return new AsyncUnityEventHandler(dropdown.onValueChanged, cancellationToken, true).OnInvokeAsync(); + } + + public static IUniTaskAsyncEnumerable OnValueChangedAsAsyncEnumerable(this Dropdown dropdown) + { + return new UnityEventHandlerAsyncEnumerable(dropdown.onValueChanged, dropdown.GetCancellationTokenOnDestroy()); + } + + public static IUniTaskAsyncEnumerable OnValueChangedAsAsyncEnumerable(this Dropdown dropdown, CancellationToken cancellationToken) + { + return new UnityEventHandlerAsyncEnumerable(dropdown.onValueChanged, cancellationToken); + } + } + + public interface IAsyncClickEventHandler : IDisposable + { + UniTask OnClickAsync(); + } + + public interface IAsyncValueChangedEventHandler : IDisposable + { + UniTask OnValueChangedAsync(); + } + + public interface IAsyncEndEditEventHandler : IDisposable + { + UniTask OnEndEditAsync(); + } + + // for TMP_PRO + + public interface IAsyncEndTextSelectionEventHandler : IDisposable + { + UniTask OnEndTextSelectionAsync(); + } + + public interface IAsyncTextSelectionEventHandler : IDisposable + { + UniTask OnTextSelectionAsync(); + } + + public interface IAsyncDeselectEventHandler : IDisposable + { + UniTask OnDeselectAsync(); + } + + public interface IAsyncSelectEventHandler : IDisposable + { + UniTask OnSelectAsync(); + } + + public interface IAsyncSubmitEventHandler : IDisposable + { + UniTask OnSubmitAsync(); + } + + internal class TextSelectionEventConverter : UnityEvent<(string, int, int)>, IDisposable + { + readonly UnityEvent innerEvent; + readonly UnityAction invokeDelegate; + + + public TextSelectionEventConverter(UnityEvent unityEvent) + { + this.innerEvent = unityEvent; + this.invokeDelegate = InvokeCore; + + innerEvent.AddListener(invokeDelegate); + } + + void InvokeCore(string item1, int item2, int item3) + { + innerEvent.Invoke(item1, item2, item3); + } + + public void Dispose() + { + innerEvent.RemoveListener(invokeDelegate); + } + } + + public class AsyncUnityEventHandler : IUniTaskSource, IDisposable, IAsyncClickEventHandler + { + static Action cancellationCallback = CancellationCallback; + + readonly UnityAction action; + readonly UnityEvent unityEvent; + + CancellationToken cancellationToken; + CancellationTokenRegistration registration; + bool isDisposed; + bool callOnce; + + UniTaskCompletionSourceCore core; + + public AsyncUnityEventHandler(UnityEvent unityEvent, CancellationToken cancellationToken, bool callOnce) + { + this.cancellationToken = cancellationToken; + if (cancellationToken.IsCancellationRequested) + { + isDisposed = true; + return; + } + + this.action = Invoke; + this.unityEvent = unityEvent; + this.callOnce = callOnce; + + unityEvent.AddListener(action); + + if (cancellationToken.CanBeCanceled) + { + registration = cancellationToken.RegisterWithoutCaptureExecutionContext(cancellationCallback, this); + } + + TaskTracker.TrackActiveTask(this, 3); + } + + public UniTask OnInvokeAsync() + { + core.Reset(); + if (isDisposed) + { + core.TrySetCanceled(this.cancellationToken); + } + return new UniTask(this, core.Version); + } + + void Invoke() + { + core.TrySetResult(AsyncUnit.Default); + } + + static void CancellationCallback(object state) + { + var self = (AsyncUnityEventHandler)state; + self.Dispose(); + } + + public void Dispose() + { + if (!isDisposed) + { + isDisposed = true; + TaskTracker.RemoveTracking(this); + registration.Dispose(); + if (unityEvent != null) + { + unityEvent.RemoveListener(action); + } + core.TrySetCanceled(cancellationToken); + } + } + + UniTask IAsyncClickEventHandler.OnClickAsync() + { + return OnInvokeAsync(); + } + + void IUniTaskSource.GetResult(short token) + { + try + { + core.GetResult(token); + } + finally + { + if (callOnce) + { + Dispose(); + } + } + } + + UniTaskStatus IUniTaskSource.GetStatus(short token) + { + return core.GetStatus(token); + } + + UniTaskStatus IUniTaskSource.UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public class AsyncUnityEventHandler : IUniTaskSource, IDisposable, IAsyncValueChangedEventHandler, IAsyncEndEditEventHandler + , IAsyncEndTextSelectionEventHandler, IAsyncTextSelectionEventHandler, IAsyncDeselectEventHandler, IAsyncSelectEventHandler, IAsyncSubmitEventHandler + { + static Action cancellationCallback = CancellationCallback; + + readonly UnityAction action; + readonly UnityEvent unityEvent; + + CancellationToken cancellationToken; + CancellationTokenRegistration registration; + bool isDisposed; + bool callOnce; + + UniTaskCompletionSourceCore core; + + public AsyncUnityEventHandler(UnityEvent unityEvent, CancellationToken cancellationToken, bool callOnce) + { + this.cancellationToken = cancellationToken; + if (cancellationToken.IsCancellationRequested) + { + isDisposed = true; + return; + } + + this.action = Invoke; + this.unityEvent = unityEvent; + this.callOnce = callOnce; + + unityEvent.AddListener(action); + + if (cancellationToken.CanBeCanceled) + { + registration = cancellationToken.RegisterWithoutCaptureExecutionContext(cancellationCallback, this); + } + + TaskTracker.TrackActiveTask(this, 3); + } + + public UniTask OnInvokeAsync() + { + core.Reset(); + if (isDisposed) + { + core.TrySetCanceled(this.cancellationToken); + } + return new UniTask(this, core.Version); + } + + void Invoke(T result) + { + core.TrySetResult(result); + } + + static void CancellationCallback(object state) + { + var self = (AsyncUnityEventHandler)state; + self.Dispose(); + } + + public void Dispose() + { + if (!isDisposed) + { + isDisposed = true; + TaskTracker.RemoveTracking(this); + registration.Dispose(); + if (unityEvent != null) + { + // Dispose inner delegate for TextSelectionEventConverter + if (unityEvent is IDisposable disp) + { + disp.Dispose(); + } + + unityEvent.RemoveListener(action); + } + + core.TrySetCanceled(); + } + } + + UniTask IAsyncValueChangedEventHandler.OnValueChangedAsync() + { + return OnInvokeAsync(); + } + + UniTask IAsyncEndEditEventHandler.OnEndEditAsync() + { + return OnInvokeAsync(); + } + + UniTask IAsyncEndTextSelectionEventHandler.OnEndTextSelectionAsync() + { + return OnInvokeAsync(); + } + + UniTask IAsyncTextSelectionEventHandler.OnTextSelectionAsync() + { + return OnInvokeAsync(); + } + + UniTask IAsyncDeselectEventHandler.OnDeselectAsync() + { + return OnInvokeAsync(); + } + + UniTask IAsyncSelectEventHandler.OnSelectAsync() + { + return OnInvokeAsync(); + } + + UniTask IAsyncSubmitEventHandler.OnSubmitAsync() + { + return OnInvokeAsync(); + } + + T IUniTaskSource.GetResult(short token) + { + try + { + return core.GetResult(token); + } + finally + { + if (callOnce) + { + Dispose(); + } + } + } + + void IUniTaskSource.GetResult(short token) + { + ((IUniTaskSource)this).GetResult(token); + } + + UniTaskStatus IUniTaskSource.GetStatus(short token) + { + return core.GetStatus(token); + } + + UniTaskStatus IUniTaskSource.UnsafeGetStatus() + { + return core.UnsafeGetStatus(); + } + + void IUniTaskSource.OnCompleted(Action continuation, object state, short token) + { + core.OnCompleted(continuation, state, token); + } + } + + public class UnityEventHandlerAsyncEnumerable : IUniTaskAsyncEnumerable + { + readonly UnityEvent unityEvent; + readonly CancellationToken cancellationToken1; + + public UnityEventHandlerAsyncEnumerable(UnityEvent unityEvent, CancellationToken cancellationToken) + { + this.unityEvent = unityEvent; + this.cancellationToken1 = cancellationToken; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + if (this.cancellationToken1 == cancellationToken) + { + return new UnityEventHandlerAsyncEnumerator(unityEvent, this.cancellationToken1, CancellationToken.None); + } + else + { + return new UnityEventHandlerAsyncEnumerator(unityEvent, this.cancellationToken1, cancellationToken); + } + } + + class UnityEventHandlerAsyncEnumerator : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action cancel1 = OnCanceled1; + static readonly Action cancel2 = OnCanceled2; + + readonly UnityEvent unityEvent; + CancellationToken cancellationToken1; + CancellationToken cancellationToken2; + + UnityAction unityAction; + CancellationTokenRegistration registration1; + CancellationTokenRegistration registration2; + bool isDisposed; + + public UnityEventHandlerAsyncEnumerator(UnityEvent unityEvent, CancellationToken cancellationToken1, CancellationToken cancellationToken2) + { + this.unityEvent = unityEvent; + this.cancellationToken1 = cancellationToken1; + this.cancellationToken2 = cancellationToken2; + } + + public AsyncUnit Current => default; + + public UniTask MoveNextAsync() + { + cancellationToken1.ThrowIfCancellationRequested(); + cancellationToken2.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (unityAction == null) + { + unityAction = Invoke; + + TaskTracker.TrackActiveTask(this, 3); + unityEvent.AddListener(unityAction); + if (cancellationToken1.CanBeCanceled) + { + registration1 = cancellationToken1.RegisterWithoutCaptureExecutionContext(cancel1, this); + } + if (cancellationToken2.CanBeCanceled) + { + registration2 = cancellationToken2.RegisterWithoutCaptureExecutionContext(cancel2, this); + } + } + + return new UniTask(this, completionSource.Version); + } + + void Invoke() + { + completionSource.TrySetResult(true); + } + + static void OnCanceled1(object state) + { + var self = (UnityEventHandlerAsyncEnumerator)state; + try + { + self.completionSource.TrySetCanceled(self.cancellationToken1); + } + finally + { + self.DisposeAsync().Forget(); + } + } + + static void OnCanceled2(object state) + { + var self = (UnityEventHandlerAsyncEnumerator)state; + try + { + self.completionSource.TrySetCanceled(self.cancellationToken2); + } + finally + { + self.DisposeAsync().Forget(); + } + } + + public UniTask DisposeAsync() + { + if (!isDisposed) + { + isDisposed = true; + TaskTracker.RemoveTracking(this); + registration1.Dispose(); + registration2.Dispose(); + unityEvent.RemoveListener(unityAction); + + completionSource.TrySetCanceled(); + } + + return default; + } + } + } + + public class UnityEventHandlerAsyncEnumerable : IUniTaskAsyncEnumerable + { + readonly UnityEvent unityEvent; + readonly CancellationToken cancellationToken1; + + public UnityEventHandlerAsyncEnumerable(UnityEvent unityEvent, CancellationToken cancellationToken) + { + this.unityEvent = unityEvent; + this.cancellationToken1 = cancellationToken; + } + + public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) + { + if (this.cancellationToken1 == cancellationToken) + { + return new UnityEventHandlerAsyncEnumerator(unityEvent, this.cancellationToken1, CancellationToken.None); + } + else + { + return new UnityEventHandlerAsyncEnumerator(unityEvent, this.cancellationToken1, cancellationToken); + } + } + + class UnityEventHandlerAsyncEnumerator : MoveNextSource, IUniTaskAsyncEnumerator + { + static readonly Action cancel1 = OnCanceled1; + static readonly Action cancel2 = OnCanceled2; + + readonly UnityEvent unityEvent; + CancellationToken cancellationToken1; + CancellationToken cancellationToken2; + + UnityAction unityAction; + CancellationTokenRegistration registration1; + CancellationTokenRegistration registration2; + bool isDisposed; + + public UnityEventHandlerAsyncEnumerator(UnityEvent unityEvent, CancellationToken cancellationToken1, CancellationToken cancellationToken2) + { + this.unityEvent = unityEvent; + this.cancellationToken1 = cancellationToken1; + this.cancellationToken2 = cancellationToken2; + } + + public T Current { get; private set; } + + public UniTask MoveNextAsync() + { + cancellationToken1.ThrowIfCancellationRequested(); + cancellationToken2.ThrowIfCancellationRequested(); + completionSource.Reset(); + + if (unityAction == null) + { + unityAction = Invoke; + + TaskTracker.TrackActiveTask(this, 3); + unityEvent.AddListener(unityAction); + if (cancellationToken1.CanBeCanceled) + { + registration1 = cancellationToken1.RegisterWithoutCaptureExecutionContext(cancel1, this); + } + if (cancellationToken2.CanBeCanceled) + { + registration2 = cancellationToken2.RegisterWithoutCaptureExecutionContext(cancel2, this); + } + } + + return new UniTask(this, completionSource.Version); + } + + void Invoke(T value) + { + Current = value; + completionSource.TrySetResult(true); + } + + static void OnCanceled1(object state) + { + var self = (UnityEventHandlerAsyncEnumerator)state; + try + { + self.completionSource.TrySetCanceled(self.cancellationToken1); + } + finally + { + self.DisposeAsync().Forget(); + } + } + + static void OnCanceled2(object state) + { + var self = (UnityEventHandlerAsyncEnumerator)state; + try + { + self.completionSource.TrySetCanceled(self.cancellationToken2); + } + finally + { + self.DisposeAsync().Forget(); + } + } + + public UniTask DisposeAsync() + { + if (!isDisposed) + { + isDisposed = true; + TaskTracker.RemoveTracking(this); + registration1.Dispose(); + registration2.Dispose(); + if (unityEvent is IDisposable disp) + { + disp.Dispose(); + } + unityEvent.RemoveListener(unityAction); + + completionSource.TrySetCanceled(); + } + + return default; + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.uGUI.cs.meta b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.uGUI.cs.meta new file mode 100644 index 0000000..90c5d51 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.uGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6804799fba2376d4099561d176101aff +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UnityAwaitableExtensions.cs b/Assets/Plugins/UniTask/Runtime/UnityAwaitableExtensions.cs new file mode 100644 index 0000000..4580da3 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityAwaitableExtensions.cs @@ -0,0 +1,17 @@ +#if UNITY_2023_1_OR_NEWER +namespace Cysharp.Threading.Tasks +{ + public static class UnityAwaitableExtensions + { + public static async UniTask AsUniTask(this UnityEngine.Awaitable awaitable) + { + await awaitable; + } + + public static async UniTask AsUniTask(this UnityEngine.Awaitable awaitable) + { + return await awaitable; + } + } +} +#endif diff --git a/Assets/Plugins/UniTask/Runtime/UnityAwaitableExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/UnityAwaitableExtensions.cs.meta new file mode 100644 index 0000000..08752a4 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityAwaitableExtensions.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c29533c9e4284dee914b71a6579ea274 +timeCreated: 1698895807 \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/UnityBindingExtensions.cs b/Assets/Plugins/UniTask/Runtime/UnityBindingExtensions.cs new file mode 100644 index 0000000..269fee2 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityBindingExtensions.cs @@ -0,0 +1,245 @@ +using System; +using System.Threading; +using UnityEngine; +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT +using UnityEngine.UI; +#endif + +namespace Cysharp.Threading.Tasks +{ + public static class UnityBindingExtensions + { +#if !UNITY_2019_1_OR_NEWER || UNITASK_UGUI_SUPPORT + // -> Text + + public static void BindTo(this IUniTaskAsyncEnumerable source, UnityEngine.UI.Text text, bool rebindOnError = true) + { + BindToCore(source, text, text.GetCancellationTokenOnDestroy(), rebindOnError).Forget(); + } + + public static void BindTo(this IUniTaskAsyncEnumerable source, UnityEngine.UI.Text text, CancellationToken cancellationToken, bool rebindOnError = true) + { + BindToCore(source, text, cancellationToken, rebindOnError).Forget(); + } + + static async UniTaskVoid BindToCore(IUniTaskAsyncEnumerable source, UnityEngine.UI.Text text, CancellationToken cancellationToken, bool rebindOnError) + { + var repeat = false; + BIND_AGAIN: + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (true) + { + bool moveNext; + try + { + moveNext = await e.MoveNextAsync(); + repeat = false; + } + catch (Exception ex) + { + if (ex is OperationCanceledException) return; + + if (rebindOnError && !repeat) + { + repeat = true; + goto BIND_AGAIN; + } + else + { + throw; + } + } + + if (!moveNext) return; + + text.text = e.Current; + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + // -> Text + + public static void BindTo(this IUniTaskAsyncEnumerable source, UnityEngine.UI.Text text, bool rebindOnError = true) + { + BindToCore(source, text, text.GetCancellationTokenOnDestroy(), rebindOnError).Forget(); + } + + public static void BindTo(this IUniTaskAsyncEnumerable source, UnityEngine.UI.Text text, CancellationToken cancellationToken, bool rebindOnError = true) + { + BindToCore(source, text, cancellationToken, rebindOnError).Forget(); + } + + public static void BindTo(this AsyncReactiveProperty source, UnityEngine.UI.Text text, bool rebindOnError = true) + { + BindToCore(source, text, text.GetCancellationTokenOnDestroy(), rebindOnError).Forget(); + } + + static async UniTaskVoid BindToCore(IUniTaskAsyncEnumerable source, UnityEngine.UI.Text text, CancellationToken cancellationToken, bool rebindOnError) + { + var repeat = false; + BIND_AGAIN: + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (true) + { + bool moveNext; + try + { + moveNext = await e.MoveNextAsync(); + repeat = false; + } + catch (Exception ex) + { + if (ex is OperationCanceledException) return; + + if (rebindOnError && !repeat) + { + repeat = true; + goto BIND_AGAIN; + } + else + { + throw; + } + } + + if (!moveNext) return; + + text.text = e.Current.ToString(); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + + // -> Selectable + + public static void BindTo(this IUniTaskAsyncEnumerable source, Selectable selectable, bool rebindOnError = true) + { + BindToCore(source, selectable, selectable.GetCancellationTokenOnDestroy(), rebindOnError).Forget(); + } + + public static void BindTo(this IUniTaskAsyncEnumerable source, Selectable selectable, CancellationToken cancellationToken, bool rebindOnError = true) + { + BindToCore(source, selectable, cancellationToken, rebindOnError).Forget(); + } + + static async UniTaskVoid BindToCore(IUniTaskAsyncEnumerable source, Selectable selectable, CancellationToken cancellationToken, bool rebindOnError) + { + var repeat = false; + BIND_AGAIN: + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (true) + { + bool moveNext; + try + { + moveNext = await e.MoveNextAsync(); + repeat = false; + } + catch (Exception ex) + { + if (ex is OperationCanceledException) return; + + if (rebindOnError && !repeat) + { + repeat = true; + goto BIND_AGAIN; + } + else + { + throw; + } + } + + if (!moveNext) return; + + + selectable.interactable = e.Current; + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } +#endif + + // -> Action + + public static void BindTo(this IUniTaskAsyncEnumerable source, TObject monoBehaviour, Action bindAction, bool rebindOnError = true) + where TObject : MonoBehaviour + { + BindToCore(source, monoBehaviour, bindAction, monoBehaviour.GetCancellationTokenOnDestroy(), rebindOnError).Forget(); + } + + public static void BindTo(this IUniTaskAsyncEnumerable source, TObject bindTarget, Action bindAction, CancellationToken cancellationToken, bool rebindOnError = true) + { + BindToCore(source, bindTarget, bindAction, cancellationToken, rebindOnError).Forget(); + } + + static async UniTaskVoid BindToCore(IUniTaskAsyncEnumerable source, TObject bindTarget, Action bindAction, CancellationToken cancellationToken, bool rebindOnError) + { + var repeat = false; + BIND_AGAIN: + var e = source.GetAsyncEnumerator(cancellationToken); + try + { + while (true) + { + bool moveNext; + try + { + moveNext = await e.MoveNextAsync(); + repeat = false; + } + catch (Exception ex) + { + if (ex is OperationCanceledException) return; + + if (rebindOnError && !repeat) + { + repeat = true; + goto BIND_AGAIN; + } + else + { + throw; + } + } + + if (!moveNext) return; + + bindAction(bindTarget, e.Current); + } + } + finally + { + if (e != null) + { + await e.DisposeAsync(); + } + } + } + } +} diff --git a/Assets/Plugins/UniTask/Runtime/UnityBindingExtensions.cs.meta b/Assets/Plugins/UniTask/Runtime/UnityBindingExtensions.cs.meta new file mode 100644 index 0000000..3fae798 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityBindingExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 090b20e3528552b4a8d751f7df525c2b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/UnityWebRequestException.cs b/Assets/Plugins/UniTask/Runtime/UnityWebRequestException.cs new file mode 100644 index 0000000..9585769 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityWebRequestException.cs @@ -0,0 +1,67 @@ +#if ENABLE_UNITYWEBREQUEST && (!UNITY_2019_1_OR_NEWER || UNITASK_WEBREQUEST_SUPPORT) + +using System; +using System.Collections.Generic; +using UnityEngine.Networking; + +namespace Cysharp.Threading.Tasks +{ + public class UnityWebRequestException : Exception + { + public UnityWebRequest UnityWebRequest { get; } +#if UNITY_2020_2_OR_NEWER + public UnityWebRequest.Result Result { get; } +#else + public bool IsNetworkError { get; } + public bool IsHttpError { get; } +#endif + public string Error { get; } + public string Text { get; } + public long ResponseCode { get; } + public Dictionary ResponseHeaders { get; } + + string msg; + + public UnityWebRequestException(UnityWebRequest unityWebRequest) + { + this.UnityWebRequest = unityWebRequest; +#if UNITY_2020_2_OR_NEWER + this.Result = unityWebRequest.result; +#else + this.IsNetworkError = unityWebRequest.isNetworkError; + this.IsHttpError = unityWebRequest.isHttpError; +#endif + this.Error = unityWebRequest.error; + this.ResponseCode = unityWebRequest.responseCode; + if (UnityWebRequest.downloadHandler != null) + { + if (unityWebRequest.downloadHandler is DownloadHandlerBuffer dhb) + { + this.Text = dhb.text; + } + } + this.ResponseHeaders = unityWebRequest.GetResponseHeaders(); + } + + public override string Message + { + get + { + if (msg == null) + { + if(!string.IsNullOrWhiteSpace(Text)) + { + msg = Error + Environment.NewLine + Text; + } + else + { + msg = Error; + } + } + return msg; + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/UnityWebRequestException.cs.meta b/Assets/Plugins/UniTask/Runtime/UnityWebRequestException.cs.meta new file mode 100644 index 0000000..50c475e --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/UnityWebRequestException.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 013a499e522703a42962a779b4d9850c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/Runtime/_InternalVisibleTo.cs b/Assets/Plugins/UniTask/Runtime/_InternalVisibleTo.cs new file mode 100644 index 0000000..ab7c10c --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/_InternalVisibleTo.cs @@ -0,0 +1,6 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("UniTask.Linq")] +[assembly: InternalsVisibleTo("UniTask.Addressables")] +[assembly: InternalsVisibleTo("UniTask.DOTween")] +[assembly: InternalsVisibleTo("UniTask.TextMeshPro")] \ No newline at end of file diff --git a/Assets/Plugins/UniTask/Runtime/_InternalVisibleTo.cs.meta b/Assets/Plugins/UniTask/Runtime/_InternalVisibleTo.cs.meta new file mode 100644 index 0000000..2ec6cd3 --- /dev/null +++ b/Assets/Plugins/UniTask/Runtime/_InternalVisibleTo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8507e97eb606fad4b99c6edf92e19cb8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UniTask/package.json b/Assets/Plugins/UniTask/package.json new file mode 100644 index 0000000..488019c --- /dev/null +++ b/Assets/Plugins/UniTask/package.json @@ -0,0 +1,12 @@ +{ + "name": "com.cysharp.unitask", + "displayName": "UniTask", + "author": { "name": "Cysharp, Inc.", "url": "https://cysharp.co.jp/en/" }, + "version": "2.5.4", + "unity": "2018.4", + "description": "Provides an efficient async/await integration to Unity.", + "keywords": [ "async/await", "async", "Task", "UniTask" ], + "license": "MIT", + "category": "Task", + "dependencies": {} +} diff --git a/Assets/Plugins/UniTask/package.json.meta b/Assets/Plugins/UniTask/package.json.meta new file mode 100644 index 0000000..65439e6 --- /dev/null +++ b/Assets/Plugins/UniTask/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d1a9a71f68bb0d04db91ddaa3329abf9 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources.meta b/Assets/Resources.meta new file mode 100644 index 0000000..d55de06 --- /dev/null +++ b/Assets/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 994a1c12ddea47c44ac9dd3db2daa632 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Materials.meta b/Assets/Resources/Materials.meta new file mode 100644 index 0000000..8e7b260 --- /dev/null +++ b/Assets/Resources/Materials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 47738ad09b7ff2c41b91ec7f0d62c98a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Materials/Trans.mat b/Assets/Resources/Materials/Trans.mat new file mode 100644 index 0000000..a6e71a1 --- /dev/null +++ b/Assets/Resources/Materials/Trans.mat @@ -0,0 +1,129 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-872115264458118325 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 5 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Trans + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_ValidKeywords: + - _SURFACE_TYPE_TRANSPARENT + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 3000 + stringTagMap: + RenderType: Transparent + disabledShaderPasses: + - DepthOnly + - SHADOWCASTER + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 10 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.005 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 5 + - _Surface: 1 + - _WorkflowMode: 1 + - _ZWrite: 0 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Resources/Materials/Trans.mat.meta b/Assets/Resources/Materials/Trans.mat.meta new file mode 100644 index 0000000..c6d6742 --- /dev/null +++ b/Assets/Resources/Materials/Trans.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f3f6a522fde04d94bbff3847409e78b5 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Prefabs.meta b/Assets/Resources/Prefabs.meta new file mode 100644 index 0000000..4a4b129 --- /dev/null +++ b/Assets/Resources/Prefabs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6d9bbd2422004354cb657e358acc41e2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites.meta b/Assets/Resources/Sprites.meta new file mode 100644 index 0000000..6f298dc --- /dev/null +++ b/Assets/Resources/Sprites.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 09f1f0d033a816f4ebfb8abd95015f50 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/低压台区.meta b/Assets/Resources/Sprites/低压台区.meta new file mode 100644 index 0000000..c3e4577 --- /dev/null +++ b/Assets/Resources/Sprites/低压台区.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bdb07414661620642a2bee93ac9bc3ff +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/低压台区/低压台区.jpg b/Assets/Resources/Sprites/低压台区/低压台区.jpg new file mode 100644 index 0000000..0d3a628 Binary files /dev/null and b/Assets/Resources/Sprites/低压台区/低压台区.jpg differ diff --git a/Assets/Resources/Sprites/低压台区/低压台区.jpg.meta b/Assets/Resources/Sprites/低压台区/低压台区.jpg.meta new file mode 100644 index 0000000..c218d76 --- /dev/null +++ b/Assets/Resources/Sprites/低压台区/低压台区.jpg.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 88e1bbf6e45da4642911ef375be09a55 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 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: 0 + - 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: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/低压台区/召测按钮.png b/Assets/Resources/Sprites/低压台区/召测按钮.png new file mode 100644 index 0000000..a4aec29 Binary files /dev/null and b/Assets/Resources/Sprites/低压台区/召测按钮.png differ diff --git a/Assets/Resources/Sprites/低压台区/召测按钮.png.meta b/Assets/Resources/Sprites/低压台区/召测按钮.png.meta new file mode 100644 index 0000000..26a400f --- /dev/null +++ b/Assets/Resources/Sprites/低压台区/召测按钮.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: b0d0e691ccc06b14c9e91426887a7e19 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 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: 0 + - 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: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/低压台区/召测结果.meta b/Assets/Resources/Sprites/低压台区/召测结果.meta new file mode 100644 index 0000000..855bf27 --- /dev/null +++ b/Assets/Resources/Sprites/低压台区/召测结果.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bdcc4e7952d1d2a4db28c0a8522ef7ff +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/低压台区/召测结果/召测提示_上.png b/Assets/Resources/Sprites/低压台区/召测结果/召测提示_上.png new file mode 100644 index 0000000..af75b69 Binary files /dev/null and b/Assets/Resources/Sprites/低压台区/召测结果/召测提示_上.png differ diff --git a/Assets/Resources/Sprites/低压台区/召测结果/召测提示_上.png.meta b/Assets/Resources/Sprites/低压台区/召测结果/召测提示_上.png.meta new file mode 100644 index 0000000..b9a09c8 --- /dev/null +++ b/Assets/Resources/Sprites/低压台区/召测结果/召测提示_上.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 63031b2f4145e05448dac55a95e90447 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 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: 0 + - 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: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/低压台区/召测结果/召测提示_下.png b/Assets/Resources/Sprites/低压台区/召测结果/召测提示_下.png new file mode 100644 index 0000000..e100dcc Binary files /dev/null and b/Assets/Resources/Sprites/低压台区/召测结果/召测提示_下.png differ diff --git a/Assets/Resources/Sprites/低压台区/召测结果/召测提示_下.png.meta b/Assets/Resources/Sprites/低压台区/召测结果/召测提示_下.png.meta new file mode 100644 index 0000000..6fa1d51 --- /dev/null +++ b/Assets/Resources/Sprites/低压台区/召测结果/召测提示_下.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 190ea573733971046adda58bab5cf9c1 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 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: 0 + - 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: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/低压台区/数据采集监控.jpg b/Assets/Resources/Sprites/低压台区/数据采集监控.jpg new file mode 100644 index 0000000..f88e1bb Binary files /dev/null and b/Assets/Resources/Sprites/低压台区/数据采集监控.jpg differ diff --git a/Assets/Resources/Sprites/低压台区/数据采集监控.jpg.meta b/Assets/Resources/Sprites/低压台区/数据采集监控.jpg.meta new file mode 100644 index 0000000..47e8f2f --- /dev/null +++ b/Assets/Resources/Sprites/低压台区/数据采集监控.jpg.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 818dbf20db7551a4ca5ddb9bd8ae6df6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 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: 0 + - 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: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/低压台区/数据采集监控_搜索结果.jpg b/Assets/Resources/Sprites/低压台区/数据采集监控_搜索结果.jpg new file mode 100644 index 0000000..5f7ec9d Binary files /dev/null and b/Assets/Resources/Sprites/低压台区/数据采集监控_搜索结果.jpg differ diff --git a/Assets/Resources/Sprites/低压台区/数据采集监控_搜索结果.jpg.meta b/Assets/Resources/Sprites/低压台区/数据采集监控_搜索结果.jpg.meta new file mode 100644 index 0000000..28c48f0 --- /dev/null +++ b/Assets/Resources/Sprites/低压台区/数据采集监控_搜索结果.jpg.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: dda7a6f24e0356647bbed869e22c32cf +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 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: 0 + - 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: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/低压台区/选中.png b/Assets/Resources/Sprites/低压台区/选中.png new file mode 100644 index 0000000..a09540e Binary files /dev/null and b/Assets/Resources/Sprites/低压台区/选中.png differ diff --git a/Assets/Resources/Sprites/低压台区/选中.png.meta b/Assets/Resources/Sprites/低压台区/选中.png.meta new file mode 100644 index 0000000..0649ec4 --- /dev/null +++ b/Assets/Resources/Sprites/低压台区/选中.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 3feb94aa7398fe240bc09e6398989145 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 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: 0 + - 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: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/低压台区/透抄按钮.png b/Assets/Resources/Sprites/低压台区/透抄按钮.png new file mode 100644 index 0000000..c74ac08 Binary files /dev/null and b/Assets/Resources/Sprites/低压台区/透抄按钮.png differ diff --git a/Assets/Resources/Sprites/低压台区/透抄按钮.png.meta b/Assets/Resources/Sprites/低压台区/透抄按钮.png.meta new file mode 100644 index 0000000..775910e --- /dev/null +++ b/Assets/Resources/Sprites/低压台区/透抄按钮.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 3c65d4c668f596c468570daee20c003b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 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: 0 + - 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: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/低压台区/透抄结果.meta b/Assets/Resources/Sprites/低压台区/透抄结果.meta new file mode 100644 index 0000000..a197b47 --- /dev/null +++ b/Assets/Resources/Sprites/低压台区/透抄结果.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 30b1133062ccc1a409751f52fef05d4d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/低压台区/透抄结果/透抄提示_上.png b/Assets/Resources/Sprites/低压台区/透抄结果/透抄提示_上.png new file mode 100644 index 0000000..9a79b2b Binary files /dev/null and b/Assets/Resources/Sprites/低压台区/透抄结果/透抄提示_上.png differ diff --git a/Assets/Resources/Sprites/低压台区/透抄结果/透抄提示_上.png.meta b/Assets/Resources/Sprites/低压台区/透抄结果/透抄提示_上.png.meta new file mode 100644 index 0000000..9e9c4c6 --- /dev/null +++ b/Assets/Resources/Sprites/低压台区/透抄结果/透抄提示_上.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: db871b10a8593cd4992bd0b4c1ad9721 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 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: 0 + - 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: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/低压台区/透抄结果/透抄提示_下.png b/Assets/Resources/Sprites/低压台区/透抄结果/透抄提示_下.png new file mode 100644 index 0000000..46cb3b4 Binary files /dev/null and b/Assets/Resources/Sprites/低压台区/透抄结果/透抄提示_下.png differ diff --git a/Assets/Resources/Sprites/低压台区/透抄结果/透抄提示_下.png.meta b/Assets/Resources/Sprites/低压台区/透抄结果/透抄提示_下.png.meta new file mode 100644 index 0000000..2ee89c2 --- /dev/null +++ b/Assets/Resources/Sprites/低压台区/透抄结果/透抄提示_下.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 1844341e93eadea46929e0025e58af99 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 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: 0 + - 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: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/数据采集监控_6.jpg b/Assets/Resources/Sprites/数据采集监控_6.jpg new file mode 100644 index 0000000..9aafe53 Binary files /dev/null and b/Assets/Resources/Sprites/数据采集监控_6.jpg differ diff --git a/Assets/Resources/Sprites/数据采集监控_6.jpg.meta b/Assets/Resources/Sprites/数据采集监控_6.jpg.meta new file mode 100644 index 0000000..37ffd82 --- /dev/null +++ b/Assets/Resources/Sprites/数据采集监控_6.jpg.meta @@ -0,0 +1,159 @@ +fileFormatVersion: 2 +guid: f144b2678f0ee6041a736e47caf5bb32 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 2 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/数据采集监控结果_7.jpg b/Assets/Resources/Sprites/数据采集监控结果_7.jpg new file mode 100644 index 0000000..d5ff16d Binary files /dev/null and b/Assets/Resources/Sprites/数据采集监控结果_7.jpg differ diff --git a/Assets/Resources/Sprites/数据采集监控结果_7.jpg.meta b/Assets/Resources/Sprites/数据采集监控结果_7.jpg.meta new file mode 100644 index 0000000..e404181 --- /dev/null +++ b/Assets/Resources/Sprites/数据采集监控结果_7.jpg.meta @@ -0,0 +1,159 @@ +fileFormatVersion: 2 +guid: c1b423c5227c09b4bba6e223c75d04b3 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 2 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/电表信息中心_5.jpg b/Assets/Resources/Sprites/电表信息中心_5.jpg new file mode 100644 index 0000000..8a62e60 Binary files /dev/null and b/Assets/Resources/Sprites/电表信息中心_5.jpg differ diff --git a/Assets/Resources/Sprites/电表信息中心_5.jpg.meta b/Assets/Resources/Sprites/电表信息中心_5.jpg.meta new file mode 100644 index 0000000..7197056 --- /dev/null +++ b/Assets/Resources/Sprites/电表信息中心_5.jpg.meta @@ -0,0 +1,159 @@ +fileFormatVersion: 2 +guid: a14b8c84ef6bd7d44be1a66941c9042d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 2 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/电表信息中心_55.jpg b/Assets/Resources/Sprites/电表信息中心_55.jpg new file mode 100644 index 0000000..2bde8b0 Binary files /dev/null and b/Assets/Resources/Sprites/电表信息中心_55.jpg differ diff --git a/Assets/Resources/Sprites/电表信息中心_55.jpg.meta b/Assets/Resources/Sprites/电表信息中心_55.jpg.meta new file mode 100644 index 0000000..334af51 --- /dev/null +++ b/Assets/Resources/Sprites/电表信息中心_55.jpg.meta @@ -0,0 +1,159 @@ +fileFormatVersion: 2 +guid: 3584a32fa80e14e4f864dc3965eed1fd +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 2 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/登陆_1.jpg b/Assets/Resources/Sprites/登陆_1.jpg new file mode 100644 index 0000000..706a25b Binary files /dev/null and b/Assets/Resources/Sprites/登陆_1.jpg differ diff --git a/Assets/Resources/Sprites/登陆_1.jpg.meta b/Assets/Resources/Sprites/登陆_1.jpg.meta new file mode 100644 index 0000000..6e2b38a --- /dev/null +++ b/Assets/Resources/Sprites/登陆_1.jpg.meta @@ -0,0 +1,159 @@ +fileFormatVersion: 2 +guid: 9dd36572d7d14714fb25510c556c2ef3 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 2 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/线损查询_2.jpg b/Assets/Resources/Sprites/线损查询_2.jpg new file mode 100644 index 0000000..9f2ea6e Binary files /dev/null and b/Assets/Resources/Sprites/线损查询_2.jpg differ diff --git a/Assets/Resources/Sprites/线损查询_2.jpg.meta b/Assets/Resources/Sprites/线损查询_2.jpg.meta new file mode 100644 index 0000000..a8b3cef --- /dev/null +++ b/Assets/Resources/Sprites/线损查询_2.jpg.meta @@ -0,0 +1,159 @@ +fileFormatVersion: 2 +guid: af79720495dbeaf428adb935c843cdd9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 2 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/线损查询结果_3.jpg b/Assets/Resources/Sprites/线损查询结果_3.jpg new file mode 100644 index 0000000..aafad22 Binary files /dev/null and b/Assets/Resources/Sprites/线损查询结果_3.jpg differ diff --git a/Assets/Resources/Sprites/线损查询结果_3.jpg.meta b/Assets/Resources/Sprites/线损查询结果_3.jpg.meta new file mode 100644 index 0000000..471b734 --- /dev/null +++ b/Assets/Resources/Sprites/线损查询结果_3.jpg.meta @@ -0,0 +1,159 @@ +fileFormatVersion: 2 +guid: 92a9e9340535b8f49a7f588e2f99cf7b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 2 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/线损率分析_4.jpg b/Assets/Resources/Sprites/线损率分析_4.jpg new file mode 100644 index 0000000..18ae69e Binary files /dev/null and b/Assets/Resources/Sprites/线损率分析_4.jpg differ diff --git a/Assets/Resources/Sprites/线损率分析_4.jpg.meta b/Assets/Resources/Sprites/线损率分析_4.jpg.meta new file mode 100644 index 0000000..20bde27 --- /dev/null +++ b/Assets/Resources/Sprites/线损率分析_4.jpg.meta @@ -0,0 +1,159 @@ +fileFormatVersion: 2 +guid: d539c981e56efe249831a3220fdc715a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 2 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/联系主站-选中.png b/Assets/Resources/Sprites/联系主站-选中.png new file mode 100644 index 0000000..2f6a6fc Binary files /dev/null and b/Assets/Resources/Sprites/联系主站-选中.png differ diff --git a/Assets/Resources/Sprites/联系主站-选中.png.meta b/Assets/Resources/Sprites/联系主站-选中.png.meta new file mode 100644 index 0000000..d08961b --- /dev/null +++ b/Assets/Resources/Sprites/联系主站-选中.png.meta @@ -0,0 +1,159 @@ +fileFormatVersion: 2 +guid: d7914a987f59d8d4fbefc52684606f50 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 2 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/联系主站-默认.png b/Assets/Resources/Sprites/联系主站-默认.png new file mode 100644 index 0000000..c2cd2e2 Binary files /dev/null and b/Assets/Resources/Sprites/联系主站-默认.png differ diff --git a/Assets/Resources/Sprites/联系主站-默认.png.meta b/Assets/Resources/Sprites/联系主站-默认.png.meta new file mode 100644 index 0000000..732bd5d --- /dev/null +++ b/Assets/Resources/Sprites/联系主站-默认.png.meta @@ -0,0 +1,159 @@ +fileFormatVersion: 2 +guid: 8dd65fc4e6fcacf42a2849166ac4a34b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 2 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + 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 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes.meta b/Assets/Scenes.meta new file mode 100644 index 0000000..d02bf76 --- /dev/null +++ b/Assets/Scenes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d3e4193055981bb4b80e37fbe30c6e24 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/10006_6001_01_InitScene.unity b/Assets/Scenes/10006_6001_01_InitScene.unity new file mode 100644 index 0000000..128d2f5 --- /dev/null +++ b/Assets/Scenes/10006_6001_01_InitScene.unity @@ -0,0 +1,474 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 4890085278179872738, guid: 464ccf2deb006e540bd7417308d4687b, type: 2} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &225222325 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 225222328} + - component: {fileID: 225222327} + - component: {fileID: 225222329} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!20 &225222327 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 225222325} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.23584908, g: 0.23584908, b: 0.23584908, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &225222328 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 225222325} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &225222329 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 225222325} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !u!1 &744736104 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 744736105} + - component: {fileID: 744736106} + m_Layer: 0 + m_Name: StartApp + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &744736105 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 744736104} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &744736106 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 744736104} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d175d4b181be89546abe91f03f9dc60e, type: 3} + m_Name: + m_EditorClassIdentifier: + systemId: 10006 + startSceneName: 03_OfficeScene +--- !u!114 &1686064644 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1817104532591070025} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2b0607653b5fed643b96912f73248d7e, type: 3} + m_Name: + m_EditorClassIdentifier: + localStatFileName: realtimeStat.json + countDown_AutoSave: 120 +--- !u!1 &1817104531410758842 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1817104531410758843} + - component: {fileID: 1817104531410758845} + - component: {fileID: 1817104531410758844} + m_Layer: 0 + m_Name: 6001 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1817104531410758843 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1817104531410758842} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1817104531432765975} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1817104531410758844 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1817104531410758842} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3e6369feb7cd5f84b8f9b113d18887ff, type: 3} + m_Name: + m_EditorClassIdentifier: + systemId: 0 + schemeId: 6001 + device_Control: {fileID: 0} +--- !u!114 &1817104531410758845 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1817104531410758842} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3e65435691fdf57479ec35495b563cbb, type: 3} + m_Name: + m_EditorClassIdentifier: + systemId: 0 + schemeId: 0 +--- !u!1 &1817104531432765974 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1817104531432765975} + m_Layer: 0 + m_Name: 10006 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1817104531432765975 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1817104531432765974} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1817104531410758843} + m_Father: {fileID: 1817104532591070031} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1817104532591070025 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1817104532591070031} + - component: {fileID: 1817104532591070030} + - component: {fileID: 1817104532591070028} + - component: {fileID: 1686064644} + - component: {fileID: 1817104532591070032} + - component: {fileID: 1817104532591070033} + m_Layer: 0 + m_Name: "\u6B65\u9AA4\u72B6\u6001" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1817104532591070028 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1817104532591070025} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 728973cb69f5b2d4b9a1ef0a634de34b, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1817104532591070030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1817104532591070025} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 614aca3f575a7014e9724a2ff85a8d25, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1817104532591070031 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1817104532591070025} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1817104531432765975} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1817104532591070032 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1817104532591070025} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a335acc154f7404494330a3524ad6b5, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1817104532591070033 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1817104532591070025} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 50fb6698959dc034e865fdc90070cff0, type: 3} + m_Name: + m_EditorClassIdentifier: + isOnceAddFun: 0 diff --git a/Assets/Scenes/10006_6001_01_InitScene.unity.meta b/Assets/Scenes/10006_6001_01_InitScene.unity.meta new file mode 100644 index 0000000..6e789be --- /dev/null +++ b/Assets/Scenes/10006_6001_01_InitScene.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f0da7a63f61f72e4797725ae8885428d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/10006_6001_03_OfficeScene.unity b/Assets/Scenes/10006_6001_03_OfficeScene.unity new file mode 100644 index 0000000..5f0c06c --- /dev/null +++ b/Assets/Scenes/10006_6001_03_OfficeScene.unity @@ -0,0 +1,7778 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 0 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 2100000, guid: 60df55341aea8904e9baa57787f2a2e6, type: 2} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 5 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 1.0244985, g: 1.2884799, b: 1.035935, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 112000000, guid: b4d13b5b703cc9e469f64765e0b4654e, type: 2} + m_LightingSettings: {fileID: 4890085278179872738, guid: 622ad26093d5eab40bee45239737be8f, type: 2} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &101029400 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 101029401} + - component: {fileID: 101029403} + - component: {fileID: 101029402} + m_Layer: 0 + m_Name: deng (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &101029401 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 101029400} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -151.5, y: 150.03917, z: 115.2055} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5832512100931678475} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &101029402 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 101029400} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 74b132ba586bda74eb5aaace82d46aa4, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &101029403 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 101029400} + m_Mesh: {fileID: -3305362684660872990, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!1 &177200665 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 177200666} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &177200666 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 177200665} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.15156129, y: 1.4344383, z: 2.7863874} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2077900030} + - {fileID: 1751720607} + - {fileID: 354386256} + - {fileID: 635157133} + - {fileID: 403552175} + - {fileID: 2144293027} + - {fileID: 307248745} + - {fileID: 1575448217} + - {fileID: 2105675285} + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &267617284 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2399593117452945565, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_Name + value: Player + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalPosition.y + value: 0.998 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalPosition.z + value: 0.678 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117623680743, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_Antialiasing + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2399593117623680743, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_RenderPostProcessing + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} +--- !u!1 &307248742 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 307248745} + - component: {fileID: 307248744} + - component: {fileID: 307248743} + m_Layer: 0 + m_Name: Point Light (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &307248743 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 307248742} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} +--- !u!108 &307248744 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 307248742} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 2 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 0.7 + m_Range: 500 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.02 + m_NormalBias: 0.1 + m_NearPlane: 0.1 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &307248745 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 307248742} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.6145613, y: 1.6325616, z: -5.2133875} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 177200666} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &354386254 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 354386256} + - component: {fileID: 354386255} + m_Layer: 0 + m_Name: Reflection Probe + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!215 &354386255 +ReflectionProbe: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 354386254} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 0 + m_RefreshMode: 0 + m_TimeSlicingMode: 0 + m_Resolution: 128 + m_UpdateFrequency: 0 + m_BoxSize: {x: 10, y: 10, z: 10} + m_BoxOffset: {x: 0, y: 0, z: 0} + m_NearClip: 0.3 + m_FarClip: 1000 + m_ShadowDistance: 100 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_IntensityMultiplier: 1 + m_BlendDistance: 1 + m_HDR: 1 + m_BoxProjection: 0 + m_RenderDynamicObjects: 0 + m_UseOcclusionCulling: 1 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} +--- !u!4 &354386256 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 354386254} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.1084387, y: -0.3197397, z: -1.2963874} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 177200666} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &403552173 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 403552175} + - component: {fileID: 403552174} + m_Layer: 0 + m_Name: Global Volume + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &403552174 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 403552173} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IsGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: ccace836f586b3b48bc1586fa3c9574c, type: 2} +--- !u!4 &403552175 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 403552173} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.8958902, y: 2.3862462, z: -8.855571} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 177200666} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &611701752 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1411090331} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 4.873 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.00000058114523 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8191740002585371210, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.0015436467 + objectReference: {fileID: 0} + - target: {fileID: -8191740002585371210, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.03315547 + objectReference: {fileID: 0} + - target: {fileID: -8191740002585371210, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.00000015553087 + objectReference: {fileID: 0} + - target: {fileID: -8191740002585371210, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.997332 + objectReference: {fileID: 0} + - target: {fileID: -8191740002585371210, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.05714028 + objectReference: {fileID: 0} + - target: {fileID: -8191740002585371210, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.04523881 + objectReference: {fileID: 0} + - target: {fileID: -8191740002585371210, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.0041678254 + objectReference: {fileID: 0} + - target: {fileID: -8068027186691560116, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.000047461992 + objectReference: {fileID: 0} + - target: {fileID: -8068027186691560116, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.021117637 + objectReference: {fileID: 0} + - target: {fileID: -8068027186691560116, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.000000052171004 + objectReference: {fileID: 0} + - target: {fileID: -8068027186691560116, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.94961053 + objectReference: {fileID: 0} + - target: {fileID: -8068027186691560116, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.31332558 + objectReference: {fileID: 0} + - target: {fileID: -8068027186691560116, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.000114545226 + objectReference: {fileID: 0} + - target: {fileID: -8068027186691560116, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.008185923 + objectReference: {fileID: 0} + - target: {fileID: -8021001004253913084, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 8.038058e-13 + objectReference: {fileID: 0} + - target: {fileID: -8021001004253913084, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.100754224 + objectReference: {fileID: 0} + - target: {fileID: -8021001004253913084, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.000000022351742 + objectReference: {fileID: 0} + - target: {fileID: -8021001004253913084, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8021001004253913084, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8021001004253913084, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -7219772299731422950, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.0006029187 + objectReference: {fileID: 0} + - target: {fileID: -7219772299731422950, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.03289157 + objectReference: {fileID: 0} + - target: {fileID: -7219772299731422950, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.00000010896474 + objectReference: {fileID: 0} + - target: {fileID: -7219772299731422950, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.9980109 + objectReference: {fileID: 0} + - target: {fileID: -7219772299731422950, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.051721543 + objectReference: {fileID: 0} + - target: {fileID: -7219772299731422950, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.029257279 + objectReference: {fileID: 0} + - target: {fileID: -7219772299731422950, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.021052688 + objectReference: {fileID: 0} + - target: {fileID: -6874584590210671055, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.000000016065314 + objectReference: {fileID: 0} + - target: {fileID: -6874584590210671055, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.4920924 + objectReference: {fileID: 0} + - target: {fileID: -6874584590210671055, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.0000000055879354 + objectReference: {fileID: 0} + - target: {fileID: -6874584590210671055, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.8756426 + objectReference: {fileID: 0} + - target: {fileID: -6874584590210671055, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.48112515 + objectReference: {fileID: 0} + - target: {fileID: -6874584590210671055, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.02110701 + objectReference: {fileID: 0} + - target: {fileID: -6874584590210671055, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.036375064 + objectReference: {fileID: 0} + - target: {fileID: -6857788192064577062, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.0077770734 + objectReference: {fileID: 0} + - target: {fileID: -6857788192064577062, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.03038643 + objectReference: {fileID: 0} + - target: {fileID: -6857788192064577062, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.0000000018626451 + objectReference: {fileID: 0} + - target: {fileID: -6857788192064577062, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9942939 + objectReference: {fileID: 0} + - target: {fileID: -6857788192064577062, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.03563146 + objectReference: {fileID: 0} + - target: {fileID: -6857788192064577062, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.046753008 + objectReference: {fileID: 0} + - target: {fileID: -6857788192064577062, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.08901858 + objectReference: {fileID: 0} + - target: {fileID: -6803169544883306252, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.10775447 + objectReference: {fileID: 0} + - target: {fileID: -6803169544883306252, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.0030452013 + objectReference: {fileID: 0} + - target: {fileID: -6803169544883306252, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.44156992 + objectReference: {fileID: 0} + - target: {fileID: -6803169544883306252, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.5390984 + objectReference: {fileID: 0} + - target: {fileID: -6803169544883306252, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.45250702 + objectReference: {fileID: 0} + - target: {fileID: -6803169544883306252, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.55644083 + objectReference: {fileID: 0} + - target: {fileID: -6768225281626788248, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.00022974426 + objectReference: {fileID: 0} + - target: {fileID: -6768225281626788248, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.020953586 + objectReference: {fileID: 0} + - target: {fileID: -6768225281626788248, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.000000009892119 + objectReference: {fileID: 0} + - target: {fileID: -6768225281626788248, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.9495716 + objectReference: {fileID: 0} + - target: {fileID: -6768225281626788248, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.31337208 + objectReference: {fileID: 0} + - target: {fileID: -6768225281626788248, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.00070556987 + objectReference: {fileID: 0} + - target: {fileID: -6768225281626788248, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.01054783 + objectReference: {fileID: 0} + - target: {fileID: -6024149945523619558, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.000029549015 + objectReference: {fileID: 0} + - target: {fileID: -6024149945523619558, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.031590868 + objectReference: {fileID: 0} + - target: {fileID: -6024149945523619558, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.000000025888625 + objectReference: {fileID: 0} + - target: {fileID: -6024149945523619558, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.94962895 + objectReference: {fileID: 0} + - target: {fileID: -6024149945523619558, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.31336847 + objectReference: {fileID: 0} + - target: {fileID: -6024149945523619558, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.0003122091 + objectReference: {fileID: 0} + - target: {fileID: -6024149945523619558, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.002229571 + objectReference: {fileID: 0} + - target: {fileID: -5665043316445423941, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.00012406716 + objectReference: {fileID: 0} + - target: {fileID: -5665043316445423941, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.028965687 + objectReference: {fileID: 0} + - target: {fileID: -5665043316445423941, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.000000020499456 + objectReference: {fileID: 0} + - target: {fileID: -5665043316445423941, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.949667 + objectReference: {fileID: 0} + - target: {fileID: -5665043316445423941, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.31322053 + objectReference: {fileID: 0} + - target: {fileID: -5665043316445423941, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.0021514893 + objectReference: {fileID: 0} + - target: {fileID: -5665043316445423941, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.0045884545 + objectReference: {fileID: 0} + - target: {fileID: -5480977901411583989, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.00024938208 + objectReference: {fileID: 0} + - target: {fileID: -5480977901411583989, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.000000016372496 + objectReference: {fileID: 0} + - target: {fileID: -5480977901411583989, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.9495964 + objectReference: {fileID: 0} + - target: {fileID: -5480977901411583989, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.31336892 + objectReference: {fileID: 0} + - target: {fileID: -5480977901411583989, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.0003147721 + objectReference: {fileID: 0} + - target: {fileID: -5480977901411583989, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.008152932 + objectReference: {fileID: 0} + - target: {fileID: -3746190272939815206, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.000000020954758 + objectReference: {fileID: 0} + - target: {fileID: -3746190272939815206, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.4445088 + objectReference: {fileID: 0} + - target: {fileID: -3746190272939815206, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.76021576 + objectReference: {fileID: 0} + - target: {fileID: -3746190272939815206, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.6496667 + objectReference: {fileID: 0} + - target: {fileID: -3746190272939815206, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.00013132588 + objectReference: {fileID: 0} + - target: {fileID: -3746190272939815206, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.0022924838 + objectReference: {fileID: 0} + - target: {fileID: -3480699329000672020, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 5.456968e-12 + objectReference: {fileID: 0} + - target: {fileID: -3480699329000672020, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.08546307 + objectReference: {fileID: 0} + - target: {fileID: -3480699329000672020, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9973977 + objectReference: {fileID: 0} + - target: {fileID: -3480699329000672020, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.07209635 + objectReference: {fileID: 0} + - target: {fileID: -3480699329000672020, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.0000074505806 + objectReference: {fileID: 0} + - target: {fileID: -3480699329000672020, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.00007146597 + objectReference: {fileID: 0} + - target: {fileID: -3432401550182100168, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.000000027939677 + objectReference: {fileID: 0} + - target: {fileID: -3432401550182100168, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.14656426 + objectReference: {fileID: 0} + - target: {fileID: -3432401550182100168, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.00000026263297 + objectReference: {fileID: 0} + - target: {fileID: -3432401550182100168, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9404212 + objectReference: {fileID: 0} + - target: {fileID: -3432401550182100168, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.2707803 + objectReference: {fileID: 0} + - target: {fileID: -3432401550182100168, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.025423933 + objectReference: {fileID: 0} + - target: {fileID: -3432401550182100168, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.2040579 + objectReference: {fileID: 0} + - target: {fileID: -3321919801592875672, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 7.7911223e-13 + objectReference: {fileID: 0} + - target: {fileID: -3321919801592875672, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.101644754 + objectReference: {fileID: 0} + - target: {fileID: -3321919801592875672, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.027142022 + objectReference: {fileID: 0} + - target: {fileID: -3321919801592875672, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -3321919801592875672, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -3321919801592875672, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -2899422035419094908, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.00044329817 + objectReference: {fileID: 0} + - target: {fileID: -2899422035419094908, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.03061242 + objectReference: {fileID: 0} + - target: {fileID: -2899422035419094908, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.000000016780831 + objectReference: {fileID: 0} + - target: {fileID: -2899422035419094908, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.9496922 + objectReference: {fileID: 0} + - target: {fileID: -2899422035419094908, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.3131815 + objectReference: {fileID: 0} + - target: {fileID: -2899422035419094908, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.00059562916 + objectReference: {fileID: 0} + - target: {fileID: -2899422035419094908, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.001322165 + objectReference: {fileID: 0} + - target: {fileID: -2770666803903516498, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.000000009313226 + objectReference: {fileID: 0} + - target: {fileID: -2770666803903516498, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.000000014901161 + objectReference: {fileID: 0} + - target: {fileID: -2770666803903516498, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9535671 + objectReference: {fileID: 0} + - target: {fileID: -2770666803903516498, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.295267 + objectReference: {fileID: 0} + - target: {fileID: -2770666803903516498, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.05673361 + objectReference: {fileID: 0} + - target: {fileID: -2770666803903516498, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.017567232 + objectReference: {fileID: 0} + - target: {fileID: -2594260964506120097, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.010840742 + objectReference: {fileID: 0} + - target: {fileID: -2594260964506120097, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.08809359 + objectReference: {fileID: 0} + - target: {fileID: -2594260964506120097, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.0017713793 + objectReference: {fileID: 0} + - target: {fileID: -2594260964506120097, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9657962 + objectReference: {fileID: 0} + - target: {fileID: -2594260964506120097, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.258967 + objectReference: {fileID: 0} + - target: {fileID: -2594260964506120097, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.004879221 + objectReference: {fileID: 0} + - target: {fileID: -2594260964506120097, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.012248306 + objectReference: {fileID: 0} + - target: {fileID: -2389525917609993686, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.00028448302 + objectReference: {fileID: 0} + - target: {fileID: -2389525917609993686, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.034315716 + objectReference: {fileID: 0} + - target: {fileID: -2389525917609993686, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.000000035065852 + objectReference: {fileID: 0} + - target: {fileID: -2389525917609993686, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9495989 + objectReference: {fileID: 0} + - target: {fileID: -2389525917609993686, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.31336293 + objectReference: {fileID: 0} + - target: {fileID: -2389525917609993686, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.00034068522 + objectReference: {fileID: 0} + - target: {fileID: -2389525917609993686, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.008097618 + objectReference: {fileID: 0} + - target: {fileID: -2072040086291044643, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.0000000011641532 + objectReference: {fileID: 0} + - target: {fileID: -2072040086291044643, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.44451123 + objectReference: {fileID: 0} + - target: {fileID: -2072040086291044643, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.0000000013969839 + objectReference: {fileID: 0} + - target: {fileID: -2072040086291044643, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7520905 + objectReference: {fileID: 0} + - target: {fileID: -2072040086291044643, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.65905607 + objectReference: {fileID: 0} + - target: {fileID: -2072040086291044643, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.00015905866 + objectReference: {fileID: 0} + - target: {fileID: -2072040086291044643, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.0022524889 + objectReference: {fileID: 0} + - target: {fileID: -1864740628597940677, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.00011806295 + objectReference: {fileID: 0} + - target: {fileID: -1864740628597940677, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.028832918 + objectReference: {fileID: 0} + - target: {fileID: -1864740628597940677, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.00000030003574 + objectReference: {fileID: 0} + - target: {fileID: -1864740628597940677, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.949624 + objectReference: {fileID: 0} + - target: {fileID: -1864740628597940677, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.3133503 + objectReference: {fileID: 0} + - target: {fileID: -1864740628597940677, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.0014375596 + objectReference: {fileID: 0} + - target: {fileID: -1864740628597940677, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.0048853154 + objectReference: {fileID: 0} + - target: {fileID: -1812909498023395591, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.000000017407956 + objectReference: {fileID: 0} + - target: {fileID: -1812909498023395591, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.1886455 + objectReference: {fileID: 0} + - target: {fileID: -1812909498023395591, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.000000020731832 + objectReference: {fileID: 0} + - target: {fileID: -1812909498023395591, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7660685 + objectReference: {fileID: 0} + - target: {fileID: -1812909498023395591, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.091603674 + objectReference: {fileID: 0} + - target: {fileID: -1812909498023395591, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.004544038 + objectReference: {fileID: 0} + - target: {fileID: -1812909498023395591, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.6361818 + objectReference: {fileID: 0} + - target: {fileID: -1070350730909333850, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.036340363 + objectReference: {fileID: 0} + - target: {fileID: -1070350730909333850, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.089909635 + objectReference: {fileID: 0} + - target: {fileID: -1070350730909333850, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.0009038374 + objectReference: {fileID: 0} + - target: {fileID: -1070350730909333850, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.9542509 + objectReference: {fileID: 0} + - target: {fileID: -1070350730909333850, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.26090896 + objectReference: {fileID: 0} + - target: {fileID: -1070350730909333850, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.010503113 + objectReference: {fileID: 0} + - target: {fileID: -1070350730909333850, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.14567637 + objectReference: {fileID: 0} + - target: {fileID: -870823317777057635, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.008985817 + objectReference: {fileID: 0} + - target: {fileID: -870823317777057635, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.03090162 + objectReference: {fileID: 0} + - target: {fileID: -870823317777057635, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.00000017881393 + objectReference: {fileID: 0} + - target: {fileID: -870823317777057635, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.9967238 + objectReference: {fileID: 0} + - target: {fileID: -870823317777057635, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.03679877 + objectReference: {fileID: 0} + - target: {fileID: -870823317777057635, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.04173368 + objectReference: {fileID: 0} + - target: {fileID: -870823317777057635, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.05870124 + objectReference: {fileID: 0} + - target: {fileID: -104578136787704052, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.013054613 + objectReference: {fileID: 0} + - target: {fileID: -104578136787704052, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.003804719 + objectReference: {fileID: 0} + - target: {fileID: -104578136787704052, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.9648906 + objectReference: {fileID: 0} + - target: {fileID: -104578136787704052, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.26208824 + objectReference: {fileID: 0} + - target: {fileID: -104578136787704052, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.002466619 + objectReference: {fileID: 0} + - target: {fileID: -104578136787704052, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.017026871 + objectReference: {fileID: 0} + - target: {fileID: 366175167995203695, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -7.463098e-13 + objectReference: {fileID: 0} + - target: {fileID: 366175167995203695, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.11514794 + objectReference: {fileID: 0} + - target: {fileID: 366175167995203695, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.0000000018626451 + objectReference: {fileID: 0} + - target: {fileID: 366175167995203695, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 366175167995203695, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 608321761475470972, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.0000000030267984 + objectReference: {fileID: 0} + - target: {fileID: 608321761475470972, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49178556 + objectReference: {fileID: 0} + - target: {fileID: 608321761475470972, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.0000000037252903 + objectReference: {fileID: 0} + - target: {fileID: 608321761475470972, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.8792911 + objectReference: {fileID: 0} + - target: {fileID: 608321761475470972, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.47442064 + objectReference: {fileID: 0} + - target: {fileID: 608321761475470972, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.021205274 + objectReference: {fileID: 0} + - target: {fileID: 608321761475470972, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.036366437 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_Name + value: Electrician_man + objectReference: {fileID: 0} + - target: {fileID: 1092408308860062549, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.00017393014 + objectReference: {fileID: 0} + - target: {fileID: 1092408308860062549, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.028420094 + objectReference: {fileID: 0} + - target: {fileID: 1092408308860062549, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.000000046161656 + objectReference: {fileID: 0} + - target: {fileID: 1092408308860062549, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.9496544 + objectReference: {fileID: 0} + - target: {fileID: 1092408308860062549, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.31316808 + objectReference: {fileID: 0} + - target: {fileID: 1092408308860062549, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.0023516119 + objectReference: {fileID: 0} + - target: {fileID: 1092408308860062549, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.00876324 + objectReference: {fileID: 0} + - target: {fileID: 1189529853000058984, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.035918694 + objectReference: {fileID: 0} + - target: {fileID: 1189529853000058984, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.00009113923 + objectReference: {fileID: 0} + - target: {fileID: 1189529853000058984, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.96515596 + objectReference: {fileID: 0} + - target: {fileID: 1189529853000058984, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.26122865 + objectReference: {fileID: 0} + - target: {fileID: 1189529853000058984, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.008846133 + objectReference: {fileID: 0} + - target: {fileID: 1189529853000058984, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.012467248 + objectReference: {fileID: 0} + - target: {fileID: 1330755669629619180, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.03682979 + objectReference: {fileID: 0} + - target: {fileID: 1330755669629619180, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.0000047385693 + objectReference: {fileID: 0} + - target: {fileID: 1330755669629619180, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9554201 + objectReference: {fileID: 0} + - target: {fileID: 1330755669629619180, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.25900382 + objectReference: {fileID: 0} + - target: {fileID: 1330755669629619180, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.012700155 + objectReference: {fileID: 0} + - target: {fileID: 1330755669629619180, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.14116766 + objectReference: {fileID: 0} + - target: {fileID: 1564860333797465651, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.00050521956 + objectReference: {fileID: 0} + - target: {fileID: 1564860333797465651, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.029672557 + objectReference: {fileID: 0} + - target: {fileID: 1564860333797465651, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.00000030710885 + objectReference: {fileID: 0} + - target: {fileID: 1564860333797465651, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9496767 + objectReference: {fileID: 0} + - target: {fileID: 1564860333797465651, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.3132304 + objectReference: {fileID: 0} + - target: {fileID: 1564860333797465651, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.00085741276 + objectReference: {fileID: 0} + - target: {fileID: 1564860333797465651, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.0004713833 + objectReference: {fileID: 0} + - target: {fileID: 1852576806548013000, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.00000002209714 + objectReference: {fileID: 0} + - target: {fileID: 1852576806548013000, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.22562814 + objectReference: {fileID: 0} + - target: {fileID: 1852576806548013000, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.00000003377778 + objectReference: {fileID: 0} + - target: {fileID: 1852576806548013000, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.99453753 + objectReference: {fileID: 0} + - target: {fileID: 1852576806548013000, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.021405146 + objectReference: {fileID: 0} + - target: {fileID: 1852576806548013000, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.074931934 + objectReference: {fileID: 0} + - target: {fileID: 1852576806548013000, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.06944239 + objectReference: {fileID: 0} + - target: {fileID: 2559285840627121667, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: -0.047544353 + objectReference: {fileID: 0} + - target: {fileID: 2559285840627121667, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0022453216 + objectReference: {fileID: 0} + - target: {fileID: 2559285840627121667, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.0016265509 + objectReference: {fileID: 0} + - target: {fileID: 2559285840627121667, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.25411925 + objectReference: {fileID: 0} + - target: {fileID: 2559285840627121667, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.9671689 + objectReference: {fileID: 0} + - target: {fileID: 2563496969622287784, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.000000022592758 + objectReference: {fileID: 0} + - target: {fileID: 2563496969622287784, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.18866172 + objectReference: {fileID: 0} + - target: {fileID: 2563496969622287784, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.0000000656521 + objectReference: {fileID: 0} + - target: {fileID: 2563496969622287784, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7660688 + objectReference: {fileID: 0} + - target: {fileID: 2563496969622287784, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.09186936 + objectReference: {fileID: 0} + - target: {fileID: 2563496969622287784, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.0044512874 + objectReference: {fileID: 0} + - target: {fileID: 2563496969622287784, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.63614374 + objectReference: {fileID: 0} + - target: {fileID: 2916570863362053800, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.000000018626451 + objectReference: {fileID: 0} + - target: {fileID: 2916570863362053800, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.16798416 + objectReference: {fileID: 0} + - target: {fileID: 2916570863362053800, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.000000029802322 + objectReference: {fileID: 0} + - target: {fileID: 2916570863362053800, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9535941 + objectReference: {fileID: 0} + - target: {fileID: 2916570863362053800, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.29576427 + objectReference: {fileID: 0} + - target: {fileID: 2916570863362053800, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.05387643 + objectReference: {fileID: 0} + - target: {fileID: 2916570863362053800, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.016710162 + objectReference: {fileID: 0} + - target: {fileID: 3183749884578473501, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.00007277399 + objectReference: {fileID: 0} + - target: {fileID: 3183749884578473501, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.03187857 + objectReference: {fileID: 0} + - target: {fileID: 3183749884578473501, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.00000027059926 + objectReference: {fileID: 0} + - target: {fileID: 3183749884578473501, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9496178 + objectReference: {fileID: 0} + - target: {fileID: 3183749884578473501, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.31336096 + objectReference: {fileID: 0} + - target: {fileID: 3183749884578473501, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.0010591595 + objectReference: {fileID: 0} + - target: {fileID: 3183749884578473501, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.0054697082 + objectReference: {fileID: 0} + - target: {fileID: 3667946887678727147, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.012633024 + objectReference: {fileID: 0} + - target: {fileID: 3667946887678727147, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.09264517 + objectReference: {fileID: 0} + - target: {fileID: 3667946887678727147, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.0049605174 + objectReference: {fileID: 0} + - target: {fileID: 3667946887678727147, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.959617 + objectReference: {fileID: 0} + - target: {fileID: 3667946887678727147, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.261486 + objectReference: {fileID: 0} + - target: {fileID: 3667946887678727147, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.011139213 + objectReference: {fileID: 0} + - target: {fileID: 3667946887678727147, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.10313182 + objectReference: {fileID: 0} + - target: {fileID: 4747904710347621765, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.03788239 + objectReference: {fileID: 0} + - target: {fileID: 4747904710347621765, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.080142386 + objectReference: {fileID: 0} + - target: {fileID: 4747904710347621765, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.00090406835 + objectReference: {fileID: 0} + - target: {fileID: 4747904710347621765, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.96598685 + objectReference: {fileID: 0} + - target: {fileID: 4747904710347621765, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.25798613 + objectReference: {fileID: 0} + - target: {fileID: 4747904710347621765, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.006854832 + objectReference: {fileID: 0} + - target: {fileID: 4747904710347621765, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.016299605 + objectReference: {fileID: 0} + - target: {fileID: 5048025441337412694, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.02046166 + objectReference: {fileID: 0} + - target: {fileID: 5048025441337412694, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.030705288 + objectReference: {fileID: 0} + - target: {fileID: 5048025441337412694, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.013256093 + objectReference: {fileID: 0} + - target: {fileID: 5048025441337412694, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.8949734 + objectReference: {fileID: 0} + - target: {fileID: 5048025441337412694, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.20688358 + objectReference: {fileID: 0} + - target: {fileID: 5048025441337412694, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.04870703 + objectReference: {fileID: 0} + - target: {fileID: 5048025441337412694, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.39223656 + objectReference: {fileID: 0} + - target: {fileID: 5097370190579632962, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.00011747127 + objectReference: {fileID: 0} + - target: {fileID: 5097370190579632962, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.029227326 + objectReference: {fileID: 0} + - target: {fileID: 5097370190579632962, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.0000002654914 + objectReference: {fileID: 0} + - target: {fileID: 5097370190579632962, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.9496275 + objectReference: {fileID: 0} + - target: {fileID: 5097370190579632962, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.31336626 + objectReference: {fileID: 0} + - target: {fileID: 5097370190579632962, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.0013499259 + objectReference: {fileID: 0} + - target: {fileID: 5097370190579632962, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.0027242599 + objectReference: {fileID: 0} + - target: {fileID: 5372056943023685468, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.00010265597 + objectReference: {fileID: 0} + - target: {fileID: 5372056943023685468, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.024491275 + objectReference: {fileID: 0} + - target: {fileID: 5372056943023685468, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.000000023234662 + objectReference: {fileID: 0} + - target: {fileID: 5372056943023685468, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.94961464 + objectReference: {fileID: 0} + - target: {fileID: 5372056943023685468, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.31337252 + objectReference: {fileID: 0} + - target: {fileID: 5372056943023685468, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.0004546045 + objectReference: {fileID: 0} + - target: {fileID: 5372056943023685468, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.0054322765 + objectReference: {fileID: 0} + - target: {fileID: 5465940246521907071, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.0011369972 + objectReference: {fileID: 0} + - target: {fileID: 5465940246521907071, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: -0.026525736 + objectReference: {fileID: 0} + - target: {fileID: 5465940246521907071, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.010724544 + objectReference: {fileID: 0} + - target: {fileID: 5465940246521907071, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5465940246521907071, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.0000011026792 + objectReference: {fileID: 0} + - target: {fileID: 5465940246521907071, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.0000022539068 + objectReference: {fileID: 0} + - target: {fileID: 5465940246521907071, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.00007183213 + objectReference: {fileID: 0} + - target: {fileID: 5866666021909216657, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_Controller + value: + objectReference: {fileID: 9100000, guid: 17a7fbd6727d90e44b8e9159e5f08945, type: 2} + - target: {fileID: 5866666021909216657, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_WarningMessage + value: + objectReference: {fileID: 0} + - target: {fileID: 6000407479487422213, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.0000000060535967 + objectReference: {fileID: 0} + - target: {fileID: 6000407479487422213, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.14656422 + objectReference: {fileID: 0} + - target: {fileID: 6000407479487422213, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.00000033900142 + objectReference: {fileID: 0} + - target: {fileID: 6000407479487422213, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.94001466 + objectReference: {fileID: 0} + - target: {fileID: 6000407479487422213, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.2711034 + objectReference: {fileID: 0} + - target: {fileID: 6000407479487422213, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.026139665 + objectReference: {fileID: 0} + - target: {fileID: 6000407479487422213, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.20540723 + objectReference: {fileID: 0} + - target: {fileID: 6341119541397085964, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.000059001148 + objectReference: {fileID: 0} + - target: {fileID: 6341119541397085964, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.033672642 + objectReference: {fileID: 0} + - target: {fileID: 6341119541397085964, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.000000016029553 + objectReference: {fileID: 0} + - target: {fileID: 6341119541397085964, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.94963086 + objectReference: {fileID: 0} + - target: {fileID: 6341119541397085964, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.3133694 + objectReference: {fileID: 0} + - target: {fileID: 6341119541397085964, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.000043928623 + objectReference: {fileID: 0} + - target: {fileID: 6341119541397085964, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.0010017306 + objectReference: {fileID: 0} + - target: {fileID: 6502182839619065283, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.000000011769572 + objectReference: {fileID: 0} + - target: {fileID: 6502182839619065283, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.00000004095793 + objectReference: {fileID: 0} + - target: {fileID: 6502182839619065283, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9950715 + objectReference: {fileID: 0} + - target: {fileID: 6502182839619065283, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.024482965 + objectReference: {fileID: 0} + - target: {fileID: 6502182839619065283, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.06895937 + objectReference: {fileID: 0} + - target: {fileID: 6502182839619065283, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.06691809 + objectReference: {fileID: 0} + - target: {fileID: 6515712193588681746, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -2.431217e-12 + objectReference: {fileID: 0} + - target: {fileID: 6515712193588681746, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.12954117 + objectReference: {fileID: 0} + - target: {fileID: 6515712193588681746, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.0000000018626451 + objectReference: {fileID: 0} + - target: {fileID: 6515712193588681746, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9973976 + objectReference: {fileID: 0} + - target: {fileID: 6515712193588681746, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.07209751 + objectReference: {fileID: 0} + - target: {fileID: 6515712193588681746, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.000000029802322 + objectReference: {fileID: 0} + - target: {fileID: 6515712193588681746, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.000000014901161 + objectReference: {fileID: 0} + - target: {fileID: 6655383506977046455, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.0000018921064 + objectReference: {fileID: 0} + - target: {fileID: 6655383506977046455, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.02386797 + objectReference: {fileID: 0} + - target: {fileID: 6655383506977046455, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.00000005989245 + objectReference: {fileID: 0} + - target: {fileID: 6655383506977046455, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9496348 + objectReference: {fileID: 0} + - target: {fileID: 6655383506977046455, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.31332403 + objectReference: {fileID: 0} + - target: {fileID: 6655383506977046455, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.00019830464 + objectReference: {fileID: 0} + - target: {fileID: 6655383506977046455, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.0046744044 + objectReference: {fileID: 0} + - target: {fileID: 7078722787440015773, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.10778905 + objectReference: {fileID: 0} + - target: {fileID: 7078722787440015773, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.0032823114 + objectReference: {fileID: 0} + - target: {fileID: 7078722787440015773, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.44102898 + objectReference: {fileID: 0} + - target: {fileID: 7078722787440015773, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.53797984 + objectReference: {fileID: 0} + - target: {fileID: 7078722787440015773, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.4532956 + objectReference: {fileID: 0} + - target: {fileID: 7078722787440015773, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.55730987 + objectReference: {fileID: 0} + - target: {fileID: 7666680083751660616, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: -0.00027978478 + objectReference: {fileID: 0} + - target: {fileID: 7666680083751660616, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.030845035 + objectReference: {fileID: 0} + - target: {fileID: 7666680083751660616, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.00000030315053 + objectReference: {fileID: 0} + - target: {fileID: 7666680083751660616, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.94958156 + objectReference: {fileID: 0} + - target: {fileID: 7666680083751660616, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.3133522 + objectReference: {fileID: 0} + - target: {fileID: 7666680083751660616, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.00026549396 + objectReference: {fileID: 0} + - target: {fileID: 7666680083751660616, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.010256617 + objectReference: {fileID: 0} + - target: {fileID: 8169382868667117632, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.08959449 + objectReference: {fileID: 0} + - target: {fileID: 8169382868667117632, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: -0.047544356 + objectReference: {fileID: 0} + - target: {fileID: 8169382868667117632, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.0021150855 + objectReference: {fileID: 0} + - target: {fileID: 8169382868667117632, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.001655489 + objectReference: {fileID: 0} + - target: {fileID: 8169382868667117632, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.24915323 + objectReference: {fileID: 0} + - target: {fileID: 8169382868667117632, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0.9684604 + objectReference: {fileID: 0} + - target: {fileID: 8255111157037086696, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0.011893265 + objectReference: {fileID: 0} + - target: {fileID: 8255111157037086696, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: -0.0053101964 + objectReference: {fileID: 0} + - target: {fileID: 8255111157037086696, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9601965 + objectReference: {fileID: 0} + - target: {fileID: 8255111157037086696, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0.25919756 + objectReference: {fileID: 0} + - target: {fileID: 8255111157037086696, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.013079047 + objectReference: {fileID: 0} + - target: {fileID: 8255111157037086696, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.103288144 + objectReference: {fileID: 0} + - target: {fileID: 8447082967072642302, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.0306428 + objectReference: {fileID: 0} + - target: {fileID: 8447082967072642302, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.0149417 + objectReference: {fileID: 0} + - target: {fileID: 8447082967072642302, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.w + value: -0.89875174 + objectReference: {fileID: 0} + - target: {fileID: 8447082967072642302, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.x + value: -0.21107095 + objectReference: {fileID: 0} + - target: {fileID: 8447082967072642302, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0.053866383 + objectReference: {fileID: 0} + - target: {fileID: 8447082967072642302, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + propertyPath: m_LocalRotation.z + value: -0.38051656 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} +--- !u!1 &635157131 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 635157133} + - component: {fileID: 635157132} + m_Layer: 0 + m_Name: Light Probe Group + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!220 &635157132 +LightProbeGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 635157131} + m_Enabled: 1 + m_SourcePositions: + - {x: 2.957388, y: 0.20940483, z: -3.4936855} + - {x: 1.9609236, y: 1.4762032, z: -3.4936855} + - {x: -3.3745418, y: 0.20940483, z: -3.4936855} + - {x: 0.9261483, y: 0.20940483, z: -3.4936855} + - {x: -2.3494344, y: 1.4762032, z: -3.4936855} + - {x: -1.1817119, y: 0.20940483, z: -3.4936855} + - {x: -0.07031618, y: 1.4762032, z: -3.4936855} + - {x: 2.957388, y: 0.20940483, z: 3.8570247} + - {x: 1.9559926, y: 0.20940483, z: 2.3212185} + - {x: 1.9609236, y: 1.4762032, z: 3.8570247} + - {x: 2.957388, y: 1.4762032, z: 2.3212185} + - {x: -3.3745418, y: 0.20940483, z: 3.8570247} + - {x: -3.3745418, y: 1.4762032, z: 2.3212185} + - {x: 0.9261483, y: 0.20940483, z: 3.8570247} + - {x: -2.3543653, y: 0.20940483, z: 2.3212185} + - {x: -2.3494344, y: 1.4762032, z: 3.8570247} + - {x: 0.9261483, y: 1.4762032, z: 2.3212185} + - {x: -1.1817119, y: 0.20940483, z: 3.8570247} + - {x: -1.1817119, y: 1.4762032, z: 2.3212185} + - {x: -0.07524721, y: 0.20940483, z: 2.3212185} + - {x: -0.07031618, y: 1.4762032, z: 3.8570247} + - {x: 1.9559926, y: 0.20940483, z: 2.3212185} + - {x: 2.957388, y: 1.4762032, z: 2.3212185} + - {x: -3.3745418, y: 1.4762032, z: 2.3212185} + - {x: -2.3543653, y: 0.20940483, z: 2.3212185} + - {x: 0.9261483, y: 1.4762032, z: 2.3212185} + - {x: -1.1817119, y: 1.4762032, z: 2.3212185} + - {x: -0.07524721, y: 0.20940483, z: 2.3212185} + - {x: 2.957388, y: 0.20940483, z: -1.7783186} + - {x: 1.9559926, y: 0.20940483, z: -2.6224334} + - {x: 1.9609236, y: 1.4762032, z: -1.7783186} + - {x: 2.957388, y: 1.4762032, z: -2.6224334} + - {x: -3.3745418, y: 0.20940483, z: -1.7783186} + - {x: -3.3745418, y: 1.4762032, z: -2.6224334} + - {x: 0.9261483, y: 0.20940483, z: -1.7783186} + - {x: -2.3543653, y: 0.20940483, z: -2.6224334} + - {x: -2.3494344, y: 1.4762032, z: -1.7783186} + - {x: 0.9261483, y: 1.4762032, z: -2.6224334} + - {x: -1.1817119, y: 0.20940483, z: -1.7783186} + - {x: -1.1817119, y: 1.4762032, z: -2.6224334} + - {x: -0.07524721, y: 0.20940483, z: -2.6224334} + - {x: -0.07031618, y: 1.4762032, z: -1.7783186} + - {x: 1.9559926, y: 0.20940483, z: -2.6224334} + - {x: 2.957388, y: 1.4762032, z: -2.6224334} + - {x: -3.3745418, y: 1.4762032, z: -2.6224334} + - {x: -2.3543653, y: 0.20940483, z: -2.6224334} + - {x: 0.9261483, y: 1.4762032, z: -2.6224334} + - {x: -1.1817119, y: 1.4762032, z: -2.6224334} + - {x: -0.07524721, y: 0.20940483, z: -2.6224334} + - {x: 2.957388, y: 0.20940483, z: 0.7033689} + - {x: 1.9559926, y: 0.20940483, z: -0.8792731} + - {x: 1.9609236, y: 1.4762032, z: 0.7033689} + - {x: 2.957388, y: 1.4762032, z: -0.8792731} + - {x: -3.3745418, y: 0.20940483, z: 0.7033689} + - {x: -3.3745418, y: 1.4762032, z: -0.8792731} + - {x: 0.9261483, y: 0.20940483, z: 0.7033689} + - {x: -2.3543653, y: 0.20940483, z: -0.8792731} + - {x: -2.3494344, y: 1.4762032, z: 0.7033689} + - {x: 0.9261483, y: 1.4762032, z: -0.8792731} + - {x: -1.1817119, y: 0.20940483, z: 0.7033689} + - {x: -1.1817119, y: 1.4762032, z: -0.8792731} + - {x: -0.07524721, y: 0.20940483, z: -0.8792731} + - {x: -0.07031618, y: 1.4762032, z: 0.7033689} + - {x: 1.9559926, y: 0.20940483, z: -0.8792731} + - {x: 2.957388, y: 1.4762032, z: -0.8792731} + - {x: -3.3745418, y: 1.4762032, z: -0.8792731} + - {x: -2.3543653, y: 0.20940483, z: -0.8792731} + - {x: 0.9261483, y: 1.4762032, z: -0.8792731} + - {x: -1.1817119, y: 1.4762032, z: -0.8792731} + - {x: -0.07524721, y: 0.20940483, z: -0.8792731} + - {x: 1.9609236, y: -1, z: -3.4936855} + - {x: -2.3494344, y: -1, z: -3.4936855} + - {x: -0.07031618, y: -1, z: -3.4936855} + - {x: 1.9609236, y: -1, z: 3.8570247} + - {x: 2.957388, y: -1, z: 2.3212185} + - {x: -3.3745418, y: -1, z: 2.3212185} + - {x: -2.3494344, y: -1, z: 3.8570247} + - {x: 0.9261483, y: -1, z: 2.3212185} + - {x: -1.1817119, y: -1, z: 2.3212185} + - {x: -0.07031618, y: -1, z: 3.8570247} + - {x: 2.957388, y: -1, z: 2.3212185} + - {x: -3.3745418, y: -1, z: 2.3212185} + - {x: 0.9261483, y: -1, z: 2.3212185} + - {x: -1.1817119, y: -1, z: 2.3212185} + - {x: 1.9609236, y: -1, z: -1.7783186} + - {x: 2.957388, y: -1, z: -2.6224334} + - {x: -3.3745418, y: -1, z: -2.6224334} + - {x: -2.3494344, y: -1, z: -1.7783186} + - {x: 0.9261483, y: -1, z: -2.6224334} + - {x: -1.1817119, y: -1, z: -2.6224334} + - {x: -0.07031618, y: -1, z: -1.7783186} + - {x: 2.957388, y: -1, z: -2.6224334} + - {x: -3.3745418, y: -1, z: -2.6224334} + - {x: 0.9261483, y: -1, z: -2.6224334} + - {x: -1.1817119, y: -1, z: -2.6224334} + - {x: 1.9609236, y: -1, z: 0.7033689} + - {x: 2.957388, y: -1, z: -0.8792731} + - {x: -3.3745418, y: -1, z: -0.8792731} + - {x: -2.3494344, y: -1, z: 0.7033689} + - {x: 0.9261483, y: -1, z: -0.8792731} + - {x: -1.1817119, y: -1, z: -0.8792731} + - {x: -0.07031618, y: -1, z: 0.7033689} + - {x: 2.957388, y: -1, z: -0.8792731} + - {x: -3.3745418, y: -1, z: -0.8792731} + - {x: 0.9261483, y: -1, z: -0.8792731} + - {x: -1.1817119, y: -1, z: -0.8792731} + m_Dering: 1 +--- !u!4 &635157133 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 635157131} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.3615613, y: -0.24443829, z: -1.5163875} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 177200666} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &744367280 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 744367281} + - component: {fileID: 744367284} + - component: {fileID: 744367283} + - component: {fileID: 744367282} + - component: {fileID: 744367285} + - component: {fileID: 744367286} + m_Layer: 0 + m_Name: "\u4F7F\u7528\u7684\u7535\u8111" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &744367281 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 744367280} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 97.09, y: 49.83, z: 9.05} + m_LocalScale: {x: 52.95, y: 30, z: 2.58} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6947447504957339977} + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 15 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &744367282 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 744367280} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &744367283 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 744367280} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: f3f6a522fde04d94bbff3847409e78b5, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &744367284 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 744367280} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &744367285 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 744367280} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8239388, g: 1.6478776, b: 0.37763864, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 1 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 0 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 2 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &744367286 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 744367280} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a61a5a2d7d8e4d949b96b4b528866992, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 5033 + triggerName: "\u7535\u8111" + _highlight: {fileID: 0} +--- !u!1 &772251462 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 772251465} + - component: {fileID: 772251464} + - component: {fileID: 772251466} + - component: {fileID: 772251467} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!20 &772251464 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 772251462} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &772251465 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 772251462} + m_LocalRotation: {x: -0, y: 1, z: -0, w: 0} + m_LocalPosition: {x: -0.05, y: 1.32, z: 7.7} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1411090331} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0.4681312, y: 2.842171e-13, z: 0} +--- !u!114 &772251466 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 772251462} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 1 + m_Antialiasing: 1 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !u!95 &772251467 +Animator: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 772251462} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 0} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 +--- !u!1 &886398201 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + m_PrefabInstance: {fileID: 611701752} + m_PrefabAsset: {fileID: 0} +--- !u!4 &886398202 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + m_PrefabInstance: {fileID: 611701752} + m_PrefabAsset: {fileID: 0} +--- !u!95 &886398203 stripped +Animator: + m_CorrespondingSourceObject: {fileID: 5866666021909216657, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3} + m_PrefabInstance: {fileID: 611701752} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1202455765 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 543450652979975617} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_LocalPosition.x + value: -0.008214593 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_LocalPosition.y + value: 1.5999991 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_LocalPosition.z + value: 2.367663 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5908163146266368092, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 95c1f503f310caf4994319c401155ba1, type: 2} + - target: {fileID: -3167299574701864104, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -2627870247053648953, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -37445397394511822, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: -37445397394511822, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 95c1f503f310caf4994319c401155ba1, type: 2} + - target: {fileID: 919132149155446097, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_Name + value: "\u529E\u516C\u5BA4\u724C\u5B50" + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 3136841376501902489, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 95c1f503f310caf4994319c401155ba1, type: 2} + - target: {fileID: 6136984974223324782, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 95c1f503f310caf4994319c401155ba1, type: 2} + - target: {fileID: 6989972652074480914, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 8653909006750398859, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} +--- !u!4 &1202455766 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 168f04024d844064cae6106b92cbe0e8, type: 3} + m_PrefabInstance: {fileID: 1202455765} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1411090329 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1411090331} + - component: {fileID: 1411090330} + - component: {fileID: 1411090332} + - component: {fileID: 1411090333} + m_Layer: 0 + m_Name: OfficeTimeline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!320 &1411090330 +PlayableDirector: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1411090329} + m_Enabled: 1 + serializedVersion: 3 + m_PlayableAsset: {fileID: 11400000, guid: 282730ee68b4dac45b34f2c80f5a8340, type: 2} + m_InitialState: 1 + m_WrapMode: 0 + m_DirectorUpdateMode: 1 + m_InitialTime: 0 + m_SceneBindings: + - key: {fileID: -421950645239995520, guid: 282730ee68b4dac45b34f2c80f5a8340, type: 2} + value: {fileID: 2089319125} + - key: {fileID: 5639829736059126345, guid: 282730ee68b4dac45b34f2c80f5a8340, type: 2} + value: {fileID: 886398201} + - key: {fileID: 8733411975691198292, guid: 282730ee68b4dac45b34f2c80f5a8340, type: 2} + value: {fileID: 772251467} + - key: {fileID: 2540533597311288102, guid: 282730ee68b4dac45b34f2c80f5a8340, type: 2} + value: {fileID: 1411090333} + - key: {fileID: -7517325925010075830, guid: 282730ee68b4dac45b34f2c80f5a8340, type: 2} + value: {fileID: 886398203} + - key: {fileID: -583877099758490811, guid: 282730ee68b4dac45b34f2c80f5a8340, type: 2} + value: {fileID: 886398203} + m_ExposedReferences: + m_References: [] +--- !u!4 &1411090331 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1411090329} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2089319124} + - {fileID: 772251465} + - {fileID: 886398202} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1411090332 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1411090329} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5436cda1c4b71f044bcd6efe54bbfc28, type: 3} + m_Name: + m_EditorClassIdentifier: + playerModel: {fileID: 886398201} + aniCamera: {fileID: 772251462} +--- !u!114 &1411090333 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1411090329} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e52de21a22b6dd44c9cc19f810c65059, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Events: + m_Signals: + - {fileID: 11400000, guid: a7c52c2be9bb2c04c8d223e031b5b8b8, type: 2} + m_Events: + - m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1411090332} + m_TargetAssemblyTypeName: OfficeTimelineControl, Assembly-CSharp + m_MethodName: OnPlayableDirectorStopped + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &1575448214 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1575448217} + - component: {fileID: 1575448216} + - component: {fileID: 1575448215} + m_Layer: 0 + m_Name: Point Light (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1575448215 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1575448214} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} +--- !u!108 &1575448216 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1575448214} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 2 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 0.7 + m_Range: 500 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.02 + m_NormalBias: 0.1 + m_NearPlane: 0.1 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1575448217 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1575448214} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -1.3974388, y: 1.6325616, z: -1.6853875} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 177200666} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1751720604 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1751720607} + - component: {fileID: 1751720606} + - component: {fileID: 1751720605} + m_Layer: 0 + m_Name: Directional Light (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1751720605 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1751720604} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} +--- !u!108 &1751720606 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1751720604} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1.5 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.02 + m_NormalBias: 0.1 + m_NearPlane: 0.5 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 5000 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 1.02e-43, y: 0, z: 0, w: -3.5207286e-34} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1751720607 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1751720604} + m_LocalRotation: {x: 0.40730646, y: 0.22203079, z: -0.1510942, w: 0.87291145} + m_LocalPosition: {x: 0.90156126, y: 0.28956163, z: -8.139387} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 177200666} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 51.094, y: 24.912, z: -7.586} +--- !u!1001 &1904940670 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 543450652349448658} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -90 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2994574054460991704, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_CastShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -315436298499295655, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_Name + value: "\u624B\u673A" + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3564783574603935192, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6589126927893049898, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + propertyPath: m_CastShadows + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} +--- !u!4 &1904940671 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + m_PrefabInstance: {fileID: 1904940670} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1986188604 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1986188605} + - component: {fileID: 1986188606} + m_Layer: 0 + m_Name: OfficeManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1986188605 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1986188604} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.016247163, y: 0.8535463, z: -1.0612803} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1986188606 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1986188604} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e84b5b8de3a3f154ba32f7748599c99d, type: 3} + m_Name: + m_EditorClassIdentifier: + mobileController: {fileID: 919132148358585193} +--- !u!1 &2077900027 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2077900030} + - component: {fileID: 2077900029} + - component: {fileID: 2077900028} + m_Layer: 0 + m_Name: Area Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2077900028 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2077900027} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} +--- !u!108 &2077900029 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2077900027} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 3 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.02 + m_NormalBias: 0.1 + m_NearPlane: 0.1 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 2 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 6.185981, y: 8.249092} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 1.05e-43, y: 1.0596762e-38, z: 2.3e-43, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &2077900030 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2077900027} + m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0.14956129, y: 1.4965616, z: -1.7163874} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 177200666} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!1 &2089319123 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2089319124} + - component: {fileID: 2089319125} + m_Layer: 0 + m_Name: OfficeDoor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2089319124 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2089319123} + m_LocalRotation: {x: -0, y: 0.5214049, z: -0, w: 0.8533094} + m_LocalPosition: {x: -0.561, y: 1.039, z: 5.132} + m_LocalScale: {x: 0.010000002, y: 0.01, z: 0.010000002} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8349363051970068140} + - {fileID: 5323224703424836121} + m_Father: {fileID: 1411090331} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 62.853, z: 0} +--- !u!95 &2089319125 +Animator: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2089319123} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 0} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 +--- !u!1 &2105675282 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2105675285} + - component: {fileID: 2105675284} + - component: {fileID: 2105675283} + m_Layer: 0 + m_Name: Point Light (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2105675283 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2105675282} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} +--- !u!108 &2105675284 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2105675282} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 2 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 0.7 + m_Range: 500 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.02 + m_NormalBias: 0.1 + m_NearPlane: 0.1 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &2105675285 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2105675282} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -1.3974388, y: 1.6325616, z: -5.2133875} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 177200666} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2144293024 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2144293027} + - component: {fileID: 2144293026} + - component: {fileID: 2144293025} + m_Layer: 0 + m_Name: Point Light (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2144293025 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2144293024} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} +--- !u!108 &2144293026 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2144293024} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 2 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 0.7 + m_Range: 500 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.02 + m_NormalBias: 0.1 + m_NearPlane: 0.1 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &2144293027 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2144293024} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.6145613, y: 1.6325616, z: -1.6853875} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 177200666} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &90378869422336730 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6857719923556227839} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -92.20541, y: 37.12967, z: -57.01514} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 13 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &124583573446515335 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5428943061850925123} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 59.387524, y: 150.4626, z: -2.2768342} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5832512100931678475} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &164816456207620356 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5951240531329479905} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: edff30b8de102de408ac74328588411d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 9 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &186713174726745503 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1617842923263896630} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -92.884384, y: 37.12967, z: 25.12382} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 11 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &193775985377016300 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6857719923556227839} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 58606fce928313f499c1c9d58d932a6f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &240325470279436237 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4160480465523272709} + - component: {fileID: 6624027143978952203} + - component: {fileID: 5982456564418364984} + m_Layer: 0 + m_Name: chuanghu2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &290772749654565673 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3674981907719964712} + m_Layer: 0 + m_Name: peijian + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &397331625908390484 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4833405511983301153} + - component: {fileID: 8069433363346767600} + - component: {fileID: 9044155866432976912} + m_Layer: 0 + m_Name: polySurface10 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!23 &446618524815711219 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8328013521711453567} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: d2fffb48ca128f346b51e7296ca01522, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 2 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15200, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &497104680714766153 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6638582164372793514} + m_Mesh: {fileID: 4732937762076777578, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!4 &543450652349448658 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132148358585192} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.024442196, y: 0.8897, z: -1.0056937} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5568970732483254973} + - {fileID: 1904940671} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &543450652979975617 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132148708085627} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8839339094347468124} + - {fileID: 6795603038300082172} + - {fileID: 5832512100931678475} + - {fileID: 3674981907719964712} + - {fileID: 1202455766} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &623420616183286104 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6795603038300082172} + m_Layer: 0 + m_Name: Door + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &752875932697047225 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6918911637051902210} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2.5157466, y: 22.349047, z: -322.0319} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5832512100931678475} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &762944088597082629 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1048607080526690226} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -92.32136, y: -6.1537113, z: -58.916283} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &837520008427041066 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8349363051970068140} + - component: {fileID: 8857112694134111807} + - component: {fileID: 3365684908109789949} + m_Layer: 0 + m_Name: Cylinder048 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &909288443134137593 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2172454688779739207} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 58606fce928313f499c1c9d58d932a6f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &919132148358585192 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 543450652349448658} + - component: {fileID: 919132148358585194} + - component: {fileID: 919132148358585193} + - component: {fileID: 919132148358585195} + - component: {fileID: 919132148358585196} + - component: {fileID: 919132148358585197} + m_Layer: 0 + m_Name: "\u624B\u673A" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &919132148358585193 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132148358585192} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2a85b91b2d2519347b583e108b24f3c8, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 5005 + triggerName: "\u624B\u673A" + _highlight: {fileID: 0} + downIndex: 0 + mobileOnDown: + - m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 919132148358585196} + m_TargetAssemblyTypeName: MobileAttach10004_4001, Assembly-CSharp + m_MethodName: OnDialogue + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 919132148358585197} + m_TargetAssemblyTypeName: MobileAttach10002_2002, Assembly-CSharp + m_MethodName: OnDialogue + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!65 &919132148358585194 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132148358585192} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.08355041, y: 0.030540586, z: 0.17206752} + m_Center: {x: -0.00045210123, y: 0.0055265427, z: 0.00059360266} +--- !u!114 &919132148358585195 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132148358585192} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8239388, g: 1.6478776, b: 0.37763864, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 1 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 0 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 2 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &919132148358585196 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132148358585192} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6426b308cc345ce448094c8d3e807617, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &919132148358585197 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132148358585192} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 86e8a9070fc7b0944a5a1de20b14ef65, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &919132148708085627 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 543450652979975617} + m_Layer: 0 + m_Name: "\u529E\u516C\u5BA4" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &936532088182303333 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1378434338555681017} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 320.19217, y: 159.99991, z: 419.0494} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 11 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1048607080526690226 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 762944088597082629} + - component: {fileID: 7741172606907668841} + - component: {fileID: 3987952216052115178} + - component: {fileID: 7741172606907668842} + m_Layer: 0 + m_Name: Desk4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!23 &1155584067200081202 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1378434338555681017} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 95c1f503f310caf4994319c401155ba1, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &1157391822910243431 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6540410156419935533} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 93.1087, y: -6.1537113, z: 28.9} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1163654931534781519 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6918911637051902210} + m_Mesh: {fileID: 8348047915851085973, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!1 &1194216463993847596 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3889643806880900031} + - component: {fileID: 7891726864536847988} + - component: {fileID: 2976613263687350293} + m_Layer: 0 + m_Name: diannao4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &1227892487190795401 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3824870582114320361} + - component: {fileID: 7799265731132571034} + - component: {fileID: 1867416895202486060} + m_Layer: 0 + m_Name: Box122aaa2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 0 +--- !u!23 &1267432102079599426 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9104620940037202610} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1100dbfb17b4c94478db8fde11e78684, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 9 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15200, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &1378434338555681017 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 936532088182303333} + - component: {fileID: 4166892609160876934} + - component: {fileID: 1155584067200081202} + m_Layer: 0 + m_Name: polySurface12 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 0 +--- !u!23 &1398896200013607445 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3358799227960974755} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 40e37ccc1ccfafb4b9248ab3f0fdd120, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &1409663623458107365 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6324629371911016835} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 06f3e165d96d9b24c8cfbc98fe1549aa, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &1420062303411535220 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8681087854152353484} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 201.90674, y: 0, z: 507.29425} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1429607154700440861 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3251435409975141430} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 186a73c98c6c222429ccb27c89f53141, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 9 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &1443878090900687023 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3860602314293400823} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 988c1e129ed7b5948a2d8b213756a577, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &1536598971573082123 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7424438174756836102} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: ee0653f342c61884bb25c57ba4eb50dd, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1554426714688187419 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4606268398588992901} + m_Mesh: {fileID: -1024596747623286815, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!4 &1585752215579624735 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3358833640430324238} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 316.73804, y: 159.99991, z: 119.99996} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1617842923263896630 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 186713174726745503} + - component: {fileID: 6407842237484521567} + - component: {fileID: 9075316439769864688} + m_Layer: 0 + m_Name: maoboli + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &1771664122742489894 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2172454688779739207} + m_Mesh: {fileID: 4215580745070462671, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!23 &1822692764681760229 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6918911637051902210} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 91536703409adb64b9f81e79d26f27d6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &1867416895202486060 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1227892487190795401} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 95c1f503f310caf4994319c401155ba1, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &1888888971171551598 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7424438174756836102} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 37.153687, y: 120.5229, z: 223.96692} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3994611958168623496} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &1919974501310297037 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8328013521711453567} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.025725853, y: -150.82274, z: 3.7218168} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5832512100931678475} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1960773616821084166 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5302468730658065633} + m_Mesh: {fileID: 1418646605705208385, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!33 &2026087500941646127 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5951240531329479905} + m_Mesh: {fileID: 1476641416608593334, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!4 &2038122410417086985 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4247177660562887690} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -59.386375, y: -64.87283, z: -102.76298} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2172454688779739207 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5996668480218171140} + - component: {fileID: 1771664122742489894} + - component: {fileID: 909288443134137593} + m_Layer: 0 + m_Name: maoboli5 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &2187542735359229241 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6518154007362557843} + m_Mesh: {fileID: 5454249617378940452, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!4 &2252500246142391065 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6538168885499610920} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -73.56645, y: 0.50873196, z: -56.266205} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &2285038279900228367 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3002171547509251104} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: edff30b8de102de408ac74328588411d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 9 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2555809956965501791 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3251435409975141430} + m_Mesh: {fileID: -4894208089070583219, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!1 &2568320733013595543 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2973180162935239482} + - component: {fileID: 5565882045612342939} + - component: {fileID: 3439899132088064460} + m_Layer: 0 + m_Name: polySurface19 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &2585420041049852439 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3946939336431678500} + - component: {fileID: 3006788583759837157} + - component: {fileID: 7340877414656517849} + m_Layer: 0 + m_Name: deng + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &2618092569916613085 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5928013730620588684} + - component: {fileID: 4128305936765445195} + - component: {fileID: 4339614833433380010} + m_Layer: 0 + m_Name: Box122aaa4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 0 +--- !u!33 &2728574438973178680 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6324629371911016835} + m_Mesh: {fileID: 6715375062900545627, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!23 &2822024365865756703 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3012678513512764155} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: af009deb118801b4c84d50978c17cf74, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &2973180162935239482 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2568320733013595543} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 14 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &2976613263687350293 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1194216463993847596} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 3c4172000ff3c484bb0bd8d8ff8dc997, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &3002171547509251104 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8204063782603233942} + - component: {fileID: 3140805172019084647} + - component: {fileID: 2285038279900228367} + - component: {fileID: 8204063782603233943} + m_Layer: 0 + m_Name: Box197 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &3006788583759837157 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2585420041049852439} + m_Mesh: {fileID: -3305362684660872990, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!1 &3012678513512764155 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4345513938095588457} + - component: {fileID: 5402818892610504014} + - component: {fileID: 2822024365865756703} + - component: {fileID: 5402818892610504015} + m_Layer: 0 + m_Name: dimian + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &3140805172019084647 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3002171547509251104} + m_Mesh: {fileID: -3472713565022528177, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!23 &3224590363136463165 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4892705122228543672} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 988c1e129ed7b5948a2d8b213756a577, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &3251435409975141430 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3994611958168623496} + - component: {fileID: 2555809956965501791} + - component: {fileID: 1429607154700440861} + - component: {fileID: 3994611958168623497} + m_Layer: 0 + m_Name: JiQi06 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!23 &3275778288865667906 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6540410156419935533} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1100dbfb17b4c94478db8fde11e78684, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 9 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15200, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &3299498039670743849 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6538168885499610920} + m_Mesh: {fileID: 4286250439584952836, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!1 &3358799227960974755 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5372793413448480917} + - component: {fileID: 6972893862184436443} + - component: {fileID: 1398896200013607445} + m_Layer: 0 + m_Name: polySurface17 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &3358833640430324238 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1585752215579624735} + - component: {fileID: 7219021228137305247} + - component: {fileID: 4664288503135667180} + m_Layer: 0 + m_Name: polySurface11 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 0 +--- !u!23 &3365684908109789949 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 837520008427041066} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 29a7a93b63a42f545b30b9f246827f0f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &3439899132088064460 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2568320733013595543} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a3a4cdd083958ef43a43bf051f9a6298, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &3547605653245667070 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4205447952691948341} + m_Mesh: {fileID: 2818843438214587958, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!33 &3614609490733948956 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7564044463053570113} + m_Mesh: {fileID: -587340726572068259, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!23 &3633953229766607662 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7759918754569703560} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 4889c33ebe8434a4c8d1c791739c8514, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &3674981907719964712 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 290772749654565673} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0, y: 0, z: 0} + m_LocalScale: {x: 0.01, y: 0.01, z: 0.01} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3824870582114320361} + - {fileID: 4395355259010197214} + - {fileID: 5928013730620588684} + - {fileID: 8204063782603233942} + - {fileID: 9212744521472479890} + - {fileID: 8091154813936942061} + - {fileID: 3994611958168623496} + - {fileID: 1420062303411535220} + - {fileID: 6845154651929574328} + - {fileID: 4833405511983301153} + - {fileID: 1585752215579624735} + - {fileID: 936532088182303333} + - {fileID: 7170552201440870093} + - {fileID: 5372793413448480917} + - {fileID: 2973180162935239482} + m_Father: {fileID: 543450652979975617} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &3720669000008053330 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8681087854152353484} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: ebec6e0399eedd645a78c6c0ea57346f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &3782120509417677455 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4892705122228543672} + m_Mesh: {fileID: -7954165472889187668, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!4 &3824870582114320361 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1227892487190795401} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 202.46782, y: 174.54544, z: -319.9441} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3835669254557036496 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7424438174756836102} + m_Mesh: {fileID: 6743484608093449489, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!1 &3860602314293400823 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8637115572260474394} + - component: {fileID: 8068587272163836454} + - component: {fileID: 1443878090900687023} + m_Layer: 0 + m_Name: diannao2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!23 &3870428652251885306 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6518154007362557843} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 704f86fad20a34447ab15bfc91cd1907, type: 2} + - {fileID: 2100000, guid: 1f7feb734c3e7354aa5040fec66abaff, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 4 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15200, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &3889643806880900031 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1194216463993847596} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -82.94932, y: 0.50873196, z: 19.221664} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &3946939336431678500 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2585420041049852439} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 146, y: 150.03917, z: 115.2055} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5832512100931678475} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &3959870563869646984 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6845154651929574328} + - component: {fileID: 9171816321565746377} + - component: {fileID: 5134774529314511304} + m_Layer: 0 + m_Name: Object003 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!23 &3987952216052115178 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1048607080526690226} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1100dbfb17b4c94478db8fde11e78684, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 9 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15200, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &3994611958168623496 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3251435409975141430} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -287.77905, y: 0.3730366, z: 112.451385} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1888888971171551598} + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &3994611958168623497 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3251435409975141430} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 67.19101, y: 159.8156, z: 58.01181} + m_Center: {x: -0.000034332275, y: 79.9078, z: -0.000032424927} +--- !u!33 &4019275011720672866 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8328013521711453567} + m_Mesh: {fileID: 2297425034801156755, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!33 &4128305936765445195 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2618092569916613085} + m_Mesh: {fileID: 8817175945571792059, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!4 &4160480465523272709 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 240325470279436237} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.0409725, y: 35.04238, z: -322.0319} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5832512100931678475} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &4166892609160876934 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1378434338555681017} + m_Mesh: {fileID: 272620219224400015, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!1 &4205447952691948341 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5745219828676935607} + - component: {fileID: 3547605653245667070} + - component: {fileID: 5218447972848788022} + m_Layer: 0 + m_Name: Chair4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &4247177660562887690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2038122410417086985} + - component: {fileID: 4327346120030712930} + - component: {fileID: 6323383630793982792} + m_Layer: 0 + m_Name: Chair3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &4327346120030712930 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4247177660562887690} + m_Mesh: {fileID: -305840788308905779, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!23 &4328174537438465970 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6944469734800208480} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 06f3e165d96d9b24c8cfbc98fe1549aa, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &4339614833433380010 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2618092569916613085} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 95c1f503f310caf4994319c401155ba1, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &4345513938095588457 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3012678513512764155} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -145.84244, y: -149.44307, z: 157.52544} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5832512100931678475} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4353719162944010595 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7564044463053570113} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -106.73515, y: -64.87283, z: 53.84412} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4395355259010197214 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7759918754569703560} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -323.28186, y: 175.81029, z: -83.77375} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &4537183201157281948 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7170552201440870093} + - component: {fileID: 6955513769363227730} + - component: {fileID: 7042318701519982313} + m_Layer: 0 + m_Name: polySurface13 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 0 +--- !u!1 &4606268398588992901 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7545846597396392071} + - component: {fileID: 1554426714688187419} + - component: {fileID: 5206277206093766040} + - component: {fileID: 7545846597396392072} + m_Layer: 0 + m_Name: Desk3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!23 &4664288503135667180 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3358833640430324238} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 95c1f503f310caf4994319c401155ba1, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &4731704203324954156 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6324629371911016835} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2.2737368e-13, y: 0.000013083786, z: 7.6738615e-13} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6795603038300082172} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &4733455042622843987 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6857719923556227839} + m_Mesh: {fileID: 8119473872373624090, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!4 &4833405511983301153 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 397331625908390484} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 319.00128, y: 159.9999, z: 120.00001} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &4842849591775986793 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5387303227848886916} + - component: {fileID: 5057547686077248338} + - component: {fileID: 7178913146137630425} + m_Layer: 0 + m_Name: Chair1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &4892705122228543672 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6947447504957339977} + - component: {fileID: 3782120509417677455} + - component: {fileID: 3224590363136463165} + m_Layer: 0 + m_Name: diannao1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &5053780510775294290 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6944469734800208480} + m_Mesh: {fileID: 2954858793080512207, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!33 &5057547686077248338 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4842849591775986793} + m_Mesh: {fileID: 8986237552638331582, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!33 &5061851654261736752 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8681087854152353484} + m_Mesh: {fileID: 1912556903442012170, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!23 &5134774529314511304 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3959870563869646984} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: edff30b8de102de408ac74328588411d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 9 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &5206277206093766040 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4606268398588992901} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1100dbfb17b4c94478db8fde11e78684, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 9 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15200, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &5218447972848788022 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4205447952691948341} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1665ee37130be8941b6076cd2331acde, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &5302468730658065633 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6869346412365894637} + - component: {fileID: 1960773616821084166} + - component: {fileID: 7072927220359209414} + m_Layer: 0 + m_Name: maoboli3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &5323224703424836121 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6944469734800208480} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 9.000014, y: -104.49999, z: -47.90006} + m_LocalScale: {x: 1, y: 1.007, z: 1.1637} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2089319124} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &5372793413448480917 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3358799227960974755} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 230.95853, y: 21.818727, z: -102.10222} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 13 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &5387303227848886916 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4842849591775986793} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 99.569016, y: -64.87283, z: 102.76298} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &5402818892610504014 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3012678513512764155} + m_Mesh: {fileID: -4115292678144379797, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!65 &5402818892610504015 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3012678513512764155} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 693.38464, y: 7.484009, z: 919.699} + m_Center: {x: 145.86401, y: -3.6420083, z: -53.950073} +--- !u!1 &5428943061850925123 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 124583573446515335} + - component: {fileID: 5958271614598904909} + - component: {fileID: 9097610931380356266} + m_Layer: 0 + m_Name: tianhuaban + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &5565882045612342939 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2568320733013595543} + m_Mesh: {fileID: 5303923085450066343, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!23 &5567140167695347738 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7564044463053570113} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1665ee37130be8941b6076cd2331acde, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &5568970732483254973 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8049962175932441955} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.01, y: 0.01, z: 0.01} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450652349448658} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &5745219828676935607 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4205447952691948341} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 118.91994, y: -64.87283, z: -102.76298} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &5832512100931678475 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7081028286826408672} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.00025725854, y: 1.5082275, z: -0.03721817} + m_LocalScale: {x: 0.01, y: 0.01, z: 0.01} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 752875932697047225} + - {fileID: 4160480465523272709} + - {fileID: 3946939336431678500} + - {fileID: 4345513938095588457} + - {fileID: 6524021382357294386} + - {fileID: 1919974501310297037} + - {fileID: 124583573446515335} + - {fileID: 101029401} + m_Father: {fileID: 543450652979975617} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &5928013730620588684 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2618092569916613085} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -199.27359, y: 174.54544, z: -319.9441} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &5951240531329479905 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9212744521472479890} + - component: {fileID: 2026087500941646127} + - component: {fileID: 164816456207620356} + - component: {fileID: 9212744521472479891} + m_Layer: 0 + m_Name: Box198 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &5958271614598904909 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5428943061850925123} + m_Mesh: {fileID: -9067164267545632704, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!23 &5982456564418364984 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 240325470279436237} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 74bf1a8193dc00a4a85cf54a8097257c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &5996668480218171140 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2172454688779739207} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 93.18212, y: 37.12967, z: 25.12382} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 14 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &6323383630793982792 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4247177660562887690} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1665ee37130be8941b6076cd2331acde, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &6324629371911016835 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4731704203324954156} + - component: {fileID: 2728574438973178680} + - component: {fileID: 1409663623458107365} + m_Layer: 0 + m_Name: Box005 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &6407842237484521567 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1617842923263896630} + m_Mesh: {fileID: -1964631776176343604, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!1 &6518154007362557843 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8091154813936942061} + - component: {fileID: 2187542735359229241} + - component: {fileID: 3870428652251885306} + m_Layer: 0 + m_Name: guizi1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &6524021382357294386 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6638582164372793514} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.021575462, y: -139.63243, z: 102.76817} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5832512100931678475} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &6538168885499610920 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2252500246142391065} + - component: {fileID: 3299498039670743849} + - component: {fileID: 8569232665336266992} + m_Layer: 0 + m_Name: diannao3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &6540410156419935533 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1157391822910243431} + - component: {fileID: 7623627004054875640} + - component: {fileID: 3275778288865667906} + - component: {fileID: 7623627004054875641} + m_Layer: 0 + m_Name: Desk1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &6624027143978952203 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 240325470279436237} + m_Mesh: {fileID: 5987938505405236802, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!1 &6638582164372793514 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6524021382357294386} + - component: {fileID: 497104680714766153} + - component: {fileID: 8268172812543076444} + m_Layer: 0 + m_Name: polySurface8 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &6795603038300082172 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 623420616183286104} + m_LocalRotation: {x: -0, y: -0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: -0.08940029, y: 1.0449998, z: 5.239122} + m_LocalScale: {x: 0.010000001, y: 0.01, z: 0.010000001} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4731704203324954156} + m_Father: {fileID: 543450652979975617} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &6845154651929574328 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3959870563869646984} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 222.54634, y: 39.000175, z: -177.85805} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &6857719923556227839 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 90378869422336730} + - component: {fileID: 4733455042622843987} + - component: {fileID: 193775985377016300} + m_Layer: 0 + m_Name: maoboli4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &6869346412365894637 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5302468730658065633} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 92.89472, y: 37.12967, z: -57.01514} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 12 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &6903190660536745484 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9104620940037202610} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -93.10871, y: -6.1537113, z: 27.932098} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &6918911637051902210 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 752875932697047225} + - component: {fileID: 1163654931534781519} + - component: {fileID: 1822692764681760229} + m_Layer: 0 + m_Name: chuanghu1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &6944469734800208480 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5323224703424836121} + - component: {fileID: 5053780510775294290} + - component: {fileID: 4328174537438465970} + - component: {fileID: 6944469734800208481} + m_Layer: 0 + m_Name: Box007 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &6944469734800208481 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6944469734800208480} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 7.000002, y: 199.9, z: 89.80004} + m_Center: {x: 0, y: 99.95, z: -0.0000104904175} +--- !u!4 &6947447504957339977 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4892705122228543672} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.23598228, y: -1.6440424, z: 3.9425056} + m_LocalScale: {x: 0.018885741, y: 0.033333335, z: 0.38759688} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 744367281} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &6955513769363227730 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4537183201157281948} + m_Mesh: {fileID: -3099183463934272234, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!33 &6972893862184436443 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3358799227960974755} + m_Mesh: {fileID: 8145136920215169916, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!23 &7042318701519982313 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4537183201157281948} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 95c1f503f310caf4994319c401155ba1, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &7072927220359209414 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5302468730658065633} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 58606fce928313f499c1c9d58d932a6f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &7081028286826408672 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5832512100931678475} + m_Layer: 0 + m_Name: BGS + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &7160817019717450662 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8839339094347468124} + m_Layer: 0 + m_Name: bangongquyu + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &7170552201440870093 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4537183201157281948} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 188.5424, y: 159.99991, z: 516.42175} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 12 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &7178913146137630425 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4842849591775986793} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1665ee37130be8941b6076cd2331acde, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &7219021228137305247 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3358833640430324238} + m_Mesh: {fileID: -8163526336849700479, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!23 &7340877414656517849 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2585420041049852439} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 74b132ba586bda74eb5aaace82d46aa4, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &7424438174756836102 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1888888971171551598} + - component: {fileID: 3835669254557036496} + - component: {fileID: 1536598971573082123} + - component: {fileID: 7424438174756836103} + m_Layer: 0 + m_Name: guizi2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!65 &7424438174756836103 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7424438174756836102} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.0002746582, y: 197.39444, z: 284.38342} + m_Center: {x: 0.0000072330586, y: -0.0000076293945, z: 0.000015258789} +--- !u!4 &7545846597396392071 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4606268398588992901} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 93.1087, y: -6.1537113, z: -58.916283} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &7545846597396392072 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4606268398588992901} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 175.21346, y: 116.239456, z: 104.1} + m_Center: {x: -0.0000038146973, y: 0, z: -14.4} +--- !u!1 &7564044463053570113 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4353719162944010595} + - component: {fileID: 3614609490733948956} + - component: {fileID: 5567140167695347738} + m_Layer: 0 + m_Name: Chair2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &7614861332787254264 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9104620940037202610} + m_Mesh: {fileID: -1883018224807258669, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!33 &7623627004054875640 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6540410156419935533} + m_Mesh: {fileID: 2533523198237221573, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!64 &7623627004054875641 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6540410156419935533} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 2533523198237221573, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!33 &7628440789119921913 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7759918754569703560} + m_Mesh: {fileID: 3424453097902837947, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!33 &7741172606907668841 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1048607080526690226} + m_Mesh: {fileID: 2992566346419572448, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!65 &7741172606907668842 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1048607080526690226} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 175.21347, y: 116.239456, z: 88.86} + m_Center: {x: -0.000022888184, y: 0, z: -5.52} +--- !u!1 &7759918754569703560 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4395355259010197214} + - component: {fileID: 7628440789119921913} + - component: {fileID: 3633953229766607662} + m_Layer: 0 + m_Name: Box122aaa3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 0 +--- !u!33 &7799265731132571034 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1227892487190795401} + m_Mesh: {fileID: -4824302170586002382, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!33 &7891726864536847988 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1194216463993847596} + m_Mesh: {fileID: -3824552196739407850, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!23 &7964202602271020417 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8049962175932441955} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2083799562548203805, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &8049962175932441955 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5568970732483254973} + - component: {fileID: 9006472541337010437} + - component: {fileID: 7964202602271020417} + m_Layer: 0 + m_Name: shouji1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &8068587272163836454 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3860602314293400823} + m_Mesh: {fileID: -8886209223684904401, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!33 &8069433363346767600 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 397331625908390484} + m_Mesh: {fileID: -856059019632272089, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!4 &8091154813936942061 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6518154007362557843} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -284.72665, y: 115.2446, z: 336.93988} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &8204063782603233942 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3002171547509251104} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 298.50104, y: 2, z: 387.7694} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &8204063782603233943 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3002171547509251104} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 40.50009, y: 46.339535, z: 50.00003} + m_Center: {x: -0.2499733, y: 21.169767, z: -0.00005722046} +--- !u!23 &8268172812543076444 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6638582164372793514} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 29a7a93b63a42f545b30b9f246827f0f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &8328013521711453567 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1919974501310297037} + - component: {fileID: 4019275011720672866} + - component: {fileID: 446618524815711219} + - component: {fileID: 8328013521711453568} + m_Layer: 0 + m_Name: polySurface9 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!64 &8328013521711453568 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8328013521711453567} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 2297425034801156755, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!4 &8349363051970068140 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 837520008427041066} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 4.457041, y: -26.002348, z: -82.41452} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2089319124} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &8569232665336266992 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6538168885499610920} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 988c1e129ed7b5948a2d8b213756a577, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &8637115572260474394 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3860602314293400823} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 102.446915, y: 0.50873196, z: -56.266205} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8839339094347468124} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &8681087854152353484 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1420062303411535220} + - component: {fileID: 5061851654261736752} + - component: {fileID: 3720669000008053330} + - component: {fileID: 8681087854152353485} + m_Layer: 0 + m_Name: MieHuoQiXiang + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!65 &8681087854152353485 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8681087854152353484} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 39.183807, y: 63.572216, z: 21.187317} + m_Center: {x: -0.0002117157, y: 31.786108, z: -0.000008583069} +--- !u!4 &8839339094347468124 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7160817019717450662} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -1.3153876, y: 0.66252714, z: -1.2924924} + m_LocalScale: {x: 0.01, y: 0.01, z: 0.01} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5387303227848886916} + - {fileID: 4353719162944010595} + - {fileID: 2038122410417086985} + - {fileID: 5745219828676935607} + - {fileID: 1157391822910243431} + - {fileID: 6903190660536745484} + - {fileID: 7545846597396392071} + - {fileID: 762944088597082629} + - {fileID: 8637115572260474394} + - {fileID: 2252500246142391065} + - {fileID: 3889643806880900031} + - {fileID: 186713174726745503} + - {fileID: 6869346412365894637} + - {fileID: 90378869422336730} + - {fileID: 5996668480218171140} + - {fileID: 744367281} + m_Father: {fileID: 543450652979975617} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &8857112694134111807 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 837520008427041066} + m_Mesh: {fileID: 8906097040320073990, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!33 &9006472541337010437 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8049962175932441955} + m_Mesh: {fileID: -9191242399983615952, guid: 7700c53e7009fc146889392de6e9a46b, type: 3} +--- !u!23 &9044155866432976912 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 397331625908390484} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 40e37ccc1ccfafb4b9248ab3f0fdd120, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &9075316439769864688 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1617842923263896630} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 58606fce928313f499c1c9d58d932a6f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &9097610931380356266 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5428943061850925123} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: d1808e0f2f98d084eb7bd54532b8a712, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &9104620940037202610 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6903190660536745484} + - component: {fileID: 7614861332787254264} + - component: {fileID: 1267432102079599426} + - component: {fileID: 9104620940037202611} + m_Layer: 0 + m_Name: Desk2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!65 &9104620940037202611 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9104620940037202610} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 175.21344, y: 116.239456, z: 76.3589} + m_Center: {x: -0.0000076293945, y: 0, z: -0.000011444092} +--- !u!33 &9171816321565746377 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3959870563869646984} + m_Mesh: {fileID: -3531946766418785785, guid: ffc5046cf0b00df4194ab7a9b9f1d172, type: 3} +--- !u!4 &9212744521472479890 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5951240531329479905} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 297.3117, y: 0, z: 447.69083} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3674981907719964712} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &9212744521472479891 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5951240531329479905} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 43.89389, y: 60.000004, z: 62.00006} + m_Center: {x: -0.9469032, y: 30.000002, z: 0.00002670288} diff --git a/Assets/Scenes/10006_6001_03_OfficeScene.unity.meta b/Assets/Scenes/10006_6001_03_OfficeScene.unity.meta new file mode 100644 index 0000000..d85afcd --- /dev/null +++ b/Assets/Scenes/10006_6001_03_OfficeScene.unity.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +<<<<<<<< HEAD:Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data.meta +guid: ae05d14aae550fa4192a9c9dae402761 +======== +guid: 825efef6ba8a5744aa342459759569a0 +>>>>>>>> 8f2b841f2cdbb028247b83d3caed38a79a85739f:Assets/Scenes/05_office.unity.meta +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/10006_6001_04_ToolMaterialScene.unity b/Assets/Scenes/10006_6001_04_ToolMaterialScene.unity new file mode 100644 index 0000000..89bf54f --- /dev/null +++ b/Assets/Scenes/10006_6001_04_ToolMaterialScene.unity @@ -0,0 +1,3982 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 2100000, guid: 60df55341aea8904e9baa57787f2a2e6, type: 2} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 1.0244985, g: 1.2884799, b: 1.035935, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 112000000, guid: 77b93511877d0b048a2f07f38b5f42cc, type: 2} + m_LightingSettings: {fileID: 4890085278179872738, guid: 622ad26093d5eab40bee45239737be8f, type: 2} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1001 &55414525 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2399593117452945565, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_Name + value: Player + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945565, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalPosition.x + value: -0.795 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalPosition.y + value: 1.143 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalRotation.w + value: 0.1539439 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalRotation.y + value: 0.9880796 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 162.289 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945567, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: playerCanMove + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2399593117846495250, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_Enabled + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3910755197489471127, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_Height + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 3910755197489471127, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_Center.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} +--- !u!4 &55414526 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2399593117623680742, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + m_PrefabInstance: {fileID: 55414525} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &214939281 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 993882620} + m_Modifications: + - target: {fileID: -9070493210130169274, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_LocalPosition.x + value: 0.057 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_LocalPosition.y + value: -0.849 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_LocalPosition.z + value: -0.059 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8183481454299698827, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -8006009767450596044, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -7657966619581158213, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -7360747449169001873, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -7121769801107515815, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -6621945745981909287, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -6385349905407273745, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -6370085079684087283, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -6234591296559379751, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -6170625038081293824, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -6056541330796499132, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -5857696854640597626, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -5561550452697079657, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -5195048882033904264, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -4999088201633142198, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -4798874528583315279, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -4728426434207774260, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -4501530691011011137, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -4332706925441422008, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -4278032810995721380, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -3799395697873186154, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -3715013532437581614, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -3542885339558904099, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -3478013746326755454, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -3214267034143217929, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -3086436065929644917, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -2855767553258790046, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -2084811680363313996, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -1781356600409242780, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -1767070837432701097, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -1703473491307067327, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -1425791611860619382, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -1268151995469589007, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -1200856079203341021, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -751476226918971245, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -552831747908440785, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -290750445479886849, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -203856693384778745, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -76546954072915012, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 9171100556185337, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 122910976867492708, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 414117464747255840, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Name + value: Man_stand + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1082271958561512970, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 1339101018200438765, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 1342273091210630203, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: b9f45527b9d758746ba04747688797b6, type: 2} + - target: {fileID: 1711505207429034123, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 2158975759703390516, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 2586065998465600510, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 2715566404302941441, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 2898355158428612036, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3001975004181858036, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: bf6b11f1a7c512745a24503e6af14f44, type: 2} + - target: {fileID: 3047284246813455858, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3135921509060577837, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3588849560313704984, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3614653200513675785, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3882815353823017779, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3948933247560734027, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3974016661214395164, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 4114030615378554161, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 4237274458221626025, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 4441848305933595309, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 4549111882529890269, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 5090943446656377903, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 342fabb2ac2baa1459862bb522cf87e0, type: 2} + - target: {fileID: 5120724536234783804, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 6240733294840144465, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 6514210125699187276, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 7363479242261063072, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 7542137907003004905, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 7732535366517880319, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 7752648071901219392, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 5636cb61d4933e446ac7bf2ddecabf95, type: 2} + - target: {fileID: 7776229726456038893, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 8817898888258712963, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 8953972740105248388, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 9037727976738196030, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Layer + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 9093751886520923538, guid: fe4c1814d44af964c94c33808b704426, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 4fc25dd2fbeec544da5882020c8fb166, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: fe4c1814d44af964c94c33808b704426, type: 3} +--- !u!4 &214939282 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: fe4c1814d44af964c94c33808b704426, type: 3} + m_PrefabInstance: {fileID: 214939281} + m_PrefabAsset: {fileID: 0} +--- !u!4 &214939283 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -1203128980051872146, guid: fe4c1814d44af964c94c33808b704426, type: 3} + m_PrefabInstance: {fileID: 214939281} + m_PrefabAsset: {fileID: 0} +--- !u!4 &214939284 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -823113218821075046, guid: fe4c1814d44af964c94c33808b704426, type: 3} + m_PrefabInstance: {fileID: 214939281} + m_PrefabAsset: {fileID: 0} +--- !u!4 &214939285 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -6248080061934879192, guid: fe4c1814d44af964c94c33808b704426, type: 3} + m_PrefabInstance: {fileID: 214939281} + m_PrefabAsset: {fileID: 0} +--- !u!4 &214939286 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -5635932071823028361, guid: fe4c1814d44af964c94c33808b704426, type: 3} + m_PrefabInstance: {fileID: 214939281} + m_PrefabAsset: {fileID: 0} +--- !u!1 &901742060 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 901742061} + m_Layer: 0 + m_Name: "\u68B3\u5986\u955C" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &901742061 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 901742060} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 3.5699997, y: 1.068, z: -2.3} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6132854414382456745} + - {fileID: 543450653353674152} + - {fileID: 1211069780} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &983777793 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 749177287581636901, guid: 906cc253ee10599478864236a349d004, type: 3} + m_PrefabInstance: {fileID: 749177288028543780} + m_PrefabAsset: {fileID: 0} +--- !u!1 &983834763 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 983834765} + - component: {fileID: 983834764} + m_Layer: 0 + m_Name: Reflection Probe + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!215 &983834764 +ReflectionProbe: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 983834763} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 0 + m_RefreshMode: 0 + m_TimeSlicingMode: 0 + m_Resolution: 128 + m_UpdateFrequency: 0 + m_BoxSize: {x: 10, y: 10, z: 10} + m_BoxOffset: {x: 1.0876153, y: 0, z: 0} + m_NearClip: 0.3 + m_FarClip: 1000 + m_ShadowDistance: 100 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_IntensityMultiplier: 1 + m_BlendDistance: 1 + m_HDR: 1 + m_BoxProjection: 0 + m_RenderDynamicObjects: 0 + m_UseOcclusionCulling: 1 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} +--- !u!4 &983834765 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 983834763} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1.1576152, y: 1.5171154, z: -1.96} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &993882619 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 993882620} + m_Layer: 0 + m_Name: BagRenderTexture + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &993882620 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 993882619} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -12.539244, y: 0.8666691, z: -0.23491144} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2090806850} + - {fileID: 214939282} + - {fileID: 1884935861} + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &994944459 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 994944462} + - component: {fileID: 994944461} + - component: {fileID: 994944460} + m_Layer: 0 + m_Name: Area Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &994944460 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 994944459} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} +--- !u!108 &994944461 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 994944459} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 3 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.02 + m_NormalBias: 0.1 + m_NearPlane: 0.1 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 2 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 7, y: 6.6} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 1.05e-43, y: 1.0596762e-38, z: 2.3e-43, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &994944462 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 994944459} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0.05, y: 2.976, z: -1.79} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!1 &1051729721 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1051729722} + m_Layer: 0 + m_Name: MainTarget + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1051729722 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1051729721} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 55414526} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1211069779 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1211069780} + - component: {fileID: 1211069782} + - component: {fileID: 1211069781} + m_Layer: 0 + m_Name: "\u68B3\u5986\u955CText " + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1211069780 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1211069779} + m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0.939} + m_LocalScale: {x: 0.2, y: 0.2, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 901742061} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0.082, y: -7.296} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1211069781 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1211069779} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: "\u6362\u88C5\u955C" + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: f23cde0c3d86dad49bedc202ad993d21, type: 2} + m_sharedMaterial: {fileID: -2120909647377011300, guid: f23cde0c3d86dad49bedc202ad993d21, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 12 + m_fontSizeBase: 12 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 52.392117, y: 6.5031004, z: 43.213562, w: 91.323105} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + _SortingLayer: 0 + _SortingLayerID: 0 + _SortingOrder: 0 + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 1211069782} + m_maskType: 0 +--- !u!23 &1211069782 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1211069779} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: -2120909647377011300, guid: f23cde0c3d86dad49bedc202ad993d21, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &1401693005 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1401693007} + - component: {fileID: 1401693006} + m_Layer: 0 + m_Name: Global Volume + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1401693006 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1401693005} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IsGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: ccace836f586b3b48bc1586fa3c9574c, type: 2} +--- !u!4 &1401693007 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1401693005} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.88970137, y: 1.6096761, z: 0.46261618} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!64 &1789438301 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3174515287918237355} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 3712387451709706197, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!64 &1834539406 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2376275863548444257} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: -4455670081757447873, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!1 &1869602005 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1869602008} + - component: {fileID: 1869602007} + - component: {fileID: 1869602006} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1869602006 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1869602005} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} +--- !u!108 &1869602007 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1869602005} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1.5 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.02 + m_NormalBias: 0.1 + m_NearPlane: 0.5 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 5000 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 5.6e-43, y: 3.1396e-41, z: 1.02e-43, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1869602008 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1869602005} + m_LocalRotation: {x: 0.49435544, y: -0.18003269, z: 0.10627039, w: 0.8437462} + m_LocalPosition: {x: 6.16, y: 1.7280648, z: -4.45} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 60.749, y: -23.998, z: 0.156} +--- !u!1 &1884935857 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1884935861} + - component: {fileID: 1884935860} + - component: {fileID: 1884935858} + m_Layer: 0 + m_Name: Camera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1884935858 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1884935857} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 1 + m_AntialiasingQuality: 2 + m_StopNaN: 1 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !u!20 &1884935860 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1884935857} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 64 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 8400000, guid: 4e7ae4146b2526a4e853ba0c061ecc5b, type: 2} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1884935861 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1884935857} + m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} + m_LocalPosition: {x: 0.003, y: 0.137, z: 2.055} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 993882620} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!1 &2075661853 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2075661855} + - component: {fileID: 2075661856} + m_Layer: 0 + m_Name: TooRoomlMannger + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2075661855 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2075661853} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 961.1248, y: 561.2451, z: 390.4476} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &2075661856 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2075661853} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: efa839f070de80947a96cae9774ce7e9, type: 3} + m_Name: + m_EditorClassIdentifier: + allTMDs: [] + toolParent: {fileID: 983777793} + headSlot: {fileID: 214939283} + bodySlot: {fileID: 214939286} + handSlot: {fileID: 214939285} + shoesSlot: {fileID: 214939284} +--- !u!1 &2090806849 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2090806850} + - component: {fileID: 2090806852} + - component: {fileID: 2090806851} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2090806850 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2090806849} + m_LocalRotation: {x: 0.9915577, y: -0, z: -0, w: 0.12966591} + m_LocalPosition: {x: 0.0030002594, y: 1.022331, z: 1.1419115} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 993882620} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 165.099, y: 0, z: 0} +--- !u!114 &2090806851 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2090806849} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} +--- !u!108 &2090806852 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2090806849} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 0.88 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.02 + m_NormalBias: 0.1 + m_NearPlane: 0.1 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 64 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &31701742176722383 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7227932631366347981} + m_Layer: 0 + m_Name: dingdeng001 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &543450653332255215 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132149395942229} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4780751698108330340} + - {fileID: 1681817639337992799} + - {fileID: 8373887989331991907} + - {fileID: 7227932631366347981} + - {fileID: 3030345207701020637} + - {fileID: 8379444867651266426} + - {fileID: 6873033662030306204} + - {fileID: 3498687524961745019} + - {fileID: 4804253547345608867} + - {fileID: 2588085967130580064} + - {fileID: 2002531610598337279} + - {fileID: 4278410587990561939} + - {fileID: 7098494330434620885} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &543450653353674152 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132149367037714} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.01, y: 1.9790282, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2587898902532246539} + m_Father: {fileID: 901742061} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &574380038142816902 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4804253547345608867} + - component: {fileID: 8101419820916546251} + - component: {fileID: 3711400966665279014} + m_Layer: 0 + m_Name: Obj3d66-4603994-900-190 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &613871186924262241 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1573520277904148674} + m_Mesh: {fileID: 2415777137736436831, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!1001 &749177288028543780 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 749177287581636900, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_Name + value: "\u5DE5\u5177" + objectReference: {fileID: 0} + - target: {fileID: 749177287581636901, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 749177287581636901, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 749177287581636901, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 749177287581636901, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 749177287581636901, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 749177287581636901, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 749177287581636901, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 749177287581636901, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 749177287581636901, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 749177287581636901, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 749177287581636901, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 830992028322172994, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalPosition.x + value: -3.06 + objectReference: {fileID: 0} + - target: {fileID: 830992028322172994, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 830992028322172994, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 830992028322172994, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -90 + objectReference: {fileID: 0} + - target: {fileID: 1041706129331822362, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalPosition.x + value: 0.000006913586 + objectReference: {fileID: 0} + - target: {fileID: 1041706129331822362, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalPosition.y + value: -0.018 + objectReference: {fileID: 0} + - target: {fileID: 1041706129331822362, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalPosition.z + value: -0.00012508316 + objectReference: {fileID: 0} + - target: {fileID: 1041706129331822362, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.w + value: 0.728113 + objectReference: {fileID: 0} + - target: {fileID: 1041706129331822362, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.x + value: -0.68545526 + objectReference: {fileID: 0} + - target: {fileID: 1041706129331822362, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.y + value: -0.0011789202 + objectReference: {fileID: 0} + - target: {fileID: 1041706129331822362, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.z + value: 0.0011787413 + objectReference: {fileID: 0} + - target: {fileID: 1041706129331822362, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -86.538 + objectReference: {fileID: 0} + - target: {fileID: 1041706129331822362, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -3.163 + objectReference: {fileID: 0} + - target: {fileID: 1041706129331822362, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 3.163 + objectReference: {fileID: 0} + - target: {fileID: 1041706130194243886, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalPosition.x + value: 0.000006913586 + objectReference: {fileID: 0} + - target: {fileID: 1041706130194243886, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalPosition.y + value: -0.018 + objectReference: {fileID: 0} + - target: {fileID: 1041706130194243886, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalPosition.z + value: -0.00012508316 + objectReference: {fileID: 0} + - target: {fileID: 1041706130194243886, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.w + value: 0.728113 + objectReference: {fileID: 0} + - target: {fileID: 1041706130194243886, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.x + value: -0.68545526 + objectReference: {fileID: 0} + - target: {fileID: 1041706130194243886, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.y + value: -0.0011789202 + objectReference: {fileID: 0} + - target: {fileID: 1041706130194243886, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.z + value: 0.0011787413 + objectReference: {fileID: 0} + - target: {fileID: 1041706130194243886, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -86.538 + objectReference: {fileID: 0} + - target: {fileID: 1041706130194243886, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -3.163 + objectReference: {fileID: 0} + - target: {fileID: 1041706130194243886, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 3.163 + objectReference: {fileID: 0} + - target: {fileID: 1774023500310906184, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_Size.y + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 1774023500310906184, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_Size.z + value: 0.045 + objectReference: {fileID: 0} + - target: {fileID: 2691809867781720779, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_Size.y + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 2691809867781720779, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_Size.z + value: 0.045 + objectReference: {fileID: 0} + - target: {fileID: 3913035377684537281, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 3913035377684537281, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 3913035377684537281, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -90 + objectReference: {fileID: 0} + - target: {fileID: 5755307409124852210, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_Name + value: "\u7535\u80FD\u8868\u6821\u9A8C\u4EEA\u5668" + objectReference: {fileID: 0} + - target: {fileID: 6255899804326469815, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_Name + value: "\u7535\u80FD\u8868\u6821\u9A8C\u4EEA\u5668" + objectReference: {fileID: 0} + - target: {fileID: 6826301612084826199, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: m_LocalPosition.x + value: -3.28 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: rmsCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.size + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[0].alpha + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[1].alpha + value: 0.2 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[2].alpha + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[3].alpha + value: 0.4 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[0].offset + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[1].offset + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[2].offset + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[3].offset + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[0].color.a + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[0].color.g + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[0].color.r + value: 0.64 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[1].color.a + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[1].color.g + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[1].color.r + value: 0.64 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[2].color.a + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[2].color.g + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[2].color.r + value: 0.64 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[3].color.a + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[3].color.g + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7421079080902381303, guid: 906cc253ee10599478864236a349d004, type: 3} + propertyPath: glowPasses.Array.data[3].color.r + value: 0.64 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 906cc253ee10599478864236a349d004, type: 3} +--- !u!1 &919132149367037714 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 543450653353674152} + - component: {fileID: 3469287837270444557} + - component: {fileID: 1711813855422086855} + - component: {fileID: 3469287837270444558} + - component: {fileID: 3469287837270444559} + - component: {fileID: 3469287837270444560} + m_Layer: 0 + m_Name: "\u68B3\u5986\u955C" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &919132149395942229 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 543450653332255215} + m_Layer: 0 + m_Name: "\u5DE5\u5668\u5177\u95F4" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &1150712073403325612 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6132854414382456745} + - component: {fileID: 7552301136719634819} + - component: {fileID: 6639766346843070705} + m_Layer: 0 + m_Name: Mirror_Cam + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &1379736554053452210 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8273280625189519447} + m_Mesh: {fileID: 392202292576815664, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!1 &1480631129144452773 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4278410587990561939} + - component: {fileID: 6868065909393700926} + - component: {fileID: 3880741410050737762} + m_Layer: 0 + m_Name: Plane013 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &1573520277904148674 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6547537557711297966} + - component: {fileID: 613871186924262241} + - component: {fileID: 7143490477662047359} + - component: {fileID: 7143490477662047360} + m_Layer: 0 + m_Name: FireDoor_R_a + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &1681817639337992799 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3174515287918237355} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + m_LocalPosition: {x: -0.000042968753, y: 1.5137969, z: -1.7640512} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653332255215} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1711813855422086855 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132149367037714} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: f26d347f60e042c4694e2bb339207750, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1857631050215693693 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3346000825274310804} + m_Mesh: {fileID: -1937141423982174662, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!33 &1890587713882337985 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3174515287918237355} + m_Mesh: {fileID: 3712387451709706197, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!4 &2002531610598337279 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2148690140096925999} + m_LocalRotation: {x: 0.000000057601174, y: -0.7071066, z: 0.00000005760115, w: 0.70710695} + m_LocalPosition: {x: 3.2778244, y: 1.190211, z: -4.3873353} + m_LocalScale: {x: 10, y: 10, z: 10} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7461354847199086612} + - {fileID: 2893925690830103088} + - {fileID: 9032225572846669850} + m_Father: {fileID: 543450653332255215} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &2026190830599880099 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8273280625189519447} + m_LocalRotation: {x: -0.000000075497894, y: 1, z: 0.0000000754979, w: -5.6999325e-15} + m_LocalPosition: {x: -0.06372266, y: -0.87512845, z: 1.2178628} + m_LocalScale: {x: -1, y: -1, z: -1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3030345207701020637} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2148690140096925999 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2002531610598337279} + - component: {fileID: 3399922635411602228} + - component: {fileID: 5888892787065851434} + - component: {fileID: 5888892787065851435} + m_Layer: 0 + m_Name: pCube14 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!23 &2179944575117779976 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8528856438170212503} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: -3008835241961893774, guid: b328f3329c3e8fa42b67040d91fdad15, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &2238549743244136737 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2893925690830103088} + - component: {fileID: 4348541273066611768} + - component: {fileID: 5633724470796314671} + m_Layer: 0 + m_Name: polySurface5 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &2376275863548444257 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6873033662030306204} + - component: {fileID: 8366424636317399556} + - component: {fileID: 7853834384120317940} + - component: {fileID: 1834539406} + m_Layer: 0 + m_Name: Obj3d66-761324-14-230 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &2455367006366865778 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6929084727361804591} + m_Mesh: {fileID: 5113251512170429174, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!4 &2587898902532246539 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8528856438170212503} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.2, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1.03, z: 1.06} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653353674152} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &2588085967130580064 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7785980324569223954} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0.030035332, y: 1.8239653, z: -5.2773046} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653332255215} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &2781099136154378700 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6754810234727759773} + m_Mesh: {fileID: 2272001217198551621, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!1 &2838347986684758650 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8891076188507897324} + - component: {fileID: 6232782236657379195} + - component: {fileID: 5363521872979565790} + m_Layer: 0 + m_Name: pPlane3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &2893925690830103088 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2238549743244136737} + m_LocalRotation: {x: 7.105431e-15, y: -4.2600438e-14, z: 0.000000087422784, w: 1} + m_LocalPosition: {x: 0.074257575, y: -0.001845955, z: 0.037142947} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8891076188507897324} + m_Father: {fileID: 2002531610598337279} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &3030345207701020637 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3346000825274310804} + m_LocalRotation: {x: -0.5, y: 0.5, z: 0.5, w: 0.5} + m_LocalPosition: {x: 0.042438965, y: 0.013796708, z: 1.7817245} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2026190830599880099} + - {fileID: 6547537557711297966} + m_Father: {fileID: 543450653332255215} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &3174515287918237355 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1681817639337992799} + - component: {fileID: 1890587713882337985} + - component: {fileID: 7275153563105478990} + - component: {fileID: 1789438301} + m_Layer: 0 + m_Name: Box122aaa + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!23 &3232515301801284925 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3346000825274310804} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8755f20ef07fcd942884d8e916eda0d9, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 3 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &3345022385497955732 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6754810234727759773} + m_LocalRotation: {x: 0.70710695, y: 0.000000061817246, z: 0.000000061817246, w: 0.7071066} + m_LocalPosition: {x: 0.030176453, y: 0.0036816332, z: -0.0016044007} + m_LocalScale: {x: 112.83781, y: 112.83781, z: 112.83781} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 9032225572846669850} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &3346000825274310804 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3030345207701020637} + - component: {fileID: 1857631050215693693} + - component: {fileID: 3232515301801284925} + m_Layer: 0 + m_Name: FireDoor_a + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &3399922635411602228 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2148690140096925999} + m_Mesh: {fileID: 9042771077998628582, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!33 &3431219503311567819 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8528856438170212503} + m_Mesh: {fileID: -5106236157677694661, guid: b328f3329c3e8fa42b67040d91fdad15, type: 3} +--- !u!33 &3469287837270444557 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132149367037714} + m_Mesh: {fileID: -5106236157677694661, guid: b328f3329c3e8fa42b67040d91fdad15, type: 3} +--- !u!65 &3469287837270444558 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132149367037714} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &3469287837270444559 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132149367037714} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ff2a91380c2cabf4186aa2d24049a84d, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 5012 + triggerName: "\u955C\u5B50" + _highlight: {fileID: 0} +--- !u!114 &3469287837270444560 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132149367037714} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 2 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!4 &3498687524961745019 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6929084727361804591} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0.17879103, y: 3.0084279, z: -1.9996434} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653332255215} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &3591145716590611116 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6754810234727759773} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: b5544628b5bea33458a16b0cec83edb3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &3711400966665279014 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 574380038142816902} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: ee0653f342c61884bb25c57ba4eb50dd, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 3 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &3880741410050737762 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480631129144452773} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 813b6b562d854a54383a6ad6214127bc, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 3 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &4109990601406380437 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5846932798130283589} + m_Mesh: {fileID: -7663071829686634888, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!23 &4148718082160267344 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7785980324569223954} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: d87f9600f2768d845bfdaece73f99a32, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 3 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &4149183435998775790 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8121870069781662419} + m_Mesh: {fileID: -1041292729156527536, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!23 &4198229849941995259 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7884939154751646451} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1ae8783c089b2e541a01f169cf742d79, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 3 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &4278410587990561939 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480631129144452773} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + m_LocalPosition: {x: -1.4528787, y: 0.8278323, z: -2.5417728} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653332255215} + m_RootOrder: 11 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &4281690943236240208 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6340648484133678307} + m_Mesh: {fileID: -7434549690534084444, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!33 &4316797753394262448 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7884939154751646451} + m_Mesh: {fileID: -4426076302045516145, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!33 &4348541273066611768 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2238549743244136737} + m_Mesh: {fileID: -4545423930167495100, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!4 &4780751698108330340 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8121870069781662419} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + m_LocalPosition: {x: -1.4529423, y: 1.0130123, z: -2.526264} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653332255215} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4804253547345608867 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 574380038142816902} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0.032153282, y: 1.8237122, z: -5.2988048} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653332255215} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &5024743154938543618 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6365786776780617512} + m_Mesh: {fileID: -7843526606762953986, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!23 &5363521872979565790 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2838347986684758650} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: b5544628b5bea33458a16b0cec83edb3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &5633724470796314671 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2238549743244136737} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 7dc2f36f4abeee54a9061fb2c5132d52, type: 2} + - {fileID: 2100000, guid: 0b2129ceeaa05bc4ca1934d740f16965, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &5846932798130283589 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8373887989331991907} + - component: {fileID: 4109990601406380437} + - component: {fileID: 8576450275586677302} + - component: {fileID: 8576450275586677303} + m_Layer: 0 + m_Name: Box128asdasd + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!23 &5888892787065851434 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2148690140096925999} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 7dc2f36f4abeee54a9061fb2c5132d52, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 3 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15200, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &5888892787065851435 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2148690140096925999} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.1485153, y: 0.23546849, z: 0.075178504} + m_Center: {x: 0, y: -5.2939417e-23, z: 0.0000000037252896} +--- !u!4 &6132854414382456745 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1150712073403325612} + m_LocalRotation: {x: 0.019918658, y: -0.685602, z: 0.02113292, w: 0.72739714} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.9965645, y: 1.9723916, z: 0.020072164} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 901742061} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &6232782236657379195 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2838347986684758650} + m_Mesh: {fileID: 3680687292192122401, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!1 &6340648484133678307 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7461354847199086612} + - component: {fileID: 4281690943236240208} + - component: {fileID: 7034797190336548102} + m_Layer: 0 + m_Name: pCube12 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &6365786776780617512 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9032225572846669850} + - component: {fileID: 5024743154938543618} + - component: {fileID: 7147321503659662890} + m_Layer: 0 + m_Name: polySurface7 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!23 &6413297641095849922 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6929084727361804591} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 471c94d627982d14cb9d21bb74f8ab9b, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 3 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &6547537557711297966 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1573520277904148674} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.06372266, y: 0.87512845, z: 1.2178628} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3030345207701020637} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &6639766346843070705 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1150712073403325612} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !u!1 &6754810234727759773 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3345022385497955732} + - component: {fileID: 2781099136154378700} + - component: {fileID: 3591145716590611116} + m_Layer: 0 + m_Name: pPlane4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!23 &6809742405447132359 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8121870069781662419} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: d87ec68e885570e4e97e6168bf75013d, type: 2} + - {fileID: 2100000, guid: b4f486c344098134e8e99e72e60560b7, type: 2} + - {fileID: 2100000, guid: eef58761479eafe4382f812007f61947, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 3 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &6868065909393700926 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480631129144452773} + m_Mesh: {fileID: 19518579058340498, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!4 &6873033662030306204 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2376275863548444257} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + m_LocalPosition: {x: -0, y: -0.022623308, z: -1.7885631} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653332255215} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &6929084727361804591 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3498687524961745019} + - component: {fileID: 2455367006366865778} + - component: {fileID: 6413297641095849922} + m_Layer: 0 + m_Name: Obj3d66-4603994-298-398 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!23 &7034797190336548102 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6340648484133678307} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: d87ec68e885570e4e97e6168bf75013d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &7098494330434620885 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7884939154751646451} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + m_LocalPosition: {x: -0.0002578125, y: 3.044676, z: -1.8485494} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653332255215} + m_RootOrder: 12 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &7143490477662047359 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1573520277904148674} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8755f20ef07fcd942884d8e916eda0d9, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 3 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &7143490477662047360 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1573520277904148674} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.19373341, y: 0.8751285, z: 2.3857257} + m_Center: {x: 0.02500026, y: -0.4375643, z: -0.024999976} +--- !u!23 &7147321503659662890 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6365786776780617512} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 7dc2f36f4abeee54a9061fb2c5132d52, type: 2} + - {fileID: 2100000, guid: 0b2129ceeaa05bc4ca1934d740f16965, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &7227932631366347981 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 31701742176722383} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0.59361804, y: 3.008981, z: -0.059986513} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653332255215} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &7275153563105478990 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3174515287918237355} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: df571e35763254141a0e2a589c5d3417, type: 2} + - {fileID: 2100000, guid: 0dc2222f0cba8834abf887c87940fa87, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 3 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &7461354847199086612 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6340648484133678307} + m_LocalRotation: {x: 7.105431e-15, y: -4.2600438e-14, z: 0.000000087422784, w: 1} + m_LocalPosition: {x: 0.00005712891, y: 0.054856434, z: -0.0007961426} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2002531610598337279} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &7552301136719634819 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1150712073403325612} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 0 + m_FOVAxisMode: 0 + m_SensorSize: {x: 16.4592, y: 15.5448} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 13.462192 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 1 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 8400000, guid: 90746777a83033d47b7f37e678b36da1, type: 2} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!1 &7614871354757096527 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8379444867651266426} + m_Layer: 0 + m_Name: Group022 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!1 &7785980324569223954 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2588085967130580064} + - component: {fileID: 8767012901301994682} + - component: {fileID: 4148718082160267344} + - component: {fileID: 8767012901301994683} + m_Layer: 0 + m_Name: Object031asdasd + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!23 &7853834384120317940 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2376275863548444257} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: d90e86586b0c5af40abcdae24fd9961d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 3 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &7884939154751646451 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7098494330434620885} + - component: {fileID: 4316797753394262448} + - component: {fileID: 4198229849941995259} + m_Layer: 0 + m_Name: Rectangle2700 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &8101419820916546251 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 574380038142816902} + m_Mesh: {fileID: 2422478808226077162, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!1 &8121870069781662419 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4780751698108330340} + - component: {fileID: 4149183435998775790} + - component: {fileID: 6809742405447132359} + - component: {fileID: 8121870069781662420} + m_Layer: 0 + m_Name: Box117 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!64 &8121870069781662420 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8121870069781662419} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: -1041292729156527536, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!1 &8273280625189519447 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2026190830599880099} + - component: {fileID: 1379736554053452210} + - component: {fileID: 9163818804323785748} + - component: {fileID: 9163818804323785749} + m_Layer: 0 + m_Name: FireDoor_L_a + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!33 &8366424636317399556 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2376275863548444257} + m_Mesh: {fileID: -4455670081757447873, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!4 &8373887989331991907 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5846932798130283589} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 3.3786929, y: 1.07, z: 0.138} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653332255215} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &8379444867651266426 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7614871354757096527} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 1.7950196, y: 1.1472483, z: 2.3742125} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653332255215} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &8528856438170212503 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2587898902532246539} + - component: {fileID: 3431219503311567819} + - component: {fileID: 2179944575117779976} + m_Layer: 0 + m_Name: "\u68B3\u5986\u955C\u6846" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &8576450275586677302 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5846932798130283589} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 827b59c7ad4d44a4fae1cbac167b68c1, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 3 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &8576450275586677303 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5846932798130283589} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.6798517, y: 1.7959403, z: 2.1184397} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &8767012901301994682 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7785980324569223954} + m_Mesh: {fileID: 6634934403492400389, guid: 156cca832bad49447b16a92685b1fa5b, type: 3} +--- !u!65 &8767012901301994683 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7785980324569223954} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1.7400064, y: 0.043001506, z: 1.6070548} + m_Center: {x: 0, y: 0.00000014808032, z: 0} +--- !u!4 &8891076188507897324 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2838347986684758650} + m_LocalRotation: {x: 0.70710695, y: 0.000000061817246, z: 0.000000061817246, w: 0.7071066} + m_LocalPosition: {x: -0.04381366, y: 0.0036816332, z: -0.0016043702} + m_LocalScale: {x: 112.83781, y: 112.83781, z: 112.83781} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2893925690830103088} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &9032225572846669850 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6365786776780617512} + m_LocalRotation: {x: 7.105431e-15, y: -4.2600438e-14, z: 0.000000087422784, w: 1} + m_LocalPosition: {x: -0.074603274, y: -0.0018457108, z: 0.037142977} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3345022385497955732} + m_Father: {fileID: 2002531610598337279} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &9163818804323785748 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8273280625189519447} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8755f20ef07fcd942884d8e916eda0d9, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 3 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &9163818804323785749 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8273280625189519447} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.19373341, y: 0.8751285, z: 2.3857257} + m_Center: {x: 0.025000378, y: -0.4375643, z: -0.024999976} diff --git a/Assets/Scenes/10006_6001_04_ToolMaterialScene.unity.meta b/Assets/Scenes/10006_6001_04_ToolMaterialScene.unity.meta new file mode 100644 index 0000000..4b79bb8 --- /dev/null +++ b/Assets/Scenes/10006_6001_04_ToolMaterialScene.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6c2d03f21698b4a46b388e20a88532fd +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/10006_6001_05_LiveScene.unity b/Assets/Scenes/10006_6001_05_LiveScene.unity new file mode 100644 index 0000000..97a8339 --- /dev/null +++ b/Assets/Scenes/10006_6001_05_LiveScene.unity @@ -0,0 +1,35795 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 2100000, guid: a7ded38bd8c934d419fa88b4b6519d59, type: 2} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 28351939} + m_IndirectSpecularColor: {r: 0.98479825, g: 1.2393407, b: 1.0060995, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 112000000, guid: 7fac50348d53b8848a093ef00fa64abb, type: 2} + m_LightingSettings: {fileID: 4890085278179872738, guid: 622ad26093d5eab40bee45239737be8f, type: 2} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1001 &546431 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 96 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -21.15001 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -6.239998 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.014541227 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9998943 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -178.334 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (96)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &546432 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 546431} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &3521617 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: 62.21 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -94.7 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (5)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &3521618 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 3521617} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &16926581 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_RootOrder + value: 33 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalPosition.x + value: -33.3 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalPosition.y + value: 0.53 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalPosition.z + value: -115.28 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8413477902044360504, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n1 (3)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} +--- !u!4 &16926582 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + m_PrefabInstance: {fileID: 16926581} + m_PrefabAsset: {fileID: 0} +--- !u!1 &23430728 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 23430729} + m_Layer: 0 + m_Name: obj + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &23430729 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 23430728} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: 0.38632345, y: 0.01753204, z: -0.13862932} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 711328481} + m_Father: {fileID: 6781460075862529084} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180} +--- !u!1 &27713282 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 27713283} + m_Layer: 0 + m_Name: "\u4F4D\u7F6E" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &27713283 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 27713282} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: -0.00066, y: -0.0347, z: -0.0568} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1015476911} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!1 &28351938 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 28351940} + - component: {fileID: 28351939} + - component: {fileID: 28351941} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &28351939 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 28351938} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0 + m_NormalBias: 0 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 4.520103e-39, y: 0.00017279461, z: 0.000000010557689, w: -5.433011e-35} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &28351940 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 28351938} + m_LocalRotation: {x: -0.15651555, y: 0.8225014, z: -0.47487146, w: -0.27109286} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1386435664} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 60, y: 216.484, z: 0} +--- !u!114 &28351941 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 28351938} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + m_UsePipelineSettings: 0 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} +--- !u!1 &33597801 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 33597802} + - component: {fileID: 33597804} + - component: {fileID: 33597803} + m_Layer: 0 + m_Name: BR-032 (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &33597802 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 33597801} + m_LocalRotation: {x: -0, y: -0.017167032, z: -0, w: 0.99985266} + m_LocalPosition: {x: 97.41104, y: -19.995834, z: 195.79721} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 421580181} + m_RootOrder: 31 + m_LocalEulerAnglesHint: {x: 0, y: -1.967, z: 0} +--- !u!23 &33597803 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 33597801} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6f22d84ddd524fd48910e6aa03a20829, type: 2} + - {fileID: 2100000, guid: 279e4fefbd269b14aa887165a9a5565e, type: 2} + - {fileID: 2100000, guid: e9e3411871cce204784983ab585c7cc5, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &33597804 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 33597801} + m_Mesh: {fileID: -7464942925386527959, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} +--- !u!1001 &34906723 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: 40.37 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -95.81 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (4)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &34906724 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 34906723} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &41030315 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 12 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -37.59 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -81.19 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &41030316 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 41030315} + m_PrefabAsset: {fileID: 0} +--- !u!1 &45042547 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 45042548} + m_Layer: 0 + m_Name: "\u4F4D\u7F6E" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &45042548 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 45042547} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 723535377} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &46717220 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 111.189995 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -34.28 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.038341355 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.9992647 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 184.395 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (10)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &46717221 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 46717220} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &56845185 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_Name + value: AlaskaCedar_Desktop_Young (1) + objectReference: {fileID: 0} + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_RootOrder + value: 23 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.x + value: -7.4 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.z + value: -133.68 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} +--- !u!4 &56845186 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + m_PrefabInstance: {fileID: 56845185} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &82768716 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 101 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 10.789993 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -5.130001 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.014541227 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9998943 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -178.334 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (101)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &82768717 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 82768716} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &96434079 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (26) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 56 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -187.2 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -120 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &96434080 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 96434079} + m_PrefabAsset: {fileID: 0} +--- !u!1 &119767343 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 119767344} + - component: {fileID: 119767347} + - component: {fileID: 119767346} + - component: {fileID: 119767345} + m_Layer: 0 + m_Name: "\u7A7A\u6C14\u5899 (5)" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &119767344 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 119767343} + m_LocalRotation: {x: -0, y: -0.7119194, z: -0, w: 0.70226115} + m_LocalPosition: {x: -42.8394, y: 1.2358, z: -101.7902} + m_LocalScale: {x: 1.3566669, y: 1.5444851, z: 1.8494457} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1453735014} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 0, y: -90.783, z: 0} +--- !u!65 &119767345 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 119767343} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1.0043563, y: 2.0055466, z: 9.509329} + m_Center: {x: 0.0021780198, y: 0.09343467, z: -5.618345} +--- !u!23 &119767346 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 119767343} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &119767347 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 119767343} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &127107671 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 127107672} + - component: {fileID: 127107675} + - component: {fileID: 127107674} + - component: {fileID: 127107673} + m_Layer: 0 + m_Name: "\u7A7A\u6C14\u5899 (3)" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &127107672 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127107671} + m_LocalRotation: {x: -0, y: -0.7119194, z: -0, w: 0.70226115} + m_LocalPosition: {x: -173.5, y: 1.6, z: -70.2} + m_LocalScale: {x: 1, y: 5.1228123, z: 47.191967} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1453735014} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: -90.783, z: 0} +--- !u!65 &127107673 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127107671} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &127107674 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127107671} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &127107675 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127107671} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &144104640 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (12) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 42 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 110.8 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -150.3 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &144104641 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 144104640} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &159466233 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: -9216917834457188086, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -9202698538687987683, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -9169119617267433877, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -9162695586580864889, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -9145263500627636261, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -9133907264562819927, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -9131956999312105318, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -9064986334561105350, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -9035925902420736438, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8923654664626383200, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8891812507703388826, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8862684111092661609, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8829124375445894052, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8680815852041116558, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_RootOrder + value: 8 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8671544822517550580, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8655221640293523157, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8626737844934223810, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8606564468655925294, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8605551438083275236, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8573627122535977745, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8529179434321811339, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8506591428954581795, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8406339604583308553, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8392136225594559049, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8330604050183986411, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8328012892942724117, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8292733685382079342, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8242622095915778115, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8221902352727754386, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8162557872172904413, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8130028824526745953, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8099972306032478063, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7980326263119351572, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7980326263119351572, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7928156535685097056, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7878822983666737236, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7838225383019126127, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7779892089233417794, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7666291874449873536, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -7666291874449873536, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7648473797486004455, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7631284239007967531, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7597515586366373351, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7555379733151345602, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7551407819374965283, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7500885064371569976, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7479724232452212587, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7459472773840599006, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7418759857997785898, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7415675129852679830, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7334406490737183551, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7334406490737183551, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7334401699074844857, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7308732102963969500, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7213260870598846670, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7168665740031553233, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7154979583015857368, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7138000903914520420, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -7138000903914520420, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7093792684155418062, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7067385609139611377, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7000654729272009712, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6967524460275591195, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6897766600784502145, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6864895904268781672, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6860739497135122252, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6841130560241479956, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6737286837241000758, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6713465806641040386, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6667345438059886826, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6667345438059886826, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6609147672508064790, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6600914504054580749, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6440258527008339774, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6405502122679350697, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6391856278680995833, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6353420831923539234, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6290279935091015733, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6189607951481365117, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6170963637358805733, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6138545148720743749, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6032521497323980121, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6031621161403256960, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6003580683916128297, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5928506163447022960, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5920514408314015071, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5856442236708194811, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5853662986837787716, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5842141891795354367, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5728442245164610267, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5718759303797991312, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5714385363660230923, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5710797207687394844, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5703739849667856598, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5599398095007976736, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5575667884042308689, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5555730225642233128, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5426692550654362093, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5363149837274744223, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5329716683866792710, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5288374262610204334, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5278188910793405201, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5252791658728615278, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5226872504087459338, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5185263689051311720, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5181582841935342950, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5177583230546348616, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5159985442000779323, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5154778496215651785, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5119601672763888614, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5116965742612701588, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5081406321795871045, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5055287162318514738, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5055287162318514738, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5013574163920101259, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5007554025980232914, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4935996568493617015, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4891736997915138044, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4872856596732383642, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4866849116024803351, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4803302333518488104, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4803302333518488104, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4786778585653557379, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4754165054214771200, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4666525172874221644, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4662342269083967795, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4604344243105070505, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4593130486874181694, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4574248093965817569, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4567168261855779306, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4524200724627266046, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4521473141615286943, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4444448195004327512, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4433015153210103123, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4418714817171551742, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4410113644612536987, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4356316541054677832, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4304934632183970014, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4272960310762880485, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4272960310762880485, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4265733741848773679, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4261704068647717660, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4177125124692358244, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3999508628335971843, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3978975921473748022, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3951345871434410388, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3938027907530247233, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3920952907271413017, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3874456864009579619, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3802161356486908887, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3773069737465278455, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3734729386072734501, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3711716652653073255, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3661877979660517940, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3572365132655361775, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3544965712126916281, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3530722532248670027, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_ScaleInLightmap + value: 0.05 + objectReference: {fileID: 0} + - target: {fileID: -3530722532248670027, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15200, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: -3467880981063587285, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3467435481762692932, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3462880356164662334, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3446242125471472966, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3406921744029949690, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3406921744029949690, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3311269541887198151, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3309408970746044326, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3252500253184877865, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3197139504074688003, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3145315288533504883, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3069525267350440492, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3069525267350440492, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3064062876675269390, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3052700996710268668, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3029478077111142411, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3029478077111142411, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3023972015166440329, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3013417928553874605, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -3013417928553874605, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2943562756694791682, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2923470158480980021, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2908580657920944886, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2845817690386363471, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -2845817690386363471, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2815992708412502370, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2787588245599129550, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2751412502248465471, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2358685094045348950, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2321103500837039259, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2301264403876647092, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2269488994707558760, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2175931306231680669, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2170918416741895158, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2164781816851328761, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2087962308158495216, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1982647940191773298, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1964278823038007460, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1874518175556241570, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1825598982747961968, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1810970049851714481, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1771076684115520651, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1714785189520857450, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1673659066455728599, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1661292452236786905, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1589005889352900021, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1581887768741202741, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1576680634527635440, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1501807092726723438, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1436673943884857526, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1427068274841732290, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1410778750969628189, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1378125669412068272, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1306072432879095028, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1204405363063503364, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1201159674724918653, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1101014823468077159, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1044157872388230941, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1021684226151846644, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1014268425052216762, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1003798128878601483, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -933358720466980185, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -933358720466980185, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -921734854092711366, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -915001203301455849, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -902581551581437241, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -897549488550173146, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -864168332997543568, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -855710372368225519, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -704354201161805360, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -554595551798628146, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -509746390358333397, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -501639173424289083, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -498967110824669668, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_ScaleInLightmap + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -498967110824669668, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: -477752879907851321, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -458665870619842863, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -434883554310568428, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -410959685758682828, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -318532001567221198, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -287127833592150374, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -278569980653403164, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -261920593902466614, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -254765511605631723, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -215207770353531380, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -212481595636088756, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -157851758129096430, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -128638154015513360, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -120130136144667260, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -83269298929033951, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -53551514644208239, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -43547654936636366, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4752000447153823, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 49764068215396203, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 49764068215396203, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 63817209515767423, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 79534808670698013, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 111117066646156883, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 115127070659611566, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 120416662191129053, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 138920970494053639, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 179517525671307853, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 247315213006356627, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 256930683572285350, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 296195265552745127, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 296195265552745127, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 322965802086621287, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 385858280716737786, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 452394364243540674, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 455117579767777896, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 509602368436561834, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 519273119669097561, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 625464058125660619, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 659229541056736539, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 722101878450202225, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 745738321298661996, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 777464528169456732, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 777464528169456732, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 785282514256227834, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 800620261575846033, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 831858570499975303, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 850789050861358498, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 856100555278633760, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 893892111835157961, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_Name + value: "\u573A\u5730" + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 960700410268611314, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 990287085783456552, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1017755078218367462, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1017755078218367462, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1055010243972575625, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1155904432966740235, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1194624165663535298, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1223057213257465302, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1277681843154547835, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1279059197110417489, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1384421233176090503, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1402050832092152271, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1435679874000640871, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1479674834138841533, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1509934269682596526, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1549506241589011325, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1568802859190719767, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1599239332910398167, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1607198759658142871, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1647729170068060507, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1665548476080231715, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1670529323237152195, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1678652307940497439, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LocalPosition.x + value: 82.33 + objectReference: {fileID: 0} + - target: {fileID: 1700197457303042545, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1806437896933113045, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1808655256057652675, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1825455412398621426, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1825455412398621426, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1839749153969202635, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1853788435867348892, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2005768220854785099, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2125978017848515198, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2188976810107002865, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2207790617374512153, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2214832154319551263, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2215032231046211484, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2274932848938900645, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2300593632408891413, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2334637691018370798, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2347299581649217420, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2367466280865456772, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2381938028986808247, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2460105974494978281, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2488697417126188208, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2503478543631803227, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2503478543631803227, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2509211015646517554, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2527857994532541286, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2561930953512739822, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2588606950836171102, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2588606950836171102, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2589796530816790722, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2615222133938989297, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2615222133938989297, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2629523305908654705, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2643645673558524904, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2668033244708481479, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2707309714446501749, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2731421197912991939, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2745634050568398127, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2746137679744727812, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2803943227238469279, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2849712222928254390, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2898188645816340313, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2935378647543829702, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2946957977168141441, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2956674950560925104, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2961355698866139331, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2968406149173110469, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2998198323858195801, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3049132016816846665, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3084232315852713438, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3084232315852713438, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3164273508681018703, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3237014820533494174, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3269858353225075752, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3278827710862049662, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3376529147141986573, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3464908163946766388, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3464908163946766388, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3468050468457455132, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3474650784029894483, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3513070762935428247, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3524459973501251811, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3534308474441366303, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3544025310806933898, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3556474374713547854, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3556474374713547854, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3577165649557073476, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3585197847242838367, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3618670014791334536, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3623375585588417869, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3711636695682667488, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3726005677291368349, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3726089275638692481, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3731697477430687819, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3731697477430687819, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3791192402829130012, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 3796080991149631520, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3799092356994857408, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3805699796803936903, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3933765329234266694, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3976043882829533347, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3986011833663695474, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4049942187218528231, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4121617041567130390, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4219001434357800517, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4220538637269743496, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4242027373471933031, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4282313706071530382, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4346578082941123697, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4393672774248248812, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4437633083263505096, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4446900438810437783, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4487613690159259315, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4507299981348364426, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4548316616001487227, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4552315133821933716, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4592851729082149784, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4603337159546281427, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4617238156575583246, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4648791230364611105, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4665482162520848971, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4699812025936253382, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4699812025936253382, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4815853403335335201, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4836930448199365883, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4935610740060039455, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4957091754947574866, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4963087456304202901, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4968499538286345300, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4981997387795584789, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4996360739776867903, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5010043522716896302, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5116064149990150247, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5120012383989077205, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5152047107400640198, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5161770563655729519, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5167923074429408386, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5180684170904399994, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5330322512184450400, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5375756341438683359, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5388527436785821567, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5388527436785821567, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5396103976761680781, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5437707615895678447, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5440259653126472690, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5483818871456701139, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5541890689646920588, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5541890689646920588, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5543971608785611495, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5559362801161706921, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5567533217067148567, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5600983165986062407, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_ScaleInLightmap + value: 0.2 + objectReference: {fileID: 0} + - target: {fileID: 5600983165986062407, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15200, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 5616172951903348149, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5629517073888584549, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5661576818944990815, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5743568295392361674, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5757906445404495940, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5785953031502274708, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5837297587517114223, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5851962261077615913, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5861828710355580026, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5916481886253231227, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5969894362453275583, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6044591695999867547, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6088675914315894584, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6093749197432459115, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6093749197432459115, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6185777768229265009, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6206202146044887262, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6206202146044887262, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6239466559215401299, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6256473822012281558, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6316685944473998457, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6342815932256234829, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6363965124744575219, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6364531483100065837, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6478586916889441475, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6484500714950180291, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6486730366176838054, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6486730366176838054, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6489116136080777224, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6522201092720021406, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6561049848698074549, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6754561809357420445, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6776948015210843837, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6777690486492552752, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6800240294274036416, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6800448685619968125, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6862206149100499923, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6862206149100499923, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6896206623840424714, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6939600215125599463, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_LocalPosition.x + value: 60.492004 + objectReference: {fileID: 0} + - target: {fileID: 6966602781404020102, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6974559281740501033, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6996777064696468257, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7060660464189092174, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7089592382519217313, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7103534873871895996, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7108319147252062004, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7203890505972096498, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7292093255044904728, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7670472934884863803, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7727875007844692164, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7775497934197985644, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7826016569055183219, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7838531526144304820, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7872600019734036813, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7901929213217876957, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7925325008239036865, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7931286359906048917, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7937103057731893493, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7944494278494552093, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8084906919250567395, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8129762302245822909, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8207849162707449158, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8233882664373150293, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8233882664373150293, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8235008488039726588, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8295193384901691276, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8307714114041556734, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8356836792472676640, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8408021027013620117, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8419806293352585241, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8435514727416302351, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8440254393334280882, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8487167654232718067, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8509035177024823403, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8619767436248084893, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8625754823048108897, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8667470563260577137, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8671395341608846142, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8677596183572625205, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8689410235001390719, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8759710640559281860, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8781466579438917802, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8791982366708228367, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8822902866977392675, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8885189198183714945, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8961894153869604861, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9026642553745400636, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9057606003556478889, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9075608652238388310, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9184597200849724653, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9192918033675734840, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9206333979769549789, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} +--- !u!1 &159466234 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2588606950836171102, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + m_PrefabInstance: {fileID: 159466233} + m_PrefabAsset: {fileID: 0} +--- !u!65 &159466235 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 159466234} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 500, y: 761.86084, z: 1.2776842} + m_Center: {x: 0, y: 119.0697, z: -0.60743433} +--- !u!4 &159466236 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -6130245540742135481, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + m_PrefabInstance: {fileID: 159466233} + m_PrefabAsset: {fileID: 0} +--- !u!1 &159466237 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 8233882664373150293, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + m_PrefabInstance: {fileID: 159466233} + m_PrefabAsset: {fileID: 0} +--- !u!64 &159466238 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 159466237} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: -4233957156868394210, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} +--- !u!1 &165813676 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 165813677} + - component: {fileID: 165813678} + m_Layer: 0 + m_Name: Tips + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &165813677 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 165813676} + m_LocalRotation: {x: -0, y: -1, z: -0, w: 0} + m_LocalPosition: {x: 0, y: 0.82, z: 0} + m_LocalScale: {x: 0.20000018, y: 0.2, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 890581128} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 0} +--- !u!212 &165813678 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 165813676} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: fe94d708b7ef8044b9b0d18a19d53f3f, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2, y: 2} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1001 &166654435 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (4) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 5.4 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -78.5 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &166654436 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 166654435} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &185160040 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 115.53999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -47.879997 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (3)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &185160041 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 185160040} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &199862878 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_Name + value: AlaskaCedar_Desktop_Young (9) + objectReference: {fileID: 0} + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_RootOrder + value: 77 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.x + value: -165.1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.z + value: -102.4 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} +--- !u!4 &199862879 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + m_PrefabInstance: {fileID: 199862878} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &227034686 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 39 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: 62.21 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -112.24 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (15)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &227034687 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 227034686} + m_PrefabAsset: {fileID: 0} +--- !u!1 &227206374 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 227206375} + m_Layer: 0 + m_Name: "\u6A21\u578B" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &227206375 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 227206374} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -64.098785, y: 67.97933, z: -31.189249} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 676106709} + - {fileID: 748076309} + - {fileID: 688107261} + - {fileID: 356551419} + - {fileID: 975687478} + - {fileID: 379741791} + - {fileID: 1526031817} + - {fileID: 536109432} + - {fileID: 1868042770} + - {fileID: 1981318698} + - {fileID: 765230033} + m_Father: {fileID: 1386435664} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &240539706 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (28) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 58 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -174.3 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -79.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &240539707 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 240539706} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &261825122 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (32) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 62 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -48.9 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -36.3 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &261825123 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 261825122} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &267707927 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (3) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -39.5 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -54 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &267707928 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 267707927} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &283184542 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: 74.43 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -94.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (6)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &283184543 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 283184542} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &289767289 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 27 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 111.189995 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -25.119999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.88852966 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.4588193 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -54.622 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (27)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &289767290 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 289767289} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &294278620 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 102 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 5.48999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -1.0999985 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.014541227 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9998943 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -178.334 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (102)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &294278621 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 294278620} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &308464706 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (27) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 57 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -202.6 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -56.5 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &308464707 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 308464706} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &324253274 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 63 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -18.00412 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -11.610443 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.014541227 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9998943 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -178.334 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (64)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &324253275 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 324253274} + m_PrefabAsset: {fileID: 0} +--- !u!1 &325451983 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 325451984} + - component: {fileID: 325451985} + m_Layer: 7 + m_Name: "\u8282\u70B92" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &325451984 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 325451983} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: -0.11819, y: -0.0575, z: 0.00349} + m_LocalScale: {x: 146.43997, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7499290556563202023} + - {fileID: 354595431} + m_Father: {fileID: 7186252140739360086} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!114 &325451985 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 325451983} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: -90, y: 0, z: 0} + noConnectLocalAngle: {x: -78.3, y: 90, z: -90} +--- !u!1001 &327724263 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 17 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 125.89 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -40.199997 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.038341355 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.9992647 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 184.395 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (17)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &327724264 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 327724263} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &337256271 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 40 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 89.799995 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -41.940002 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7602474 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.6496337 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -81.028 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (40)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &337256272 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 337256271} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &342786922 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 88 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 28.849998 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -25.579998 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (88)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &342786923 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 342786922} + m_PrefabAsset: {fileID: 0} +--- !u!1 &345567139 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 345567140} + - component: {fileID: 345567141} + m_Layer: 7 + m_Name: "\u8282\u70B91" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &345567140 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 345567139} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.00012901319, y: -0.000103607264, z: 0.000050500665} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5687382821897077147} + m_Father: {fileID: 1284177668} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &345567141 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 345567139} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: 0, y: 0, z: 0} + noConnectLocalAngle: {x: 0, y: 64.638, z: 0} +--- !u!1 &354595430 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 354595431} + - component: {fileID: 354595432} + m_Layer: 7 + m_Name: "\u8282\u70B91" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &354595431 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 354595430} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.0008216725, y: 0.0000318089, z: 0.00004936011} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4070507212663398037} + m_Father: {fileID: 325451984} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &354595432 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 354595430} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: 0, y: 0, z: 0} + noConnectLocalAngle: {x: 0, y: -11.728, z: 0} +--- !u!1001 &356551418 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 227206375} + m_Modifications: + - target: {fileID: 2964015961807033432, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_Name + value: "\u5EFA\u7B515 (2)" + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalScale.x + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.x + value: 52.998787 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.y + value: -67.69933 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.z + value: -72.610756 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: e1f73a77da6e672488a711dae713b376, type: 3} +--- !u!4 &356551419 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + m_PrefabInstance: {fileID: 356551418} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &359244873 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 87 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 23.819992 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -21.14 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (87)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &359244874 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 359244873} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &370959561 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalPosition.x + value: -33.3 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalPosition.y + value: 0.53 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalPosition.z + value: -97.74 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8413477902044360504, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n1" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} +--- !u!4 &370959562 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + m_PrefabInstance: {fileID: 370959561} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &379741790 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 227206375} + m_Modifications: + - target: {fileID: 2964015961807033432, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_Name + value: "\u5EFA\u7B515 (3)" + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalScale.x + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.x + value: 131.15878 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.y + value: -67.65933 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.z + value: -71.710754 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: e1f73a77da6e672488a711dae713b376, type: 3} +--- !u!4 &379741791 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + m_PrefabInstance: {fileID: 379741790} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &401253891 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 36 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 95.909996 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -34.089996 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.74455714 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.6675587 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -83.758 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (36)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &401253892 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 401253891} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &403010648 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (39) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 69 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 108.8 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -48.3 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &403010649 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 403010648} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &412901610 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 69 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -38.42778 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -19.67609 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.76610065 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.64272064 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -79.99 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (69)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &412901611 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 412901610} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &421580180 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: -9149590711052348023, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -9077025313706941028, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -8841142990366791512, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: -8679921383154817045, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8443896039280069861, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -8356627945148562062, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -8351826655361582470, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8351826655361582470, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -8235464705651466370, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -8188549688696570937, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -7317944712813833837, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -7207085642442953192, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -7203289364850536347, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -7156142646271778893, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: -6984805394838468159, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: -6960808750792157307, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -6944438561095834901, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: -6891047774088247830, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalPosition.x + value: -6.440628 + objectReference: {fileID: 0} + - target: {fileID: -6891047774088247830, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalPosition.z + value: 13.991013 + objectReference: {fileID: 0} + - target: {fileID: -6891047774088247830, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalRotation.w + value: 0.99998885 + objectReference: {fileID: 0} + - target: {fileID: -6891047774088247830, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -6891047774088247830, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalRotation.y + value: -0.004725891 + objectReference: {fileID: 0} + - target: {fileID: -6891047774088247830, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -0.542 + objectReference: {fileID: 0} + - target: {fileID: -6586410448465858989, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -6464201211413745232, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -6079442957475019083, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -6011821740669889572, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_ScaleInLightmap + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -6011821740669889572, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: -5866070154366762759, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -5758421443084338567, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -5712289106324617929, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -5441735386008841435, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -5385756651928406195, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -5377460121037048086, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -5319870835144837577, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: -5144993180687633875, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalPosition.x + value: -10.2 + objectReference: {fileID: 0} + - target: {fileID: -5144993180687633875, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalPosition.z + value: 39.9 + objectReference: {fileID: 0} + - target: {fileID: -4942916276977152491, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -4753011842630474668, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: -4490109419756132595, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -4489900543056989875, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -4216863995478052765, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: -3777083702665928725, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -3726633411976678579, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -3486338307513702595, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: -3422473230650660394, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -3395715036419629748, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -2961712271068383216, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -2939055373483438026, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -2924927157165512371, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -2621056378972881021, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: -2547456913649129304, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: -2346390218026298404, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -2220208752023051823, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -2060389583882124651, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -1827645780106707501, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -1732669873230513818, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -1272583835321384207, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -914653926976607855, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -672961667335956829, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -499425170004492597, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: -352597048596782060, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 104918299769463837, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 107935591383732138, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 197086408795335526, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 296691514623915954, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 438303509748732210, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalPosition.x + value: -4.548031 + objectReference: {fileID: 0} + - target: {fileID: 438303509748732210, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalPosition.z + value: -4.399109 + objectReference: {fileID: 0} + - target: {fileID: 438303509748732210, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalRotation.w + value: 0.99999726 + objectReference: {fileID: 0} + - target: {fileID: 438303509748732210, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 438303509748732210, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalRotation.y + value: 0.002340479 + objectReference: {fileID: 0} + - target: {fileID: 438303509748732210, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0.268 + objectReference: {fileID: 0} + - target: {fileID: 631507239857915787, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_Name + value: xiaoqu + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 1084492107827416128, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 1136433458076873445, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 1157069380744618514, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 1212081724491745016, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 1264736563746095045, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 1472407886504343582, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 1480292717889062273, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 1609705618363912085, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 1913513874304456476, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 1964422325409236959, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 2148712156501333199, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 2174890211566540011, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 2414945868818144108, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 2450134559080400436, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 2468938770651380615, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 2588341343119900252, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 3150617369566442813, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 3261231958367881392, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 3557614053464724503, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 3642571241887963299, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 3644708312059749300, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 3668689995853467183, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 3835275211803173344, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 3845110918320813260, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 3861186024375991454, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 4050044399736016422, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 4136075872937683523, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 4213749287265758341, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 4226368816130685741, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 4282132471962742545, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 4297796833623085390, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 4485038998415129715, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 4505246555555382339, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 4562504968789143364, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 4887460639793125717, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 4912363304729199007, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 5041965947478139810, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 5094676269672405923, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 5309877187451069312, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 5377432484121867887, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 5586287572636850404, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 5589856682034828762, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 5893220733836105890, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 5916764459109378280, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 6181089957889321174, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 6544355233629989430, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 6553867458886058484, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 6633334797331562957, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 7221697409291365951, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 7389052425542969105, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 7827270035464120739, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 7998328431396999024, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 8149304189331386958, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 8222337142502528679, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalPosition.x + value: -3.2 + objectReference: {fileID: 0} + - target: {fileID: 8222337142502528679, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalPosition.z + value: -26.9 + objectReference: {fileID: 0} + - target: {fileID: 8222337142502528679, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalRotation.w + value: 0.99999404 + objectReference: {fileID: 0} + - target: {fileID: 8222337142502528679, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8222337142502528679, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalRotation.y + value: 0.0034536738 + objectReference: {fileID: 0} + - target: {fileID: 8222337142502528679, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0.396 + objectReference: {fileID: 0} + - target: {fileID: 8340873895319171425, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 8358245343735493866, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 8390984494234905857, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + - target: {fileID: 8426593802908671035, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + - target: {fileID: 9039053067166609358, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + propertyPath: m_LightmapParameters + value: + objectReference: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} +--- !u!4 &421580181 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1957450708453783175, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} + m_PrefabInstance: {fileID: 421580180} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &430898464 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1189213516} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 8d9ed311cb49ffa41b678e8ac62bc878, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 8d9ed311cb49ffa41b678e8ac62bc878, type: 3} + propertyPath: m_LocalPosition.x + value: 0.3511963 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 8d9ed311cb49ffa41b678e8ac62bc878, type: 3} + propertyPath: m_LocalPosition.y + value: 0.2026217 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 8d9ed311cb49ffa41b678e8ac62bc878, type: 3} + propertyPath: m_LocalPosition.z + value: -0.18091965 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 8d9ed311cb49ffa41b678e8ac62bc878, type: 3} + propertyPath: m_LocalRotation.w + value: 0.000000115202326 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 8d9ed311cb49ffa41b678e8ac62bc878, type: 3} + propertyPath: m_LocalRotation.x + value: -0.000000115202326 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 8d9ed311cb49ffa41b678e8ac62bc878, type: 3} + propertyPath: m_LocalRotation.y + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 8d9ed311cb49ffa41b678e8ac62bc878, type: 3} + propertyPath: m_LocalRotation.z + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 8d9ed311cb49ffa41b678e8ac62bc878, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 8d9ed311cb49ffa41b678e8ac62bc878, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 8d9ed311cb49ffa41b678e8ac62bc878, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 8d9ed311cb49ffa41b678e8ac62bc878, type: 3} + propertyPath: m_Name + value: "\u4F4E\u538B\u7535\u6D41\u4E92\u611F\u5668" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8d9ed311cb49ffa41b678e8ac62bc878, type: 3} +--- !u!4 &430898465 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8d9ed311cb49ffa41b678e8ac62bc878, type: 3} + m_PrefabInstance: {fileID: 430898464} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &437292349 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalPosition.x + value: -75.26 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalPosition.y + value: 0.44 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalPosition.z + value: -97.96 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8579978593060138814, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n2 (1)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} +--- !u!4 &437292350 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + m_PrefabInstance: {fileID: 437292349} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &437909024 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_Name + value: AlaskaCedar_Desktop_Young (7) + objectReference: {fileID: 0} + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_RootOrder + value: 75 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.x + value: -96.4 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.z + value: -98.1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} +--- !u!4 &437909025 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + m_PrefabInstance: {fileID: 437909024} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &439795098 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (6) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 18 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 49.3 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -75.1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &439795099 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 439795098} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &442729826 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (25) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 55 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -187.2 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -92.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &442729827 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 442729826} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &456634751 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 64 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -12.573975 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -11.5 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.014541227 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9998943 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -178.334 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (63)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &456634752 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 456634751} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &457437475 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (43) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 73 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 127.8 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -140.8 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &457437476 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 457437475} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &466158973 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_RootOrder + value: 28 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalPosition.x + value: -48.77 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalPosition.y + value: 0.53 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalPosition.z + value: -115.28 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8413477902044360504, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n1 (2)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} +--- !u!4 &466158974 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + m_PrefabInstance: {fileID: 466158973} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &474397152 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 39 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 89.95999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -39 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9850868 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.17205818 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 19.815 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (39)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &474397153 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 474397152} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &474698779 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (40) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 70 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 112.2 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -67.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &474698780 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 474698779} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &475168972 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 43 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 75.009995 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -41.96 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.24048798 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.97065216 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -152.169 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (43)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &475168973 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 475168972} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &476123600 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 69.439995 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -41.36 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.24048798 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.97065216 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -152.169 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (45)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &476123601 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 476123600} + m_PrefabAsset: {fileID: 0} +--- !u!1 &476775471 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 476775472} + m_Layer: 8 + m_Name: "\u526A\u7EBF\u4F4D\u7F6E" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &476775472 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 476775471} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: -0.00063, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1779049931} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!1001 &481207833 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 14 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 106.17 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -29.980003 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.88852966 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.4588193 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -54.622 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (14)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &481207834 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 481207833} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &483488626 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (30) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 60 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -109 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -40 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &483488627 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 483488626} + m_PrefabAsset: {fileID: 0} +--- !u!1 &483819745 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 483819746} + - component: {fileID: 483819747} + m_Layer: 7 + m_Name: "\u8282\u70B92" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &483819746 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 483819745} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: -0.07983322, y: -0.050374184, z: 0.0034508144} + m_LocalScale: {x: 146.43997, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5488424282546057137} + - {fileID: 891660392} + m_Father: {fileID: 3586611681676375721} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!114 &483819747 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 483819745} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: -90, y: 0, z: 0} + noConnectLocalAngle: {x: -69.899, y: 90, z: -90} +--- !u!1001 &489035548 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 99 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -8.590012 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -7.2299995 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.014541227 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9998943 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -178.334 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (99)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &489035549 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 489035548} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &499485542 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 72 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -29.14 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -5.130001 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.0028667273 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.99999595 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -179.672 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (72)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &499485543 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 499485542} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &515169310 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 80 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -4.5 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -32.29 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (80)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &515169311 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 515169310} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &517122224 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 5.8799896 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -10.259998 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (90)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &517122225 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 517122224} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &519375228 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 86 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 14.360001 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -21.810001 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (86)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &519375229 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 519375228} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &520652736 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 36 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: 16.98 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -113.35 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (12)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &520652737 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 520652736} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &529420954 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 79 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -11.660004 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -34.71 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (79)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &529420955 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 529420954} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &536109431 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 227206375} + m_Modifications: + - target: {fileID: 1406698450091869915, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2027125598527953166, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2287472374374668521, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2756750972258220154, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3167275437532865613, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3251470194866535675, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3556601953975471196, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4371243490678644382, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4566673082345884449, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_Name + value: "\u5EFA\u7B516" + objectReference: {fileID: 0} + - target: {fileID: 5111273071338567129, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6091371754657872959, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6563675356889940596, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6875143140850910947, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7529242858277321920, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 7529242858277321920, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_LocalPosition.x + value: 22.808784 + objectReference: {fileID: 0} + - target: {fileID: 7529242858277321920, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_LocalPosition.y + value: -67.69933 + objectReference: {fileID: 0} + - target: {fileID: 7529242858277321920, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_LocalPosition.z + value: -74.960754 + objectReference: {fileID: 0} + - target: {fileID: 7529242858277321920, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 7529242858277321920, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 7529242858277321920, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7529242858277321920, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7529242858277321920, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7529242858277321920, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7529242858277321920, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8412144313379349950, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8940754339384109642, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} +--- !u!4 &536109432 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 7529242858277321920, guid: 108a59efda0843b4ebcf9483814c52ff, type: 3} + m_PrefabInstance: {fileID: 536109431} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &545341470 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (2) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 14 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -61.2 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -58.9 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &545341471 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 545341470} + m_PrefabAsset: {fileID: 0} +--- !u!1 &557971043 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 557971044} + - component: {fileID: 557971047} + - component: {fileID: 557971046} + - component: {fileID: 557971045} + m_Layer: 0 + m_Name: "\u5899\u78B0\u649E (4)" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &557971044 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 557971043} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -174.03, y: 2.2225, z: -52.0243} + m_LocalScale: {x: 0.09559214, y: 4.099373, z: 1.0994881} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1453735014} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &557971045 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 557971043} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &557971046 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 557971043} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &557971047 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 557971043} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &561160708 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_Name + value: AlaskaCedar_Desktop_Young (5) + objectReference: {fileID: 0} + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_RootOrder + value: 27 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.x + value: -86.06999 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.z + value: -133.68 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} +--- !u!4 &561160709 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + m_PrefabInstance: {fileID: 561160708} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &578817787 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (34) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 64 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 12.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -32.6 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &578817788 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 578817787} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &583815627 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (23) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 53 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -188.2 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -44.1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &583815628 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 583815627} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &587389395 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 75 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -26.440002 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -38.93 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (75)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &587389396 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 587389395} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &594120674 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 92 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 23.819992 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -8.879997 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (91)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &594120675 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 594120674} + m_PrefabAsset: {fileID: 0} +--- !u!65 &595210373 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1570371604147209342} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.37781534, y: 0.06046491, z: 0.5470549} + m_Center: {x: 0.18708532, y: 0.028410684, z: -0.12220934} +--- !u!114 &595210374 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1570371604147209342} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cf1df5cdcab28254cb3cc96edfa143da, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "\u67DC\u95E8" + _highlight: {fileID: 0} + deviceType: 1 + isMoving: 0 + isOpen: 0 + zhouEnum: 2 + angele: 150 + duration: 2 + testPosAndRot: {fileID: 659250810} + hasElectricity: 0 + group: {fileID: 0} +--- !u!1001 &630165448 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 106.70999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -44.67 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.8412164 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.5406986 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -65.462 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (1)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &630165449 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 630165448} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &632171168 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (44) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 79 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 7.8 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -156.4 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9874304 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.15805455 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -18.188 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &632171169 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 632171168} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &642292124 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (24) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 54 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -186.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -68.4 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &642292125 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 642292124} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &652462644 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 106.369995 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -41.07 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9992049 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.03987171 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -4.57 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (2)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &652462645 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 652462644} + m_PrefabAsset: {fileID: 0} +--- !u!1 &656029484 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 656029487} + - component: {fileID: 656029486} + - component: {fileID: 656029485} + m_Layer: 0 + m_Name: Area Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &656029485 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656029484} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} +--- !u!108 &656029486 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656029484} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 3 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 2 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.02 + m_NormalBias: 0.1 + m_NearPlane: 0.1 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 2 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 3.8452663, y: 2.307826} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &656029487 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656029484} + m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: -176.46, y: 4.206, z: -55.82} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1386435664} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!1001 &658863083 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 130.81 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -39.699997 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9984675 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.05534211 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 6.345 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (16)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &658863084 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 658863083} + m_PrefabAsset: {fileID: 0} +--- !u!1 &659250809 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 659250810} + m_Layer: 0 + m_Name: "\u9A8C\u7535\u4F4D\u7F6E" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &659250810 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 659250809} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0.3288, y: 0.0442, z: -0.217} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6781460075862529084} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!1 &665274768 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 665274769} + - component: {fileID: 665274770} + m_Layer: 7 + m_Name: "\u8282\u70B92" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &665274769 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 665274768} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0.05301351, y: -0.064427085, z: -0.008096612} + m_LocalScale: {x: 146.43997, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1644365778119754143} + - {fileID: 1020189678} + m_Father: {fileID: 3036967995131516333} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!114 &665274770 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 665274768} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: -90, y: 0, z: 0} + noConnectLocalAngle: {x: -64.155, y: -90, z: 90} +--- !u!1001 &668275944 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (37) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 67 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 87.2 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -27.1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &668275945 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 668275944} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &672471056 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 26 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 173.67763 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -39.486008 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.8980328 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.43992862 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 52.199 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (26)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &672471057 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 672471056} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &675022156 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 71 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalScale.x + value: 0.49999982 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalScale.z + value: 0.49999982 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -36.048615 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -29.44387 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.30681804 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9517682 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -144.265 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (71)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &675022157 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 675022156} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &676106708 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 227206375} + m_Modifications: + - target: {fileID: 678007781398302268, guid: 3d64f80dfa5a1b34c84f2dced54b82cc, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 678007781398302268, guid: 3d64f80dfa5a1b34c84f2dced54b82cc, type: 3} + propertyPath: m_LocalPosition.x + value: -2.501213 + objectReference: {fileID: 0} + - target: {fileID: 678007781398302268, guid: 3d64f80dfa5a1b34c84f2dced54b82cc, type: 3} + propertyPath: m_LocalPosition.y + value: -67.80933 + objectReference: {fileID: 0} + - target: {fileID: 678007781398302268, guid: 3d64f80dfa5a1b34c84f2dced54b82cc, type: 3} + propertyPath: m_LocalPosition.z + value: -75.31075 + objectReference: {fileID: 0} + - target: {fileID: 678007781398302268, guid: 3d64f80dfa5a1b34c84f2dced54b82cc, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 678007781398302268, guid: 3d64f80dfa5a1b34c84f2dced54b82cc, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 678007781398302268, guid: 3d64f80dfa5a1b34c84f2dced54b82cc, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 678007781398302268, guid: 3d64f80dfa5a1b34c84f2dced54b82cc, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 678007781398302268, guid: 3d64f80dfa5a1b34c84f2dced54b82cc, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 678007781398302268, guid: 3d64f80dfa5a1b34c84f2dced54b82cc, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 678007781398302268, guid: 3d64f80dfa5a1b34c84f2dced54b82cc, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7417996146752504979, guid: 3d64f80dfa5a1b34c84f2dced54b82cc, type: 3} + propertyPath: m_Name + value: "\u5EFA\u7B514" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 3d64f80dfa5a1b34c84f2dced54b82cc, type: 3} +--- !u!4 &676106709 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 678007781398302268, guid: 3d64f80dfa5a1b34c84f2dced54b82cc, type: 3} + m_PrefabInstance: {fileID: 676106708} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &679886909 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -6.934601 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -11.1856 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.014541227 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9998943 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -178.334 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (65)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &679886910 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 679886909} + m_PrefabAsset: {fileID: 0} +--- !u!1 &680750128 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 680750129} + - component: {fileID: 680750130} + m_Layer: 0 + m_Name: GanTanhao + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &680750129 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 680750128} + m_LocalRotation: {x: -0, y: -0.033108294, z: -0, w: 0.9994518} + m_LocalPosition: {x: -0.104, y: 1.127, z: -0.123} + m_LocalScale: {x: 0.3, y: 0.3, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1198127457} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: -3.795, z: 0} +--- !u!212 &680750130 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 680750128} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: 5836d6344f7a5b149b3976f56f6b0326, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2, y: 2} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1001 &685990275 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 56 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -32.64 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -18.45 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7238394 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.6899686 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -87.255 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (56)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &685990276 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 685990275} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &688107260 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 227206375} + m_Modifications: + - target: {fileID: 2964015961807033432, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_Name + value: "\u5EFA\u7B515 (1)" + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalScale.x + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.x + value: 86.49879 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.y + value: -67.65933 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.z + value: -71.710754 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: e1f73a77da6e672488a711dae713b376, type: 3} +--- !u!4 &688107261 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + m_PrefabInstance: {fileID: 688107260} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &691230244 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 68 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -41.14 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -13.709999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.0028667273 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.99999595 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -179.672 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (68)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &691230245 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 691230244} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &700735804 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalPosition.x + value: -48.77 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalPosition.y + value: 0.53 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalPosition.z + value: -97.74 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8413477902044360504, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n1 (1)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} +--- !u!4 &700735805 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 7883548575225095185, guid: 749cedba19f926b4fa1bbb65ffc9701d, type: 3} + m_PrefabInstance: {fileID: 700735804} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &704216928 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (16) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 46 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 24.2 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -181.9 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &704216929 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 704216928} + m_PrefabAsset: {fileID: 0} +--- !u!1 &711328480 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 711328481} + - component: {fileID: 711328484} + - component: {fileID: 711328483} + - component: {fileID: 711328482} + m_Layer: 0 + m_Name: "\u67DC\u95E8\u87BA\u4E1D" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &711328481 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 711328480} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7980228399672658471} + - {fileID: 1105207257} + m_Father: {fileID: 23430729} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &711328482 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 711328480} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.007179737, y: 0.02584838, z: 0.008618351} + m_Center: {x: 0.000053167343, y: 0.008258065, z: 0.000084848034} +--- !u!114 &711328483 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 711328480} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 1 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &711328484 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 711328480} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "\u67DC\u95E8\u87BA\u4E1D" + _highlight: {fileID: 0} + toolType: 11 + isMoving: 0 + isInstall: 1 + installPos: {fileID: 1105207257} + hasElectricity: 0 + initPostionY: 0 + jiaZiPos: {fileID: 0} +--- !u!1 &714447599 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 714447600} + - component: {fileID: 714447601} + m_Layer: 7 + m_Name: "\u8282\u70B92" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &714447600 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 714447599} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: -0.21775681, y: -0.04158789, z: 0.006213409} + m_LocalScale: {x: 146.43997, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 772617247004367733} + - {fileID: 1748610667} + m_Father: {fileID: 1835685155622220430} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!114 &714447601 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 714447599} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: -90, y: 0, z: 0} + noConnectLocalAngle: {x: -97.072, y: -90, z: 90} +--- !u!1001 &715036844 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: 85.6 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -94.7 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (7)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &715036845 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 715036844} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &716476112 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (18) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 48 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -107.9 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -82.89 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &716476113 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 716476112} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &722758224 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (54) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 89 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -154.1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -135.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9874304 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.15805455 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -18.188 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &722758225 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 722758224} + m_PrefabAsset: {fileID: 0} +--- !u!1 &723535376 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 723535377} + - component: {fileID: 723535380} + - component: {fileID: 723535379} + - component: {fileID: 723535378} + m_Layer: 0 + m_Name: "\u7535\u80FD\u8868\u533A\u57DF\u78B0\u649E" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &723535377 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 723535376} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: -0.020301819, y: 0.08375621, z: 0.07457733} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 45042548} + - {fileID: 1682562279} + m_Father: {fileID: 1584432035} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!114 &723535378 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 723535376} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ad1852809a3fa664b833b3c6f0b340d3, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "\u7535\u80FD\u8868\u533A\u57DF\u78B0\u649E" + _highlight: {fileID: 0} + installVector: {fileID: 45042548} + isMoving: 0 +--- !u!114 &723535379 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 723535376} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 1 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!65 &723535380 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 723535376} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.15057719, y: 0.081492774, z: 0.20389238} + m_Center: {x: 0.00017854576, y: 0.04019532, z: 0.02191966} +--- !u!1001 &728604736 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 136 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -38.92 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.999059 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.043372165 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -4.972 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (7)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &728604737 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 728604736} + m_PrefabAsset: {fileID: 0} +--- !u!114 &737359439 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 8820952056471289716, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + m_PrefabInstance: {fileID: 8820952056044702011} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4df8ad3ae5d512b49b5c3d270a869164, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &740803345 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 32 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 121.57303 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -22.785141 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9999374 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.011189685 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 1.282 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (32)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &740803346 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 740803345} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &746310876 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 21 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 145.13141 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -45.257637 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9965987 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.082407966 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 9.454 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (21)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &746310877 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 746310876} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &748076308 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 227206375} + m_Modifications: + - target: {fileID: 2964015961807033432, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_Name + value: "\u5EFA\u7B515" + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.x + value: 98.83878 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.y + value: -67.65933 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.z + value: -71.710754 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: e1f73a77da6e672488a711dae713b376, type: 3} +--- !u!4 &748076309 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + m_PrefabInstance: {fileID: 748076308} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &759593430 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 97 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -14.800003 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -7.619999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.014541227 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9998943 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -178.334 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (97)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &759593431 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 759593430} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &765061366 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: -4.26 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -113.14 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (8)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &765061367 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 765061366} + m_PrefabAsset: {fileID: 0} +--- !u!1 &765230032 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 765230033} + m_Layer: 0 + m_Name: "\u8349" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &765230033 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 765230032} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -84.63121, y: -67.97933, z: -4.7407513} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1826612531} + - {fileID: 630165449} + - {fileID: 652462645} + - {fileID: 185160041} + - {fileID: 1302370109} + - {fileID: 2040487439} + - {fileID: 1864912369} + - {fileID: 728604737} + - {fileID: 962706781} + - {fileID: 1994133429} + - {fileID: 46717221} + - {fileID: 1807692837} + - {fileID: 1178678894} + - {fileID: 1251462912} + - {fileID: 481207834} + - {fileID: 1100847577} + - {fileID: 658863084} + - {fileID: 327724264} + - {fileID: 1642561836} + - {fileID: 922355852} + - {fileID: 1268776138} + - {fileID: 746310877} + - {fileID: 1801946539} + - {fileID: 1806878037} + - {fileID: 1362544317} + - {fileID: 2053617542} + - {fileID: 672471057} + - {fileID: 289767290} + - {fileID: 1193123042} + - {fileID: 1437659662} + - {fileID: 1188029646} + - {fileID: 1185027487} + - {fileID: 740803346} + - {fileID: 1858058876} + - {fileID: 1284082836} + - {fileID: 1053463720} + - {fileID: 401253892} + - {fileID: 1397631811} + - {fileID: 1325901524} + - {fileID: 474397153} + - {fileID: 337256272} + - {fileID: 1524158881} + - {fileID: 1310963238} + - {fileID: 475168973} + - {fileID: 1459827182} + - {fileID: 476123601} + - {fileID: 1397763686} + - {fileID: 1653940705} + - {fileID: 767349436} + - {fileID: 2015820549} + - {fileID: 2060023713} + - {fileID: 1155621101} + - {fileID: 2055596355} + - {fileID: 1238984324} + - {fileID: 2090357194} + - {fileID: 1153387683} + - {fileID: 685990276} + - {fileID: 919630982} + - {fileID: 1498167927} + - {fileID: 1169498294} + - {fileID: 1272626931} + - {fileID: 1841317501} + - {fileID: 2002609923} + - {fileID: 324253275} + - {fileID: 456634752} + - {fileID: 679886910} + - {fileID: 1399251340} + - {fileID: 1642934316} + - {fileID: 691230245} + - {fileID: 412901611} + - {fileID: 1205775610} + - {fileID: 675022157} + - {fileID: 499485543} + - {fileID: 2031403298} + - {fileID: 1187330324} + - {fileID: 587389396} + - {fileID: 1316308998} + - {fileID: 1989750501} + - {fileID: 1787950695} + - {fileID: 529420955} + - {fileID: 515169311} + - {fileID: 1524156818} + - {fileID: 1392823745} + - {fileID: 1703712485} + - {fileID: 1025451747} + - {fileID: 1569360875} + - {fileID: 519375229} + - {fileID: 359244874} + - {fileID: 342786923} + - {fileID: 2073494886} + - {fileID: 517122225} + - {fileID: 1473960862} + - {fileID: 594120675} + - {fileID: 1628476946} + - {fileID: 2139543807} + - {fileID: 767242134} + - {fileID: 546432} + - {fileID: 759593431} + - {fileID: 1589741010} + - {fileID: 489035549} + - {fileID: 1101892041} + - {fileID: 82768717} + - {fileID: 294278621} + - {fileID: 786321713} + - {fileID: 1797637238} + - {fileID: 1113253221} + - {fileID: 1476199134} + - {fileID: 894311944} + - {fileID: 1944799158} + m_Father: {fileID: 227206375} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &767242133 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 95 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -0.6300049 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -10.509998 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (95)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &767242134 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 767242133} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &767349435 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 48 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 47.1 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -48.260002 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.027930798 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9996099 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -176.799 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (48)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &767349436 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 767349435} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &771570711 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (33) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 63 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -17.8 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -34.3 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &771570712 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 771570711} + m_PrefabAsset: {fileID: 0} +--- !u!1 &783535023 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 783535024} + - component: {fileID: 783535027} + - component: {fileID: 783535026} + - component: {fileID: 783535025} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &783535024 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 783535023} + m_LocalRotation: {x: 0.7804834, y: -0.017575322, z: -0.009597796, w: 0.62485576} + m_LocalPosition: {x: -9.578127, y: -190.37762, z: -0.49406433} + m_LocalScale: {x: 4.6274, y: 1, z: 1.5708975} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 159466236} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 12.646, y: -2.17, z: 0.41} +--- !u!65 &783535025 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 783535023} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &783535026 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 783535023} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &783535027 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 783535023} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &786321712 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 103 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 32.83168 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -0.4416275 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.06913742 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9976072 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -172.071 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (103)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &786321713 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 786321712} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &796813779 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (5) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 17 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 3.4900017 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -51.309998 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &796813780 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 796813779} + m_PrefabAsset: {fileID: 0} +--- !u!1 &810356987 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 810356988} + - component: {fileID: 810356989} + m_Layer: 7 + m_Name: "\u8282\u70B92" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &810356988 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 810356987} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0.21226452, y: -0.042128015, z: -0.031182108} + m_LocalScale: {x: 146.43997, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6394903190299001093} + - {fileID: 1322853381} + m_Father: {fileID: 8068779415140856140} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!114 &810356989 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 810356987} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: -90, y: 0, z: 0} + noConnectLocalAngle: {x: -83.49, y: -90, z: 90} +--- !u!1 &821960849 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 821960850} + - component: {fileID: 821960852} + - component: {fileID: 821960851} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &821960850 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 821960849} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1198127457} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &821960851 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 821960849} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &821960852 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 821960849} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &822393760 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (41) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 71 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 115.3 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -93.3 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &822393761 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 822393760} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &832252281 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_Name + value: AlaskaCedar_Desktop_Young + objectReference: {fileID: 0} + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_RootOrder + value: 22 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.x + value: 6.66 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.z + value: -133.68 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} +--- !u!4 &832252282 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + m_PrefabInstance: {fileID: 832252281} + m_PrefabAsset: {fileID: 0} +--- !u!4 &834722527 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1078205159222055358, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + m_PrefabInstance: {fileID: 897986305} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &860285843 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 38 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: 40.37 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -113.35 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (14)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &860285844 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 860285843} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &865628288 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (38) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 68 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 107 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -26.5 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &865628289 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 865628288} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &865680364 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (52) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 87 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -100.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -135.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9874304 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.15805455 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -18.188 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &865680365 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 865680364} + m_PrefabAsset: {fileID: 0} +--- !u!1 &882038157 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 882038158} + - component: {fileID: 882038161} + - component: {fileID: 882038160} + - component: {fileID: 882038159} + m_Layer: 0 + m_Name: "\u5899\u78B0\u649E (2)" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &882038158 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 882038157} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -178.8316, y: 2.2225, z: -55.864} + m_LocalScale: {x: 0.09559214, y: 4.099373, z: 8.787996} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1453735014} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &882038159 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 882038157} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &882038160 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 882038157} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &882038161 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 882038157} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &882462868 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalPosition.x + value: -57.78 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalPosition.y + value: 0.44 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalPosition.z + value: -97.96 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8579978593060138814, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n2" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} +--- !u!4 &882462869 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + m_PrefabInstance: {fileID: 882462868} + m_PrefabAsset: {fileID: 0} +--- !u!1 &890581127 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 890581128} + - component: {fileID: 890581130} + - component: {fileID: 890581129} + - component: {fileID: 890581131} + m_Layer: 0 + m_Name: NPCCustomController + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &890581128 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 890581127} + m_LocalRotation: {x: -0, y: 0.51830465, z: -0, w: 0.85519606} + m_LocalPosition: {x: -45.05, y: 1.26, z: -94.43} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1638246612} + - {fileID: 165813677} + - {fileID: 1417925981} + - {fileID: 543450652139532038} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 62.437, z: 0} +--- !u!114 &890581129 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 890581127} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0.5 + cullBackFaces: 0 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 1 + outlineQuality: 2 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 1 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 2 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 3 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &890581130 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 890581127} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ba76b9e47a61d284eac9cba888792ed9, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 5018 + triggerName: "NPC\u5BA2\u6237" + _highlight: {fileID: 0} + npcSpeack: + - "\u60A8\u597D" + speackIndex: 0 + spriteRenderer: {fileID: 1638246613} + animator: {fileID: 0} + animatorParameters: + target: {fileID: 1501092963} + minDistance: 2 + isClose: 0 +--- !u!136 &890581131 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 890581127} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &891660391 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 891660392} + - component: {fileID: 891660393} + m_Layer: 7 + m_Name: "\u8282\u70B91" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &891660392 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 891660391} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.00056201994, y: -0.000029907247, z: 0.000050199073} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2793906374691152554} + m_Father: {fileID: 483819746} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &891660393 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 891660391} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: 0, y: 0, z: 0} + noConnectLocalAngle: {x: 0, y: -16.003, z: 0} +--- !u!1001 &894311943 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 107 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -6.3400116 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -1.8699989 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.014541227 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9998943 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -178.334 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (107)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &894311944 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 894311943} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &897986305 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1198127457} + m_Modifications: + - target: {fileID: 413589328981969668, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_Name + value: NPCHead + objectReference: {fileID: 0} + - target: {fileID: 1078205159222055358, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 1078205159222055358, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_LocalScale.x + value: 0.94000006 + objectReference: {fileID: 0} + - target: {fileID: 1078205159222055358, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_LocalScale.z + value: 1.1627908 + objectReference: {fileID: 0} + - target: {fileID: 1078205159222055358, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_LocalPosition.x + value: -0.07276666 + objectReference: {fileID: 0} + - target: {fileID: 1078205159222055358, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_LocalPosition.y + value: -0.98 + objectReference: {fileID: 0} + - target: {fileID: 1078205159222055358, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_LocalPosition.z + value: -0.09859396 + objectReference: {fileID: 0} + - target: {fileID: 1078205159222055358, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_LocalRotation.w + value: -0.30901685 + objectReference: {fileID: 0} + - target: {fileID: 1078205159222055358, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1078205159222055358, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_LocalRotation.y + value: 0.95105654 + objectReference: {fileID: 0} + - target: {fileID: 1078205159222055358, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1078205159222055358, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1078205159222055358, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 216 + objectReference: {fileID: 0} + - target: {fileID: 1078205159222055358, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7678975020132607861, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_Materials.Array.data[2] + value: + objectReference: {fileID: 2100000, guid: e67081498759fc14a8c4e5a1c092be1f, type: 2} + - target: {fileID: 7678975020132607861, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_Materials.Array.data[4] + value: + objectReference: {fileID: 2100000, guid: b1d01a46cb7ee954a874bd249bf9fe8e, type: 2} + - target: {fileID: 7850606089874859549, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_Avatar + value: + objectReference: {fileID: 9000000, guid: b1cd4878f1d86294eaf3c848c1541227, type: 3} + - target: {fileID: 7850606089874859549, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_UpdateMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7850606089874859549, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_CullingMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7850606089874859549, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_WarningMessage + value: + objectReference: {fileID: 0} + - target: {fileID: 7850606089874859549, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + propertyPath: m_ApplyRootMotion + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} +--- !u!95 &897986306 stripped +Animator: + m_CorrespondingSourceObject: {fileID: 7850606089874859549, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + m_PrefabInstance: {fileID: 897986305} + m_PrefabAsset: {fileID: 0} +--- !u!4 &897986307 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 5897271435368223667, guid: 37a1c4ccb0351ce4b84bf605bc9cbf11, type: 3} + m_PrefabInstance: {fileID: 897986305} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &901456639 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (55) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -100.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -161.2 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9874304 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.15805455 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -18.188 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &901456640 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 901456639} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &919630981 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 57 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -32.64 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -23.66 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7238394 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.6899686 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -87.255 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (57)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &919630982 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 919630981} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &922355851 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 19 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 141.76 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -37.43 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9745341 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.22423974 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -25.916 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (19)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &922355852 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 922355851} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &926258657 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_Name + value: AlaskaCedar_Desktop_Young (2) + objectReference: {fileID: 0} + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_RootOrder + value: 24 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.x + value: -22.5 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.z + value: -133.68 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} +--- !u!4 &926258658 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + m_PrefabInstance: {fileID: 926258657} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &941226329 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (20) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -158.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -86.590004 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &941226330 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 941226329} + m_PrefabAsset: {fileID: 0} +--- !u!1 &944765735 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 944765736} + m_Layer: 8 + m_Name: "\u526A\u7EBF\u4F4D\u7F6E" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &944765736 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 944765735} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: -0.00063, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1884165006} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!1001 &954783089 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (49) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 84 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 7.4 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -181 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9874304 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.15805455 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -18.188 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &954783090 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 954783089} + m_PrefabAsset: {fileID: 0} +--- !u!1 &961206653 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 961206655} + - component: {fileID: 961206654} + m_Layer: 0 + m_Name: Global Volume + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &961206654 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 961206653} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IsGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: 95cd91a857f545c4c82927a1b029d68d, type: 2} +--- !u!4 &961206655 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 961206653} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -118.019875, y: 93.6083, z: 34.581726} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1386435664} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &962706780 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 124.44863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -36.225533 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.038341355 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.9992647 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 184.395 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (8)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &962706781 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 962706780} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &975687477 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 227206375} + m_Modifications: + - target: {fileID: 2964015961807033432, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_Name + value: "\u5EFA\u7B515 (4)" + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.x + value: 143.49878 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.y + value: -67.65933 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalPosition.z + value: -71.710754 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: e1f73a77da6e672488a711dae713b376, type: 3} +--- !u!4 &975687478 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6112802081037098544, guid: e1f73a77da6e672488a711dae713b376, type: 3} + m_PrefabInstance: {fileID: 975687477} + m_PrefabAsset: {fileID: 0} +--- !u!1 &984283001 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 984283002} + - component: {fileID: 984283005} + - component: {fileID: 984283004} + - component: {fileID: 984283003} + m_Layer: 0 + m_Name: "\u5899\u78B0\u649E (3)" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &984283002 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 984283001} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -174.03, y: 2.2225, z: -57.2426} + m_LocalScale: {x: 0.09559214, y: 4.099373, z: 6.031202} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1453735014} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &984283003 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 984283001} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &984283004 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 984283001} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &984283005 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 984283001} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &987454037 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 987454038} + - component: {fileID: 987454041} + - component: {fileID: 987454040} + - component: {fileID: 987454039} + m_Layer: 0 + m_Name: "\u7A7A\u6C14\u5899" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &987454038 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 987454037} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -156.43, y: 1.6, z: -54.44} + m_LocalScale: {x: 1, y: 5.1228123, z: 30.957731} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1453735014} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &987454039 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 987454037} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &987454040 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 987454037} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &987454041 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 987454037} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &1015476910 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1584432035} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_LocalPosition.x + value: 0.479 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_LocalPosition.y + value: -0.051 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_LocalPosition.z + value: -0.263 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_LocalRotation.w + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_LocalRotation.x + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_LocalRotation.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_LocalRotation.z + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -90 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 90 + objectReference: {fileID: 0} + - target: {fileID: -6177979780503834757, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2064267324628843600, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 125212212027887621, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_CastShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 125212212027887621, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_StaticShadowCaster + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_Name + value: "\u9A8C\u7535\u63D2\u5EA7 (1)" + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1938986344656154344, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + propertyPath: m_CastShadows + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} +--- !u!4 &1015476911 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + m_PrefabInstance: {fileID: 1015476910} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1015476912 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: c18f17de6f9abd2498a7e0ca1c438f9f, type: 3} + m_PrefabInstance: {fileID: 1015476910} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1015476913 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1015476912} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 2 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &1015476914 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1015476912} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fa45c24333cc9da47815471820b14336, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "\u63D2\u5EA7" + _highlight: {fileID: 0} + deviceType: 2 + isMoving: 0 + testPosAndRot: {fileID: 27713283} + hasElectricity: 1 +--- !u!65 &1015476915 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1015476912} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.12188721, y: 0.037322998, z: 0.1265794} + m_Center: {x: -0.00007247925, y: -0.050231934, z: -0.05688131} +--- !u!1001 &1019902795 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (53) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 88 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -125.8 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -135.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9874304 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.15805455 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -18.188 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1019902796 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1019902795} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1020189677 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1020189678} + - component: {fileID: 1020189679} + m_Layer: 7 + m_Name: "\u8282\u70B91" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1020189678 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1020189677} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.00035839117, y: -0.00005203252, z: 0.000049499293} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1697162105165851237} + m_Father: {fileID: 665274769} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1020189679 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1020189677} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: 0, y: 0, z: 0} + noConnectLocalAngle: {x: 0, y: 23.625, z: 0} +--- !u!1001 &1025451746 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 84 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -0.7799988 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -23.989998 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (84)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1025451747 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1025451746} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1043540959 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_RootOrder + value: 29 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalPosition.x + value: -75.26 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalPosition.y + value: 0.44 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalPosition.z + value: -115.5 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8579978593060138814, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n2 (2)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} +--- !u!4 &1043540960 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + m_PrefabInstance: {fileID: 1043540959} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1048855951 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (31) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 61 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -79.1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -38 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1048855952 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1048855951} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1053463719 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 35 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 95.67 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -39.690002 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.74455714 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.6675587 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -83.758 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (35)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1053463720 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1053463719} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1071482503 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (46) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 81 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -82 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -155.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9874304 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.15805455 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -18.188 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1071482504 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1071482503} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1075917132 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1189213516} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} + propertyPath: m_LocalPosition.x + value: 0.17012024 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} + propertyPath: m_LocalPosition.y + value: -0.1857444 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} + propertyPath: m_LocalPosition.z + value: -0.042247772 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} + propertyPath: m_LocalRotation.w + value: 0.50000006 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} + propertyPath: m_LocalRotation.x + value: -0.50000006 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} + propertyPath: m_LocalRotation.y + value: 0.49999997 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} + propertyPath: m_LocalRotation.z + value: 0.49999997 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} + propertyPath: m_Name + value: "\u8BA1\u91CF\u67DC\u4F532" + objectReference: {fileID: 0} + - target: {fileID: 7173187837616832427, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: bc593ae3c484e1b4ebdb0dc5779f839b, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} +--- !u!4 &1075917133 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: f745ed48138625d4cbe5faf87276dc90, type: 3} + m_PrefabInstance: {fileID: 1075917132} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1098836241 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 8207849162707449158, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + m_PrefabInstance: {fileID: 159466233} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1098836245 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1098836241} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cf1df5cdcab28254cb3cc96edfa143da, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: + _highlight: {fileID: 0} + deviceType: 0 + isMoving: 0 + isOpen: 0 + zhouEnum: 2 + angele: 90 + duration: 1 + testPosAndRot: {fileID: 0} + hasElectricity: 0 + group: {fileID: 0} +--- !u!65 &1098836246 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1098836241} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.7044029, y: 0.224, z: 2.275163} + m_Center: {x: 0.35220146, y: 0.022552505, z: 0.053770185} +--- !u!114 &1098836247 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1098836241} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0.5 + cullBackFaces: 0 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 2 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 1 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!1001 &1100847576 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 134.54 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -44.190002 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9984675 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.05534211 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 6.345 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (15)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1100847577 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1100847576} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1101892040 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 5.0099945 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -6.3199997 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.014541227 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9998943 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -178.334 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (100)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1101892041 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1101892040} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1105207256 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1105207257} + m_Layer: 0 + m_Name: "\u4F4D\u7F6E" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1105207257 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1105207256} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: -0.0012130737, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 711328481} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!1001 &1105235792 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (45) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 80 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -35.8 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -156.4 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9874304 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.15805455 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -18.188 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1105235793 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1105235792} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1113253220 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 105 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 17.871078 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: 0.90089035 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.06913742 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9976072 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -172.071 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (105)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1113253221 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1113253220} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1121243099 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (48) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 83 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -36.4 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -179.9 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9874304 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.15805455 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -18.188 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1121243100 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1121243099} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1122362119 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1386435664} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 711610f624d597b49aefcd55bc4c551f, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 711610f624d597b49aefcd55bc4c551f, type: 3} + propertyPath: m_LocalPosition.x + value: 61 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 711610f624d597b49aefcd55bc4c551f, type: 3} + propertyPath: m_LocalPosition.y + value: -16.2 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 711610f624d597b49aefcd55bc4c551f, type: 3} + propertyPath: m_LocalPosition.z + value: -78 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 711610f624d597b49aefcd55bc4c551f, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 711610f624d597b49aefcd55bc4c551f, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 711610f624d597b49aefcd55bc4c551f, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 711610f624d597b49aefcd55bc4c551f, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 711610f624d597b49aefcd55bc4c551f, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 711610f624d597b49aefcd55bc4c551f, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 711610f624d597b49aefcd55bc4c551f, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 711610f624d597b49aefcd55bc4c551f, type: 3} + propertyPath: m_Name + value: "\u5929\u9645\u7EBF\u80CC\u666F_1" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 711610f624d597b49aefcd55bc4c551f, type: 3} +--- !u!4 &1122362120 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 711610f624d597b49aefcd55bc4c551f, type: 3} + m_PrefabInstance: {fileID: 1122362119} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1137586308 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_Name + value: AlaskaCedar_Desktop_Young (4) + objectReference: {fileID: 0} + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_RootOrder + value: 26 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.x + value: -70.97 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.z + value: -133.68 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} +--- !u!4 &1137586309 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + m_PrefabInstance: {fileID: 1137586308} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1149761031 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1189213516} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} + propertyPath: m_LocalPosition.x + value: -0.064086914 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} + propertyPath: m_LocalPosition.z + value: -0.8002472 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} + propertyPath: m_LocalRotation.w + value: -0.00000008146034 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} + propertyPath: m_LocalRotation.x + value: 0.000000043711395 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} + propertyPath: m_LocalRotation.z + value: -1.3819966e-14 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} + propertyPath: m_Name + value: "\u67DC\u4F532" + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} + propertyPath: m_StaticEditorFlags + value: 2147483647 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} +--- !u!4 &1149761032 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: b217d6ab1a46ca84e83734240d11baf4, type: 3} + m_PrefabInstance: {fileID: 1149761031} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1153387682 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 55 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -32.64 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -13.799999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7238394 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.6899686 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -87.255 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (55)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1153387683 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1153387682} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1155621100 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 51 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -20.268997 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -12.153999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.74455714 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.6675587 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -83.758 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (51)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1155621101 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1155621100} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1169498293 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 59 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -20.730011 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -25.169998 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.59892714 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.8008036 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -106.414 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (59)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1169498294 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1169498293} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1178678893 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 12 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 111 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -43.11 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9992049 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.03987171 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -4.57 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (12)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1178678894 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1178678893} + m_PrefabAsset: {fileID: 0} +--- !u!4 &1180096483 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1180096483, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + m_PrefabInstance: {fileID: 1501092961} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1183061310 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1183061311} + - component: {fileID: 1183061313} + - component: {fileID: 1183061312} + m_Layer: 0 + m_Name: BR-031 (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &1183061311 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1183061310} + m_LocalRotation: {x: -0, y: -0.017167032, z: -0, w: 0.99985266} + m_LocalPosition: {x: 55, y: -19.995834, z: 192.5} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 421580181} + m_RootOrder: 30 + m_LocalEulerAnglesHint: {x: 0, y: -1.967, z: 0} +--- !u!23 &1183061312 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1183061310} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6f22d84ddd524fd48910e6aa03a20829, type: 2} + - {fileID: 2100000, guid: 279e4fefbd269b14aa887165a9a5565e, type: 2} + - {fileID: 2100000, guid: e9e3411871cce204784983ab585c7cc5, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1183061313 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1183061310} + m_Mesh: {fileID: 3019228731682637673, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} +--- !u!1001 &1185027486 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 31 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 116.47 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -23.04 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9831533 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.18278304 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -21.064 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (31)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1185027487 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1185027486} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1187330323 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 74 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -26.770004 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -32.61 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (74)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1187330324 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1187330323} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1188029645 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 115.31999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -16.099998 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.70088214 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.7132772 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -91.004 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (30)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1188029646 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1188029645} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1189213515 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1189213516} + m_Layer: 0 + m_Name: "\u8BA1\u91CF\u67DC" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1189213516 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1189213515} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -176.69, y: 1.28, z: -55.89} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 430898465} + - {fileID: 1650591910} + - {fileID: 1312493579} + - {fileID: 1075917133} + - {fileID: 1149761032} + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1193123041 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 28 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 105.95999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -17.829998 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.88852966 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.4588193 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -54.622 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (28)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1193123042 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1193123041} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1198127453 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1198127457} + - component: {fileID: 1198127456} + - component: {fileID: 1198127455} + - component: {fileID: 1198127454} + m_Layer: 0 + m_Name: NPCHeadController + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!136 &1198127454 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1198127453} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &1198127455 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1198127453} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0.5 + cullBackFaces: 0 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 1 + outlineQuality: 2 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 1 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 2 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 9 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &1198127456 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1198127453} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ba76b9e47a61d284eac9cba888792ed9, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 5020 + triggerName: "NPC\u8D1F\u8D23\u4EBA" + _highlight: {fileID: 0} + npcSpeack: + - "\u7740\u88C5\u89C4\u8303\u3001\u4E2A\u4EBA\u9632\u62A4\u7528\u54C1\u5408\u683C\u9F50\u5907\u3001\u4EBA\u5458\u7CBE\u795E\u72B6\u6001\u826F\u597D\uFF0C\u53EF\u4EE5\u5F00\u5C55\u5DE5\u4F5C\uFF01\u4ECA\u5929\u5DE5\u4F5C\u5185\u5BB9\u662F\u73B0\u573A\u91C7\u96C6\u6545\u969C\u6392\u67E5\u53CA\u5904\u7406\u4F5C\u4E1A\uFF0C\u5DE5\u4F5C\u5730\u70B9\u662Fxxx\uFF0C\u5E26\u7535\u90E8\u5206\uFF0C\u8BA1\u91CF\u7BB1\u53CA\u91D1\u5C5E\u88F8\u9732\u90E8\u5206\u7B49\uFF0C\u73B0\u573A\u4F5C\u4E1A\u5B89\u5168\u63AA\u65BD\u6839\u636E\u5DE5\u4F5C\u7968\u6240\u5217\u5B89\u5168\u8981\u6C42\uFF0C\u843D\u5B9E\u5B89\u5168\u63AA\u65BD..." + speackIndex: 0 + spriteRenderer: {fileID: 680750130} + animator: {fileID: 897986306} + animatorParameters: NPCState + target: {fileID: 1501092963} + minDistance: 2 + isClose: 0 +--- !u!4 &1198127457 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1198127453} + m_LocalRotation: {x: -0, y: -0.6641403, z: -0, w: 0.747608} + m_LocalPosition: {x: -40.43, y: 1.459, z: -94.1} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 680750129} + - {fileID: 821960850} + - {fileID: 834722527} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: -83.233, z: 0} +--- !u!1001 &1205775609 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 70 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -38.48001 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -25.029999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.6241228 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.78132623 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -102.764 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (70)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1205775610 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1205775609} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1232874495 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1232874496} + - component: {fileID: 1232874497} + m_Layer: 0 + m_Name: Light Probe Group + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1232874496 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1232874495} + m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: -176.46, y: 2.1959999, z: -55.85} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1386435664} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!220 &1232874497 +LightProbeGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1232874495} + m_Enabled: 1 + m_SourcePositions: + - {x: 2.1510468, y: 4.018106, z: 1.9622802} + - {x: 2.1510468, y: 2.378799, z: -1.905242} + - {x: 2.1510468, y: -3.8208275, z: 1.9622802} + - {x: 1.2693787, y: 4.0181017, z: -1.9052417} + - {x: 1.2693787, y: 2.3754888, z: 1.9622799} + - {x: 1.2693787, y: -3.820826, z: -1.9052416} + - {x: -1.4838715, y: 4.018106, z: 1.9622802} + - {x: -1.4838715, y: 2.378799, z: -1.8732505} + - {x: -1.4838715, y: -3.8208275, z: 1.9622802} + - {x: -2.0891418, y: 4.0181017, z: -1.8732504} + - {x: -2.0891418, y: 2.3754888, z: 1.9622799} + - {x: -2.0891418, y: -3.820826, z: -1.8732502} + - {x: 0.41778564, y: 4.0181017, z: -1.8717867} + - {x: 0.41778564, y: -3.820826, z: -1.8717866} + - {x: -0.012435913, y: 2.3754842, z: -1.871787} + - {x: 0.41778564, y: 4.018106, z: 1.9622802} + - {x: 0.41778564, y: 2.378804, z: -0.3282768} + - {x: 0.41778564, y: -3.8208275, z: 1.9622802} + - {x: -0.012435913, y: 4.0181065, z: -0.3282767} + - {x: -0.012435913, y: 2.3754888, z: 1.9622799} + - {x: -0.012435913, y: -3.820828, z: -0.3282768} + - {x: -0.47296143, y: 4.0181017, z: -1.8717867} + - {x: -0.47296143, y: -3.820826, z: -1.8717866} + - {x: -0.903183, y: 2.3754842, z: -1.871787} + - {x: -0.47296143, y: 4.018106, z: 1.9622802} + - {x: -0.47296143, y: 2.378804, z: -0.3282768} + - {x: -0.47296143, y: -3.8208275, z: 1.9622802} + - {x: -0.903183, y: 4.0181065, z: -0.3282767} + - {x: -0.903183, y: 2.3754888, z: 1.9622799} + - {x: -0.903183, y: -3.820828, z: -0.3282768} + - {x: 2.1510468, y: 0.9999997, z: -1.8722168} + - {x: 2.1510468, y: 1.0000001, z: 1.9622802} + - {x: 2.1510468, y: -2.1207378, z: -1.9052416} + - {x: 1.2693787, y: 0.99999994, z: -0.33162558} + - {x: 1.2693787, y: -2.124054, z: 1.9622799} + - {x: -1.4838715, y: 0.9999997, z: -1.8762465} + - {x: -1.4838715, y: 1.0000001, z: 1.9622802} + - {x: -1.4838715, y: -2.1207378, z: -1.8732501} + - {x: -2.0891418, y: 0.9999999, z: -0.29963413} + - {x: -2.0891418, y: -2.124054, z: 1.9622799} + - {x: 0.41778564, y: 0.99999994, z: -0.29817054} + - {x: -0.012435913, y: 0.9999997, z: -1.8805774} + - {x: -0.012435913, y: -2.1240528, z: -1.8717866} + - {x: 0.41778564, y: 1.0000001, z: 1.9622802} + - {x: 0.41778564, y: -2.1207395, z: -0.3282767} + - {x: -0.012435913, y: 1, z: 0.851935} + - {x: -0.012435913, y: -2.124054, z: 1.9622799} + - {x: -0.47296143, y: 0.99999994, z: -0.29817054} + - {x: -0.903183, y: 0.9999997, z: -1.8805774} + - {x: -0.903183, y: -2.1240528, z: -1.8717866} + - {x: -0.47296143, y: 1.0000001, z: 1.9622802} + - {x: -0.47296143, y: -2.1207395, z: -0.3282767} + - {x: -0.903183, y: 1, z: 0.851935} + - {x: -0.903183, y: -2.124054, z: 1.9622799} + - {x: 2.1510468, y: -1.0000001, z: -1.8722168} + - {x: 2.1510468, y: -0.9999999, z: 1.9622802} + - {x: 1.2693787, y: -0.99999994, z: -0.33162558} + - {x: -1.4838715, y: -1.0000001, z: -1.8762465} + - {x: -1.4838715, y: -0.9999999, z: 1.9622802} + - {x: -2.0891418, y: -0.9999999, z: -0.29963413} + - {x: 0.41778564, y: -1, z: -0.29817054} + - {x: -0.012435913, y: -1, z: -1.8805774} + - {x: 0.41778564, y: -0.9999999, z: 1.9622802} + - {x: -0.012435913, y: -0.9999998, z: 0.851935} + - {x: -0.47296143, y: -1, z: -0.29817054} + - {x: -0.903183, y: -1, z: -1.8805774} + - {x: -0.47296143, y: -0.9999999, z: 1.9622802} + - {x: -0.903183, y: -0.9999998, z: 0.851935} + - {x: 1.2693787, y: 0.04670307, z: -1.8722168} + - {x: 2.1510468, y: 0.05001828, z: -0.33162546} + - {x: 1.2693787, y: 0.046703577, z: 1.96228} + - {x: -2.0891418, y: 0.04670313, z: -1.8762465} + - {x: -1.4838715, y: 0.05001828, z: -0.299634} + - {x: -2.0891418, y: 0.046703577, z: 1.96228} + - {x: 0.41778564, y: 0.050018072, z: -1.8805772} + - {x: -0.012435913, y: 0.04670334, z: -0.29817054} + - {x: 0.41778564, y: 0.05001843, z: 0.85193515} + - {x: -0.012435913, y: 0.046703577, z: 1.96228} + - {x: -0.47296143, y: 0.050018072, z: -1.8805772} + - {x: -0.903183, y: 0.04670334, z: -0.29817054} + - {x: -0.47296143, y: 0.05001843, z: 0.85193515} + - {x: -0.903183, y: 0.046703577, z: 1.96228} + m_Dering: 1 +--- !u!1001 &1238984323 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 53 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -32.48001 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -9.689999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.0028667273 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.99999595 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -179.672 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (53)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1238984324 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1238984323} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1241040080 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1055010243972575625, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + m_PrefabInstance: {fileID: 159466233} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1241040084 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1241040080} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cf1df5cdcab28254cb3cc96edfa143da, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: + _highlight: {fileID: 0} + deviceType: 0 + isMoving: 0 + isOpen: 0 + zhouEnum: 2 + angele: -90 + duration: 1 + testPosAndRot: {fileID: 0} + hasElectricity: 0 + group: {fileID: 0} +--- !u!65 &1241040085 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1241040080} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.7044029, y: 0.224, z: 2.275163} + m_Center: {x: -0.35220146, y: 0.022552501, z: 0.053770185} +--- !u!114 &1241040086 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1241040080} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0.5 + cullBackFaces: 0 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 2 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 1 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!1001 &1251462911 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 13 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 105.84 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -36.409996 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9630606 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.2692849 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 31.243 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (13)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1251462912 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1251462911} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1266354605 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1266354606} + - component: {fileID: 1266354607} + m_Layer: 7 + m_Name: "\u8282\u70B92" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1266354606 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1266354605} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.11273543, y: -0.0476755, z: -0.0075166705} + m_LocalScale: {x: 146.43997, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6650476538356560213} + - {fileID: 1452093734} + m_Father: {fileID: 4747287885685369931} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1266354607 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1266354605} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: 0, y: 0, z: 0} + noConnectLocalAngle: {x: 0, y: 0, z: 13.42} +--- !u!1001 &1268776137 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 20 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 137.84999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -43.510002 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.74890715 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.66267496 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 83.008 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (20)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1268776138 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1268776137} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1272626930 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 60 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -18.050003 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -24.14 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (60)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1272626931 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1272626930} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1284082835 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 34 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 88.20999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -49.050003 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9988895 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.04711464 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -5.401 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (34)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1284082836 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1284082835} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1284177667 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1284177668} + - component: {fileID: 1284177669} + m_Layer: 7 + m_Name: "\u8282\u70B92" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1284177668 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1284177667} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0.019418156, y: -0.05749141, z: -0.015664123} + m_LocalScale: {x: 146.43997, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8339329295935652015} + - {fileID: 345567140} + m_Father: {fileID: 98703590638354738} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!114 &1284177669 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1284177667} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: -90, y: 0, z: 0} + noConnectLocalAngle: {x: -21.169, y: -90, z: 90} +--- !u!1 &1287374198 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1287374199} + - component: {fileID: 1287374200} + m_Layer: 7 + m_Name: "\u8282\u70B91" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1287374199 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1287374198} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.0007094581, y: -0.000033035307, z: 0.00008319978} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5286605781624325523} + m_Father: {fileID: 1870185559} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1287374200 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1287374198} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: 0, y: 0, z: 0} + noConnectLocalAngle: {x: 0, y: -15.226, z: 0} +--- !u!1001 &1302314402 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 897986307} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: f34caaed6235134468dbd98fb600152a, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f34caaed6235134468dbd98fb600152a, type: 3} + propertyPath: m_LocalPosition.x + value: -0.007545978 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f34caaed6235134468dbd98fb600152a, type: 3} + propertyPath: m_LocalPosition.y + value: 0.17798197 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f34caaed6235134468dbd98fb600152a, type: 3} + propertyPath: m_LocalPosition.z + value: 0.13521229 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f34caaed6235134468dbd98fb600152a, type: 3} + propertyPath: m_LocalRotation.w + value: 0.1658498 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f34caaed6235134468dbd98fb600152a, type: 3} + propertyPath: m_LocalRotation.x + value: 0.00840973 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f34caaed6235134468dbd98fb600152a, type: 3} + propertyPath: m_LocalRotation.y + value: -0.98537236 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f34caaed6235134468dbd98fb600152a, type: 3} + propertyPath: m_LocalRotation.z + value: 0.038267113 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f34caaed6235134468dbd98fb600152a, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -70.4 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f34caaed6235134468dbd98fb600152a, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -103.482 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f34caaed6235134468dbd98fb600152a, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -77.496 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: f34caaed6235134468dbd98fb600152a, type: 3} + propertyPath: m_Name + value: "\u7535\u7F51logo2" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f34caaed6235134468dbd98fb600152a, type: 3} +--- !u!1001 &1302370108 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 114.517624 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -41.86445 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9668855 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.2552106 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 29.572 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (4)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1302370109 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1302370108} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1310963237 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 42 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 79.479996 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -45.870003 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.24048798 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.97065216 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -152.169 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (42)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1310963238 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1310963237} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1312493578 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1189213516} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 4d40967eea1bdb34ca0f08e1591389a3, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4d40967eea1bdb34ca0f08e1591389a3, type: 3} + propertyPath: m_LocalPosition.x + value: 0.3117218 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4d40967eea1bdb34ca0f08e1591389a3, type: 3} + propertyPath: m_LocalPosition.y + value: 0.117070794 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4d40967eea1bdb34ca0f08e1591389a3, type: 3} + propertyPath: m_LocalPosition.z + value: 0.20265579 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4d40967eea1bdb34ca0f08e1591389a3, type: 3} + propertyPath: m_LocalRotation.w + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4d40967eea1bdb34ca0f08e1591389a3, type: 3} + propertyPath: m_LocalRotation.x + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4d40967eea1bdb34ca0f08e1591389a3, type: 3} + propertyPath: m_LocalRotation.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4d40967eea1bdb34ca0f08e1591389a3, type: 3} + propertyPath: m_LocalRotation.z + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4d40967eea1bdb34ca0f08e1591389a3, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4d40967eea1bdb34ca0f08e1591389a3, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4d40967eea1bdb34ca0f08e1591389a3, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 4d40967eea1bdb34ca0f08e1591389a3, type: 3} + propertyPath: m_Name + value: "\u63A5\u7EBF\u76D2" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 4d40967eea1bdb34ca0f08e1591389a3, type: 3} +--- !u!4 &1312493579 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 4d40967eea1bdb34ca0f08e1591389a3, type: 3} + m_PrefabInstance: {fileID: 1312493578} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1316134869 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (15) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 70.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -182.9 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1316134870 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1316134869} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1316308997 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 76 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -22.12001 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -42.79 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (76)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1316308998 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1316308997} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1320562300 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_Name + value: AlaskaCedar_Desktop_Young (8) + objectReference: {fileID: 0} + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_RootOrder + value: 76 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.x + value: -129.2 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.z + value: -100 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} +--- !u!4 &1320562301 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + m_PrefabInstance: {fileID: 1320562300} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1322853380 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1322853381} + - component: {fileID: 1322853382} + m_Layer: 7 + m_Name: "\u8282\u70B91" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1322853381 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1322853380} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.0014477936, y: -0.00012817391, z: -0.00008100038} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2462907909773885537} + m_Father: {fileID: 810356988} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1322853382 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1322853380} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: 0, y: 0, z: 0} + noConnectLocalAngle: {x: 0, y: 4.734, z: 0} +--- !u!1001 &1323181882 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: -16.95 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -96.69 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &1323181883 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 1323181882} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1325901523 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 38 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 91.28 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -32.65 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9376161 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.34767252 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -40.69 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (38)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1325901524 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1325901523} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1347163144 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1347163146} + - component: {fileID: 1347163145} + m_Layer: 0 + m_Name: "\u5BA4\u5185Reflection Probe" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!215 &1347163145 +ReflectionProbe: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1347163144} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 0 + m_RefreshMode: 0 + m_TimeSlicingMode: 0 + m_Resolution: 128 + m_UpdateFrequency: 0 + m_BoxSize: {x: 4.6793365, y: 5.1795363, z: 8.602741} + m_BoxOffset: {x: -1.1408234, y: 0.5632603, z: -1.4889221} + m_NearClip: 0.3 + m_FarClip: 1000 + m_ShadowDistance: 100 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_IntensityMultiplier: 1 + m_BlendDistance: 1 + m_HDR: 1 + m_BoxProjection: 0 + m_RenderDynamicObjects: 0 + m_UseOcclusionCulling: 1 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} +--- !u!4 &1347163146 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1347163144} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -175.24895, y: 1.3057537, z: -54.35441} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1386435664} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1358859177 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 35 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: -16.95 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -114.23 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (11)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &1358859178 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 1358859177} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1362544316 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 24 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 167.87312 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -43.36489 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.8605367 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.5093885 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 61.246 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (24)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1362544317 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1362544316} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1380313811 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (10) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 40 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 20.8 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -130.9 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1380313812 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1380313811} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1382836294 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (35) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 38 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -31.1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1382836295 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1382836294} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1386435663 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1386435664} + m_Layer: 0 + m_Name: Environment + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1386435664 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1386435663} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 227206375} + - {fileID: 961206655} + - {fileID: 1122362120} + - {fileID: 1232874496} + - {fileID: 1577187093} + - {fileID: 1973274448} + - {fileID: 656029487} + - {fileID: 1347163146} + - {fileID: 1958409358} + - {fileID: 28351940} + - {fileID: 1659092933} + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1388340784 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (11) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 41 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 64 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -130.9 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1388340785 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1388340784} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1392823744 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 82 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -7.25 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -27.16 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (82)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1392823745 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1392823744} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1392851291 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1392851292} + - component: {fileID: 1392851295} + - component: {fileID: 1392851294} + - component: {fileID: 1392851293} + m_Layer: 0 + m_Name: "\u7A7A\u6C14\u5899 (7)" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1392851292 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392851291} + m_LocalRotation: {x: -0, y: -0.7119194, z: -0, w: 0.70226115} + m_LocalPosition: {x: -75.31, y: 1.627, z: -89.73} + m_LocalScale: {x: 31.999699, y: 5.177114, z: 5.5261793} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1453735014} + m_RootOrder: 12 + m_LocalEulerAnglesHint: {x: 0, y: -90.783, z: 0} +--- !u!65 &1392851293 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392851291} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1392851294 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392851291} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1392851295 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392851291} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &1397631810 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 37 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 95.98999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -28.260002 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.74455714 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.6675587 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -83.758 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (37)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1397631811 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1397631810} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1397763685 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 46 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 66.31 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -46.409996 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.027930798 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9996099 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -176.799 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (46)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1397763686 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1397763685} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1399251339 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 66 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -35.740005 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -5.8600006 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.0028667273 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.99999595 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -179.672 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (66)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1399251340 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1399251339} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1415637078 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_RootOrder + value: 34 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalPosition.x + value: -57.78 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalPosition.y + value: 0.44 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalPosition.z + value: -115.5 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8579978593060138814, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n2 (3)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} +--- !u!4 &1415637079 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 8152975293973017513, guid: 2e8a541b3379490419d805f9d32a8c82, type: 3} + m_PrefabInstance: {fileID: 1415637078} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1417925980 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1417925981} + - component: {fileID: 1417925984} + - component: {fileID: 1417925983} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &1417925981 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1417925980} + m_LocalRotation: {x: -0, y: -0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 890581128} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1417925983 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1417925980} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1417925984 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1417925980} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1425746104 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1425746105} + - component: {fileID: 1425746108} + - component: {fileID: 1425746107} + - component: {fileID: 1425746106} + m_Layer: 0 + m_Name: "\u5899\u78B0\u649E (1)" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1425746105 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1425746104} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -176.391, y: 2.2225, z: -60.218} + m_LocalScale: {x: 4.8945975, y: 4.099373, z: 0.21191} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1453735014} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &1425746106 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1425746104} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1425746107 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1425746104} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1425746108 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1425746104} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &1437659661 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 29 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 110.64 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -18.400002 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.88852966 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.4588193 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -54.622 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (29)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1437659662 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1437659661} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1443161524 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1443161530} + - component: {fileID: 1443161529} + - component: {fileID: 1443161528} + - component: {fileID: 1443161527} + - component: {fileID: 1443161525} + - component: {fileID: 1443161526} + m_Layer: 0 + m_Name: "\u68C0\u67E5\u63A5\u7EBF\u5B8C\u597D" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1443161525 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1443161524} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f00c6998a11da1f49be16976546d5f34, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "\u68C0\u67E5\u63A5\u7EBF" + _highlight: {fileID: 0} + isChecked: 0 +--- !u!114 &1443161526 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1443161524} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 1 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!65 &1443161527 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1443161524} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1443161528 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1443161524} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: c3418e6ed2aef6345a0f851ed6a26394, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1443161529 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1443161524} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1443161530 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1443161524} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.02046, y: -0.00416, z: 0.02886} + m_LocalScale: {x: 0.10836358, y: 0.021279307, z: 0.013582791} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1584432035} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1452093733 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1452093734} + - component: {fileID: 1452093735} + m_Layer: 7 + m_Name: "\u8282\u70B91" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1452093734 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1452093733} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.00076950155, y: 0.00005959994, z: 0.000052719155} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1488334974511809544} + m_Father: {fileID: 1266354606} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1452093735 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1452093733} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: 0, y: 0, z: 0} + noConnectLocalAngle: {x: 0, y: 0, z: -12.026} +--- !u!1 &1453735013 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1453735014} + m_Layer: 0 + m_Name: "\u78B0\u649E\u5899 (1)" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1453735014 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1453735013} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2057780907} + - {fileID: 1425746105} + - {fileID: 882038158} + - {fileID: 984283002} + - {fileID: 557971044} + - {fileID: 987454038} + - {fileID: 1915720483} + - {fileID: 1763597784} + - {fileID: 127107672} + - {fileID: 2108072794} + - {fileID: 119767344} + - {fileID: 1610734687} + - {fileID: 1392851292} + - {fileID: 1473619280} + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1459827181 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 44 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 72.92 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -46.32 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.24048798 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.97065216 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -152.169 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (44)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1459827182 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1459827181} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1461189883 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (50) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 85 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 143.6 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -159.5 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1461189884 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1461189883} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1464158384 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (47) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 82 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -83.6 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -179 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9874304 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0.15805455 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -18.188 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1464158385 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1464158384} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1473619279 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1473619280} + - component: {fileID: 1473619283} + - component: {fileID: 1473619282} + - component: {fileID: 1473619281} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1473619280 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1473619279} + m_LocalRotation: {x: -0, y: -0.015914662, z: -0, w: 0.9998734} + m_LocalPosition: {x: -67.2901, y: 2.5458, z: -102.4228} + m_LocalScale: {x: 55.692703, y: 5.3410597, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1453735014} + m_RootOrder: 13 + m_LocalEulerAnglesHint: {x: 0, y: -1.824, z: 0} +--- !u!65 &1473619281 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1473619279} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1473619282 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1473619279} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1473619283 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1473619279} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &1473960861 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 91 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 14.360001 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -9.549999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (93)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1473960862 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1473960861} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1476199133 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 106 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -2.1699982 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -5.8899994 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.014541227 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9998943 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -178.334 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (106)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1476199134 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1476199133} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1481893485 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_Name + value: AlaskaCedar_Desktop_Young (10) + objectReference: {fileID: 0} + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_RootOrder + value: 78 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.x + value: -129 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.z + value: -116.9 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} +--- !u!4 &1481893486 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + m_PrefabInstance: {fileID: 1481893485} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1485367675 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (29) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 59 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -140 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -41.3 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1485367676 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1485367675} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1498167926 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 58 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -26.64 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -27.36 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.0028667273 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.99999595 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -179.672 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (58)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1498167927 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1498167926} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1501092961 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1180096482, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1501092967, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1927580342, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945565, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_Name + value: Player + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalPosition.x + value: -43.020226 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalPosition.y + value: 0.88138634 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalPosition.z + value: -90.07991 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalRotation.w + value: -0.014337449 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalRotation.y + value: -0.99989724 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 1155.7 + objectReference: {fileID: 0} + - target: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2399593117623680741, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: near clip plane + value: 0.01 + objectReference: {fileID: 0} + - target: {fileID: 2399593117623680743, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_Antialiasing + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 2399593117623680743, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + propertyPath: m_RenderPostProcessing + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} +--- !u!4 &1501092963 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2399593117452945566, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + m_PrefabInstance: {fileID: 1501092961} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1517282834 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 32 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: 85.6 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -112.24 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (10)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &1517282835 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 1517282834} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1518280691 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (21) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 51 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -157.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -65.6 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1518280692 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1518280691} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1524156817 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 81 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -12.930008 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -27.16 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (81)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1524156818 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1524156817} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1524158880 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 41 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 83.649994 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -42.449997 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7602474 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.6496337 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -81.028 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (41)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1524158881 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1524158880} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1526031816 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 227206375} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: fe374bf9fc032e54791660e234c97d85, type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe374bf9fc032e54791660e234c97d85, type: 3} + propertyPath: m_LocalPosition.x + value: 22.808786 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe374bf9fc032e54791660e234c97d85, type: 3} + propertyPath: m_LocalPosition.y + value: -67.699326 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe374bf9fc032e54791660e234c97d85, type: 3} + propertyPath: m_LocalPosition.z + value: -74.960785 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe374bf9fc032e54791660e234c97d85, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe374bf9fc032e54791660e234c97d85, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe374bf9fc032e54791660e234c97d85, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe374bf9fc032e54791660e234c97d85, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe374bf9fc032e54791660e234c97d85, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe374bf9fc032e54791660e234c97d85, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: fe374bf9fc032e54791660e234c97d85, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: fe374bf9fc032e54791660e234c97d85, type: 3} + propertyPath: m_Name + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: fe374bf9fc032e54791660e234c97d85, type: 3} +--- !u!4 &1526031817 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: fe374bf9fc032e54791660e234c97d85, type: 3} + m_PrefabInstance: {fileID: 1526031816} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1544618357 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: 16.98 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -95.81 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (3)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &1544618358 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 1544618357} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1546770818 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (22) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 52 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -164.2 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -42.8 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1546770819 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1546770818} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1564351360 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_Name + value: AlaskaCedar_Desktop_Young (6) + objectReference: {fileID: 0} + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_RootOrder + value: 74 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.x + value: -89.4 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.z + value: -115.9 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} +--- !u!4 &1564351361 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + m_PrefabInstance: {fileID: 1564351360} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1569360874 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 85 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 5.8799896 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -22.52 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (85)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1569360875 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1569360874} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1575167083 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1575167084} + - component: {fileID: 1575167086} + - component: {fileID: 1575167085} + m_Layer: 0 + m_Name: BR-016 (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &1575167084 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1575167083} + m_LocalRotation: {x: 0, y: -0.02946718, z: -0, w: 0.9995658} + m_LocalPosition: {x: -104.3, y: -19.995834, z: 182.2} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 421580181} + m_RootOrder: 34 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1575167085 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1575167083} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 279e4fefbd269b14aa887165a9a5565e, type: 2} + - {fileID: 2100000, guid: 6f22d84ddd524fd48910e6aa03a20829, type: 2} + - {fileID: 2100000, guid: ec6a6428ece7f514d9b5d971a026f33e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1575167086 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1575167083} + m_Mesh: {fileID: -6959392983967209446, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} +--- !u!1 &1577187092 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1577187093} + - component: {fileID: 1577187095} + - component: {fileID: 1577187094} + m_Layer: 0 + m_Name: Area Light (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1577187093 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1577187092} + m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: -176.46, y: 4.206, z: -52.94} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1386435664} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!114 &1577187094 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1577187092} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} +--- !u!108 &1577187095 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1577187092} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 3 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 2 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.02 + m_NormalBias: 0.1 + m_NearPlane: 0.1 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 2 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 3.9054878, y: 2.307826} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &1584432034 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1584432035} + - component: {fileID: 1584432037} + m_Layer: 0 + m_Name: "\u7535\u7BB1" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1584432035 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1584432034} + m_LocalRotation: {x: 0, y: -1, z: 0, w: 0} + m_LocalPosition: {x: -42.9, y: 1.626, z: -101.052} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3322083525341225165} + - {fileID: 543450653146961812} + - {fileID: 8820952056044702012} + - {fileID: 1015476911} + - {fileID: 1639812602} + - {fileID: 1443161530} + - {fileID: 723535377} + - {fileID: 2591019038652623238} + - {fileID: 1893456732} + - {fileID: 5008542128686470641} + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: -180, z: 0} +--- !u!114 &1584432037 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1584432034} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2a632905a0cc8dc4ea587d7d92c08982, type: 3} + m_Name: + m_EditorClassIdentifier: + hasInit: 0 + collector: {fileID: 1893456730} + device_collectorTrigger: {fileID: 1971629290} + collector_transform: {fileID: 1584432035} + meteringDevice: {fileID: 3322083525341225164} + socket: {fileID: 1015476914} + inSwitch: {fileID: 1639812606} + jieXian_lines: + - {fileID: 7828154217890752842} + - {fileID: 9056950828145047996} + - {fileID: 7700093358639259306} + - {fileID: 4282998662405287153} + - {fileID: 873583606023215499} + - {fileID: 7186252140739360087} + - {fileID: 1835685155622220431} + - {fileID: 8114224637867779678} + dianTrigger: {fileID: 723535378} + sundries: {fileID: 737359439} + inSwitchScrews: [] + check_JieXian: {fileID: 1443161525} + door_screw: {fileID: 711328484} + cabinetDoor: {fileID: 595210374} + door_seal: {fileID: 1779049932} + door_seal_trigger: {fileID: 1884165005} +--- !u!1001 &1589741009 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 98 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -13.180008 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -3.1800003 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.014541227 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9998943 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -178.334 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (98)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1589741010 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1589741009} + m_PrefabAsset: {fileID: 0} +--- !u!95 &1594247407 +Animator: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132148467463612} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 929b30606ed3b3544b3e3c185b9b3053, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 +--- !u!1001 &1608080314 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (51) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 86 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 138.9 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -181.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1608080315 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1608080314} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1610734686 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1610734687} + - component: {fileID: 1610734690} + - component: {fileID: 1610734689} + - component: {fileID: 1610734688} + m_Layer: 0 + m_Name: "\u7A7A\u6C14\u5899 (6)" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1610734687 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1610734686} + m_LocalRotation: {x: -0, y: -0.7119194, z: -0, w: 0.70226115} + m_LocalPosition: {x: -27.38, y: 1.627, z: -89.08} + m_LocalScale: {x: 31.999699, y: 5.177114, z: 5.5261793} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1453735014} + m_RootOrder: 11 + m_LocalEulerAnglesHint: {x: 0, y: -90.783, z: 0} +--- !u!65 &1610734688 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1610734686} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1610734689 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1610734686} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1610734690 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1610734686} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &1628476945 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 93 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 30.849998 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -4.9300003 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (94)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1628476946 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1628476945} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1635280773 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (36) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 66 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 64.2 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -28.8 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1635280774 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1635280773} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1638246611 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1638246612} + - component: {fileID: 1638246613} + m_Layer: 0 + m_Name: GanTanhao + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1638246612 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1638246611} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1.176, z: 0} + m_LocalScale: {x: 0.30000013, y: 0.3, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 890581128} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!212 &1638246613 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1638246611} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: 5836d6344f7a5b149b3976f56f6b0326, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2, y: 2} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1001 &1639812601 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1584432035} + m_Modifications: + - target: {fileID: 76098880207111981, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 291486433402094323, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: 0.008 + objectReference: {fileID: 0} + - target: {fileID: 291486433402094323, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: -0.038 + objectReference: {fileID: 0} + - target: {fileID: 464730649119265222, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: -0.0051 + objectReference: {fileID: 0} + - target: {fileID: 464730649119265222, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: 0.0666 + objectReference: {fileID: 0} + - target: {fileID: 766372402841369938, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: -0.0062 + objectReference: {fileID: 0} + - target: {fileID: 766372402841369938, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: -0.0549 + objectReference: {fileID: 0} + - target: {fileID: 934995501590735350, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: -0.0051 + objectReference: {fileID: 0} + - target: {fileID: 934995501590735350, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: 0.058 + objectReference: {fileID: 0} + - target: {fileID: 1022599661122291062, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1093676091756976995, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: -0.0051 + objectReference: {fileID: 0} + - target: {fileID: 1093676091756976995, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: 0.0838 + objectReference: {fileID: 0} + - target: {fileID: 1434598506340831815, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: 0.008 + objectReference: {fileID: 0} + - target: {fileID: 1434598506340831815, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: -0.038 + objectReference: {fileID: 0} + - target: {fileID: 1475160883693217875, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 1475160883693217875, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 1475160883693217875, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1475160883693217875, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1475160883693217875, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -90 + objectReference: {fileID: 0} + - target: {fileID: 1475160883693217875, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1526881452205694441, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 1526881452205694441, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 1526881452205694441, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1526881452205694441, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1526881452205694441, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -90 + objectReference: {fileID: 0} + - target: {fileID: 1526881452205694441, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1715693147780050847, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2148749421170049319, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2461615083108572310, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2586786277745996098, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2719892636039955731, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2736531572888914448, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3631663089922111655, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: -0.0062 + objectReference: {fileID: 0} + - target: {fileID: 3631663089922111655, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: -0.0377 + objectReference: {fileID: 0} + - target: {fileID: 4227247686377938468, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4251360167891514632, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4529020011155021449, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4547423319590743901, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: 0.008 + objectReference: {fileID: 0} + - target: {fileID: 4547423319590743901, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: -0.0894 + objectReference: {fileID: 0} + - target: {fileID: 4581370433528338117, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: 0.0091 + objectReference: {fileID: 0} + - target: {fileID: 4581370433528338117, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: 0.0492 + objectReference: {fileID: 0} + - target: {fileID: 4596848900066290366, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4886829077502262985, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5042973976623414328, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: 0.008 + objectReference: {fileID: 0} + - target: {fileID: 5042973976623414328, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: -0.0551 + objectReference: {fileID: 0} + - target: {fileID: 5050291276899349093, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5507591794618694001, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5820553168798234453, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5909457142689649870, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5948617164823036609, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 5948617164823036609, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 5948617164823036609, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5948617164823036609, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5948617164823036609, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -90 + objectReference: {fileID: 0} + - target: {fileID: 5948617164823036609, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5948617164823036622, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5948617164962113010, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: isMoveAng + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5948617164962113010, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: triggerID + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5948617164962113010, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: OpenLocalPos + value: + objectReference: {fileID: 0} + - target: {fileID: 5948617164962113010, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: CloseLocalPos + value: + objectReference: {fileID: 0} + - target: {fileID: 5948617164962113010, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: CloselcoalAng.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 5948617165021199511, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: triggerName + value: "in\u5F00\u5173_\u87BA\u4E1D1" + objectReference: {fileID: 0} + - target: {fileID: 5948617165317844720, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: triggerName + value: "in\u5F00\u5173_\u87BA\u4E1D2" + objectReference: {fileID: 0} + - target: {fileID: 5948617165317844723, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: triggerName + value: "in\u5F00\u5173_\u87BA\u4E1D3" + objectReference: {fileID: 0} + - target: {fileID: 5948617165317844724, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: OpenLocalPos + value: + objectReference: {fileID: 0} + - target: {fileID: 5948617165317844724, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: CloseLocalPos + value: + objectReference: {fileID: 0} + - target: {fileID: 5948617165317844724, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: CloselcoalAng.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 5991669883772443596, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6006481768991761335, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6120286115428417299, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: 0.008 + objectReference: {fileID: 0} + - target: {fileID: 6120286115428417299, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: -0.072 + objectReference: {fileID: 0} + - target: {fileID: 6126868798989584877, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 6126868798989584877, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: -0.0331 + objectReference: {fileID: 0} + - target: {fileID: 6126868798989584877, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: -0.12830424 + objectReference: {fileID: 0} + - target: {fileID: 6126868798989584877, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.z + value: 0.0318 + objectReference: {fileID: 0} + - target: {fileID: 6126868798989584877, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.w + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6126868798989584877, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.x + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 6126868798989584877, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6126868798989584877, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalRotation.z + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6126868798989584877, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -90 + objectReference: {fileID: 0} + - target: {fileID: 6126868798989584877, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6126868798989584877, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 6156941444892379820, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: 0.0091 + objectReference: {fileID: 0} + - target: {fileID: 6156941444892379820, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: 0.0664 + objectReference: {fileID: 0} + - target: {fileID: 6351552948761746105, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6454489170282308740, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6481124198019512998, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6516105333053171593, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: 0.025 + objectReference: {fileID: 0} + - target: {fileID: 6516105333053171593, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: -0.0463 + objectReference: {fileID: 0} + - target: {fileID: 6587608156892483654, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: 0.0261 + objectReference: {fileID: 0} + - target: {fileID: 6587608156892483654, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: 0.0752 + objectReference: {fileID: 0} + - target: {fileID: 6601498785956142394, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6795036949448135511, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_Name + value: "\u7A7A\u5F00 (1)" + objectReference: {fileID: 0} + - target: {fileID: 6795036949448135511, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6807701940238858731, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6825603828634789626, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: -0.0067 + objectReference: {fileID: 0} + - target: {fileID: 6825603828634789626, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: -0.0635 + objectReference: {fileID: 0} + - target: {fileID: 7141048459737150333, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7243223785199714966, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: 0.008 + objectReference: {fileID: 0} + - target: {fileID: 7243223785199714966, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: -0.0551 + objectReference: {fileID: 0} + - target: {fileID: 7308428600824140457, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: 0.008 + objectReference: {fileID: 0} + - target: {fileID: 7308428600824140457, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: -0.072 + objectReference: {fileID: 0} + - target: {fileID: 7957138250020952789, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8101902270376114664, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: 0.0091 + objectReference: {fileID: 0} + - target: {fileID: 8101902270376114664, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: 0.0492 + objectReference: {fileID: 0} + - target: {fileID: 8143731825971019217, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: 0.008 + objectReference: {fileID: 0} + - target: {fileID: 8143731825971019217, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: -0.0894 + objectReference: {fileID: 0} + - target: {fileID: 8624674173080473637, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: -0.0062 + objectReference: {fileID: 0} + - target: {fileID: 8624674173080473637, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: -0.0806 + objectReference: {fileID: 0} + - target: {fileID: 8692433372993717280, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.x + value: 0.0091 + objectReference: {fileID: 0} + - target: {fileID: 8692433372993717280, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_LocalPosition.y + value: 0.0835 + objectReference: {fileID: 0} + - target: {fileID: 8919936616990869463, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9033772287738834289, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9128698550455627366, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} +--- !u!4 &1639812602 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6126868798989584877, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + m_PrefabInstance: {fileID: 1639812601} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1639812606 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 5948617164962113010, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3} + m_PrefabInstance: {fileID: 1639812601} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e83ad6c42a2ebf24191e9a0b21b2f7b5, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &1642561835 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 18 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 128.37999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -44.33 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.038341355 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.9992647 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 184.395 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (18)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1642561836 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1642561835} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1642934315 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 67 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -39.380005 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -9.689999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.0028667273 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.99999595 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -179.672 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (67)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1642934316 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1642934315} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1650591909 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1189213516} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: a88648246c337eb45a166146d510d16d, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a88648246c337eb45a166146d510d16d, type: 3} + propertyPath: m_LocalPosition.x + value: 0.3261261 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a88648246c337eb45a166146d510d16d, type: 3} + propertyPath: m_LocalPosition.y + value: 0.36081088 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a88648246c337eb45a166146d510d16d, type: 3} + propertyPath: m_LocalPosition.z + value: -0.18273926 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a88648246c337eb45a166146d510d16d, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a88648246c337eb45a166146d510d16d, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a88648246c337eb45a166146d510d16d, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a88648246c337eb45a166146d510d16d, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a88648246c337eb45a166146d510d16d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a88648246c337eb45a166146d510d16d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a88648246c337eb45a166146d510d16d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: a88648246c337eb45a166146d510d16d, type: 3} + propertyPath: m_Name + value: "\u5F00\u5173\u5668" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: a88648246c337eb45a166146d510d16d, type: 3} +--- !u!4 &1650591910 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: a88648246c337eb45a166146d510d16d, type: 3} + m_PrefabInstance: {fileID: 1650591909} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1650911789 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 37 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: 29.2 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -113.14 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (13)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &1650911790 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 1650911789} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1653940704 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 47 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 57.35 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -47.79 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.027930798 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9996099 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -176.799 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (47)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1653940705 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1653940704} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1659092932 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1659092933} + - component: {fileID: 1659092935} + - component: {fileID: 1659092934} + m_Layer: 0 + m_Name: Area Light (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1659092933 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1659092932} + m_LocalRotation: {x: 0.5000007, y: -0.4999993, z: -0.4999993, w: 0.5000007} + m_LocalPosition: {x: -174.362, y: 1.835, z: -56} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1386435664} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 0, y: -90, z: -90} +--- !u!114 &1659092934 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1659092932} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} +--- !u!108 &1659092935 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1659092932} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 3 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 0.5 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.02 + m_NormalBias: 0.1 + m_NearPlane: 0.1 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 2 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 2.9976535, y: 6.783925} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1001 &1678022385 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_Name + value: AlaskaCedar_Desktop_Young (3) + objectReference: {fileID: 0} + - target: {fileID: 5309567860478790525, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_RootOrder + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.x + value: -56.91 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalPosition.z + value: -133.68 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} +--- !u!4 &1678022386 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9220000996837407086, guid: 5f0ed426620ac56488cf672d05ef617d, type: 3} + m_PrefabInstance: {fileID: 1678022385} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1682562278 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1682562279} + - component: {fileID: 1682562281} + - component: {fileID: 1682562280} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1682562279 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1682562278} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.037, z: 0} + m_LocalScale: {x: 0.1505772, y: 0.08149278, z: 0.2480063} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 723535377} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1682562280 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1682562278} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: c3418e6ed2aef6345a0f851ed6a26394, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1682562281 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1682562278} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &1685711353 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (42) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 72 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 114.2 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -116.6 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1685711354 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1685711353} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1703712484 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 83 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 0.7899933 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -29.800003 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (83)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1703712485 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1703712484} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1721553704 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (14) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 44 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 69.2 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -157.1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1721553705 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1721553704} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1737325935 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (17) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 47 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 118.8 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -184.9 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1737325936 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1737325935} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1748610666 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1748610667} + - component: {fileID: 1748610668} + m_Layer: 7 + m_Name: "\u8282\u70B91" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1748610667 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1748610666} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.0015013138, y: -0.00006896977, z: 0.000053800417} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3223214614432192775} + m_Father: {fileID: 714447600} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1748610668 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1748610666} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: 0, y: 0, z: 0} + noConnectLocalAngle: {x: 0, y: -5.272, z: 0} +--- !u!1 &1763597783 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1763597784} + - component: {fileID: 1763597787} + - component: {fileID: 1763597786} + - component: {fileID: 1763597785} + m_Layer: 0 + m_Name: "\u7A7A\u6C14\u5899 (2)" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1763597784 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1763597783} + m_LocalRotation: {x: -0, y: -0.7119194, z: -0, w: 0.70226115} + m_LocalPosition: {x: -173.9, y: 1.6, z: -39.9} + m_LocalScale: {x: 1, y: 5.1228123, z: 47.191967} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1453735014} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: -90.783, z: 0} +--- !u!65 &1763597785 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1763597783} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1763597786 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1763597783} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1763597787 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1763597783} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &1769904076 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: -4.26 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -95.6 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (1)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &1769904077 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 1769904076} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1771089975 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1771089976} + - component: {fileID: 1771089978} + - component: {fileID: 1771089977} + m_Layer: 0 + m_Name: BR-031 (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &1771089976 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1771089975} + m_LocalRotation: {x: -0, y: -0.017167032, z: -0, w: 0.99985266} + m_LocalPosition: {x: 10.3, y: -19.995834, z: 190.4} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 421580181} + m_RootOrder: 32 + m_LocalEulerAnglesHint: {x: 0, y: -1.967, z: 0} +--- !u!23 &1771089977 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1771089975} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6f22d84ddd524fd48910e6aa03a20829, type: 2} + - {fileID: 2100000, guid: 279e4fefbd269b14aa887165a9a5565e, type: 2} + - {fileID: 2100000, guid: e9e3411871cce204784983ab585c7cc5, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1771089978 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1771089975} + m_Mesh: {fileID: 3019228731682637673, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} +--- !u!1 &1779049930 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1779049931} + - component: {fileID: 1779049936} + - component: {fileID: 1779049935} + - component: {fileID: 1779049934} + - component: {fileID: 1779049933} + - component: {fileID: 1779049932} + m_Layer: 8 + m_Name: "\u67DC\u95E8\u5C01\u5370" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1779049931 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1779049930} + m_LocalRotation: {x: -0, y: -0, z: -1, w: 0} + m_LocalPosition: {x: 0.1923006, y: 0.030107297, z: -0.028839588} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 476775472} + m_Father: {fileID: 543450653146961812} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1779049932 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1779049930} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b817d2af1a955fc40bcde4e10b3d3db4, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "\u67DC\u95E8\u5C01\u5370" + _highlight: {fileID: 0} + deviceType: 8 + isMoving: 0 + isCut: 0 + testPosAndRot: {fileID: 476775472} +--- !u!114 &1779049933 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1779049930} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 1 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!65 &1779049934 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1779049930} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.01215125, y: 0.008852866, z: 0.02775514} + m_Center: {x: 0.0000000041909516, y: -0.0000000055879354, z: 0.00000006053597} +--- !u!23 &1779049935 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1779049930} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 14b7ce7899ab5104e866597407f38385, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1779049936 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1779049930} + m_Mesh: {fileID: -4076435291616448373, guid: 3022de55b8046f04485b93331386de5f, type: 3} +--- !u!1001 &1786166417 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (13) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 43 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 26 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -157.1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1786166418 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1786166417} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1787950694 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 78 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -14.169998 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -40.46 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (78)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1787950695 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1787950694} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1793690612 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (8) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 20 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 89.5 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -73.8 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1793690613 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1793690612} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1797637237 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 104 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalScale.x + value: 0.49999988 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalScale.z + value: 0.49999988 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 22.430664 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -4.243683 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.5022955 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.8646961 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -119.696 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (104)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1797637238 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1797637237} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1801946538 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 22 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 153.56999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -44.269997 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9965987 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.082407966 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 9.454 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (22)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1801946539 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1801946538} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1806878036 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 23 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 197.09999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -40.93 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9965987 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.082407966 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 9.454 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (23)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1806878037 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1806878036} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1807692836 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 112.619995 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0.08124912 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -29.989998 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.6869037 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: 0.030650819 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.7253854 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0.032246202 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0.268 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 266.89 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 5.093 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (11)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1807692837 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1807692836} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1825757253 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1825757254} + - component: {fileID: 1825757256} + - component: {fileID: 1825757255} + m_Layer: 0 + m_Name: BR-016 (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!4 &1825757254 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1825757253} + m_LocalRotation: {x: 0, y: -0.02946718, z: -0, w: 0.9995658} + m_LocalPosition: {x: -54, y: -19.995834, z: 185.4} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 421580181} + m_RootOrder: 33 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1825757255 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1825757253} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 279e4fefbd269b14aa887165a9a5565e, type: 2} + - {fileID: 2100000, guid: 6f22d84ddd524fd48910e6aa03a20829, type: 2} + - {fileID: 2100000, guid: ec6a6428ece7f514d9b5d971a026f33e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1825757256 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1825757253} + m_Mesh: {fileID: -6959392983967209446, guid: ef2cd0ebd606640468057f73ab8ece68, type: 3} +--- !u!1001 &1826612530 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 109.81 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -48.449997 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1826612531 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1826612530} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1841317500 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 61 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -12.630005 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -23.79 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (61)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1841317501 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1841317500} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1858058875 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 33 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 94.51178 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -46.75966 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9714101 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.23740771 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -27.467 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (33)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1858058876 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1858058875} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1864912368 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 123.39 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -46.9 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.999059 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.043372165 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -4.972 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (6)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1864912369 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1864912368} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1868042769 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 227206375} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_RootOrder + value: 8 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_LocalPosition.x + value: 64.098785 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_LocalPosition.y + value: -67.97933 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_LocalPosition.z + value: 31.189249 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -6426153068891259782, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_LocalScale.z + value: 1.05 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_Name + value: "\u5730\u9762" + objectReference: {fileID: 0} + - target: {fileID: 2470104726104482405, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: a393dab3e6c5453449a02e508ec142dc, type: 2} + - target: {fileID: 4688139533246087123, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: e97f413a5b273df429a8a02861aed949, type: 2} + - target: {fileID: 6848440017604520861, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 5d79309e164fe564387c9653bbd8d1e8, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} +--- !u!4 &1868042770 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + m_PrefabInstance: {fileID: 1868042769} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1868042771 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: -4476773834129712118, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} + m_PrefabInstance: {fileID: 1868042769} + m_PrefabAsset: {fileID: 0} +--- !u!64 &1868042773 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1868042771} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: -5542628691950386421, guid: 414cd4be79a4504428b866c60d8367bc, type: 3} +--- !u!1 &1870185558 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1870185559} + - component: {fileID: 1870185560} + m_Layer: 7 + m_Name: "\u8282\u70B92" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1870185559 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1870185558} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: -0.10138194, y: -0.054987025, z: 0.003351048} + m_LocalScale: {x: 146.43997, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2880396300948671012} + - {fileID: 1287374199} + m_Father: {fileID: 824515504563392176} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!114 &1870185560 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1870185558} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31fa667179ba54a419e7c6b761601a38, type: 3} + m_Name: + m_EditorClassIdentifier: + connnectLocalAngle: {x: -90, y: 0, z: 0} + noConnectLocalAngle: {x: -103.6, y: -90, z: 90} +--- !u!1 &1884165004 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1884165006} + - component: {fileID: 1884165010} + - component: {fileID: 1884165009} + - component: {fileID: 1884165008} + - component: {fileID: 1884165007} + - component: {fileID: 1884165005} + m_Layer: 8 + m_Name: "\u67DC\u95E8\u5C01\u5370\u89E6\u53D1\u533A\u57DF" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!114 &1884165005 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1884165004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ad1852809a3fa664b833b3c6f0b340d3, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "\u67DC\u95E8\u5C01\u5370\u89E6\u53D1\u533A\u57DF" + _highlight: {fileID: 0} + installVector: {fileID: 944765736} + isMoving: 0 +--- !u!4 &1884165006 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1884165004} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: 0.1923006, y: 0.030107297, z: -0.028839588} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 944765736} + m_Father: {fileID: 543450653146961812} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1884165007 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1884165004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 1 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!65 &1884165008 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1884165004} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.01215125, y: 0.008852866, z: 0.02775514} + m_Center: {x: 0.0000000041909516, y: -0.0000000055879354, z: 0.00000006053597} +--- !u!23 &1884165009 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1884165004} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: c3418e6ed2aef6345a0f851ed6a26394, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1884165010 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1884165004} + m_Mesh: {fileID: -4076435291616448373, guid: 3022de55b8046f04485b93331386de5f, type: 3} +--- !u!1001 &1893456729 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1584432035} + m_Modifications: + - target: {fileID: 332338951700092342, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_Name + value: "\u539F\u91C7\u96C6\u5668" + objectReference: {fileID: 0} + - target: {fileID: 332338951700092342, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 740431971001944585, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_Name + value: "\u91C7\u96C6\u5668\u63D2\u5934" + objectReference: {fileID: 0} + - target: {fileID: 1141491156000722700, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_RootOrder + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 1141491156000722700, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_LocalPosition.x + value: -0.15650177 + objectReference: {fileID: 0} + - target: {fileID: 1141491156000722700, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_LocalPosition.y + value: 0.08880007 + objectReference: {fileID: 0} + - target: {fileID: 1141491156000722700, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_LocalPosition.z + value: 0.0439 + objectReference: {fileID: 0} + - target: {fileID: 1141491156000722700, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1141491156000722700, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1141491156000722700, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1141491156000722700, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1141491156000722700, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1141491156000722700, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1141491156000722700, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1365277361744250478, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_LocalPosition.x + value: 0.0063 + objectReference: {fileID: 0} + - target: {fileID: 1365277361744250478, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_LocalPosition.y + value: -0.09872 + objectReference: {fileID: 0} + - target: {fileID: 1365277361744250478, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_LocalPosition.z + value: -0.0059 + objectReference: {fileID: 0} + - target: {fileID: 2477067558898956688, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2734541677271557524, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3621052572427822743, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: isInstalled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3621052572427822743, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: installPos.x + value: -0.1565018 + objectReference: {fileID: 0} + - target: {fileID: 3621052572427822743, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: installPos.y + value: 0.08880007 + objectReference: {fileID: 0} + - target: {fileID: 3621052572427822743, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: installPos.z + value: 0.0439 + objectReference: {fileID: 0} + - target: {fileID: 3621052572427822743, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: uninstallPos.x + value: -0.1565018 + objectReference: {fileID: 0} + - target: {fileID: 3621052572427822743, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: uninstallPos.y + value: 0.08880007 + objectReference: {fileID: 0} + - target: {fileID: 3621052572427822743, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: uninstallPos.z + value: -0.0424 + objectReference: {fileID: 0} + - target: {fileID: 5791492738359864041, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6497348981358589025, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7398560141106263315, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8371691835583921438, guid: 60338bcb7d853724fba468a37342705f, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 60338bcb7d853724fba468a37342705f, type: 3} +--- !u!114 &1893456730 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 3621052572427822743, guid: 60338bcb7d853724fba468a37342705f, type: 3} + m_PrefabInstance: {fileID: 1893456729} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 70279c5aa0aadc84c8af33f91f058a10, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1893456731 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 740431971001944585, guid: 60338bcb7d853724fba468a37342705f, type: 3} + m_PrefabInstance: {fileID: 1893456729} + m_PrefabAsset: {fileID: 0} +--- !u!4 &1893456732 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1141491156000722700, guid: 60338bcb7d853724fba468a37342705f, type: 3} + m_PrefabInstance: {fileID: 1893456729} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1893456733 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1893456731} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 1 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 1 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!65 &1893456734 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1893456731} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.015484007, y: 0.018053893, z: 0.015229111} + m_Center: {x: -0.000008001924, y: -0.00000015227124, z: -0.0000000023283064} +--- !u!1001 &1902674597 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (9) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 21 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 87.59 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -46.61 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1902674598 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1902674597} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1911286162 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: 29.2 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -95.6 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (2)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &1911286163 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 1911286162} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1913557571 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (7) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 19 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: 47.39 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -47.909996 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &1913557572 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 1913557571} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1915720482 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1915720483} + - component: {fileID: 1915720486} + - component: {fileID: 1915720485} + - component: {fileID: 1915720484} + m_Layer: 0 + m_Name: "\u7A7A\u6C14\u5899 (1)" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1915720483 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915720482} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -189.8, y: 1.6, z: -54.44} + m_LocalScale: {x: 1, y: 5.1228123, z: 30.957731} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1453735014} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &1915720484 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915720482} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1915720485 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915720482} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1915720486 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915720482} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1927580343 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1927580343, guid: 86a8666f9623b6b46b8f4b860a11546f, type: 3} + m_PrefabInstance: {fileID: 1501092961} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1944799157 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 108 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.014541227 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9998943 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -178.334 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (108)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1944799158 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1944799157} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1958409357 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1958409358} + - component: {fileID: 1958409359} + m_Layer: 0 + m_Name: "\u5BA4\u5916Reflection Probe" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1958409358 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1958409357} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -43.103, y: 1.44, z: -99.67} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1386435664} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!215 &1958409359 +ReflectionProbe: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1958409357} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 1 + m_RefreshMode: 0 + m_TimeSlicingMode: 0 + m_Resolution: 128 + m_UpdateFrequency: 0 + m_BoxSize: {x: 511.60043, y: 70.62684, z: 776.7171} + m_BoxOffset: {x: 41.64833, y: 12.899323, z: -19.386871} + m_NearClip: 0.3 + m_FarClip: 1000 + m_ShadowDistance: 100 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_IntensityMultiplier: 1 + m_BlendDistance: 1 + m_HDR: 1 + m_BoxProjection: 1 + m_RenderDynamicObjects: 0 + m_UseOcclusionCulling: 1 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} +--- !u!1 &1971629284 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1971629285} + - component: {fileID: 1971629288} + - component: {fileID: 1971629287} + - component: {fileID: 1971629286} + - component: {fileID: 1971629290} + - component: {fileID: 1971629289} + m_Layer: 0 + m_Name: "\u91C7\u96C6\u5668\u533A\u57DF\u78B0\u649E" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &1971629285 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971629284} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.0442, y: 0.5148, z: 0.0069} + m_LocalScale: {x: 0.045, y: 0.1, z: 0.045} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5008542128686470641} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &1971629286 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971629284} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1971629287 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971629284} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: c3418e6ed2aef6345a0f851ed6a26394, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1971629288 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971629284} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1971629289 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971629284} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 2 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &1971629290 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971629284} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ad1852809a3fa664b833b3c6f0b340d3, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "\u91C7\u96C6\u5668\u533A\u57DF\u78B0\u649E" + _highlight: {fileID: 0} + installVector: {fileID: 0} + isMoving: 0 +--- !u!1 &1973274447 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1973274448} + - component: {fileID: 1973274450} + - component: {fileID: 1973274449} + m_Layer: 0 + m_Name: Area Light (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1973274448 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1973274447} + m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: -176.46, y: 4.206, z: -58.68} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1386435664} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!114 &1973274449 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1973274447} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} +--- !u!108 &1973274450 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1973274447} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 3 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 2 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.02 + m_NormalBias: 0.1 + m_NearPlane: 0.1 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 2 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 3.9714725, y: 2.307826} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &1981318697 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1981318698} + m_Layer: 0 + m_Name: "\u6811" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1981318698 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1981318697} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 64.098785, y: -67.97933, z: 31.189249} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 370959562} + - {fileID: 700735805} + - {fileID: 882462869} + - {fileID: 437292350} + - {fileID: 1323181883} + - {fileID: 1769904077} + - {fileID: 1911286163} + - {fileID: 1544618358} + - {fileID: 34906724} + - {fileID: 283184543} + - {fileID: 3521618} + - {fileID: 715036845} + - {fileID: 41030316} + - {fileID: 2087552301} + - {fileID: 545341471} + - {fileID: 267707928} + - {fileID: 166654436} + - {fileID: 796813780} + - {fileID: 439795099} + - {fileID: 1913557572} + - {fileID: 1793690613} + - {fileID: 1902674598} + - {fileID: 832252282} + - {fileID: 56845186} + - {fileID: 926258658} + - {fileID: 1678022386} + - {fileID: 1137586309} + - {fileID: 561160709} + - {fileID: 466158974} + - {fileID: 1043540960} + - {fileID: 765061367} + - {fileID: 2120785206} + - {fileID: 1517282835} + - {fileID: 16926582} + - {fileID: 1415637079} + - {fileID: 1358859178} + - {fileID: 520652737} + - {fileID: 1650911790} + - {fileID: 860285844} + - {fileID: 227034687} + - {fileID: 1380313812} + - {fileID: 1388340785} + - {fileID: 144104641} + - {fileID: 1786166418} + - {fileID: 1721553705} + - {fileID: 1316134870} + - {fileID: 704216929} + - {fileID: 1737325936} + - {fileID: 716476113} + - {fileID: 2015081881} + - {fileID: 941226330} + - {fileID: 1518280692} + - {fileID: 1546770819} + - {fileID: 583815628} + - {fileID: 642292125} + - {fileID: 442729827} + - {fileID: 96434080} + - {fileID: 308464707} + - {fileID: 240539707} + - {fileID: 1485367676} + - {fileID: 483488627} + - {fileID: 1048855952} + - {fileID: 261825123} + - {fileID: 771570712} + - {fileID: 578817788} + - {fileID: 1382836295} + - {fileID: 1635280774} + - {fileID: 668275945} + - {fileID: 865628289} + - {fileID: 403010649} + - {fileID: 474698780} + - {fileID: 822393761} + - {fileID: 1685711354} + - {fileID: 457437476} + - {fileID: 1564351361} + - {fileID: 437909025} + - {fileID: 1320562301} + - {fileID: 199862879} + - {fileID: 1481893486} + - {fileID: 632171169} + - {fileID: 1105235793} + - {fileID: 1071482504} + - {fileID: 1464158385} + - {fileID: 1121243100} + - {fileID: 954783090} + - {fileID: 1461189884} + - {fileID: 1608080315} + - {fileID: 865680365} + - {fileID: 1019902796} + - {fileID: 722758225} + - {fileID: 901456640} + m_Father: {fileID: 227206375} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1989750500 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 77 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -19.960007 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -35.9 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (77)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1989750501 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1989750500} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1994133428 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 118.92 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -34.239998 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.038341355 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.9992647 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 184.395 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (9)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &1994133429 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 1994133428} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &2002609922 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 62 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -7.01001 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -23.227001 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (62)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &2002609923 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 2002609922} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &2015081880 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (19) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 49 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -106.4 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -60.6 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &2015081881 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 2015081880} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &2015820548 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 49 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 51.679993 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -43.699997 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.027930798 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9996099 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -176.799 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (49)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &2015820549 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 2015820548} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &2031403297 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 73 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -18.270004 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -29.769997 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (73)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &2031403298 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 2031403297} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &2040487438 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 121.53999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -41.4 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.93329144 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.35911995 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -42.092 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (5)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &2040487439 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 2040487438} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &2053617541 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 161.45 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -44.5 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9965987 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: 0.082407966 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 9.454 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (25)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &2053617542 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 2053617541} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &2055596354 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 52 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -27.070007 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -9.689999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.0028667273 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.99999595 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -179.672 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (52)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &2055596355 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 2055596354} + m_PrefabAsset: {fileID: 0} +--- !u!1 &2057780906 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2057780907} + - component: {fileID: 2057780910} + - component: {fileID: 2057780909} + - component: {fileID: 2057780908} + m_Layer: 0 + m_Name: "\u5899\u78B0\u649E" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2057780907 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2057780906} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -176.391, y: 2.2225, z: -51.508} + m_LocalScale: {x: 4.8945975, y: 4.099373, z: 0.21191} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1453735014} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &2057780908 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2057780906} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &2057780909 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2057780906} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2057780910 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2057780906} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &2060023712 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 37.339996 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -49.17 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.027930798 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9996099 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -176.799 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (50)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &2060023713 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 2060023712} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &2073494885 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 89 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 37.269997 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -21.560001 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (89)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &2073494886 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 2073494885} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &2087552300 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_Name + value: Broadleaf_Desktop (1) + objectReference: {fileID: 0} + - target: {fileID: 6214017860256173231, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_RootOrder + value: 13 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.x + value: -62.7 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalPosition.z + value: -81.19 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} +--- !u!4 &2087552301 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6946795325555637948, guid: 772c587dcf0c19543a69729a6e6a66d5, type: 3} + m_PrefabInstance: {fileID: 2087552300} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &2090357193 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 54 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: -32 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -27.36 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: 0.0028667273 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.99999595 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -179.672 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (54)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &2090357194 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 2090357193} + m_PrefabAsset: {fileID: 0} +--- !u!1 &2108072793 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2108072794} + - component: {fileID: 2108072797} + - component: {fileID: 2108072796} + - component: {fileID: 2108072795} + m_Layer: 0 + m_Name: "\u7A7A\u6C14\u5899 (4)" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2108072794 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2108072793} + m_LocalRotation: {x: -0, y: -0.7119194, z: -0, w: 0.70226115} + m_LocalPosition: {x: -51.69, y: 1.627, z: -76.36} + m_LocalScale: {x: 3.5596282, y: 5.177114, z: 47.191967} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1453735014} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: -90.783, z: 0} +--- !u!65 &2108072795 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2108072793} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &2108072796 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2108072793} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2108072797 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2108072793} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &2109812125 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2109812127} + - component: {fileID: 2109812126} + m_Layer: 0 + m_Name: LiveSceneManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2109812126 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2109812125} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c4842c1db67320e4ba13a9d80e25214e, type: 3} + m_Name: + m_EditorClassIdentifier: + firstPersonController: {fileID: 0} + currentTool: {fileID: 0} + spawnToolPos: {fileID: 1927580343} + tMDTips: {fileID: 1180096483} + triggerName: "\u6536\u56DE\u5DE5\u5177" + npcCustomController: {fileID: 890581130} + playSpeack: "\u60A8\u597D\uFF0C\u6211\u662F XX \u4F9B\u7535\u516C\u53F8\u7684\u5458\u5DE5\uFF0C\u8FD9\u662F\u6211\u7684\u5DE5\u4F5C\u8BC1\u3002\u4ECA\u5929\u6211\u4EEC\u5BF9\u8D35\u6237\u8FDB\u884C\u73B0\u573A\u91C7\u96C6\u6545\u969C\u6392\u67E5\u53CA\u5904\u7406\u5DE5\u4F5C\uFF0C\u4F5C\u4E1A\u65F6\u95F4\u4E3A + XX \u65F6\u81F3 XX \u65F6\uFF0C\u4F5C\u4E1A\u5B8C\u6210\u540E\u5C06\u518D\u6B21\u901A\u77E5\u60A8\u3002\u5728\u6B64\u671F\u95F4\u5BF9\u60A8\u9020\u6210\u7684\u4E0D\u4FBF\u6211\u4EEC\u6DF1\u611F\u62B1\u6B49\uFF0C\u611F\u8C22\u60A8\u7684\u7406\u89E3\u3002" + device_Control: {fileID: 1584432037} + jiaoYanYiPos: {fileID: 0} + wanYongBiaoPos: {fileID: 0} + jiaoYanYi: {fileID: 0} +--- !u!4 &2109812127 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2109812125} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &2120785205 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1981318698} + m_Modifications: + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_RootOrder + value: 31 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.x + value: 74.43 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.y + value: 0.49 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalPosition.z + value: -112.03 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4029585531790099007, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + propertyPath: m_Name + value: "\u666F\u89C2\u6811n3 (9)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} +--- !u!4 &2120785206 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3593006595331923624, guid: c1ba509224d97b744b49a4332f1fbaf5, type: 3} + m_PrefabInstance: {fileID: 2120785205} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &2139543806 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 765230033} + m_Modifications: + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_RootOrder + value: 94 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.x + value: 37.269997 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalPosition.z + value: -9.299999 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.w + value: -0.0075336937 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9999716 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.863 + objectReference: {fileID: 0} + - target: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1713810064694721689, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + propertyPath: m_Name + value: "\u8349\u5730 (92)" + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} +--- !u!4 &2139543807 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 851285674796985220, guid: 8415df3b5f471bc4c970b889ad1aa825, type: 3} + m_PrefabInstance: {fileID: 2139543806} + m_PrefabAsset: {fileID: 0} +--- !u!1 &9171101143762452 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7078722786081206640} + m_Layer: 0 + m_Name: mixamorig:RightShoulder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &25671758346347408 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6456393697205194991} + m_Mesh: {fileID: -3531946766418785785, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &98703590638354738 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 873583606023215498} + m_LocalRotation: {x: 0.00000008146034, y: 0, z: -0, w: 1} + m_LocalPosition: {x: -0.10668331, y: 0.13732475, z: 0.011742204} + m_LocalScale: {x: 0.682873, y: 0.682873, z: 0.682873} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6187705274633668163} + - {fileID: 4593966406577750282} + - {fileID: 3433479116383594546} + - {fileID: 1284177668} + m_Father: {fileID: 2591019038652623238} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &122910975407467401 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8020243057960156803} + - component: {fileID: 1467318048630038285} + - component: {fileID: 6440091503180571526} + m_Layer: 0 + m_Name: SafetyHelmet_SGCOC (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!33 &133750975383923016 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8573176959571749146} + m_Mesh: {fileID: 2919977959394850775, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!1 &152878828318821035 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6000407481014523880} + m_Layer: 0 + m_Name: mixamorig:RightArm + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &177211319130422402 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 631735921339788093} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: ee4f3b476e847644a8b8e85602777edf, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &234480624140102565 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1039890583813775768} + m_LocalRotation: {x: 1.6452775e-17, y: -4.656614e-10, z: 0.000000035332057, w: 1} + m_LocalPosition: {x: 0.003962636, y: 0.021387637, z: 0.00000023841858} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2003599736200493559} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &284117585453194380 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2546177940106643429} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &337714631986259594 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8592795873994188302} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: ee4f3b476e847644a8b8e85602777edf, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &366175169152686210 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5680486695701624368} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0, y: 0.113613725, z: -0.000000011175871} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2420202490545817625} + - {fileID: 6515712192867636479} + - {fileID: 7078722786081206640} + m_Father: {fileID: 1202371031577307369} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &414117463220674765 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5372056942134867889} + m_Layer: 0 + m_Name: mixamorig:RightHandPinky2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &433386429896327819 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 631735921339788093} + m_Mesh: {fileID: 5675649671517717326, guid: a1f1e83a4c64bee4a88bb2f18c084341, type: 3} +--- !u!1 &434291130812448198 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3968409811735540346} + - component: {fileID: 3463941986788718247} + - component: {fileID: 6876092084664887655} + m_Layer: 0 + m_Name: polySurface194 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &461627322759338798 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2793906374691152554} + - component: {fileID: 8051425438490921879} + - component: {fileID: 6104295200261876912} + - component: {fileID: 8051425438490921881} + - component: {fileID: 8051425438490921880} + m_Layer: 7 + m_Name: "\u7EBF\u7F0620" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &497831375316259495 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6240733294017653436} + m_LocalRotation: {x: -0.0000000074505797, y: 9.313226e-10, z: 4.6566134e-10, w: 1} + m_LocalPosition: {x: -0.0000037029386, y: 0.016501725, z: 0.00000011920929} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1155344850850702753} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &543450652139532038 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132148467463612} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0.97, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5465940245800636306} + - {fileID: 6886943050835836889} + m_Father: {fileID: 890581128} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &543450653146961812 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 919132148675841326} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + m_LocalPosition: {x: -0.017, y: 0.0260396, z: 0.0142} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5740554174508195627} + - {fileID: 1569455433591290203} + - {fileID: 3968409811735540346} + - {fileID: 6781460075862529084} + - {fileID: 1779049931} + - {fileID: 1884165006} + m_Father: {fileID: 1584432035} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &553485972152636556 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5763990593621633427} + m_Mesh: {fileID: 1866804440111803909, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!1 &580954991494305465 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3433479116383594546} + - component: {fileID: 4028951989184330232} + - component: {fileID: 854254119395606761} + m_Layer: 7 + m_Name: "\u7EBF\u7F0610" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &608321760754200209 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8471895809214791806} + m_LocalRotation: {x: 0.484877, y: -0.024850043, z: 0.013784418, w: 0.8741206} + m_LocalPosition: {x: 0.000000044703484, y: 0.36963257, z: -0.0000000055879354} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2916570862808555077} + m_Father: {fileID: 5477181765508417079} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &608559584156280470 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6794518064774738691} + - component: {fileID: 3411526258424216072} + - component: {fileID: 2002669709702132696} + m_Layer: 7 + m_Name: pCylinder2466677 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &611325987932838028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6120147202655328318} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &631735921339788093 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1569455433591290203} + - component: {fileID: 433386429896327819} + - component: {fileID: 177211319130422402} + m_Layer: 0 + m_Name: polySurface193 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &772617247004367733 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6316118119761251965} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.0005533986, y: 0.00011116036, z: -0.00004189971} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 714447600} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &803846171231873999 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4204295178576035376} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &822416212772874436 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5120724536821611729} + m_LocalRotation: {x: -3.1983972e-18, y: 9.313227e-10, z: 0.0000000034342524, w: 1} + m_LocalPosition: {x: 0.00009763427, y: 0.022595286, z: 0.00000011920929} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3199222092153647607} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &824515504563392176 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4282998662405287152} + m_LocalRotation: {x: 0.00000008146034, y: 0, z: -0, w: 1} + m_LocalPosition: {x: -0.116546005, y: 0.13732475, z: 0.012413874} + m_LocalScale: {x: 0.682873, y: 0.682873, z: 0.682873} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1870185559} + - {fileID: 7276296448443433598} + m_Father: {fileID: 2591019038652623238} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &854254119395606761 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 580954991494305465} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &873583606023215498 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 98703590638354738} + - component: {fileID: 873583606023215499} + - component: {fileID: 873583606023215500} + m_Layer: 7 + m_Name: "C_in_\u7EBF" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &873583606023215499 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 873583606023215498} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41b247796aa1fe84899d9a663784684c, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "C_in_\u7EBF" + _highlight: {fileID: 0} + toolType: 12 + isMoving: 0 + isConnected: 1 + screws: + - {fileID: 3322083525341225173} + - {fileID: 3322083525341225172} +--- !u!114 &873583606023215500 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 873583606023215498} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 5 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!33 &880439282562657418 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4070461418400931209} + m_Mesh: {fileID: -3292925553009838691, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!33 &881358992725451865 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3912239187119583646} + m_Mesh: {fileID: 1734468498029562286, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &889744324847561843 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3974016661768156145} + m_LocalRotation: {x: 1.951564e-18, y: 9.313226e-10, z: -0.0000000020954758, w: 1} + m_LocalPosition: {x: -0.000026576221, y: 0.01591301, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7358631409246279382} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &912123868191329199 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4923577926790099015} + m_Mesh: {fileID: -1712880834141306600, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!1 &919132148467463612 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 543450652139532038} + - component: {fileID: 1594247407} + m_Layer: 0 + m_Name: Women-01 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &919132148675841326 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 543450653146961812} + m_Layer: 0 + m_Name: "\u7BB1\u5B50" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &956425023126491919 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7977018297936883431} + m_Mesh: {fileID: -7456421272584432218, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &1031632035427177819 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4114030616435893724} + m_LocalRotation: {x: 0.048509456, y: 0.0000000010919179, z: 0.000000008083793, w: 0.99882275} + m_LocalPosition: {x: -0.0013802946, y: 0.02477163, z: 0.00000023841858} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2925517129086466294} + m_Father: {fileID: 2365583845746092343} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1039890583813775768 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 234480624140102565} + m_Layer: 0 + m_Name: mixamorig:RightHandThumb4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1055161589263398902 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4934269572281083963} + m_Layer: 7 + m_Name: "\u7EBF\u7F06" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1082271959349892839 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5465940245800636306} + m_Layer: 0 + m_Name: mixamorig:Hips + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1092408309950727096 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3882815355248964574} + m_LocalRotation: {x: 0.042477652, y: -9.2800945e-10, z: 9.771552e-11, w: 0.9990974} + m_LocalPosition: {x: -0.00002874434, y: 0.023706496, z: 0.00000023841858} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2325615479419973215} + m_Father: {fileID: 6323950000747440233} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &1155344850850702753 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7955220042844691740} + m_LocalRotation: {x: 0.12570716, y: -0.0000000011288142, z: -0.0000000014998119, w: 0.9920674} + m_LocalPosition: {x: 0.000015947968, y: 0.020016193, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 497831375316259495} + m_Father: {fileID: 6655383508000339802} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1155531964591615691 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4478767617737470620} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &1189529851876130949 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2101602235193990836} + m_LocalRotation: {x: -0.019476056, y: 0.000869183, z: -0.044575434, w: 0.9988158} + m_LocalPosition: {x: 0.028512731, y: 0.051594198, z: 0.0014175177} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5372056942134867889} + m_Father: {fileID: 1852576805692487461} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &1202371031577307369 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9019515341942858986} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0, y: 0.099411845, z: 0.0000000037252903} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 366175169152686210} + m_Father: {fileID: 5742672706361310209} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1217362269991265753 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7358631409246279382} + m_Layer: 0 + m_Name: mixamorig:LeftHandIndex3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1257109681684705550 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4016116851318354297} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: -0.0617457, y: -0.047723692, z: -0.0053251837} + m_LocalScale: {x: 146.43999, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3586611681676375721} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1299406472071844574 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8835129526263918860} + m_Mesh: {fileID: 3419023929311668749, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!33 &1329795526162832276 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4636473757738917395} + m_Mesh: {fileID: -3177303119761559707, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &1330755670317335297 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4549111883821848368} + m_LocalRotation: {x: 0.013016332, y: -0.00012001931, z: -0.009219498, w: 0.9998728} + m_LocalPosition: {x: 0.028548338, y: 0.07362139, z: 0.0019057989} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7666680084607149221} + m_Father: {fileID: 6502182840541961518} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1339101016707383040 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6452705233941002307} + m_Layer: 0 + m_Name: mixamorig:LeftToeBase + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1442771899439738772 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1835685155622220430} + - component: {fileID: 1835685155622220431} + - component: {fileID: 1835685155622220432} + m_Layer: 7 + m_Name: "\u96F6_out_\u7EBF" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &1461785430765589340 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4478767617737470620} + m_Mesh: {fileID: 9186633843763367028, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!23 &1461831936053016646 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3356357160727945627} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1467318048630038285 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 122910975407467401} + m_Mesh: {fileID: 224562653422427921, guid: ee451e45686549b40aacd5af45fdb233, type: 3} +--- !u!33 &1483377223960937671 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2197951248741835712} + m_Mesh: {fileID: -2639241166356525208, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &1488334974511809544 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4070461418400931209} + m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0.00033691444, y: -0.00048679987, z: -0.00007148741} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1452093734} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &1564860334351488734 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1711505208486377574} + m_LocalRotation: {x: -0.0047402307, y: -9.2551783e-10, z: -0.0000000012267618, w: 0.9999888} + m_LocalPosition: {x: 0.0000057034194, y: 0.028282583, z: -0.00000023841858} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3558328719386320470} + m_Father: {fileID: 6629111071157590194} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1565405416653235286 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5742672706361310209} + m_Layer: 0 + m_Name: mixamorig:Spine + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1569455433591290203 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 631735921339788093} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.005, y: -0.0613, z: 0.056} + m_LocalScale: {x: 1, y: 0.12878741, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653146961812} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1570366377815773332 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4923577926790099015} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &1570371604147209342 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6781460075862529084} + - component: {fileID: 6173118890623103646} + - component: {fileID: 7221431641791205997} + - component: {fileID: 595210373} + - component: {fileID: 595210374} + - component: {fileID: 7221431641791205998} + m_Layer: 0 + m_Name: "\u67DC\u95E8" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1599464333670017566 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2880396300948671012} + - component: {fileID: 1709580560696443248} + - component: {fileID: 5692947502561580056} + - component: {fileID: 5692947502561580058} + - component: {fileID: 5692947502561580057} + m_Layer: 7 + m_Name: "\u7EBF\u7F0601" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1644365778119754143 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2523003144201920636} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.00011379255, y: 0.000016632084, z: -0.0003839007} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 665274769} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &1697162105165851237 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2408334408838207284} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.00024459863, y: 0.0000686646, z: -0.00043339998} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1020189678} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1709580560696443248 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1599464333670017566} + m_Mesh: {fileID: -1671475766378298110, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &1711458120915814856 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4636473757738917395} + m_LocalRotation: {x: 0.000000043711385, y: -0.000000043711392, z: 1.9106855e-15, w: 1} + m_LocalPosition: {x: -0.0024113478, y: 0.0006823787, z: -0.0028323745} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4934269572281083963} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1711505208486377574 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1564860334351488734} + m_Layer: 0 + m_Name: mixamorig:LeftHandRing2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &1767338888452057641 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8462084880560888935} + m_Mesh: {fileID: -3637364234581469759, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!1 &1770907914034496457 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4164171316182894046} + - component: {fileID: 6757777363213771731} + - component: {fileID: 8377386735191376848} + m_Layer: 7 + m_Name: "\u7EBF\u7F0605" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1835685155622220430 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1442771899439738772} + m_LocalRotation: {x: 0.00000008146034, y: 0, z: -0, w: 1} + m_LocalPosition: {x: -0.06645373, y: 0.13732475, z: 0.015784562} + m_LocalScale: {x: 0.682873, y: 0.682873, z: 0.682873} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 714447600} + - {fileID: 8740202633155158324} + m_Father: {fileID: 2591019038652623238} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1835685155622220431 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1442771899439738772} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41b247796aa1fe84899d9a663784684c, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "\u96F6_out_\u7EBF" + _highlight: {fileID: 0} + toolType: 12 + isMoving: 0 + isConnected: 1 + screws: + - {fileID: 3322083525341225169} + - {fileID: 3322083525341225168} +--- !u!114 &1835685155622220432 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1442771899439738772} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 3 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!4 &1852576805692487461 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2715566403346261484} + m_LocalRotation: {x: -0.015965106, y: 0.057083182, z: -0.005839216, w: 0.99822474} + m_LocalPosition: {x: 0.000000014901161, y: 0.2304425, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8153021305291509323} + - {fileID: 3667946888232000262} + - {fileID: 1189529851876130949} + - {fileID: 9118793900821671905} + - {fileID: 8447082967860796435} + m_Father: {fileID: 2563496968498593093} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1862624589212617346 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8153021305291509323} + m_Layer: 0 + m_Name: mixamorig:RightHandIndex1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &2002669709702132696 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 608559584156280470} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &2003599736200493559 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4237274457064114756} + m_LocalRotation: {x: -0.045124706, y: 1.6918097e-12, z: -0.000000010356886, w: 0.9989814} + m_LocalPosition: {x: 0.002045244, y: 0.024077415, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 234480624140102565} + m_Father: {fileID: 8352548718221930608} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &2048891536383486780 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4070461418400931209} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &2101602235193990836 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1189529851876130949} + m_Layer: 0 + m_Name: mixamorig:RightHandPinky1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &2158975759048962521 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3199222092153647607} + m_Layer: 0 + m_Name: mixamorig:RightHandMiddle3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &2197951248741835712 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4904364008640292989} + - component: {fileID: 1483377223960937671} + - component: {fileID: 5143084584013414285} + m_Layer: 7 + m_Name: Object006 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &2291573950284375348 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6456393697205194991} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2319616482541048167 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3268018479852605235} + m_Mesh: {fileID: -3924962381356476683, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &2325615479419973215 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3365675183774838123} + m_LocalRotation: {x: 9.3132235e-10, y: -9.313226e-10, z: -1.382432e-10, w: 1} + m_LocalPosition: {x: 0.000012814999, y: 0.01981479, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1092408309950727096} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &2348787448170419932 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7138560357548313689} + m_LocalRotation: {x: 0.53869253, y: 0.018090904, z: -0.0115710255, w: 0.8422287} + m_LocalPosition: {x: -0.000000044703484, y: 0.37159914, z: -0.000000007450581} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6452705233941002307} + m_Father: {fileID: 7151331951889542704} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &2365583845746092343 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7363479243820936525} + m_LocalRotation: {x: -0.06496927, y: 1.7655873e-10, z: -0.0000000134629445, w: 0.99788725} + m_LocalPosition: {x: 0.008137554, y: 0.019998968, z: -0.00000011920929} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1031632035427177819} + m_Father: {fileID: 5048025442394260667} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2408334408838207284 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1697162105165851237} + - component: {fileID: 8525773095544777909} + - component: {fileID: 6431932596975633959} + - component: {fileID: 8525773095544777911} + - component: {fileID: 8525773095544777910} + m_Layer: 7 + m_Name: Object004 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2420202490545817625 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2853286956482972384} + m_LocalRotation: {x: 0.57924217, y: -0.4056446, z: 0.57865375, w: 0.4063137} + m_LocalPosition: {x: -0.060884394, y: 0.105748534, z: 0.00004316494} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5790970485783337941} + m_Father: {fileID: 366175169152686210} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &2455146754406311557 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3588849561035537141} + m_LocalRotation: {x: 0.08043722, y: -7.2571976e-11, z: -8.992954e-10, w: 0.9967597} + m_LocalPosition: {x: -0.000023607165, y: 0.020518959, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6069836247873029949} + m_Father: {fileID: 5372056942134867889} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &2462907909773885537 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4556318930598687417} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.0017652913, y: -0.00045349158, z: 0.00036899955} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1322853381} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2523003144201920636 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1644365778119754143} + - component: {fileID: 5780106753361420912} + - component: {fileID: 7090244123832603613} + - component: {fileID: 7090244123832603615} + - component: {fileID: 7090244123832603614} + m_Layer: 7 + m_Name: "\u7EBF\u7F0613" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &2546177940106643429 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5324984063536747676} + - component: {fileID: 6707184306886175493} + - component: {fileID: 284117585453194380} + m_Layer: 7 + m_Name: "\u7EBF\u7F0625" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2559285841650415342 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3135921508272456384} + m_LocalRotation: {x: -0.0017061606, y: 0.028631212, z: 0.9978186, w: 0.05945926} + m_LocalPosition: {x: -0.07219199, y: -0.047150552, z: 0.0032080468} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7151331951889542704} + m_Father: {fileID: 5465940245800636306} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &2559366583418175746 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1584432035} + m_Modifications: + - target: {fileID: 477736180284341766, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 617705673610781294, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_LocalPosition.x + value: 0.0063 + objectReference: {fileID: 0} + - target: {fileID: 617705673610781294, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_LocalPosition.y + value: -0.09872 + objectReference: {fileID: 0} + - target: {fileID: 617705673610781294, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_LocalPosition.z + value: -0.0059 + objectReference: {fileID: 0} + - target: {fileID: 712534944864115237, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1163743426699570697, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_Name + value: "\u91C7\u96C6\u5668\u63D2\u5934" + objectReference: {fileID: 0} + - target: {fileID: 2232743127493013942, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_Name + value: "------\u91C7\u96C6\u5668" + objectReference: {fileID: 0} + - target: {fileID: 3791089853158224115, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7351379683168670963, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_RootOrder + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 7351379683168670963, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_LocalPosition.x + value: -0.2007 + objectReference: {fileID: 0} + - target: {fileID: 7351379683168670963, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_LocalPosition.y + value: -0.426 + objectReference: {fileID: 0} + - target: {fileID: 7351379683168670963, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_LocalPosition.z + value: 0.051 + objectReference: {fileID: 0} + - target: {fileID: 7351379683168670963, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7351379683168670963, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7351379683168670963, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7351379683168670963, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7351379683168670963, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7351379683168670963, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 7351379683168670963, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7876382830030917193, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_Name + value: "\u7EBF\u7F06+\u91C7\u96C6\u5668" + objectReference: {fileID: 0} + - target: {fileID: 7948503499924445470, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8106429740729373753, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: rmsCount + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 8701836718813083065, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: rmsCount + value: 13 + objectReference: {fileID: 0} + - target: {fileID: 8701836718813083065, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + propertyPath: effectGroup + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} +--- !u!1 &2559366583418175749 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1163743426699570697, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + m_PrefabInstance: {fileID: 2559366583418175746} + m_PrefabAsset: {fileID: 0} +--- !u!114 &2559366583418175751 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2559366583418175749} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 1 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 1 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!65 &2559366583418175752 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2559366583418175749} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.015484007, y: 0.018053893, z: 0.015229111} + m_Center: {x: -0.000008001924, y: -0.00000015227124, z: -0.0000000023283064} +--- !u!4 &2563496968498593093 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8932621592901728018} + m_LocalRotation: {x: 0.071530856, y: 0.0034457247, z: 0.047991727, w: 0.9962772} + m_LocalPosition: {x: 0.000000044703484, y: 0.23097682, z: -0.00000023841858} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1852576805692487461} + m_Father: {fileID: 6000407481014523880} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2586065997241008915 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6629111071157590194} + m_Layer: 0 + m_Name: mixamorig:LeftHandRing1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2591019038652623238 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2936055289702101820} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.0967, y: -0.1592, z: 0.041} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4747287885685369931} + - {fileID: 3586611681676375721} + - {fileID: 3036967995131516333} + - {fileID: 824515504563392176} + - {fileID: 98703590638354738} + - {fileID: 7186252140739360086} + - {fileID: 8068779415140856140} + - {fileID: 1835685155622220430} + - {fileID: 4934269572281083963} + m_Father: {fileID: 1584432035} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2601426291660987956 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6323950000747440233} + m_Layer: 0 + m_Name: mixamorig:RightHandRing2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &2715566403346261484 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1852576805692487461} + m_Layer: 0 + m_Name: mixamorig:RightHand + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2793906374691152554 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 461627322759338798} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.0004384999, y: 0.00008987434, z: -0.000032099506} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 891660392} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2821543180573937230 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4998189464348554806} + - component: {fileID: 7194665904597350155} + - component: {fileID: 4060625163852443230} + m_Layer: 7 + m_Name: "\u7EBF\u7F0604" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &2853286956482972384 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2420202490545817625} + m_Layer: 0 + m_Name: mixamorig:LeftShoulder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2880396300948671012 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1599464333670017566} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.0001799776, y: 0.00005783086, z: 0.000049599428} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1870185559} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2898355159384505641 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8700783697221466475} + m_Layer: 0 + m_Name: mixamorig:HeadTop_End + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2916570862808555077 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3661821583537055866} + m_LocalRotation: {x: 0.25460944, y: -0.016609734, z: 0.004373786, w: 0.9668914} + m_LocalPosition: {x: -0.000000014901161, y: 0.14866546, z: -0.000000033527613} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8044669281194295015} + m_Father: {fileID: 608321760754200209} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &2925517129086466294 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4945339227083903921} + m_LocalRotation: {x: -0.0000000018626451, y: -9.3132246e-10, z: -0.00000007155177, w: 1} + m_LocalPosition: {x: -0.006757289, y: 0.020495594, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1031632035427177819} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2936055289702101820 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2591019038652623238} + m_Layer: 7 + m_Name: "\u7EBF\u7F06 (1)" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &2988780741888852532 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6341119540340234209} + m_Layer: 0 + m_Name: mixamorig:RightHandMiddle2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &2990767918641012808 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7314271389142287775} + m_Mesh: {fileID: 7648359724212481607, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &3036967995131516333 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7700093358639259305} + m_LocalRotation: {x: 0.00000008146034, y: 0, z: -0, w: 1} + m_LocalPosition: {x: -0.13540012, y: 0.13732475, z: 0.01157181} + m_LocalScale: {x: 0.682873, y: 0.682873, z: 0.682873} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 665274769} + - {fileID: 4904364008640292989} + - {fileID: 4164171316182894046} + - {fileID: 5374751128342823263} + m_Father: {fileID: 2591019038652623238} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &3047284247736089887 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3183749883118743280} + m_Layer: 0 + m_Name: mixamorig:LeftHandMiddle3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &3051318130466003698 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6316118119761251965} + m_Mesh: {fileID: 4072514858154037192, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!1 &3052747000267066093 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7151331951889542704} + m_Layer: 0 + m_Name: mixamorig:LeftLeg + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &3062985154854182140 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3226489720248027087} + - component: {fileID: 3596784842089906628} + - component: {fileID: 7470190225763718268} + m_Layer: 7 + m_Name: "\u7EBF\u7F0617" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &3135921508272456384 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2559285841650415342} + m_Layer: 0 + m_Name: mixamorig:LeftUpLeg + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &3156623898457563776 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6824972183692312769} + m_Mesh: {fileID: -4797292904368278281, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!1 &3166830707584624553 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3742394133950427366} + m_Layer: 0 + m_Name: mixamorig:RightHandIndex2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3183749883118743280 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3047284247736089887} + m_LocalRotation: {x: 0.0564172, y: -1.2725164e-10, z: -0.0000000022519544, w: 0.9984073} + m_LocalPosition: {x: -0.000005185604, y: 0.024661303, z: 0.00000047683716} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7934756005527238611} + m_Father: {fileID: 6833846120200934087} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &3194478479479597839 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7980228399672658471} + - component: {fileID: 5847256845293654975} + - component: {fileID: 6328583031783875234} + m_Layer: 0 + m_Name: mesh + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3199222092153647607 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2158975759048962521} + m_LocalRotation: {x: 0.119047314, y: 0.0000000012694407, z: 0.0000000027643665, w: 0.9928886} + m_LocalPosition: {x: -0.00004165247, y: 0.026668847, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 822416212772874436} + m_Father: {fileID: 6341119540340234209} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &3223214614432192775 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7161727192589905159} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.0009479151, y: 0.00018013016, z: -0.00009570012} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1748610667} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &3226489720248027087 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3062985154854182140} + m_LocalRotation: {x: 0, y: -0.000000011924881, z: -0, w: 1} + m_LocalPosition: {x: 0.00067591306, y: -0.00010894239, z: 0.00061354873} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4934269572281083963} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &3268018479852605235 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5374751128342823263} + - component: {fileID: 2319616482541048167} + - component: {fileID: 5744108904496208341} + m_Layer: 7 + m_Name: "\u7EBF\u7F0608" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &3286160701569460988 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8835129526263918860} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1001 &3322083525341225163 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1584432035} + m_Modifications: + - target: {fileID: 320442222871672192, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 332014700243993484, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 350304172647704154, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463332351137760399, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 517248266688709110, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 650253884735618937, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 724508414009356362, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 754605573398818327, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 789939456080788408, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 973081086771838013, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 976974222189789564, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1054049943193780919, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1055502669301928295, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1073299034102600349, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1115382372544181941, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1115382372544181941, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_LocalPosition.x + value: -0.020301819 + objectReference: {fileID: 0} + - target: {fileID: 1115382372544181941, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_LocalPosition.y + value: 0.08375621 + objectReference: {fileID: 0} + - target: {fileID: 1115382372544181941, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_LocalPosition.z + value: 0.07457733 + objectReference: {fileID: 0} + - target: {fileID: 1115382372544181941, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 1115382372544181941, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 1115382372544181941, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1115382372544181941, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1115382372544181941, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1115382372544181941, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1115382372544181941, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1284239395923397454, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1416277697221098415, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1435038412228956864, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1478174217997785690, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1501941580820666084, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1600806229322504750, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1722993150816652786, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1727674405933790365, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1751435333266168767, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1807441815628340252, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1841308821452590840, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1855690377851627184, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1874166110276913044, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1925916963476786400, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1946667097768799827, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1976419546056809672, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2023724602131711702, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2058135279419096163, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2132793262433189682, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2285922320055940476, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2360062271134495547, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2444671051741609303, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2495103970386678462, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_Enabled + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2511601821602283983, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2534270468772251865, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2611429273092850905, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2622462814090229568, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2750645596218213336, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2760194154978388232, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3004229968862895593, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3028704560947863330, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3091502540604030348, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3174140591840984452, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3343712873833081111, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3354373410300411170, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3364335972088743895, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3647140851570694915, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3667250783891015368, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3690942472163479312, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3731320892758579718, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3739252603834217789, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3904531470558406150, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3952194349717846392, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3952194349717846392, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3971177227239322403, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4019119487483026998, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4027234244411482364, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4106715758956512622, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4129341317131247706, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4196765956860338472, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4267014313263308103, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4296265467818426623, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4428912352103974303, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4526804430836032835, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4571873592757483881, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4578351436152274282, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_LocalScale.y + value: 1.7218 + objectReference: {fileID: 0} + - target: {fileID: 4610679681179678519, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4741651671601545117, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764133642611920471, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4957633642674850592, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4979398479695569229, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5015395763867031685, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5037438573811339093, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5060025340838016138, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5354908835265674943, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_Name + value: "\u539F\u4E09\u76F8\u56DB\u7EBF\u8D39\u63A7\u667A\u80FD\u7535\u80FD\u8868" + objectReference: {fileID: 0} + - target: {fileID: 5354908835265674943, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5368239638245173940, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5412576947644988543, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5442835320398393141, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5538586908182032159, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5540987875046925805, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5602560913489373084, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5762385062928949227, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5808519058724478653, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5880432296457415981, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5945354323864009823, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6066262882530351653, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6184434413637862912, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6205577524253165702, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6328485329043012550, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6413114781987958015, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6419414810614896851, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6516275926322669981, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6521300243644384048, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6525234817604305157, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6605935390537433085, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6725195206451080259, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6868279355264240535, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6911742346114702425, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7071103811456634928, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7077911863407635852, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: openLocalPos.x + value: 0.295 + objectReference: {fileID: 0} + - target: {fileID: 7077911863407635852, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: openLocalPos.y + value: 0.121 + objectReference: {fileID: 0} + - target: {fileID: 7077911863407635852, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: openLocalPos.z + value: -0.067 + objectReference: {fileID: 0} + - target: {fileID: 7240809354564011159, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7355280426196819183, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7417729883851945019, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7443115465158507835, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7444897625536804255, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7482469245078275214, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7498981148573599777, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7517615141571545761, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7593963331604242596, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7611938045389715188, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7678617094070216481, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7701427582251705764, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7707890680700831093, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7783694684697909476, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7981220171878780951, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8020890304400423363, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8145425410886384729, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8507721987982545378, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8627032244961994575, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8935591338374847932, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8978519935341317265, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8979812689823996008, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9048785331380861651, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} +--- !u!114 &3322083525341225164 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4843853261531996568, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6692d9c5c4f07d74cb7699776e6f2601, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &3322083525341225165 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1115382372544181941, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} +--- !u!114 &3322083525341225166 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 8239989255111343481, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225167 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 8209490965831231336, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225168 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 2046886231539217583, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225169 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 5587104619343863314, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225170 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 380597630917774306, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225171 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 9151911468697611026, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225172 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 3439375705947568501, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225173 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 974737114411687780, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225174 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 5388092849907877530, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225175 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 8474057387531307363, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225176 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 2226314435388817534, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225177 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 5601857253740416187, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225178 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4529993286687087729, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225179 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 911579561895395507, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225180 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 9146543477679576611, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3322083525341225181 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 8314237386873098259, guid: 5980ef5428cf0f140a7fb83bcea6a203, type: 3} + m_PrefabInstance: {fileID: 3322083525341225163} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97d1fee3926f6b74dba1fe23cdd84263, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &3356357160727945627 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7015062079591666802} + - component: {fileID: 7038477618993137362} + - component: {fileID: 1461831936053016646} + m_Layer: 7 + m_Name: "\u7EBF\u7F0622" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &3365675183774838123 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2325615479419973215} + m_Layer: 0 + m_Name: mixamorig:RightHandRing4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &3411526258424216072 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 608559584156280470} + m_Mesh: {fileID: -5523573474829101802, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &3433479116383594546 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 580954991494305465} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0.02485075, y: -0.1286029, z: -0.0066208076} + m_LocalScale: {x: 146.43999, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 98703590638354738} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3463941986788718247 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 434291130812448198} + m_Mesh: {fileID: -1614967008008844043, guid: a1f1e83a4c64bee4a88bb2f18c084341, type: 3} +--- !u!4 &3558328719386320470 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7797580424071784295} + m_LocalRotation: {x: 0.10539638, y: 5.5213892e-11, z: 5.2095117e-10, w: 0.9944303} + m_LocalPosition: {x: 0.000011239201, y: 0.026169598, z: 0.00000023841858} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8251234210062096111} + m_Father: {fileID: 1564860334351488734} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &3586611681676375721 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9056950828145047995} + m_LocalRotation: {x: 0.00000008146034, y: 0, z: -0, w: 1} + m_LocalPosition: {x: -0.14643592, y: 0.13732475, z: 0.01255174} + m_LocalScale: {x: 0.682873, y: 0.682873, z: 0.682873} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 483819746} + - {fileID: 1257109681684705550} + m_Father: {fileID: 2591019038652623238} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &3588849561035537141 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2455146754406311557} + m_Layer: 0 + m_Name: mixamorig:RightHandPinky3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &3596784842089906628 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3062985154854182140} + m_Mesh: {fileID: 3304576134304538732, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!1 &3614653199893330660 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7930214442681379120} + m_Layer: 0 + m_Name: mixamorig:RightHandIndex4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &3661821583537055866 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2916570862808555077} + m_Layer: 0 + m_Name: mixamorig:RightToeBase + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3667946888232000262 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9146825081926634321} + m_LocalRotation: {x: -0.02943883, y: 0.0008270316, z: -0.028070008, w: 0.99917203} + m_LocalPosition: {x: -0.010216974, y: 0.0665828, z: 0.00063729286} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6341119540340234209} + m_Father: {fileID: 1852576805692487461} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3677569119359557518 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6802495391375884829} + m_Mesh: {fileID: -8390736721693561871, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &3742394133950427366 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3166830707584624553} + m_LocalRotation: {x: -0.04636032, y: -0.0000000013577027, z: -8.787958e-10, w: 0.9989248} + m_LocalPosition: {x: 0.000018119812, y: 0.023744285, z: -0.00000011920929} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5097370189690586031} + m_Father: {fileID: 8153021305291509323} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &3882815355248964574 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1092408309950727096} + m_Layer: 0 + m_Name: mixamorig:RightHandRing3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &3885352906697735407 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9135896868843048998} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &3912239187119583646 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9117073240587032823} + - component: {fileID: 881358992725451865} + - component: {fileID: 5460421694783484653} + m_Layer: 7 + m_Name: "\u7EBF\u7F0609" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &3948933246805351846 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7410462539888490004} + m_Layer: 0 + m_Name: mixamorig:LeftForeArm + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3968409811735540346 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 434291130812448198} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.0443, y: -0.0608, z: -0.1524} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653146961812} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &3974016661768156145 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 889744324847561843} + m_Layer: 0 + m_Name: mixamorig:LeftHandIndex4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &4016116851318354297 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1257109681684705550} + - component: {fileID: 4586045948627501054} + - component: {fileID: 7500054424629047027} + m_Layer: 7 + m_Name: "\u7EBF\u7F0624" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &4028323153361141141 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6515712192867636479} + m_Layer: 0 + m_Name: mixamorig:Neck + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &4028951989184330232 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 580954991494305465} + m_Mesh: {fileID: -8274127145087209487, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &4042427858098437525 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7519898546537971884} + m_LocalRotation: {x: 9.313226e-10, y: 1.6263033e-18, z: 0.0000000017462298, w: 1} + m_LocalPosition: {x: 0.000000059604645, y: 0.061494797, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6452705233941002307} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &4060625163852443230 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2821543180573937230} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &4070461418400931209 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1488334974511809544} + - component: {fileID: 880439282562657418} + - component: {fileID: 2048891536383486780} + - component: {fileID: 4070461418400931211} + - component: {fileID: 4070461418400931210} + m_Layer: 7 + m_Name: Object001 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &4070461418400931210 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4070461418400931209} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 7828154217890752842} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &4070461418400931211 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4070461418400931209} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: -3292925553009838691, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &4070507212663398037 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7062464053834456986} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.0006079108, y: 0.000025329613, z: 0.000019500258} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 354595431} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &4114030616435893724 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1031632035427177819} + m_Layer: 0 + m_Name: mixamorig:LeftHandThumb3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4164171316182894046 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1770907914034496457} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0.036347866, y: -0.12064544, z: -0.010532589} + m_LocalScale: {x: 146.43999, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3036967995131516333} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &4204295178576035376 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7276296448443433598} + - component: {fileID: 8525641402901082435} + - component: {fileID: 803846171231873999} + m_Layer: 7 + m_Name: "\u7EBF\u7F0603" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &4224283833996485287 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8251234210062096111} + m_Layer: 0 + m_Name: mixamorig:LeftHandRing4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &4237274457064114756 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2003599736200493559} + m_Layer: 0 + m_Name: mixamorig:RightHandThumb3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &4282998662405287152 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 824515504563392176} + - component: {fileID: 4282998662405287153} + - component: {fileID: 4282998662405287154} + m_Layer: 7 + m_Name: "B_out_\u7EBF" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &4282998662405287153 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4282998662405287152} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41b247796aa1fe84899d9a663784684c, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "B_out_\u7EBF" + _highlight: {fileID: 0} + toolType: 12 + isMoving: 0 + isConnected: 1 + screws: + - {fileID: 3322083525341225175} + - {fileID: 3322083525341225174} +--- !u!114 &4282998662405287154 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4282998662405287152} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 3 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!33 &4437612932489133271 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7062464053834456986} + m_Mesh: {fileID: -6500644947824582641, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!1 &4441848306822412864 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5097370189690586031} + m_Layer: 0 + m_Name: mixamorig:RightHandIndex3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &4446931587278266967 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6824972183692312769} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &4478767617737470620 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4522435300044685728} + - component: {fileID: 1461785430765589340} + - component: {fileID: 1155531964591615691} + m_Layer: 7 + m_Name: Object005 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &4494945601221083425 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6502182840541961518} + m_Layer: 0 + m_Name: mixamorig:LeftHand + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4522435300044685728 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4478767617737470620} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0.04938793, y: -0.11023468, z: -0.010265522} + m_LocalScale: {x: 146.43999, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4747287885685369931} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &4549111883821848368 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1330755670317335297} + m_Layer: 0 + m_Name: mixamorig:LeftHandIndex1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &4556318930598687417 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2462907909773885537} + - component: {fileID: 7148290407704868023} + - component: {fileID: 8480345817307430846} + - component: {fileID: 8480345817307430848} + - component: {fileID: 8480345817307430847} + m_Layer: 7 + m_Name: "\u7EBF\u7F0628" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &4586045948627501054 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4016116851318354297} + m_Mesh: {fileID: -4448373877863473164, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &4593966406577750282 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9135896868843048998} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0.026620291, y: -0.1286026, z: -0.010782108} + m_LocalScale: {x: 146.43999, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 98703590638354738} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &4636473757738917395 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1711458120915814856} + - component: {fileID: 1329795526162832276} + - component: {fileID: 8185341331982980675} + m_Layer: 7 + m_Name: pCylinder2466678 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &4721841345021564242 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7934756005527238611} + m_Layer: 0 + m_Name: mixamorig:LeftHandMiddle4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4747287885685369931 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7828154217890752841} + m_LocalRotation: {x: 0.00000008146034, y: 0, z: -0, w: 1} + m_LocalPosition: {x: -0.16491398, y: 0.13732475, z: 0.011389405} + m_LocalScale: {x: 0.682873, y: 0.682873, z: 0.682873} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1266354606} + - {fileID: 4522435300044685728} + - {fileID: 7353300493510838823} + - {fileID: 9117073240587032823} + m_Father: {fileID: 2591019038652623238} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4747904711169592680 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6514210124407229089} + m_LocalRotation: {x: 0.037103266, y: 0.0010065445, z: 0.02709953, w: 0.99894345} + m_LocalPosition: {x: -0.02818691, y: 0.054665208, z: 0.00061059} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6655383508000339802} + m_Father: {fileID: 6502182840541961518} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &4758907333267819335 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7186252140739360086} + - component: {fileID: 7186252140739360087} + - component: {fileID: 7186252140739360088} + m_Layer: 7 + m_Name: "C_out_\u7EBF" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &4796578925741363150 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8740202633155158324} + - component: {fileID: 9076905209103937773} + - component: {fileID: 6157947579215360509} + m_Layer: 7 + m_Name: "\u7EBF\u7F0629" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &4890665110558090661 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5477181765508417079} + m_Layer: 0 + m_Name: mixamorig:RightLeg + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4904364008640292989 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2197951248741835712} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0.036347847, y: -0.12064544, z: -0.010532856} + m_LocalScale: {x: 146.43999, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3036967995131516333} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &4923577926790099015 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7353300493510838823} + - component: {fileID: 912123868191329199} + - component: {fileID: 1570366377815773332} + m_Layer: 7 + m_Name: "\u7EBF\u7F0606" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4934269572281083963 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1055161589263398902} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0.05724132, y: 0.019, z: 0.0514} + m_LocalScale: {x: 100, y: 100, z: 100} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6794518064774738691} + - {fileID: 1711458120915814856} + - {fileID: 7967627429162474623} + - {fileID: 8730366743450144978} + - {fileID: 5652713281379456616} + - {fileID: 3226489720248027087} + - {fileID: 5589798272978919662} + - {fileID: 7015062079591666802} + - {fileID: 8064156782530476709} + - {fileID: 5324984063536747676} + m_Father: {fileID: 2591019038652623238} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &4945339227083903921 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2925517129086466294} + m_Layer: 0 + m_Name: mixamorig:LeftHandThumb4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &4966533302107937367 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6187705274633668163} + - component: {fileID: 6676347101755186236} + - component: {fileID: 8949931049186725723} + m_Layer: 7 + m_Name: Object007 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4998189464348554806 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2821543180573937230} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: -0.08690242, y: -0.047723692, z: -0.0047823903} + m_LocalScale: {x: 146.43999, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7186252140739360086} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &5008542128686470641 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 7351379683168670963, guid: b39fdcc820528d14396a912f3d0daf97, type: 3} + m_PrefabInstance: {fileID: 2559366583418175746} + m_PrefabAsset: {fileID: 0} +--- !u!4 &5048025442394260667 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7776229725599993088} + m_LocalRotation: {x: 0.06104817, y: -0.02002427, z: -0.3110258, w: 0.94822735} + m_LocalPosition: {x: 0.022880156, y: 0.013951242, z: 0.003205061} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2365583845746092343} + m_Father: {fileID: 6502182840541961518} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &5097370189690586031 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4441848306822412864} + m_LocalRotation: {x: 0.044878583, y: -1.9592078e-10, z: -0.0000000043611754, w: 0.99899244} + m_LocalPosition: {x: -0.000029087067, y: 0.023299575, z: 0.00000047683716} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7930214442681379120} + m_Father: {fileID: 3742394133950427366} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &5120724536821611729 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 822416212772874436} + m_Layer: 0 + m_Name: mixamorig:RightHandMiddle4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &5143084584013414285 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2197951248741835712} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &5148572318081622913 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7062464053834456986} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &5234653474554988923 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8573176959571749146} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &5286605781624325523 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8462084880560888935} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.0005294805, y: 0.00009086617, z: -0.000033600358} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1287374199} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &5324984063536747676 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2546177940106643429} + m_LocalRotation: {x: 0, y: -0.000000011924881, z: -0, w: 1} + m_LocalPosition: {x: -0.0023055216, y: 0.00066798506, z: -0.00078814983} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4934269572281083963} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &5372056942134867889 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 414117463220674765} + m_LocalRotation: {x: -0.0066120145, y: 4.8835846e-10, z: -0.0000000034310983, w: 0.9999782} + m_LocalPosition: {x: -0.000019676983, y: 0.02523315, z: 0.00000011920929} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2455146754406311557} + m_Father: {fileID: 1189529851876130949} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &5374751128342823263 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3268018479852605235} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0.036347866, y: -0.12064544, z: -0.010532589} + m_LocalScale: {x: 146.43999, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3036967995131516333} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &5380441135577055994 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6886943050835836889} + - component: {fileID: 6829318296788649389} + m_Layer: 0 + m_Name: Obj3d66-9825864-2-284 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &5410906603427938571 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6394903190299001093} + - component: {fileID: 6599024349750509711} + - component: {fileID: 8977030026394259917} + - component: {fileID: 8977030026394259919} + - component: {fileID: 8977030026394259918} + m_Layer: 7 + m_Name: Object002 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &5423976340205951611 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8447082967860796435} + m_Layer: 0 + m_Name: mixamorig:RightHandThumb1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &5460421694783484653 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3912239187119583646} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &5465940245800636306 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1082271959349892839} + m_LocalRotation: {x: 0.000000021855694, y: 0, z: -0, w: 1} + m_LocalPosition: {x: -0.007969171, y: 0.9036006, z: -0.016842512} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2559285841650415342} + - {fileID: 8169382869690939565} + - {fileID: 5742672706361310209} + m_Father: {fileID: 543450652139532038} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &5477181765508417079 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4890665110558090661} + m_LocalRotation: {x: 0.0073417514, y: 0.00009875537, z: 0.013449618, w: 0.99988264} + m_LocalPosition: {x: -0.000000014901161, y: 0.41492712, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 608321760754200209} + m_Father: {fileID: 8169382869690939565} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &5488424282546057137 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7314271389142287775} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.00012352003, y: 0.00005996709, z: 0.000018099565} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 483819746} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &5557296764936854557 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8592795873994188302} + m_Mesh: {fileID: 5870379973697829204, guid: a1f1e83a4c64bee4a88bb2f18c084341, type: 3} +--- !u!23 &5558413955029322033 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6536037933398504728} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &5589798272978919662 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8835129526263918860} + m_LocalRotation: {x: 0, y: -0.000000011924881, z: -0, w: 1} + m_LocalPosition: {x: -0.0026132083, y: 0.00066312787, z: -0.00078814983} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4934269572281083963} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &5652713281379456616 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6802495391375884829} + m_LocalRotation: {x: 0, y: -0.000000011924881, z: -0, w: 1} + m_LocalPosition: {x: 0.00091118336, y: -0.00010308534, z: 0.0006720567} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4934269572281083963} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &5680486695701624368 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 366175169152686210} + m_Layer: 0 + m_Name: mixamorig:Spine2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5687382821897077147 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6456393697205194991} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.0001781847, y: 0.00007026675, z: -0.00053610007} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 345567140} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &5692947502561580056 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1599464333670017566} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!114 &5692947502561580057 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1599464333670017566} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 4282998662405287153} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &5692947502561580058 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1599464333670017566} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: -1671475766378298110, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!33 &5697322134873038083 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6536037933398504728} + m_Mesh: {fileID: -1504891409508278186, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &5740554174508195627 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8592795873994188302} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.000000007450581, y: 0.0000022500753, z: 0.00000023841858} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450653146961812} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &5742672706361310209 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1565405416653235286} + m_LocalRotation: {x: -0.027586535, y: 0, z: -0, w: 0.9996194} + m_LocalPosition: {x: -0, y: 0.085080564, z: -0.0046995264} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1202371031577307369} + m_Father: {fileID: 5465940245800636306} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &5744108904496208341 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3268018479852605235} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &5745358289504497519 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6833846120200934087} + m_Layer: 0 + m_Name: mixamorig:LeftHandMiddle2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &5763990593621633427 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7967627429162474623} + - component: {fileID: 553485972152636556} + - component: {fileID: 7249977471821933725} + m_Layer: 7 + m_Name: pSphere16688 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &5780106753361420912 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2523003144201920636} + m_Mesh: {fileID: 8418635518983783903, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &5790970485783337941 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8817898887067909486} + m_LocalRotation: {x: -0.237914, y: 0.14097936, z: 0.034925174, w: 0.9603656} + m_LocalPosition: {x: -0.000000014901161, y: 0.12573779, z: 0.00000035762787} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7410462539888490004} + m_Father: {fileID: 2420202490545817625} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &5847256845293654975 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3194478479479597839} + m_Mesh: {fileID: -4279604626400628910, guid: a1f1e83a4c64bee4a88bb2f18c084341, type: 3} +--- !u!4 &5901452234272423301 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7442015437837634441} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0, y: 0.11500728, z: 0.019331802} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8700783697221466475} + m_Father: {fileID: 6515712192867636479} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &5941590189966779110 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6120147202655328318} + m_Mesh: {fileID: 3230736716819529079, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &6000407481014523880 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 152878828318821035} + m_LocalRotation: {x: -0.22919112, y: -0.03128166, z: -0.007369564, w: 0.9728508} + m_LocalPosition: {x: -0.0000000037252903, y: 0.1257377, z: -0.00000023841858} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2563496968498593093} + m_Father: {fileID: 7078722786081206640} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &6009105003768409626 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6655383508000339802} + m_Layer: 0 + m_Name: mixamorig:LeftHandPinky2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &6051129461637323441 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7314271389142287775} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &6069836247873029949 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7542137906147254020} + m_LocalRotation: {x: -0.0000000037252903, y: 9.3132246e-10, z: 0.0000000025611369, w: 1} + m_LocalPosition: {x: 0.0000432916, y: 0.018143296, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2455146754406311557} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &6104295200261876912 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 461627322759338798} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &6120147202655328318 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8064156782530476709} + - component: {fileID: 5941590189966779110} + - component: {fileID: 611325987932838028} + m_Layer: 7 + m_Name: "\u7EBF\u7F0623" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &6136935972115938406 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8169382869690939565} + m_Layer: 0 + m_Name: mixamorig:RightUpLeg + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &6157947579215360509 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4796578925741363150} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &6173118890623103646 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1570371604147209342} + m_Mesh: {fileID: -6163231277755865950, guid: a1f1e83a4c64bee4a88bb2f18c084341, type: 3} +--- !u!4 &6187705274633668163 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4966533302107937367} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0.02485076, y: -0.1286026, z: -0.0066207885} + m_LocalScale: {x: 146.43999, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 98703590638354738} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &6240733294017653436 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 497831375316259495} + m_Layer: 0 + m_Name: mixamorig:LeftHandPinky4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &6268003854793822401 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7161727192589905159} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &6316118119761251965 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 772617247004367733} + - component: {fileID: 3051318130466003698} + - component: {fileID: 8008680019132534273} + - component: {fileID: 8008680019132534275} + - component: {fileID: 8008680019132534274} + m_Layer: 7 + m_Name: "\u7EBF\u7F0626" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6323950000747440233 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2601426291660987956} + m_LocalRotation: {x: -0.04115396, y: -9.359236e-10, z: 9.2528686e-11, w: 0.99915284} + m_LocalPosition: {x: 0.000015951693, y: 0.025168836, z: -0.00000023841858} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1092408309950727096} + m_Father: {fileID: 9118793900821671905} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &6328583031783875234 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3194478479479597839} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 529b1ba27078076428f0615b45548b43, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &6341119540340234209 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2988780741888852532} + m_LocalRotation: {x: 0.013718172, y: 4.592295e-10, z: -4.7200555e-10, w: 0.99990594} + m_LocalPosition: {x: -0.00005598925, y: 0.029643834, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3199222092153647607} + m_Father: {fileID: 3667946888232000262} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &6394903190299001093 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5410906603427938571} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.00031749767, y: -0.0005816655, z: 0.0002879992} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 810356988} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &6431932596975633959 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2408334408838207284} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!23 &6440091503180571526 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 122910975407467401} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a20b7619a225ee44c8f1ca48bec65c62, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &6452705233941002307 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1339101016707383040} + m_LocalRotation: {x: 0.24874377, y: 0.02191231, z: -0.0056289523, w: 0.9683051} + m_LocalPosition: {x: 0.000000029802322, y: 0.15167943, z: -0.0000000037252903} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4042427858098437525} + m_Father: {fileID: 2348787448170419932} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &6456393697205194991 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5687382821897077147} + - component: {fileID: 25671758346347408} + - component: {fileID: 2291573950284375348} + - component: {fileID: 6456393697205194993} + - component: {fileID: 6456393697205194992} + m_Layer: 7 + m_Name: Object003 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &6456393697205194992 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6456393697205194991} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 873583606023215499} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &6456393697205194993 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6456393697205194991} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: -3531946766418785785, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &6502182840541961518 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4494945601221083425} + m_LocalRotation: {x: -0.025440063, y: -0.13993916, z: 0.021550784, w: 0.98959863} + m_LocalPosition: {x: -0, y: 0.23088801, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1330755670317335297} + - {fileID: 8255111158630547205} + - {fileID: 4747904711169592680} + - {fileID: 6629111071157590194} + - {fileID: 5048025442394260667} + m_Father: {fileID: 7410462539888490004} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &6514210124407229089 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4747904711169592680} + m_Layer: 0 + m_Name: mixamorig:LeftHandPinky1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6515712192867636479 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4028323153361141141} + m_LocalRotation: {x: 0.027586564, y: 0, z: -0, w: 0.9996194} + m_LocalPosition: {x: -0, y: 0.12781513, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5901452234272423301} + m_Father: {fileID: 366175169152686210} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &6536037933398504728 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7499290556563202023} + - component: {fileID: 5697322134873038083} + - component: {fileID: 5558413955029322033} + - component: {fileID: 7499290556563202025} + - component: {fileID: 7499290556563202024} + m_Layer: 7 + m_Name: "\u7EBF\u7F0611" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &6599024349750509711 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5410906603427938571} + m_Mesh: {fileID: -3996760141626369306, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &6629111071157590194 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2586065997241008915} + m_LocalRotation: {x: -0.010120698, y: -0.00028628024, z: 0.02827385, w: 0.999549} + m_LocalPosition: {x: -0.008614652, y: 0.062179685, z: -0.00006246567} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1564860334351488734} + m_Father: {fileID: 6502182840541961518} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &6648159213073605108 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7977018297936883431} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &6650476538356560213 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7977018297936883431} + m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: -0.000433, y: -0.000427, z: -0.000019} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1266354606} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &6655383508000339802 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6009105003768409626} + m_LocalRotation: {x: -0.058694467, y: -1.1615992e-10, z: 0.000000001975649, w: 0.998276} + m_LocalPosition: {x: -0.000012278557, y: 0.023886025, z: 0.00000023841858} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1155344850850702753} + m_Father: {fileID: 4747904711169592680} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &6671171653051582947 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7161727192589905159} + m_Mesh: {fileID: -5183003118388027221, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!33 &6676347101755186236 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4966533302107937367} + m_Mesh: {fileID: 7733717212360752527, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!33 &6707184306886175493 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2546177940106643429} + m_Mesh: {fileID: -680494101330030254, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!33 &6757777363213771731 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1770907914034496457} + m_Mesh: {fileID: 7110613539984323524, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &6781460075862529084 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1570371604147209342} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.19475147, y: 0.006410703, z: 0.12220931} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 659250810} + - {fileID: 23430729} + m_Father: {fileID: 543450653146961812} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &6794518064774738691 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 608559584156280470} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.0009968552, y: 0.0006823787, z: 0.0008834457} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4934269572281083963} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &6802495391375884829 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5652713281379456616} + - component: {fileID: 3677569119359557518} + - component: {fileID: 7441030722579943984} + m_Layer: 7 + m_Name: "\u7EBF\u7F0616" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &6824972183692312769 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8730366743450144978} + - component: {fileID: 3156623898457563776} + - component: {fileID: 4446931587278266967} + m_Layer: 7 + m_Name: "\u7EBF\u7F0614" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!137 &6829318296788649389 +SkinnedMeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5380441135577055994} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 3 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9e4f01f5cbefae8439b17d2493397604, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + serializedVersion: 2 + m_Quality: 0 + m_UpdateWhenOffscreen: 0 + m_SkinnedMotionVectors: 1 + m_Mesh: {fileID: 6408130227516479830, guid: ee451e45686549b40aacd5af45fdb233, type: 3} + m_Bones: + - {fileID: 6515712192867636479} + - {fileID: 5901452234272423301} + - {fileID: 366175169152686210} + - {fileID: 1202371031577307369} + - {fileID: 2420202490545817625} + - {fileID: 5742672706361310209} + - {fileID: 608321760754200209} + - {fileID: 2916570862808555077} + - {fileID: 5465940245800636306} + - {fileID: 7078722786081206640} + - {fileID: 6000407481014523880} + - {fileID: 5477181765508417079} + - {fileID: 5790970485783337941} + - {fileID: 7410462539888490004} + - {fileID: 8169382869690939565} + - {fileID: 2563496968498593093} + - {fileID: 2348787448170419932} + - {fileID: 6452705233941002307} + - {fileID: 2559285841650415342} + - {fileID: 7151331951889542704} + - {fileID: 6502182840541961518} + - {fileID: 4747904711169592680} + - {fileID: 5048025442394260667} + - {fileID: 1852576805692487461} + - {fileID: 1189529851876130949} + - {fileID: 5372056942134867889} + - {fileID: 2455146754406311557} + - {fileID: 3199222092153647607} + - {fileID: 6341119540340234209} + - {fileID: 8352548718221930608} + - {fileID: 2003599736200493559} + - {fileID: 3667946888232000262} + - {fileID: 9118793900821671905} + - {fileID: 6323950000747440233} + - {fileID: 8447082967860796435} + - {fileID: 8153021305291509323} + - {fileID: 3742394133950427366} + - {fileID: 5097370189690586031} + - {fileID: 1092408309950727096} + - {fileID: 6655383508000339802} + - {fileID: 1155344850850702753} + - {fileID: 6833846120200934087} + - {fileID: 3183749883118743280} + - {fileID: 2365583845746092343} + - {fileID: 1031632035427177819} + - {fileID: 6629111071157590194} + - {fileID: 1564860334351488734} + - {fileID: 8255111158630547205} + - {fileID: 1330755670317335297} + - {fileID: 3558328719386320470} + - {fileID: 7358631409246279382} + - {fileID: 7666680084607149221} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 5465940245800636306} + m_AABB: + m_Center: {x: 0.0000526011, y: -0.1440531, z: 0.050138354} + m_Extent: {x: 0.78679144, y: 0.8713213, z: 0.23872888} + m_DirtyAABB: 0 +--- !u!4 &6833846120200934087 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5745358289504497519} + m_LocalRotation: {x: 0.05591927, y: -0.0000000029067737, z: -0.0000000019359605, w: 0.9984353} + m_LocalPosition: {x: 0.0000097081065, y: 0.026772082, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3183749883118743280} + m_Father: {fileID: 8255111158630547205} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &6876092084664887655 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 434291130812448198} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: ee4f3b476e847644a8b8e85602777edf, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &6886943050835836889 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5380441135577055994} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + m_LocalPosition: {x: -0, y: 0, z: 0} + m_LocalScale: {x: 0.393701, y: 0.393701, z: 0.393701} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 543450652139532038} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &7015062079591666802 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3356357160727945627} + m_LocalRotation: {x: 0, y: -0.000000011924881, z: -0, w: 1} + m_LocalPosition: {x: -0.0024991343, y: 0.00066466554, z: -0.00081542967} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4934269572281083963} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &7038477618993137362 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3356357160727945627} + m_Mesh: {fileID: -1900831672993190768, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!1 &7062464053834456986 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4070507212663398037} + - component: {fileID: 4437612932489133271} + - component: {fileID: 5148572318081622913} + - component: {fileID: 7062464053834456988} + - component: {fileID: 7062464053834456987} + m_Layer: 7 + m_Name: "\u7EBF\u7F0618" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &7062464053834456987 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7062464053834456986} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 7186252140739360087} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &7062464053834456988 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7062464053834456986} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: -6500644947824582641, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &7078722786081206640 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9171101143762452} + m_LocalRotation: {x: -0.56652457, y: -0.41500786, z: 0.5901855, w: -0.39811993} + m_LocalPosition: {x: 0.060884394, y: 0.10588753, z: -0.002473224} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6000407481014523880} + m_Father: {fileID: 366175169152686210} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &7090244123832603613 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2523003144201920636} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!114 &7090244123832603614 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2523003144201920636} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 7700093358639259306} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &7090244123832603615 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2523003144201920636} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 8418635518983783903, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!1 &7138560357548313689 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2348787448170419932} + m_Layer: 0 + m_Name: mixamorig:LeftFoot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &7148290407704868023 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4556318930598687417} + m_Mesh: {fileID: 2833982866831935772, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &7151331951889542704 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3052747000267066093} + m_LocalRotation: {x: -0.08050906, y: 0.0011348403, z: -0.014048648, w: 0.9966542} + m_LocalPosition: {x: 0.000000029802322, y: 0.41559684, z: -0.000000007450581} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2348787448170419932} + m_Father: {fileID: 2559285841650415342} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &7161727192589905159 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3223214614432192775} + - component: {fileID: 6671171653051582947} + - component: {fileID: 6268003854793822401} + - component: {fileID: 7161727192589905161} + - component: {fileID: 7161727192589905160} + m_Layer: 7 + m_Name: "\u7EBF\u7F0615" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &7161727192589905160 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7161727192589905159} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1835685155622220431} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &7161727192589905161 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7161727192589905159} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: -5183003118388027221, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &7186252140739360086 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4758907333267819335} + m_LocalRotation: {x: 0.00000008146034, y: 0, z: -0, w: 1} + m_LocalPosition: {x: -0.0867868, y: 0.13732475, z: 0.012181088} + m_LocalScale: {x: 0.682873, y: 0.682873, z: 0.682873} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 325451984} + - {fileID: 4998189464348554806} + m_Father: {fileID: 2591019038652623238} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &7186252140739360087 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4758907333267819335} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41b247796aa1fe84899d9a663784684c, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "C_out_\u7EBF" + _highlight: {fileID: 0} + toolType: 12 + isMoving: 0 + isConnected: 1 + screws: + - {fileID: 3322083525341225171} + - {fileID: 3322083525341225170} +--- !u!114 &7186252140739360088 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4758907333267819335} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 3 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!33 &7194665904597350155 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2821543180573937230} + m_Mesh: {fileID: 1860764037295464059, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!23 &7221431641791205997 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1570371604147209342} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: ee4f3b476e847644a8b8e85602777edf, type: 2} + - {fileID: 2100000, guid: 4318e05c0f609474985749d11485150e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!114 &7221431641791205998 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1570371604147209342} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 1 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 1 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!23 &7249977471821933725 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5763990593621633427} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &7276296448443433598 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4204295178576035376} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: -0.07502359, y: -0.047723692, z: -0.005123253} + m_LocalScale: {x: 146.43999, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 824515504563392176} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &7314271389142287775 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5488424282546057137} + - component: {fileID: 2990767918641012808} + - component: {fileID: 6051129461637323441} + - component: {fileID: 7314271389142287777} + - component: {fileID: 7314271389142287776} + m_Layer: 7 + m_Name: "\u7EBF\u7F0602" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &7314271389142287776 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7314271389142287775} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 9056950828145047996} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &7314271389142287777 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7314271389142287775} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 7648359724212481607, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!23 &7339486731692534123 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8462084880560888935} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &7353300493510838823 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4923577926790099015} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0.049387913, y: -0.11023468, z: -0.010265465} + m_LocalScale: {x: 146.43999, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4747287885685369931} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &7358631409246279382 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1217362269991265753} + m_LocalRotation: {x: 0.038270876, y: 9.440062e-10, z: 3.1334757e-10, w: 0.9992674} + m_LocalPosition: {x: -0.000008881092, y: 0.019134283, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 889744324847561843} + m_Father: {fileID: 7666680084607149221} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &7363479243820936525 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2365583845746092343} + m_Layer: 0 + m_Name: mixamorig:LeftHandThumb2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7410462539888490004 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3948933246805351846} + m_LocalRotation: {x: 0.09496253, y: -0.0076553817, z: -0.07998874, w: 0.9922325} + m_LocalPosition: {x: -0, y: 0.23258305, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6502182840541961518} + m_Father: {fileID: 5790970485783337941} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &7441030722579943984 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6802495391375884829} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &7442015437837634441 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5901452234272423301} + m_Layer: 0 + m_Name: mixamorig:Head + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &7470190225763718268 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3062985154854182140} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &7499290556563202023 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6536037933398504728} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.00021364726, y: 0.000056451874, z: 0.000066759894} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 325451984} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &7499290556563202024 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6536037933398504728} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 7186252140739360087} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &7499290556563202025 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6536037933398504728} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: -1504891409508278186, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!23 &7500054424629047027 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4016116851318354297} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &7519898546537971884 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4042427858098437525} + m_Layer: 0 + m_Name: mixamorig:LeftToe_End + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &7542137906147254020 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6069836247873029949} + m_Layer: 0 + m_Name: mixamorig:RightHandPinky4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7666680084607149221 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8670540287956592066} + m_LocalRotation: {x: 0.022680186, y: 3.2178912e-12, z: 1.4184469e-10, w: 0.9997428} + m_LocalPosition: {x: 0.000035453588, y: 0.020540178, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7358631409246279382} + m_Father: {fileID: 1330755670317335297} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &7700093358639259305 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3036967995131516333} + - component: {fileID: 7700093358639259306} + - component: {fileID: 7700093358639259307} + m_Layer: 7 + m_Name: "B_in_\u7EBF" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &7700093358639259306 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7700093358639259305} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41b247796aa1fe84899d9a663784684c, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "B_in_\u7EBF" + _highlight: {fileID: 0} + toolType: 12 + isMoving: 0 + isConnected: 1 + screws: + - {fileID: 3322083525341225177} + - {fileID: 3322083525341225176} +--- !u!114 &7700093358639259307 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7700093358639259305} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 5 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!1 &7732535365226413330 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9118793900821671905} + m_Layer: 0 + m_Name: mixamorig:RightHandRing1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &7776229725599993088 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5048025442394260667} + m_Layer: 0 + m_Name: mixamorig:LeftHandThumb1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &7797580424071784295 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3558328719386320470} + m_Layer: 0 + m_Name: mixamorig:LeftHandRing3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &7828154217890752841 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4747287885685369931} + - component: {fileID: 7828154217890752842} + - component: {fileID: 7828154217890752843} + m_Layer: 7 + m_Name: "A_in_\u7EBF" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &7828154217890752842 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7828154217890752841} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41b247796aa1fe84899d9a663784684c, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "A_in_\u7EBF" + _highlight: {fileID: 0} + toolType: 12 + isMoving: 0 + isConnected: 1 + screws: + - {fileID: 3322083525341225181} + - {fileID: 3322083525341225180} +--- !u!114 &7828154217890752843 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7828154217890752841} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 5 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!33 &7915001895247683376 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9135896868843048998} + m_Mesh: {fileID: 4031775341677087993, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &7930214442681379120 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3614653199893330660} + m_LocalRotation: {x: -0.0000000018626451, y: -4.656613e-10, z: -0.0000000029685907, w: 1} + m_LocalPosition: {x: 0.000010997057, y: 0.01896882, z: 0.00000023841858} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5097370189690586031} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &7934756005527238611 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4721841345021564242} + m_LocalRotation: {x: -0.000000022351736, y: -0.000000001862645, z: -0.0000000057043508, w: 1} + m_LocalPosition: {x: -0.0000045597553, y: 0.02064073, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3183749883118743280} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &7955220042844691740 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1155344850850702753} + m_Layer: 0 + m_Name: mixamorig:LeftHandPinky3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7967627429162474623 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5763990593621633427} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.002402705, y: 0.0006424594, z: -0.0011525678} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4934269572281083963} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &7977018297936883431 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6650476538356560213} + - component: {fileID: 956425023126491919} + - component: {fileID: 6648159213073605108} + - component: {fileID: 7977018297936883433} + - component: {fileID: 7977018297936883432} + m_Layer: 7 + m_Name: "\u7EBF\u7F0627" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &7977018297936883432 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7977018297936883431} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 7828154217890752842} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &7977018297936883433 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7977018297936883431} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: -7456421272584432218, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &7980228399672658471 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3194478479479597839} + m_LocalRotation: {x: -0, y: -0, z: -1, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 711328481} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &8008680019132534273 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6316118119761251965} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!114 &8008680019132534274 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6316118119761251965} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1835685155622220431} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &8008680019132534275 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6316118119761251965} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 4072514858154037192, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &8020243057960156803 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 122910975407467401} + m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.70710677} + m_LocalPosition: {x: 0.006252909, y: -0.04281187, z: -0.002464112} + m_LocalScale: {x: 0.009342001, y: 0.009342001, z: 0.009342001} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8700783697221466475} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &8022515959110641102 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8044669281194295015} + m_Layer: 0 + m_Name: mixamorig:RightToe_End + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8044669281194295015 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8022515959110641102} + m_LocalRotation: {x: 2.3852448e-17, y: -0.0000000037252903, z: 0.0000000064028427, w: 1} + m_LocalPosition: {x: 0.000000029802322, y: 0.06157075, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2916570862808555077} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &8051425438490921879 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 461627322759338798} + m_Mesh: {fileID: 4966951130932364719, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!114 &8051425438490921880 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 461627322759338798} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 9056950828145047996} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &8051425438490921881 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 461627322759338798} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 4966951130932364719, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &8064156782530476709 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6120147202655328318} + m_LocalRotation: {x: 0, y: -0.000000011924881, z: -0, w: 1} + m_LocalPosition: {x: -0.002376902, y: 0.00063583057, z: -0.00081542967} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4934269572281083963} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &8068779415140856140 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8114224637867779677} + m_LocalRotation: {x: 0.00000008146034, y: 0, z: -0, w: 1} + m_LocalPosition: {x: -0.07686622, y: 0.13732475, z: 0.010788113} + m_LocalScale: {x: 0.682873, y: 0.682873, z: 0.682873} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 810356988} + m_Father: {fileID: 2591019038652623238} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &8114224637867779677 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8068779415140856140} + - component: {fileID: 8114224637867779678} + - component: {fileID: 8114224637867779679} + m_Layer: 7 + m_Name: "\u96F6_\u5730_\u7EBF" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8114224637867779678 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8114224637867779677} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41b247796aa1fe84899d9a663784684c, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "\u96F6_\u5730_\u7EBF" + _highlight: {fileID: 0} + toolType: 12 + isMoving: 0 + isConnected: 1 + screws: + - {fileID: 3322083525341225167} + - {fileID: 3322083525341225166} +--- !u!114 &8114224637867779679 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8114224637867779677} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 2 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!4 &8153021305291509323 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1862624589212617346} + m_LocalRotation: {x: 0.036121987, y: 0.00023583924, z: 0.0065245535, w: 0.99932605} + m_LocalPosition: {x: -0.02715855, y: 0.06323236, z: 0.00011456013} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3742394133950427366} + m_Father: {fileID: 1852576805692487461} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &8169382869690939565 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6136935972115938406} + m_LocalRotation: {x: -0.00014237934, y: -0.0023845052, z: 0.9982207, w: -0.05958005} + m_LocalPosition: {x: 0.07219199, y: -0.047150552, z: -0.008962357} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5477181765508417079} + m_Father: {fileID: 5465940245800636306} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &8185341331982980675 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4636473757738917395} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &8251234210062096111 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4224283833996485287} + m_LocalRotation: {x: 0.000000007450583, y: 3.1225036e-17, z: 0.000000004190952, w: 1} + m_LocalPosition: {x: -0.000016938895, y: 0.021913707, z: 0.00000011920929} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3558328719386320470} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &8255111158630547205 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9037727975177536211} + m_LocalRotation: {x: -0.03647988, y: 0.0007615479, z: -0.020857438, w: 0.9991164} + m_LocalPosition: {x: 0.008253243, y: 0.07306528, z: -0.0013549328} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6833846120200934087} + m_Father: {fileID: 6502182840541961518} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &8339329295935652015 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8573176959571749146} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.0000491715, y: -0.000033340537, z: -0.00048559945} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1284177668} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &8352548718221930608 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8953972738813810281} + m_LocalRotation: {x: -0.038009312, y: -0.0000000059312497, z: 0.0000000089196055, w: 0.9992774} + m_LocalPosition: {x: -0.00600788, y: 0.020941228, z: 0.00000023841858} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2003599736200493559} + m_Father: {fileID: 8447082967860796435} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &8377386735191376848 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1770907914034496457} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!4 &8447082967860796435 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5423976340205951611} + m_LocalRotation: {x: 0.04577497, y: 0.015577201, z: 0.3217801, w: 0.945579} + m_LocalPosition: {x: -0.021843053, y: 0.0160653, z: 0.0025285482} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8352548718221930608} + m_Father: {fileID: 1852576805692487461} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &8462084880560888935 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5286605781624325523} + - component: {fileID: 1767338888452057641} + - component: {fileID: 7339486731692534123} + - component: {fileID: 8462084880560888937} + - component: {fileID: 8462084880560888936} + m_Layer: 7 + m_Name: "\u7EBF\u7F0619" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8462084880560888936 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8462084880560888935} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 4282998662405287153} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &8462084880560888937 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8462084880560888935} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: -3637364234581469759, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!1 &8471895809214791806 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 608321760754200209} + m_Layer: 0 + m_Name: mixamorig:RightFoot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &8480345817307430846 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4556318930598687417} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!114 &8480345817307430847 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4556318930598687417} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 8114224637867779678} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &8480345817307430848 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4556318930598687417} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 2833982866831935772, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!33 &8525641402901082435 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4204295178576035376} + m_Mesh: {fileID: 2675016291901819486, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!33 &8525773095544777909 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2408334408838207284} + m_Mesh: {fileID: -8113768720884857512, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!114 &8525773095544777910 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2408334408838207284} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 7700093358639259306} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &8525773095544777911 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2408334408838207284} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: -8113768720884857512, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!1 &8573176959571749146 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8339329295935652015} + - component: {fileID: 133750975383923016} + - component: {fileID: 5234653474554988923} + - component: {fileID: 8573176959571749148} + - component: {fileID: 8573176959571749147} + m_Layer: 7 + m_Name: "\u7EBF\u7F0612" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &8573176959571749147 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8573176959571749146} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 873583606023215499} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &8573176959571749148 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8573176959571749146} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 2919977959394850775, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!1 &8592795873994188302 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5740554174508195627} + - component: {fileID: 5557296764936854557} + - component: {fileID: 337714631986259594} + m_Layer: 0 + m_Name: C155___6 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &8670540287956592066 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7666680084607149221} + m_Layer: 0 + m_Name: mixamorig:LeftHandIndex2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8700783697221466475 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2898355159384505641} + m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0, y: 0.18499947, z: 0.031096943} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8020243057960156803} + m_Father: {fileID: 5901452234272423301} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &8730366743450144978 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6824972183692312769} + m_LocalRotation: {x: 0, y: -0.000000011924881, z: -0, w: 1} + m_LocalPosition: {x: 0.00078792317, y: -0.00010308534, z: 0.0006720567} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4934269572281083963} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &8740202633155158324 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4796578925741363150} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: -0.13671711, y: -0.047723692, z: -0.010059337} + m_LocalScale: {x: 146.43999, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1835685155622220430} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &8817898887067909486 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5790970485783337941} + m_Layer: 0 + m_Name: mixamorig:LeftArm + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1001 &8820952056044702011 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1584432035} + m_Modifications: + - target: {fileID: 1627081842395861, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 14b7ce7899ab5104e866597407f38385, type: 2} + - target: {fileID: 73270659706458397, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 121293987052164525, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 160778709743022122, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 308833620792198714, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.y + value: 1.1764 + objectReference: {fileID: 0} + - target: {fileID: 308833620792198714, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.302 + objectReference: {fileID: 0} + - target: {fileID: 349553363809177638, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 385252101148282165, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.222 + objectReference: {fileID: 0} + - target: {fileID: 385252101148282165, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.2695 + objectReference: {fileID: 0} + - target: {fileID: 405701247773624579, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + - target: {fileID: 571430265641358274, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 873425296020614519, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 14b7ce7899ab5104e866597407f38385, type: 2} + - target: {fileID: 1119237858810993493, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1142493415734142929, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.0671 + objectReference: {fileID: 0} + - target: {fileID: 1142493415734142929, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.2727 + objectReference: {fileID: 0} + - target: {fileID: 1360190718482989729, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.2757947 + objectReference: {fileID: 0} + - target: {fileID: 1360190718482989729, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.27073574 + objectReference: {fileID: 0} + - target: {fileID: 1420342462249333838, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 14b7ce7899ab5104e866597407f38385, type: 2} + - target: {fileID: 1429505683436661527, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1429505683436661527, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1480197826108686512, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1824164864326867057, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.0516 + objectReference: {fileID: 0} + - target: {fileID: 1824164864326867057, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.3048 + objectReference: {fileID: 0} + - target: {fileID: 1924352979358058500, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 862fbba5633e6d242a597daa7a2be3cc, type: 2} + - target: {fileID: 2033646130684410113, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.1305 + objectReference: {fileID: 0} + - target: {fileID: 2033646130684410113, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.2611 + objectReference: {fileID: 0} + - target: {fileID: 2292501707310495772, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 14b7ce7899ab5104e866597407f38385, type: 2} + - target: {fileID: 2460614059487426841, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.y + value: 1.1764 + objectReference: {fileID: 0} + - target: {fileID: 2460614059487426841, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.2746 + objectReference: {fileID: 0} + - target: {fileID: 2698790498680266458, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 862fbba5633e6d242a597daa7a2be3cc, type: 2} + - target: {fileID: 2849474882279565441, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 862fbba5633e6d242a597daa7a2be3cc, type: 2} + - target: {fileID: 3142397062983177574, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3326421879806180381, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3866984433905226568, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.18806 + objectReference: {fileID: 0} + - target: {fileID: 3866984433905226568, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.29679 + objectReference: {fileID: 0} + - target: {fileID: 4062056463391916711, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4403667990868686459, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4492232629431655059, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4807741152875788632, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5340541412905796651, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5354117605113294983, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + - target: {fileID: 5498962460313838433, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: -0.0103 + objectReference: {fileID: 0} + - target: {fileID: 5498962460313838433, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.29 + objectReference: {fileID: 0} + - target: {fileID: 5881543561601833798, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.139 + objectReference: {fileID: 0} + - target: {fileID: 5881543561601833798, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.3106 + objectReference: {fileID: 0} + - target: {fileID: 5981576137832816387, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.10756 + objectReference: {fileID: 0} + - target: {fileID: 5981576137832816387, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.3033498 + objectReference: {fileID: 0} + - target: {fileID: 6115357343493290438, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134047903981462654, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + - target: {fileID: 6188354548507528596, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + - target: {fileID: 6194122662260195393, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6263672150686216569, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6495744209936146145, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6613872063962319176, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + - target: {fileID: 6622841492654514866, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.014 + objectReference: {fileID: 0} + - target: {fileID: 6622841492654514866, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.2996 + objectReference: {fileID: 0} + - target: {fileID: 6691215823501836399, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + - target: {fileID: 7106980553896808231, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.0682 + objectReference: {fileID: 0} + - target: {fileID: 7106980553896808231, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.2439 + objectReference: {fileID: 0} + - target: {fileID: 7417573084244074375, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + - target: {fileID: 7549711858477645100, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7576728703908038702, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 862fbba5633e6d242a597daa7a2be3cc, type: 2} + - target: {fileID: 7645370110410548891, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 862fbba5633e6d242a597daa7a2be3cc, type: 2} + - target: {fileID: 7759141212438458551, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.2458 + objectReference: {fileID: 0} + - target: {fileID: 7759141212438458551, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.2768 + objectReference: {fileID: 0} + - target: {fileID: 8189795699094300300, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + - target: {fileID: 8282109888006790520, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8309719282217808703, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 862fbba5633e6d242a597daa7a2be3cc, type: 2} + - target: {fileID: 8346511203215235905, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8459767468777173959, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + - target: {fileID: 8525691116329017914, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.1802 + objectReference: {fileID: 0} + - target: {fileID: 8525691116329017914, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.2741 + objectReference: {fileID: 0} + - target: {fileID: 8549077564971443655, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.1199 + objectReference: {fileID: 0} + - target: {fileID: 8549077564971443655, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.2845 + objectReference: {fileID: 0} + - target: {fileID: 8550990959972041254, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Name + value: "\u6742\u7269" + objectReference: {fileID: 0} + - target: {fileID: 8550990959972041254, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8550990959972041254, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8663411435246207266, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8771583904196222402, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 862fbba5633e6d242a597daa7a2be3cc, type: 2} + - target: {fileID: 8804785270243441041, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + - target: {fileID: 8820952056471289706, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: rmsCount + value: 21 + objectReference: {fileID: 0} + - target: {fileID: 8820952056471289707, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Size.x + value: 0.32182205 + objectReference: {fileID: 0} + - target: {fileID: 8820952056471289707, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Size.z + value: 0.1244812 + objectReference: {fileID: 0} + - target: {fileID: 8820952056471289707, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Center.x + value: -0.09519249 + objectReference: {fileID: 0} + - target: {fileID: 8820952056471289707, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Center.y + value: 0.0014811186 + objectReference: {fileID: 0} + - target: {fileID: 8820952056471289707, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_Center.z + value: -0.007659912 + objectReference: {fileID: 0} + - target: {fileID: 8965272610182031804, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9070505103643220124, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 9070505103643220124, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.x + value: -0.11687089 + objectReference: {fileID: 0} + - target: {fileID: 9070505103643220124, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.y + value: -0.22986054 + objectReference: {fileID: 0} + - target: {fileID: 9070505103643220124, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalPosition.z + value: 0.060562156 + objectReference: {fileID: 0} + - target: {fileID: 9070505103643220124, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9070505103643220124, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 9070505103643220124, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9070505103643220124, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 9070505103643220124, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9070505103643220124, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 9070505103643220124, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9076937868049187441, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} +--- !u!4 &8820952056044702012 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9070505103643220124, guid: 470bef2fcfcd2c945aba83ad9dff030c, type: 3} + m_PrefabInstance: {fileID: 8820952056044702011} + m_PrefabAsset: {fileID: 0} +--- !u!1 &8835129526263918860 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5589798272978919662} + - component: {fileID: 1299406472071844574} + - component: {fileID: 3286160701569460988} + m_Layer: 7 + m_Name: "\u7EBF\u7F0621" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &8932621592901728018 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2563496968498593093} + m_Layer: 0 + m_Name: mixamorig:RightForeArm + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &8949931049186725723 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4966533302107937367} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &8953972738813810281 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8352548718221930608} + m_Layer: 0 + m_Name: mixamorig:RightHandThumb2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &8977030026394259917 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5410906603427938571} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9995a3a5744a8bd439959d7b69853aa6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!114 &8977030026394259918 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5410906603427938571} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 8114224637867779678} + m_TargetAssemblyTypeName: Tool_Line, Assembly-CSharp + m_MethodName: MyOnMDown + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!64 &8977030026394259919 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5410906603427938571} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: -3996760141626369306, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!1 &9019515341942858986 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1202371031577307369} + m_Layer: 0 + m_Name: mixamorig:Spine1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &9037727975177536211 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8255111158630547205} + m_Layer: 0 + m_Name: mixamorig:LeftHandMiddle1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &9056950828145047995 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3586611681676375721} + - component: {fileID: 9056950828145047996} + - component: {fileID: 9056950828145047997} + m_Layer: 7 + m_Name: "A_out_\u7EBF" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &9056950828145047996 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9056950828145047995} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41b247796aa1fe84899d9a663784684c, type: 3} + m_Name: + m_EditorClassIdentifier: + triggerID: 0 + triggerName: "A_out_\u7EBF" + _highlight: {fileID: 0} + toolType: 12 + isMoving: 0 + isConnected: 1 + screws: + - {fileID: 3322083525341225179} + - {fileID: 3322083525341225178} +--- !u!114 &9056950828145047997 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9056950828145047995} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.4 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowIgnoreMask: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 3 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!33 &9076905209103937773 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4796578925741363150} + m_Mesh: {fileID: -1576236073621600580, guid: a443510e8e5240046b59f13f94cd7849, type: 3} +--- !u!4 &9117073240587032823 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3912239187119583646} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0.049387913, y: -0.11023468, z: -0.010265465} + m_LocalScale: {x: 146.43999, y: 146.43999, z: 146.43999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4747287885685369931} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &9118793900821671905 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7732535365226413330} + m_LocalRotation: {x: 0.014371639, y: -0.00014862538, z: -0.010339856, w: 0.9998433} + m_LocalPosition: {x: 0.008862779, y: 0.06779206, z: -0.0010601282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6323950000747440233} + m_Father: {fileID: 1852576805692487461} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &9135896868843048998 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4593966406577750282} + - component: {fileID: 7915001895247683376} + - component: {fileID: 3885352906697735407} + m_Layer: 7 + m_Name: "\u7EBF\u7F0607" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &9146825081926634321 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3667946888232000262} + m_Layer: 0 + m_Name: mixamorig:RightHandMiddle1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 diff --git a/Assets/Scenes/10006_6001_05_LiveScene.unity.meta b/Assets/Scenes/10006_6001_05_LiveScene.unity.meta new file mode 100644 index 0000000..ece2413 --- /dev/null +++ b/Assets/Scenes/10006_6001_05_LiveScene.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a507348e7edc6184fba24528e9bf78f4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts.meta b/Assets/Scripts.meta new file mode 100644 index 0000000..94f6310 --- /dev/null +++ b/Assets/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cd330a0200f6c0848bc198432fe88e60 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/4001.meta b/Assets/Scripts/4001.meta new file mode 100644 index 0000000..73f4e32 --- /dev/null +++ b/Assets/Scripts/4001.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5684af2d982c5b14e8f55884da73ac09 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/4001/Device_Control_4001.cs b/Assets/Scripts/4001/Device_Control_4001.cs new file mode 100644 index 0000000..270afa1 --- /dev/null +++ b/Assets/Scripts/4001/Device_Control_4001.cs @@ -0,0 +1,434 @@ +using HighlightPlus; +using Sirenix.Utilities; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Unity.VisualScripting.Antlr3.Runtime; +using UnityEngine; + +/// +/// 10002_2002_װֻ +/// +public class Device_Control_4001 : Device_Control +{ + /// + /// ɼ + /// + public Device_Collector collector; + /// + /// ɼװ + /// + public DeviceTrigger device_collectorTrigger; + /// + /// ɼװλ + /// + public Transform collector_transform; + + /// + /// ǰаװߵܱ + /// + public Device_3Phase4WireMeter meteringDevice; + /// + /// + /// + public Device_Socket socket; + /// + /// 翪 + /// + public Device_Switch inSwitch; + /// + /// ܱ + /// + public List jieXian_lines; + + /// + /// ܱײ + /// + public DeviceTrigger dianTrigger; + /// + /// ܱװɺ + /// + public Device_Sundries sundries; + /// + /// 翪ؽ˿ + /// + public List inSwitchScrews; + /// + /// ߼ + /// + public Check_JieXian check_JieXian; + + #region + /// + /// ˿ + /// + public Tool_Screw door_screw; + /// + /// + /// + public Door cabinetDoor; + /// + /// ŷӡ + /// + public Device_Seal door_seal; + /// + /// ŷӡ + /// + public DeviceTrigger door_seal_trigger; + #endregion + + private void Awake() + { + //ÿƽű + StepStateControl.instance?.SetDeviceControl(4001, this); + ScoreManager.instance?.SetDeviceControl(4001, this); + + //עṤóջأʾķӡĴ + EventCenter.Instance.AddEventListener(Enum_EventType.TakeOutAndRetrievingTheTools, CheckTriggerShow); + + AddActions(); + + sundries.gameObject.SetActive(false); + + //ӵܱ¼ + dianTrigger.clickAction += () => + { + if ((GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(dianTrigger.gameObject.name, true)) == 0) + { + if (meteringDevice == null) + { + //װܱ + if (LiveSceneManager.Instance.currentTool != null && LiveSceneManager.Instance.currentTool.GetComponent() != null) + { + meteringDevice = LiveSceneManager.Instance.currentTool.GetComponent(); + meteringDevice.cover.openLocalPos = new Vector3(0.295f, 0.121f, -0.067f); + meteringDevice.Add(this, dianTrigger.transform.localPosition, dianTrigger.transform.localEulerAngles); + + //߹˿ + SetLineScrew(); + //עص + //AddActions(); + //˿װص + meteringDevice.jieXian_screws.ForEach(screw => + { + screw.AddinstallAction(isinstalled => + { + //ˢ´״̬ + CheckHasElectricity(); + //жϽʾ + CheckJieXianOk(); + }); + }); + //ˢ´״̬ + CheckHasElectricity(); + // + dianTrigger.CallScoreAction(true); + } + } + else + { + //µܱ + meteringDevice.Remove(a => + { + if (a) + { + //³Դĵܱʾ + if (meteringDevice.name == "ԭ߷ѿܱܵ") + { + sundries.gameObject.SetActive(true); + } + meteringDevice = null; + //߹˿ + ClearLineScrew(); + // + dianTrigger.CallScoreAction(false); + } + }); + } + } + }; + + //ŷӡ¼ + door_seal_trigger.clickAction += () => + { + //װӡ + if (door_screw.isInstall) + { + if (GameManager.ProcessMgr == null || GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(door_seal_trigger.name, true) == 0) + { + door_seal.Install(); + door_seal_trigger.gameObject.SetActive(false); + } + } + }; + + //ɼװ¼ + collector.installArea = device_collectorTrigger.transform; + + device_collectorTrigger.clickAction += () => + { + Device_Collector cur_collector = LiveSceneManager.Instance.currentTool.GetComponent(); + cur_collector.Install(collector_transform, new Vector3(0, 180, 0), () => { + collector.MoveToInstall(); + cur_collector.gameObject.SetActive(false); + collector.gameObject.SetActive(true); + if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(device_collectorTrigger.name, true) == 0) + { + ScoreManager.instance.Check(device_collectorTrigger.name, "ɼװ"); + } + }); + }; + + GameManager.UIMgr.ShowPanel();//HQB ʾϵ̨վİť + } + /// + /// Ӹֲص + /// + public void AddActions() + { + //Ŵ + cabinetDoor.canOpen += () => + { + return !door_screw.isInstall; + }; + + //˿ + door_screw.AddCheckAction(() => + { + return door_seal.isCut && !cabinetDoor.isOpen; + }); + + //ӿлص + inSwitch.AddAction(isOpen => + { + //ˢ´״̬ + CheckHasElectricity(); + }); + + //˿װص + meteringDevice.jieXian_screws.ForEach(screw => + { + screw.AddinstallAction(isinstalled => + { + //ˢ´״̬ + CheckHasElectricity(); + //жϽʾ + CheckJieXianOk(); + }); + }); + + //Ӻȡ»صжϻص + jieXian_lines.ForEach(line => + { + //޵ܱƶ + line.AddCanMoveCheck(() => { return meteringDevice != null; }); + + line.AddCompleteAction(isConnected => + { + //ˢ´״̬ + CheckHasElectricity(); + //жϽʾ + CheckJieXianOk(); + }); + }); + + ///˿ɲж + inSwitchScrews.ForEach(a => + { + a.AddCheckAction(() => + { + //ʾɲ + TipPanel.ShowTip("ǰ˿ɲж"); + return false; + }); + }); + } + + /// + /// ԭ״̬ + /// + public void Init() + { + //ԭߵܱ + if (meteringDevice == null) + { + meteringDevice = GameObject.FindObjectOfType(true); + } + meteringDevice.Init(true); + //ԭ + check_JieXian.isChecked = false; + check_JieXian.gameObject.SetActive(true); + + //ԭ + cabinetDoor.SetState(false); + door_screw.isInstall = true; + door_screw.transform.localPosition = new Vector3(door_screw.transform.localPosition.x, door_screw.initPostionY, door_screw.transform.localPosition.z); + door_seal.isCut = false; + door_seal.gameObject.SetActive(true); + + //ԭ + + //ԭ߿ + inSwitch.OpenState(); + //ԭܱ + jieXian_lines.ForEach(line => + { + line.SetConenctState(true); + }); + //ԭ + sundries.gameObject.SetActive(false); + + //ˢ״̬ + CheckHasElectricity(); + + //ԭɼ HQB + collector.Init(true); + } + + /// + /// սߵ˿ + /// + public void ClearLineScrew() + { + Debug.Log("߹˿"); + jieXian_lines.ForEach(a => + { + a.screws.Clear(); + }); + } + /// + /// ýߵ˿ + /// + public void SetLineScrew() + { + Debug.Log("¹˿"); + jieXian_lines.ForEach(a => + { + a.screws = meteringDevice.jieXian_screws.FindAll(b => b.gameObject.name.StartsWith(a.gameObject.name.Replace("", ""))); + if (a.screws == null || a.screws.Count == 0) + { + Debug.LogError("δҵӦ˿"); + } + }); + } + + /// + /// ˢµܱ˿״̬ + /// + public void CheckHasElectricity() + { + Debug.Log("״̬ˢ"); + //˿Ƿ + jieXian_lines.ForEach(a => + { + if (!inSwitch.isOpen) + { + //عرղ + a.screws.ForEach(b => b.hasElectricity = false); + } + else + { + //ش--߽--˿šϴ + if (!a.isConnected) + { + a.screws.ForEach(b => b.hasElectricity = false); + } + else + { + a.screws.ForEach(b => + { + //װ + //޵еѹ + if (b.triggerName.Contains("")) + { + b.hasElectricity = false; + } + else + { + //ĿǷϵ + b.hasElectricity = b.isInstall; + } + }); + } + } + }); + //翪˿Ƿ + inSwitchScrews.ForEach(a => + { + a.hasElectricity = inSwitch.isOpen; + }); + //ܱǷ + if (meteringDevice != null) + meteringDevice.screemControl.hasElectricity = (inSwitch.isOpen && jieXian_lines.All(line => line.isConnected)); + } + /// + /// ˢ½õʾ + /// + public void CheckJieXianOk() + { + if (jieXian_lines.TrueForAll(a => a.isConnected) && meteringDevice.jieXian_screws.TrueForAll(a => a.isInstall)) + { + //ʾ + check_JieXian.isChecked = false; + check_JieXian.gameObject.SetActive(true); + Debug.Log("ʾ"); + } + else + { + //ؽ + check_JieXian.isChecked = true; + check_JieXian.gameObject.SetActive(false); + Debug.Log("ؽ"); + } + } + + private void FixedUpdate() + { + //ǷԴܱIJжװ + if (meteringDevice == null) + { + dianTrigger.gameObject.SetActive(true); + } + else + { + //̶ܱ˿ˣ߲ + if (!meteringDevice.fix_screw_left.isInstall && !meteringDevice.fix_screw_right.isInstall && jieXian_lines.TrueForAll(a => !a.isConnected)) + { + dianTrigger.gameObject.SetActive(true); + } + else + { + dianTrigger.gameObject.SetActive(false); + } + } + } + + /// + /// ʾطӡ + /// + /// + private void CheckTriggerShow(GameObject obj) + { + if (obj == null) + { + //ջ + Debug.Log("ջ"); + door_seal_trigger.gameObject.SetActive(false); + } + else + { + //ó + Debug.Log("ó"); + if (obj.name == "װӡ") + { + if (!cabinetDoor.isOpen && door_seal.isCut && door_screw.isInstall) + door_seal_trigger.gameObject.SetActive(true); + } + } + } + + protected void OnDestroy() + { + EventCenter.Instance.RemoveEventListener(Enum_EventType.TakeOutAndRetrievingTheTools, CheckTriggerShow); + } +} diff --git a/Assets/Scripts/4001/Device_Control_4001.cs.meta b/Assets/Scripts/4001/Device_Control_4001.cs.meta new file mode 100644 index 0000000..a3f4312 --- /dev/null +++ b/Assets/Scripts/4001/Device_Control_4001.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e0f2749bad1884449b25b2f9f261519d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/4001/MobileAttach10004_4001.cs b/Assets/Scripts/4001/MobileAttach10004_4001.cs new file mode 100644 index 0000000..3dabb7c --- /dev/null +++ b/Assets/Scripts/4001/MobileAttach10004_4001.cs @@ -0,0 +1,40 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class MobileAttach10004_4001 : MonoBehaviour +{ + //public void OnReceiveTask(string triggerName) + //{ + // if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, false) == 0) + // { + // GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel) => + // { + // panel.Init(triggerName, Input.mousePosition); + // }); + // } + //} + public void OnDialogue(string triggerName) + { + GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel) => + { + panel.Init(triggerName, "您好,主站初步排查xxx客户采集故障,导致9月25日没有抄表数据。", PlayerTalk, 0); + }); + } + + private void PlayerTalk(string triggerName) + { + if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, false) == 0) + { + GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel) => + { + panel.Init(triggerName, "好的", "班组成员", 1, (intTemp) => + { + ScoreManager.instance.Check(triggerName, "线损异常类型研判完成"); + GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, true); + GameManager.UIMgr.HidePanel(); + }); + }); + } + } +} diff --git a/Assets/Scripts/4001/MobileAttach10004_4001.cs.meta b/Assets/Scripts/4001/MobileAttach10004_4001.cs.meta new file mode 100644 index 0000000..b323307 --- /dev/null +++ b/Assets/Scripts/4001/MobileAttach10004_4001.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6426b308cc345ce448094c8d3e807617 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/4001/Score_4001.cs b/Assets/Scripts/4001/Score_4001.cs new file mode 100644 index 0000000..8564d43 --- /dev/null +++ b/Assets/Scripts/4001/Score_4001.cs @@ -0,0 +1,399 @@ +using Newtonsoft.Json; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using LitJson; + +/// +/// õȫbuffer +/// +public class BufferTemp_4001 +{ + public List TestPen3list; + public List InSwitchCloseYDList; + public List InSwitchOpenYDList; + public List currentunInstallJieXian; + public List currentInstallJieXian; + public List installCover; + public List currentInstallTestJieXian; + +} + +public class Score_4001 : ScoreBase +{ + /// + /// ֳе + /// + private Device_Control_4001 device_Control; + + /// + /// ʼõķûʹĬϵķ + /// + public override void Init() + { + base.Init(); + List tmps = new List(); + tmps.Add(new ScoreSubjectStep(1, 0));//쳣_ + tmps.Add(new ScoreSubjectStep(2, 0));//쳣_ + tmps.Add(new ScoreSubjectStep(3, 5));//ԤԼ_ + tmps.Add(new ScoreSubjectStep(4, 5));//Ʊ_ + tmps.Add(new ScoreSubjectStep(5, 5));//ȷװ_ + tmps.Add(new ScoreSubjectStep(6, 10));//ѡȡ_ + tmps.Add(new ScoreSubjectStep(7, 5));//ͻͨ_ + tmps.Add(new ScoreSubjectStep(8, 0));//ǰ_ + tmps.Add(new ScoreSubjectStep(9, 3));//ɼ + tmps.Add(new ScoreSubjectStep(10, 4));//ɼϴ + tmps.Add(new ScoreSubjectStep(11, 4));//ֳ_ + + + steps = new Dictionary(); + tmps.ForEach(a => + { + steps.Add(a.subProcessId, a); + }); + + List dsteps = new List(); + DataManager.Instance.d_System.subjects.Find(a => a.id == schemeId).processes.ForEach(a => + { + dsteps.AddRange(a.subProcesses); + }); + + for (int i = 0; i < steps.Count; i++) + { + steps[i + 1].step = dsteps[i]; + } + + // + TestPen3list.Clear(); + InSwitchCloseYDList.Clear(); + InSwitchOpenYDList.Clear(); + currentunInstallJieXian.Clear(); + currentInstallJieXian.Clear(); + installCover.Clear(); + currentInstallTestJieXian.Clear(); + reInstall = false; + } + + public override void SetDeviceControl(Device_Control device_Control) + { + this.device_Control = (Device_Control_4001)device_Control; + } + /// + /// ˳ + /// + List TestPen3list = new List(); + /// + /// ضϵ + /// + List InSwitchCloseYDList = new List(); + /// + /// ͨ + /// + List InSwitchOpenYDList = new List(); + /// + /// ˳ + /// + List unInstallJieXian = new List() + { + "A_in_˿up", "A_in_˿down", "A_in_", + "B_in_˿up","B_in_˿down","B_in_", + "C_in_˿up","C_in_˿down","C_in_", + "A_out_˿up","A_out_˿down","A_out_", + "B_out_˿up","B_out_˿down","B_out_", + "C_out_˿up","C_out_˿down","C_out_", + "__˿up","__˿down","__", + "_out_˿up","_out_˿down","_out_" + }; + /// + /// ˿ + /// + List currentunInstallJieXian = new List(); + /// + /// װ˿˳ + /// + List installJieXian = new List() + { + "_out_","_out_˿up","_out_˿down", + "__","__˿up","__˿down", + "C_out_","C_out_˿up","C_out_˿down", + "B_out_","B_out_˿up","B_out_˿down", + "A_out_","A_out_˿up","A_out_˿down", + "C_in_","C_in_˿up","C_in_˿down", + "B_in_","B_in_˿up","B_in_˿down", + "A_in_","A_in_˿up", "A_in_˿down" + }; + /// + /// װ˿ + /// + List currentInstallJieXian = new List(); + + /// + /// װ̰װ + /// + List installCover = new List(); + /// + /// װ̶Խ˿ + /// + List installTestJieXian = new List() { "+A_in_˿", "+B_in_˿", "+C_in_˿" }; + /// + /// װ̶Խ + /// + List currentInstallTestJieXian = new List(); + /// + /// ɼǷװ + /// + bool reInstall = false; + public override void CheckScore(string triggerName, object para) + { + base.CheckScore(triggerName, para); + if (triggerName == "") + { + if (para.ToString() == "쳣") + { + steps[1].SetScore(true);//쳣 + } + } + if (triggerName == "ֻ") + { + if (para.ToString() == "쳣") + { + steps[2].SetScore(true);//1->2 쳣 + } + else if (para.ToString() == "ԤԼ") + { + steps[3].SetScore(true);//2->3 ԤԼ + } + } + else if (triggerName == "ѹƱȷϰť") + { + steps[4].SetScore(true);//3->4 Ʊ + } + else if (triggerName == "ֳť") + { + //Ƿ񴩴 + float tmp = 0; + tmp += (PacksackBagMgr.Instance.wearDic.ContainsKey("ȫñ") ? 0.25f : 0); + tmp += (PacksackBagMgr.Instance.wearDic.ContainsKey("") ? 0.25f : 0); + tmp += (PacksackBagMgr.Instance.wearDic.ContainsKey("֯") ? 0.25f : 0); + tmp += (PacksackBagMgr.Instance.wearDic.ContainsKey("Եѥ") ? 0.25f : 0); + steps[5].SetScore(tmp); + + //鱳ǷЯ + string[] shoudleTools = new string[] { "ǯ", "Ե˿", "", "ȫñ", "", "֯", "Եѥ", "֤", "װӡ", "ɼ" }; + float tmp2 = 1; + shoudleTools.ToList().ForEach(a => + { + tmp2 -= (PacksackBagMgr.Instance.toolAndMaterialDic.ContainsKey(a) ? 0 : 0.1f); + }); + steps[6].SetScore(Mathf.Clamp01(tmp2)); + } + else if (triggerName == "֤") + { + //ͻͨ + steps[7].SetScore(true); + } + else if (triggerName == "NPC") + { + //ǰ + steps[8].SetScore(true); + } + else if (triggerName == "+" || triggerName == "+") + { + //¼˳ + TestPen3list.Add(triggerName); + } + else if (triggerName == "ϼ¼ť") + { + //ɼ,硢ѡһɼ쳣 + steps[9].SetScore(isCheckE() && + FaultManager.Instance.selectedFaultsInReg.Count == 1 && FaultManager.Instance.selectedFaultsInReg[0].Equals("ɼ쳣")) ; + + } + else if (triggerName == "ɼ") + { + if (para.ToString() == "ɼװ") + { + reInstall = true; + } + } + else if (triggerName == "ϵվ̨ť") + { + if (steps[9].isDone && para.ToString() == "쳣" && reInstall) + { + steps[10].SetScore(true); + } + } + else if (triggerName == "ŷӡ") + { + if (steps[10].isDone) + { + if (!device_Control.sundries.gameObject.activeInHierarchy && device_Control.door_screw.isInstall && !device_Control.door_seal.isCut) + { + steps[11].SetScore(true);//ֳ + } + } + } + } + + /// + /// + /// + /// + private bool isCheckE() + { + int guimen = 0; + if (TestPen3list.Count >= 3) + { + for (int i = 0; i < TestPen3list.Count; i++) + { + if (i == 0) + { + if (TestPen3list[i] != "+") + break; + } + else + { + if (TestPen3list[i] == "+") + { + guimen = i; + } + else + { + if (guimen != 0) + { + // + Debug.Log("ȷ"); + return true; + } + } + } + } + } + + return false; + } + /// + /// + /// + /// + private bool isInSwitchCheckE() + { + if (InSwitchCloseYDList.Contains("+in_˿1") && InSwitchCloseYDList.Contains("+in_˿2") && InSwitchCloseYDList.Contains("+in_˿2")) + { + return true; + } + else + { + return false; + } + } + + /// + /// жϲ˳ + /// + /// + private bool IsUninstallJieXianCheckE() + { + if (currentunInstallJieXian.Count != unInstallJieXian.Count) + { + return false; + } + + //һһȶ + for (int i = 0; i < currentunInstallJieXian.Count; i++) + { + if (currentunInstallJieXian[i] != unInstallJieXian[i]) + { + //˿ + if (currentunInstallJieXian[i].Replace("up", "").Replace("down", "") != unInstallJieXian[i].Replace("up", "").Replace("down", "")) + return false; + } + } + + return true; + } + + /// + /// жϰװ˳ + /// + /// + public bool IsInstallJieXianCheckE() + { + if (!currentInstallJieXian.Contains("ܱװ˿1") || !currentInstallJieXian.Contains("ܱװ˿2")) + return false; + + if (currentInstallJieXian.Count < installJieXian.Count + 2) + { + return false; + } + + //һһȶ + string[] tmps = new string[currentInstallJieXian.Count]; + currentInstallJieXian.CopyTo(tmps); + var tmplist = tmps.ToList(); + tmplist.Remove("ܱװ˿1"); + tmplist.Remove("ܱװ˿2"); + + + for (int i = 0; i < tmplist.Count; i++) + { + //˿ + if (tmplist[i].Replace("up", "").Replace("down", "") != installJieXian[i].Replace("up", "").Replace("down", "")) + return false; + } + + return true; + } + + public bool Check15() + { + //عˣš + if (device_Control.inSwitch.isOpen && installCover.Contains("ܱӹ̶˿1") && installCover.Contains("ܱӹ̶˿2")) + { + //˳ + if (installTestJieXian.TrueForAll(a => currentInstallTestJieXian.Any(b => b.Replace("up", "").Replace("down", "") == a))) + { + return true; + } + } + + return false; + } + + /// + /// 泡BufferϢ + /// + /// + public override string SaveSceneBufferList() + { + BufferTemp_4001 tmp = new BufferTemp_4001(); + tmp.TestPen3list = TestPen3list; + tmp.InSwitchCloseYDList = InSwitchCloseYDList; + tmp.InSwitchOpenYDList = InSwitchOpenYDList; + tmp.currentunInstallJieXian = currentunInstallJieXian; + tmp.currentInstallJieXian = currentInstallJieXian; + tmp.installCover = installCover; + tmp.currentInstallTestJieXian = currentInstallTestJieXian; + string sceneInfo = JsonConvert.SerializeObject(tmp, Formatting.Indented); + return sceneInfo; + //throw new System.NotImplementedException(); + } + + /// + /// سBufferϢ + /// + public override void LoadSceneBufferList(string sceneInfo) + { + BufferTemp_4001 tmp = new BufferTemp_4001(); + tmp = JsonMapper.ToObject(sceneInfo); + TestPen3list = tmp.TestPen3list; + InSwitchCloseYDList = tmp.InSwitchCloseYDList; + InSwitchOpenYDList = tmp.InSwitchOpenYDList; + currentunInstallJieXian = tmp.currentunInstallJieXian; + currentInstallJieXian = tmp.currentInstallJieXian; + installCover = tmp.installCover; + currentInstallTestJieXian = tmp.currentInstallTestJieXian; + //throw new System.NotImplementedException(); + } +} diff --git a/Assets/Scripts/4001/Score_4001.cs.meta b/Assets/Scripts/4001/Score_4001.cs.meta new file mode 100644 index 0000000..2c98e29 --- /dev/null +++ b/Assets/Scripts/4001/Score_4001.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0fb5bb7721dd3c04bb80b07a2bca4d2b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/4001/StepState_4001.cs b/Assets/Scripts/4001/StepState_4001.cs new file mode 100644 index 0000000..55b9c31 --- /dev/null +++ b/Assets/Scripts/4001/StepState_4001.cs @@ -0,0 +1,302 @@ +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +/// +/// ֱӽʽܼװ ״̬ +/// +public class StepState_4001 : StepState +{ + /// + /// ֳе + /// + private Device_Control_4001 device_Control; + private void Awake() + { + steps.Add(1, E_SceneType.Office);//쳣 + steps.Add(2, E_SceneType.Office);//쳣 + steps.Add(3, E_SceneType.Office);//ԤԼ + steps.Add(4, E_SceneType.Office);//Ʊ + steps.Add(5, E_SceneType.ToolRoom);//ȷװ + steps.Add(6, E_SceneType.ToolRoom);//ѡȡ + steps.Add(7, E_SceneType.Site);//ͻͨ + steps.Add(8, E_SceneType.Site);//ǰ + steps.Add(9, E_SceneType.Site);//ɼ + steps.Add(10, E_SceneType.Site);//ɼϴ + steps.Add(11, E_SceneType.Site);//ֳ + } + + public override void SetDeviceControl(Device_Control device_Control) + { + this.device_Control = (Device_Control_4001)device_Control; + } + /// + /// ӳһִУֱָ + /// + /// + public override void SetStepState(int num, int lastNum) + { + Debug.Log("л" + num); + //ɾĶ + LiveSceneManager.Instance?.OnCheckSubProcess(); + + if (num == 1) + { + //칫ҳ׸ + //쳣 + GameManager.UIMgr.HidePanel(); + GameManager.UIMgr.HidePanel(); + GameManager.UIMgr.HidePanel(); + GameManager.UIMgr.HidePanel(); + GameManager.UIMgr.HidePanel(); + PacksackBagMgr.Instance.ClearAllData(); + } + if (num == 2) + { + //쳣 + //δ + OfficeManager.Instance.mobileController.downIndex = 0; + } + else if (num == 3) + { + //ԤԼ + OfficeManager.Instance.mobileController.downIndex = 1; + + } + else if (num == 4) + { + //Ʊ + OfficeManager.Instance.mobileController.downIndex = 2; + + } + else if (num == 5) + { + //׸ + //ȷװ + + //ձ + PacksackBagMgr.Instance.ClearAllToolAndDiveceAndMaterial(); + TooRoomMannger.Instance.CheckWearByWearDic(); + //ɵһȥ߼ + if (num == lastNum) + { + E_SceneType curret = GameManager.RunModelMgr.SceneType; + GameManager.RunModelMgr.SceneType = E_SceneType.Office; + if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID("߼䰴ť", true) == 0) + { + Debug.Log("߼䰴ťԶ"); + } + GameManager.RunModelMgr.SceneType = curret; + } + } + else if (num == 6) + { + + //ѡȡ + + //װõ + List items = TooRoomMannger.Instance.GetItemInfoByName(new List { "ȫñ", "", "֯", "Եѥ" }); + items.ForEach(item => + { + PacksackBagMgr.Instance.AddOneToolOrMater(item.itemInfo); + Destroy(item.gameObject); + // + PacksackBagMgr.Instance.WearItemState(item.itemInfo, true); + }); + } + else if (num == 7) + { + //׸ + //ͻͨ + + + //ƶλ + LiveSceneManager.Instance.firstPersonController.transform.position = new Vector3(-43.02f, 1.07f, -90.08f); + LiveSceneManager.Instance.firstPersonController.transform.eulerAngles = new Vector3(0, -181.643f, 0); + //ɵһȥ߼ + if (num == lastNum) + { + E_SceneType curret = GameManager.RunModelMgr.SceneType; + GameManager.RunModelMgr.SceneType = E_SceneType.ToolRoom; + if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID("ֳť", true) == 0) + { + Debug.Log("ֳťԶ"); + } + GameManager.RunModelMgr.SceneType = curret; + } + + + #region òȷװ + + //ձ + PacksackBagMgr.Instance.ClearAllData(); + //ɷװ + List items = ToolAndmaterialMgr.Instance.CreateItemInfoByName(new List { "ȫñ", "", "֯", "Եѥ" }); + //뱳 + items.ForEach(item => + { + PacksackBagMgr.Instance.AddOneToolOrMater(item); + // + PacksackBagMgr.Instance.WearItemState(item, true); + }); + //ɹ + List items2 = ToolAndmaterialMgr.Instance.CreateItemInfoByName(new List { "ǯ","Ե˿","","ȫñ","","֯","Եѥ","֤","װӡ","ɼ" }); + items2.ForEach(item => + { + PacksackBagMgr.Instance.AddOneToolOrMater(item); + }); + + #endregion + + //ԭ + device_Control.Init(); + + //ԭnpcԻ + GameObject.FindObjectsOfType().ToList().ForEach(a => + { + a.speackIndex = 0; + a.spriteRenderer.gameObject.SetActive(true); + }); + + //رչϵǼDZ + GameManager.UIMgr.HidePanel(); + } + else if (num == 8) + { + //ǰ + GameObject.FindObjectsOfType().ToList().Find(a => a.triggerName == "NPCͻ").spriteRenderer.gameObject.SetActive(false); + } + else if (num == 9) + { + //ɼ + + //ƶλ + LiveSceneManager.Instance.firstPersonController.transform.position = new Vector3(-42.91014f, 0.8813875f, -99.69319f); + LiveSceneManager.Instance.firstPersonController.transform.eulerAngles = new Vector3(0, -180.343f, 0); + //ԭnpc + GameObject.FindObjectsOfType().ToList().ForEach(a => + { + if (a.triggerName == "NPC") + a.speackIndex = 1; + a.spriteRenderer.gameObject.SetActive(false); + }); + + + } + else if (num == 10) + { + //ɼϴ + + //ſ + device_Control.cabinetDoor.SetState(true); + device_Control.door_screw.isInstall = false; + device_Control.door_screw.transform.localPosition = new Vector3(device_Control.door_screw.transform.localPosition.x, device_Control.door_screw.initPostionY - 0.03f, device_Control.door_screw.transform.localPosition.z); + device_Control.door_seal.isCut = true; + device_Control.door_seal.gameObject.SetActive(false); + + + ////Ӳ + //device_Control.meteringDevice.CoverUnstallState(); + ////ӡ + //device_Control.meteringDevice.CoverSealUninstallState(); + + ////Ѽ + //device_Control.check_JieXian.isChecked = true; + //device_Control.check_JieXian.gameObject.SetActive(false); + + } + //else if (num == 11) + //{ + // //˶Ժͳ¼豸Ϣ + + // //ԴϿ + // device_Control.inSwitch.CloseState(); + // //ˢ´״̬ + // device_Control.CheckHasElectricity(); + //} + //else if (num == 12) + //{ + // //ܼװ + // //Ѷȡ + // device_Control.meteringDevice.namePlate.isChecked = true; + //} + //else if (num == 13) + //{ + // //װܱ + + // //״̬ + // device_Control.meteringDevice.Init(false); + // device_Control.meteringDevice.gameObject.SetActive(false); + // device_Control.meteringDevice = null; + // //ʾ + // device_Control.sundries.gameObject.SetActive(true); + + // //ܱȡ + // device_Control.jieXian_lines.ForEach(line => + // { + // line.SetConenctState(false); + // }); + // //ˢ´״̬ + // device_Control.CheckHasElectricity(); + //} + //else if (num == 14) + //{ + // //װ + + // device_Control.meteringDevice = GameObject.FindObjectOfType(true); + // device_Control.meteringDevice.gameObject.SetActive(true); + // //עص + // //device_Control.AddActions(); + // device_Control.meteringDevice.jieXian_screws.ForEach(screw => + // { + // screw.AddinstallAction(isinstalled => + // { + // //ˢ´״̬ + // device_Control.CheckHasElectricity(); + // //жϽʾ + // device_Control.CheckJieXianOk(); + // }); + // }); + // //̶˿š + // device_Control.meteringDevice.FixScrewInstall(); + // //δ + // device_Control.check_JieXian.isChecked = false; + // device_Control.check_JieXian.gameObject.SetActive(true); + // //ܱ + // device_Control.jieXian_lines.ForEach(line => + // { + // line.SetConenctState(true); + // }); + // //˿š + // device_Control.meteringDevice.JieXianScrewInstallState(); + // //ˢ´״̬ + // device_Control.CheckHasElectricity(); + //} + //else if (num == 15) + //{ + // //ֳͨ缰 + + // //δ + // device_Control.check_JieXian.isChecked = true; + // device_Control.check_JieXian.gameObject.SetActive(false); + //} + //else if (num == 16) + //{ + // //ʵʩӡ + + // //ش + // device_Control.inSwitch.OpenState(); + // //ˢ´״̬ + // device_Control.CheckHasElectricity(); + // //Ӹ + // device_Control.meteringDevice.CoverInstallState(); + //} + else if (num == 11) + { + device_Control.collector.Init(true); + device_Control.sundries.gameObject.SetActive(true); + //ֳ + } + } +} diff --git a/Assets/Scripts/4001/StepState_4001.cs.meta b/Assets/Scripts/4001/StepState_4001.cs.meta new file mode 100644 index 0000000..68411ac --- /dev/null +++ b/Assets/Scripts/4001/StepState_4001.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ed348a29c8f7d8840972088e94d8d9cd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/ComputerController.cs b/Assets/Scripts/ComputerController.cs new file mode 100644 index 0000000..65ec961 --- /dev/null +++ b/Assets/Scripts/ComputerController.cs @@ -0,0 +1,34 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ComputerController : PermanentTriggerBase +{ + protected override void OnStart() + { + base.OnStart(); + + } + protected override void OnMEnter() + { + base.OnMEnter(); + if (GameManager.RunModelMgr.ModeType != E_ModeType.Study) + { + _highlight.SetHighlighted(true); + } + } + protected override void OnMExit() + { + if (GameManager.RunModelMgr.ModeType != E_ModeType.Study) + _highlight.SetHighlighted(false); + base.OnMExit(); + } + protected override void OnMDown() + { + _highlight.SetHighlighted(false); + GameManager.UIMgr.ShowPanel(E_UI_Layer.Mid, (panel) => + { + //panel.Init(triggerName, "xxxԱxxxطչֱӽʽܼװװձ׼ҵ", PlayerTalk, 0); + }); + } +} diff --git a/Assets/Scripts/ComputerController.cs.meta b/Assets/Scripts/ComputerController.cs.meta new file mode 100644 index 0000000..b06033f --- /dev/null +++ b/Assets/Scripts/ComputerController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a61a5a2d7d8e4d949b96b4b528866992 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/ComputerSystem.meta b/Assets/Scripts/ComputerSystem.meta new file mode 100644 index 0000000..2943a95 --- /dev/null +++ b/Assets/Scripts/ComputerSystem.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 96e1f71575ede994ca65b51bb7a5ce79 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/ComputerSystem/UI_ComputerSystemBasePanel.cs b/Assets/Scripts/ComputerSystem/UI_ComputerSystemBasePanel.cs new file mode 100644 index 0000000..c7c7247 --- /dev/null +++ b/Assets/Scripts/ComputerSystem/UI_ComputerSystemBasePanel.cs @@ -0,0 +1,85 @@ +using DG.Tweening; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +public class UI_ComputerSystemBasePanel : BasePanel +{ + protected Button backObj; + protected Button closeObj; + protected List tipList; + protected Tween tween; + + public static bool FirstPageTween = true; + + public override void ShowMe() + { + base.ShowMe(); + + if (GameManager.RunModelMgr.ModeType == E_ModeType.Study)//ѧϰģʽعرպͻ˰ť + { + backObj = GetControl