Search Results for

    Show / Hide Table of Contents

    Class Dew

    The ultimate helper class widely used across the game.

    Inheritance
    object
    Dew
    Namespace: Global
    Assembly: Dew.Core.dll
    Syntax
    public static class Dew

    Fields

    CharacterColor

    Declaration
    public static readonly Color CharacterColor
    Field Value
    Type Description
    UnityEngine.Color

    CharacterColorHex

    Declaration
    public static readonly string CharacterColorHex
    Field Value
    Type Description
    string

    CommonColor

    Declaration
    public static readonly Color CommonColor
    Field Value
    Type Description
    UnityEngine.Color

    CommonColorHex

    Declaration
    public static readonly string CommonColorHex
    Field Value
    Type Description
    string

    DestroyDelay

    Declaration
    public const float DestroyDelay = 0.3
    Field Value
    Type Description
    float

    DestructionColor

    Declaration
    public static readonly Color DestructionColor
    Field Value
    Type Description
    UnityEngine.Color

    DreamDustColor

    Declaration
    public static readonly Color DreamDustColor
    Field Value
    Type Description
    UnityEngine.Color

    EpicColor

    Declaration
    public static readonly Color EpicColor
    Field Value
    Type Description
    UnityEngine.Color

    EpicColorHex

    Declaration
    public static readonly string EpicColorHex
    Field Value
    Type Description
    string

    FlexibleColor

    Declaration
    public static readonly Color FlexibleColor
    Field Value
    Type Description
    UnityEngine.Color

    GoldColor

    Declaration
    public static readonly Color GoldColor
    Field Value
    Type Description
    UnityEngine.Color

    HealthColor

    Declaration
    public static readonly Color HealthColor
    Field Value
    Type Description
    UnityEngine.Color

    HeroOrder

    Declaration
    public static readonly List<string> HeroOrder
    Field Value
    Type Description
    System.Collections.Generic.List<T><string>

    IdentityColor

    Declaration
    public static readonly Color IdentityColor
    Field Value
    Type Description
    UnityEngine.Color

    IdentityColorHex

    Declaration
    public static readonly string IdentityColorHex
    Field Value
    Type Description
    string

    ImaginationColor

    Declaration
    public static readonly Color ImaginationColor
    Field Value
    Type Description
    UnityEngine.Color

    LegendaryColor

    Declaration
    public static readonly Color LegendaryColor
    Field Value
    Type Description
    UnityEngine.Color

    LegendaryColorHex

    Declaration
    public static readonly string LegendaryColorHex
    Field Value
    Type Description
    string

    LifeColor

    Declaration
    public static readonly Color LifeColor
    Field Value
    Type Description
    UnityEngine.Color

    ObliterationSlotPrice

    Declaration
    public static readonly int[] ObliterationSlotPrice
    Field Value
    Type Description
    int[]

    PlatinumCoinColor

    Declaration
    public static readonly Color PlatinumCoinColor
    Field Value
    Type Description
    UnityEngine.Color

    RareColor

    Declaration
    public static readonly Color RareColor
    Field Value
    Type Description
    UnityEngine.Color

    RareColorHex

    Declaration
    public static readonly string RareColorHex
    Field Value
    Type Description
    string

    StardustColor

    Declaration
    public static readonly Color StardustColor
    Field Value
    Type Description
    UnityEngine.Color

    UniqueColor

    Declaration
    public static readonly Color UniqueColor
    Field Value
    Type Description
    UnityEngine.Color

    UniqueColorHex

    Declaration
    public static readonly string UniqueColorHex
    Field Value
    Type Description
    string

    Properties

    achievementsByName

    Declaration
    public static IReadOnlyDictionary<string, Type> achievementsByName { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyDictionary<TKey, TValue><string, System.Type>

    allAchievements

    Declaration
    public static IReadOnlyList<Type> allAchievements { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><System.Type>

    allArtifacts

    Declaration
    public static IReadOnlyList<Type> allArtifacts { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><System.Type>

    allGameModifiers

    Declaration
    public static IReadOnlyList<Type> allGameModifiers { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><System.Type>

    allGems

    Declaration
    public static IReadOnlyList<Type> allGems { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><System.Type>

    allHeroes

    Declaration
    public static IReadOnlyList<Type> allHeroes { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><System.Type>

    allHeroSkills

    Declaration
    public static IReadOnlyList<Type> allHeroSkills { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><System.Type>

    allLucidDreams

    Declaration
    public static IReadOnlyList<Type> allLucidDreams { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><System.Type>

    allMonsters

    Declaration
    public static IReadOnlyList<Type> allMonsters { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><System.Type>

    allOldStars

    Declaration
    public static IReadOnlyList<DewStarItemOld> allOldStars { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><DewStarItemOld>

    allReveries

    Declaration
    public static IReadOnlyList<DewReverieItem> allReveries { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><DewReverieItem>

    allRoomModifiers

    Declaration
    public static IReadOnlyList<Type> allRoomModifiers { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><System.Type>

    allSkills

    Declaration
    public static IReadOnlyList<Type> allSkills { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><System.Type>

    allStarTypes

    Declaration
    public static IReadOnlyList<Type> allStarTypes { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><System.Type>

    allTutorialItems

    Declaration
    public static IReadOnlyList<Type> allTutorialItems { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><System.Type>

    gameCanvas

    Declaration
    public static Canvas gameCanvas { get; }
    Property Value
    Type Description
    UnityEngine.Canvas

    heroTypeOfOldStar

    Contains all stars. Non-hero stars will have value of null.

    Declaration
    public static IReadOnlyDictionary<DewStarItemOld, Type> heroTypeOfOldStar { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyDictionary<TKey, TValue><DewStarItemOld, System.Type>

    mainCamera

    Declaration
    public static Camera mainCamera { get; }
    Property Value
    Type Description
    UnityEngine.Camera

    resourceLinkTypes

    Declaration
    public static IReadOnlyList<(Type, DewResourceLinkAttribute)> resourceLinkTypes { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><(System.Type, DewResourceLinkAttribute)>

    reveriesByName

    Declaration
    public static IReadOnlyDictionary<string, DewReverieItem> reveriesByName { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyDictionary<TKey, TValue><string, DewReverieItem>

    Methods

    CallDelayed(Action, int)

    Call a function delayed by one frame.

    Declaration
    public static void CallDelayed(Action func, int frameCount = 1)
    Parameters
    Type Name Description
    System.Action func
    int frameCount

    CallOnReady(MonoBehaviour, Func<bool>, Action)

    Declaration
    public static void CallOnReady(MonoBehaviour caller, Func<bool> condition, Action func)
    Parameters
    Type Name Description
    UnityEngine.MonoBehaviour caller
    System.Func<TResult><bool> condition
    System.Action func

    ClearTypeReferences()

    Declaration
    public static void ClearTypeReferences()

    ContainsData(IDictionary<string, string>, string, string, string)

    Declaration
    public static bool ContainsData(this IDictionary<string, string> dict, string key0, string key1, string key2)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    string key1
    string key2
    Returns
    Type Description
    bool

    ContainsData(IDictionary<string, string>, string, string)

    Declaration
    public static bool ContainsData(this IDictionary<string, string> dict, string key0, string key1)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    string key1
    Returns
    Type Description
    bool

    ContainsData(IDictionary<string, string>, string)

    Declaration
    public static bool ContainsData(this IDictionary<string, string> dict, string key0)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    Returns
    Type Description
    bool

    ConvertToStringInvariantCulture(object)

    Declaration
    public static string ConvertToStringInvariantCulture(object value)
    Parameters
    Type Name Description
    object value
    Returns
    Type Description
    string

    CreateAbilityInstance<T>(T, Vector3, Quaternion?, Actor, CastInfo, Action<T>)

    Declaration
    public static T CreateAbilityInstance<T>(T prefab, Vector3 position, Quaternion? rotation, Actor parent, CastInfo info, Action<T> beforePrepare = null) where T : AbilityInstance
    Parameters
    Type Name Description
    T prefab
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    Actor parent
    CastInfo info
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateAbilityInstance<T>(Vector3, Quaternion?, Actor, CastInfo, Action<T>)

    Declaration
    public static T CreateAbilityInstance<T>(Vector3 position, Quaternion? rotation, Actor parent, CastInfo info, Action<T> beforePrepare = null) where T : AbilityInstance
    Parameters
    Type Name Description
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    Actor parent
    CastInfo info
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateAbilityTrigger<T>(T, Action<T>)

    Declaration
    public static T CreateAbilityTrigger<T>(T trigger, Action<T> beforePrepare = null) where T : AbilityTrigger
    Parameters
    Type Name Description
    T trigger
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateAbilityTrigger<T>(Action<T>)

    Declaration
    public static T CreateAbilityTrigger<T>(Action<T> beforeSpawn = null) where T : AbilityTrigger
    Parameters
    Type Name Description
    System.Action<T><T> beforeSpawn
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateActor<T>()

    Declaration
    public static T CreateActor<T>() where T : Actor
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateActor<T>(T, Vector3, Quaternion?, Actor, Action<T>)

    Declaration
    public static T CreateActor<T>(T prefab, Vector3 position, Quaternion? rotation, Actor parent = null, Action<T> beforePrepare = null) where T : Actor
    Parameters
    Type Name Description
    T prefab
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    Actor parent
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateActor<T>(Action<T>)

    Declaration
    public static T CreateActor<T>(Action<T> beforePrepare = null) where T : Actor
    Parameters
    Type Name Description
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateActor<T>(Vector3, Quaternion?, Actor, Action<T>)

    Declaration
    public static T CreateActor<T>(Vector3 position, Quaternion? rotation, Actor parent = null, Action<T> beforePrepare = null) where T : Actor
    Parameters
    Type Name Description
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    Actor parent
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateGem<T>(T, Vector3, int, DewPlayer, Action<T>)

    Declaration
    public static T CreateGem<T>(T gem, Vector3 position, int quality, DewPlayer tempOwner = null, Action<T> beforePrepare = null) where T : Gem
    Parameters
    Type Name Description
    T gem
    UnityEngine.Vector3 position
    int quality
    DewPlayer tempOwner
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateGem<T>(Vector3, int, DewPlayer, Action<T>)

    Declaration
    public static T CreateGem<T>(Vector3 position, int quality, DewPlayer tempOwner = null, Action<T> beforePrepare = null) where T : Gem
    Parameters
    Type Name Description
    UnityEngine.Vector3 position
    int quality
    DewPlayer tempOwner
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateSkillTrigger<T>(T, Vector3, int, DewPlayer, Action<T>)

    Declaration
    public static T CreateSkillTrigger<T>(T trigger, Vector3 position, int level, DewPlayer tempOwner = null, Action<T> beforePrepare = null) where T : SkillTrigger
    Parameters
    Type Name Description
    T trigger
    UnityEngine.Vector3 position
    int level
    DewPlayer tempOwner
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateSkillTrigger<T>(Vector3, int, DewPlayer, Action<T>)

    Declaration
    public static T CreateSkillTrigger<T>(Vector3 position, int level, DewPlayer tempOwner = null, Action<T> beforePrepare = null) where T : SkillTrigger
    Parameters
    Type Name Description
    UnityEngine.Vector3 position
    int level
    DewPlayer tempOwner
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateStatusEffect<T>(T, Entity, Actor, CastInfo, Action<T>)

    Create a new status effect and attach it to an entity.

    This can return null if the creation fails:

    e.g. Trying to apply a status effect with isKilledByUnstoppable flag to an unstoppable/invulnerable entity.

    Declaration
    public static T CreateStatusEffect<T>(T prefab, Entity victim, Actor parent, CastInfo info, Action<T> beforePrepare = null) where T : StatusEffect
    Parameters
    Type Name Description
    T prefab
    Entity victim
    Actor parent
    CastInfo info
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateStatusEffect<T>(Entity, Actor, CastInfo, Action<T>)

    Create a new status effect and attach it to an entity.

    This can return null if the creation fails:

    e.g. Trying to apply a status effect with isKilledByUnstoppable flag to an unstoppable/invulnerable entity.

    Declaration
    public static T CreateStatusEffect<T>(Entity victim, Actor parent, CastInfo info, Action<T> beforePrepare = null) where T : StatusEffect
    Parameters
    Type Name Description
    Entity victim
    Actor parent
    CastInfo info
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    Debounce(Object, float, Action, object)

    Declaration
    public static void Debounce(Object owner, float unscaledTime, Action callback, object id = null)
    Parameters
    Type Name Description
    UnityEngine.Object owner
    float unscaledTime
    System.Action callback
    object id

    Destroy(GameObject)

    Destroy a networked game object. Despawning and destroying will be delayed for network RPCs and cleanups.

    Declaration
    public static void Destroy(GameObject gameObject)
    Parameters
    Type Name Description
    UnityEngine.GameObject gameObject

    FilterNonOkayValues(ref float, float)

    Declaration
    public static void FilterNonOkayValues(ref float v, float fallback = 0)
    Parameters
    Type Name Description
    float v
    float fallback

    FilterNonOkayValues(ref Vector2, Vector2)

    Declaration
    public static void FilterNonOkayValues(ref Vector2 v, Vector2 fallback = default)
    Parameters
    Type Name Description
    UnityEngine.Vector2 v
    UnityEngine.Vector2 fallback

    FilterNonOkayValues(ref Vector3, Vector3)

    Declaration
    public static void FilterNonOkayValues(ref Vector3 v, Vector3 fallback = default)
    Parameters
    Type Name Description
    UnityEngine.Vector3 v
    UnityEngine.Vector3 fallback

    FindActorOfType<T>()

    Declaration
    public static T FindActorOfType<T>() where T : Actor
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    FindAllActorsOfType<T>(out ListReturnHandle<T>)

    Declaration
    public static List<T> FindAllActorsOfType<T>(out ListReturnHandle<T> handle) where T : Actor
    Parameters
    Type Name Description
    ListReturnHandle<T> handle
    Returns
    Type Description
    System.Collections.Generic.List<T><T>
    Type Parameters
    Name Description
    T

    FindInterfaceOfType<T>(bool)

    Declaration
    public static T FindInterfaceOfType<T>(bool includeInactive) where T : class
    Parameters
    Type Name Description
    bool includeInactive
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    FindInterfacesOfType<T>(bool)

    Declaration
    public static T[] FindInterfacesOfType<T>(bool includeInactive) where T : class
    Parameters
    Type Name Description
    bool includeInactive
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    FormatBigNumbers(float, float, string)

    Declaration
    public static string FormatBigNumbers(float number, float threshold, string format)
    Parameters
    Type Name Description
    float number
    float threshold
    string format
    Returns
    Type Description
    string

    GetAchievementColor(Type)

    Declaration
    public static Color GetAchievementColor(Type achievementType)
    Parameters
    Type Name Description
    System.Type achievementType
    Returns
    Type Description
    UnityEngine.Color

    GetAchievementColorHex(Type)

    Declaration
    public static string GetAchievementColorHex(Type achievementType)
    Parameters
    Type Name Description
    System.Type achievementType
    Returns
    Type Description
    string

    GetAliveHeroCount()

    Declaration
    public static int GetAliveHeroCount()
    Returns
    Type Description
    int

    GetClosestAliveHero(Vector3, bool)

    Declaration
    public static Hero GetClosestAliveHero(Vector3 pivot, bool fallbackToDead = true)
    Parameters
    Type Name Description
    UnityEngine.Vector3 pivot
    bool fallbackToDead
    Returns
    Type Description
    Hero

    GetClosestHeroDistance(Vector3, bool)

    Declaration
    public static float GetClosestHeroDistance(Vector3 pivot, bool fallbackToDead = true)
    Parameters
    Type Name Description
    UnityEngine.Vector3 pivot
    bool fallbackToDead
    Returns
    Type Description
    float

    GetControlPresetWindow()

    Declaration
    public static IControlPresetWindow GetControlPresetWindow()
    Returns
    Type Description
    IControlPresetWindow

    GetCoroutiner()

    Declaration
    public static Coroutiner GetCoroutiner()
    Returns
    Type Description
    Coroutiner

    GetCurrencyColor(CurrencyType)

    Declaration
    public static Color GetCurrencyColor(CurrencyType type)
    Parameters
    Type Name Description
    CurrencyType type
    Returns
    Type Description
    UnityEngine.Color

    GetCurrencyColorHex(CurrencyType)

    Declaration
    public static string GetCurrencyColorHex(CurrencyType type)
    Parameters
    Type Name Description
    CurrencyType type
    Returns
    Type Description
    string

    GetCurrentMultiplayerCompatibilityVersion()

    Used to check game compatibility between multiplayer host/clients.
    This special version is used to allow cross-platform multiplayer (DRM-Free, STOVE, Steam, e.g.)

    Declaration
    public static string GetCurrentMultiplayerCompatibilityVersion()
    Returns
    Type Description
    string

    GetData<T>(IDictionary<string, string>, string, string, string)

    Declaration
    public static T GetData<T>(this IDictionary<string, string> dict, string key0, string key1, string key2)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    string key1
    string key2
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetData<T>(IDictionary<string, string>, string, string)

    Declaration
    public static T GetData<T>(this IDictionary<string, string> dict, string key0, string key1)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    string key1
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetData<T>(IDictionary<string, string>, string)

    Declaration
    public static T GetData<T>(this IDictionary<string, string> dict, string key0)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetDataKey(string, string, string)

    Declaration
    public static string GetDataKey(string key0, string key1, string key2)
    Parameters
    Type Name Description
    string key0
    string key1
    string key2
    Returns
    Type Description
    string

    GetDataKey(string, string)

    Declaration
    public static string GetDataKey(string key0, string key1)
    Parameters
    Type Name Description
    string key0
    string key1
    Returns
    Type Description
    string

    GetDataKey(string)

    Declaration
    public static string GetDataKey(string key0)
    Parameters
    Type Name Description
    string key0
    Returns
    Type Description
    string

    GetDataOrDefault<T>(IDictionary<string, string>, string, T)

    Declaration
    public static T GetDataOrDefault<T>(this IDictionary<string, string> dict, string key0, T defaultValue = default)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    T defaultValue
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetDataOrDefault<T>(IDictionary<string, string>, string, string, T)

    Declaration
    public static T GetDataOrDefault<T>(this IDictionary<string, string> dict, string key0, string key1, T defaultValue = default)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    string key1
    T defaultValue
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetDataOrDefault<T>(IDictionary<string, string>, string, string, string, T)

    Declaration
    public static T GetDataOrDefault<T>(this IDictionary<string, string> dict, string key0, string key1, string key2, T defaultValue = default)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    string key1
    string key2
    T defaultValue
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetDefaultObliterationSlots()

    Declaration
    public static int GetDefaultObliterationSlots()
    Returns
    Type Description
    int

    GetDejavuCost(Object, int)

    Declaration
    public static int GetDejavuCost(Object target, int wins = -1)
    Parameters
    Type Name Description
    UnityEngine.Object target
    int wins
    Returns
    Type Description
    int

    GetDejavuMaxWins(Object)

    Declaration
    public static int GetDejavuMaxWins(Object target)
    Parameters
    Type Name Description
    UnityEngine.Object target
    Returns
    Type Description
    int

    GetGoodRewardPosition(Vector3, float)

    This applies random offset to pivot and avoids nearby IBanRoomNodesNearby, items and interactables.
    The position will be traversable by nearest hero.

    Declaration
    public static Vector3 GetGoodRewardPosition(Vector3 pivot, float randomOffset = 2)
    Parameters
    Type Name Description
    UnityEngine.Vector3 pivot
    float randomOffset
    Returns
    Type Description
    UnityEngine.Vector3

    GetHex(Color)

    Declaration
    public static string GetHex(Color color)
    Parameters
    Type Name Description
    UnityEngine.Color color
    Returns
    Type Description
    string

    GetMaxObliterationSlots()

    Declaration
    public static int GetMaxObliterationSlots()
    Returns
    Type Description
    int

    GetMultiplayerCompatibilityVersion(string)

    Declaration
    public static string GetMultiplayerCompatibilityVersion(string bundleVersion)
    Parameters
    Type Name Description
    string bundleVersion
    Returns
    Type Description
    string

    GetNavMeshPath(Vector3, Vector3)

    Declaration
    public static NavMeshPath GetNavMeshPath(Vector3 start, Vector3 end)
    Parameters
    Type Name Description
    UnityEngine.Vector3 start
    UnityEngine.Vector3 end
    Returns
    Type Description
    UnityEngine.AI.NavMeshPath

    GetNavMeshPathStatus(Vector3, Vector3)

    Declaration
    public static NavMeshPathStatus GetNavMeshPathStatus(Vector3 start, Vector3 end)
    Parameters
    Type Name Description
    UnityEngine.Vector3 start
    UnityEngine.Vector3 end
    Returns
    Type Description
    UnityEngine.AI.NavMeshPathStatus

    GetObliterationMinAllowedHeroes()

    Declaration
    public static int GetObliterationMinAllowedHeroes()
    Returns
    Type Description
    int

    GetObliterationMinAllowedItemsPerRarity()

    Declaration
    public static int GetObliterationMinAllowedItemsPerRarity()
    Returns
    Type Description
    int

    GetObliterationSlotPrice(int)

    Declaration
    public static int GetObliterationSlotPrice(int slotIndex)
    Parameters
    Type Name Description
    int slotIndex
    Returns
    Type Description
    int

    GetOriginalName(string)

    Clean the given name removing (Clone) or variant suffixes.
    Useful when trying to figure out id of name-linked resources.

    Declaration
    public static string GetOriginalName(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    string

    GetParentDirectory(string)

    Declaration
    public static string GetParentDirectory(string path)
    Parameters
    Type Name Description
    string path
    Returns
    Type Description
    string

    GetPositionOnGround(Vector3, float)

    Declaration
    public static Vector3 GetPositionOnGround(Vector3 position, float yDiffRange = 50)
    Parameters
    Type Name Description
    UnityEngine.Vector3 position
    float yDiffRange
    Returns
    Type Description
    UnityEngine.Vector3

    GetProjectRootPath()

    Declaration
    public static string GetProjectRootPath()
    Returns
    Type Description
    string

    GetRarityColor(Rarity)

    Declaration
    public static Color GetRarityColor(Rarity rarity)
    Parameters
    Type Name Description
    Rarity rarity
    Returns
    Type Description
    UnityEngine.Color

    GetRarityColor(SkinRarity)

    Declaration
    public static Color GetRarityColor(SkinRarity rarity)
    Parameters
    Type Name Description
    SkinRarity rarity
    Returns
    Type Description
    UnityEngine.Color

    GetRarityColorHex(Rarity)

    Gets rarity color with prefix #.

    Declaration
    public static string GetRarityColorHex(Rarity rarity)
    Parameters
    Type Name Description
    Rarity rarity
    Returns
    Type Description
    string
    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    GetRarityColorHex(SkinRarity)

    Declaration
    public static string GetRarityColorHex(SkinRarity rarity)
    Parameters
    Type Name Description
    SkinRarity rarity
    Returns
    Type Description
    string

    GetReadableTimespanConcise(TimeSpan)

    Declaration
    public static string GetReadableTimespanConcise(TimeSpan t)
    Parameters
    Type Name Description
    System.TimeSpan t
    Returns
    Type Description
    string

    GetReadableTimespanDetailed(TimeSpan)

    Declaration
    public static string GetReadableTimespanDetailed(TimeSpan t)
    Parameters
    Type Name Description
    System.TimeSpan t
    Returns
    Type Description
    string

    GetRequiredAchievementOfTarget(string)

    Declaration
    public static Type GetRequiredAchievementOfTarget(string targetTypeName)
    Parameters
    Type Name Description
    string targetTypeName
    Returns
    Type Description
    System.Type

    GetRequiredAchievementOfTarget(Type)

    Declaration
    public static Type GetRequiredAchievementOfTarget(Type targetType)
    Parameters
    Type Name Description
    System.Type targetType
    Returns
    Type Description
    System.Type

    GetRequiredMasteryLevelForStarSlotUnlock(int)

    Declaration
    public static int GetRequiredMasteryLevelForStarSlotUnlock(int index)
    Parameters
    Type Name Description
    int index
    Returns
    Type Description
    int

    GetRequiredMasteryPointsToLevelUp(int)

    Declaration
    public static long GetRequiredMasteryPointsToLevelUp(int currentLevel)
    Parameters
    Type Name Description
    int currentLevel
    Returns
    Type Description
    long

    GetRequiredStardustForStarSlotUnlock(int)

    Declaration
    public static int GetRequiredStardustForStarSlotUnlock(int index)
    Parameters
    Type Name Description
    int index
    Returns
    Type Description
    int

    GetRewardedMasteryPoints(float)

    Declaration
    public static long GetRewardedMasteryPoints(float minutes)
    Parameters
    Type Name Description
    float minutes
    Returns
    Type Description
    long

    GetStarCategoryColor(StarType)

    Declaration
    public static Color GetStarCategoryColor(StarType type)
    Parameters
    Type Name Description
    StarType type
    Returns
    Type Description
    UnityEngine.Color

    GetStardustRewardOnLevelUpAmount(int)

    Declaration
    public static int GetStardustRewardOnLevelUpAmount(int nextLevel)
    Parameters
    Type Name Description
    int nextLevel
    Returns
    Type Description
    int

    GetTypeFromShortName(string)

    Declaration
    public static Type GetTypeFromShortName(string typeName)
    Parameters
    Type Name Description
    string typeName
    Returns
    Type Description
    System.Type

    GetUIComponentBelowCursor<T>(bool)

    Declaration
    public static T GetUIComponentBelowCursor<T>(bool includeParent = true) where T : Component
    Parameters
    Type Name Description
    bool includeParent
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetUnlockedTargetsOfAchievement(Type)

    Declaration
    public static List<Type> GetUnlockedTargetsOfAchievement(Type achievementType)
    Parameters
    Type Name Description
    System.Type achievementType
    Returns
    Type Description
    System.Collections.Generic.List<T><System.Type>

    GetValidAgentDestination_Closest(Vector3, Vector3)

    Returns a point that is pathable from start position that is the closest to the end point.

    Declaration
    public static Vector3 GetValidAgentDestination_Closest(Vector3 start, Vector3 end)
    Parameters
    Type Name Description
    UnityEngine.Vector3 start
    UnityEngine.Vector3 end
    Returns
    Type Description
    UnityEngine.Vector3

    GetValidAgentDestination_LinearSweep(Vector3, Vector3)

    Returns a point that is pathable from start position, sweeping linearly across two points.

    Declaration
    public static Vector3 GetValidAgentDestination_LinearSweep(Vector3 start, Vector3 end)
    Parameters
    Type Name Description
    UnityEngine.Vector3 start
    UnityEngine.Vector3 end
    Returns
    Type Description
    UnityEngine.Vector3

    GetValidAgentPosition(Vector3, float)

    Declaration
    public static Vector3 GetValidAgentPosition(Vector3 pos, float threshold = 10)
    Parameters
    Type Name Description
    UnityEngine.Vector3 pos
    float threshold
    Returns
    Type Description
    UnityEngine.Vector3

    Helper_GetInstanceOfActor<T>(ref T)

    This is a helper function for instance / softInstance management of actors.

    Declaration
    public static T Helper_GetInstanceOfActor<T>(ref T softInstance) where T : Actor
    Parameters
    Type Name Description
    T softInstance
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    InitAllTypeReferences()

    Declaration
    [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)]
    public static void InitAllTypeReferences()

    InstantiateActor_Imp<T>(T, Vector3, Quaternion?, Actor)

    Declaration
    public static T InstantiateActor_Imp<T>(T prefab, Vector3 position, Quaternion? rotation, Actor parent) where T : Actor
    Parameters
    Type Name Description
    T prefab
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    Actor parent
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    InstantiateAndSpawn<T>(T, Action<T>)

    Declaration
    public static T InstantiateAndSpawn<T>(T prefab, Action<T> beforeSpawn = null) where T : Component
    Parameters
    Type Name Description
    T prefab
    System.Action<T><T> beforeSpawn
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    InstantiateAndSpawn<T>(T, Vector3, Quaternion?, Action<T>)

    Declaration
    public static T InstantiateAndSpawn<T>(T prefab, Vector3 position, Quaternion? rotation, Action<T> beforeSpawn = null) where T : Component
    Parameters
    Type Name Description
    T prefab
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    System.Action<T><T> beforeSpawn
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    InstantiateAndSpawn<T>(Action<T>)

    Declaration
    public static T InstantiateAndSpawn<T>(Action<T> beforeSpawn = null) where T : Component
    Parameters
    Type Name Description
    System.Action<T><T> beforeSpawn
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    InstantiateAndSpawn<T>(Vector3, Quaternion?, Action<T>)

    Declaration
    public static T InstantiateAndSpawn<T>(Vector3 position, Quaternion? rotation, Action<T> beforeSpawn = null) where T : Component
    Parameters
    Type Name Description
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    System.Action<T><T> beforeSpawn
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    IntToRoman(int)

    Declaration
    public static string IntToRoman(int num)
    Parameters
    Type Name Description
    int num
    Returns
    Type Description
    string

    IsAccessoryIncludedInGame(string)

    Declaration
    public static bool IsAccessoryIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsAchievementIncludedInGame(string)

    Declaration
    public static bool IsAchievementIncludedInGame(string typeStr)
    Parameters
    Type Name Description
    string typeStr
    Returns
    Type Description
    bool

    IsAnyActorBeingDestroyed()

    Declaration
    public static bool IsAnyActorBeingDestroyed()
    Returns
    Type Description
    bool

    IsArtifactIncludedInGame(string)

    Declaration
    public static bool IsArtifactIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsBeingDestroyed(GameObject)

    Declaration
    public static bool IsBeingDestroyed(GameObject gameObject)
    Parameters
    Type Name Description
    UnityEngine.GameObject gameObject
    Returns
    Type Description
    bool

    IsChristmas()

    Declaration
    public static bool IsChristmas()
    Returns
    Type Description
    bool

    IsCurseIncludedInGame(string)

    Declaration
    public static bool IsCurseIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsDejavuFree(string)

    Declaration
    public static bool IsDejavuFree(string typeName)
    Parameters
    Type Name Description
    string typeName
    Returns
    Type Description
    bool

    IsDejavuFree(Object)

    Declaration
    public static bool IsDejavuFree(Object target)
    Parameters
    Type Name Description
    UnityEngine.Object target
    Returns
    Type Description
    bool

    IsEmoteIncludedInGame(string)

    Declaration
    public static bool IsEmoteIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsExcludedFromPool(string)

    Declaration
    public static bool IsExcludedFromPool(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsGameModifierIncludedInGame(string)

    Declaration
    public static bool IsGameModifierIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsGemIncludedInGame(string)

    Declaration
    public static bool IsGemIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsHeroIncludedInGame(string)

    Declaration
    public static bool IsHeroIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsLucidDreamIncludedInGame(string)

    Declaration
    public static bool IsLucidDreamIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsMeleeHero(HeroClassType)

    Declaration
    public static bool IsMeleeHero(Hero.HeroClassType type)
    Parameters
    Type Name Description
    Hero.HeroClassType type
    Returns
    Type Description
    bool

    IsMonsterIncludedInGame(string)

    Declaration
    public static bool IsMonsterIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsNametagIncludedInGame(string)

    Declaration
    public static bool IsNametagIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsNearChristmas()

    Declaration
    public static bool IsNearChristmas()
    Returns
    Type Description
    bool

    IsNotPlayableOnTop(Vector3)

    Declaration
    public static bool IsNotPlayableOnTop(Vector3 pos)
    Parameters
    Type Name Description
    UnityEngine.Vector3 pos
    Returns
    Type Description
    bool

    IsOkay(Displacement)

    Check floating values if they're not infinity nor NaNs.
    This will print out exceptions for getting stack traces in Cloud Diagnostics.

    Declaration
    public static bool IsOkay(Displacement d)
    Parameters
    Type Name Description
    Displacement d
    Returns
    Type Description
    bool

    IsOkay(double)

    Check floating values if they're not infinity nor NaNs.
    This will print out exceptions for getting stack traces in Cloud Diagnostics.

    Declaration
    public static bool IsOkay(double d)
    Parameters
    Type Name Description
    double d
    Returns
    Type Description
    bool

    IsOkay(float)

    Check floating values if they're not infinity nor NaNs.
    This will print out exceptions for getting stack traces in Cloud Diagnostics.

    Declaration
    public static bool IsOkay(float f)
    Parameters
    Type Name Description
    float f
    Returns
    Type Description
    bool

    IsOkay(Vector2)

    Check floating values if they're not infinity nor NaNs.
    This will print out exceptions for getting stack traces in Cloud Diagnostics.

    Declaration
    public static bool IsOkay(Vector2 v)
    Parameters
    Type Name Description
    UnityEngine.Vector2 v
    Returns
    Type Description
    bool

    IsOkay(Vector3)

    Check floating values if they're not infinity nor NaNs.
    This will print out exceptions for getting stack traces in Cloud Diagnostics.

    Declaration
    public static bool IsOkay(Vector3 v)
    Parameters
    Type Name Description
    UnityEngine.Vector3 v
    Returns
    Type Description
    bool

    IsOkay(Vector4)

    Check floating values if they're not infinity nor NaNs.
    This will print out exceptions for getting stack traces in Cloud Diagnostics.

    Declaration
    public static bool IsOkay(Vector4 v)
    Parameters
    Type Name Description
    UnityEngine.Vector4 v
    Returns
    Type Description
    bool

    IsRangedHero(HeroClassType)

    Declaration
    public static bool IsRangedHero(Hero.HeroClassType type)
    Parameters
    Type Name Description
    Hero.HeroClassType type
    Returns
    Type Description
    bool

    IsRoomModifierIncludedInGame(string)

    Declaration
    public static bool IsRoomModifierIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsSkillIncludedInGame(string)

    Declaration
    public static bool IsSkillIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsSkinIncludedInGame(string)

    Declaration
    public static bool IsSkinIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsStarIncludedInGame(string)

    Declaration
    public static bool IsStarIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsTreasureIncludedInGame(string)

    Declaration
    public static bool IsTreasureIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    IsZoneIncludedInGame(string)

    Declaration
    public static bool IsZoneIncludedInGame(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    bool

    NicifyVariableName(string)

    Converts a variable name string into a human-readable label. Example: "helloThere_fella" becomes "Hello There Fella".

    Declaration
    public static string NicifyVariableName(this string input)
    Parameters
    Type Name Description
    string input
    Returns
    Type Description
    string

    OpenURL(string, OpenURLSettings)

    Declaration
    public static void OpenURL(string url, OpenURLSettings settings = null)
    Parameters
    Type Name Description
    string url
    OpenURLSettings settings

    PrepareAndSpawnActor_Imp<T>(T, Action<T>)

    Declaration
    public static T PrepareAndSpawnActor_Imp<T>(T newActor, Action<T> beforePrepare) where T : Actor
    Parameters
    Type Name Description
    T newActor
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    PrepareAndSpawnHero_Imp<T>(T, DewPlayer, int, HeroLoadoutData, string, Action<T>)

    Declaration
    public static T PrepareAndSpawnHero_Imp<T>(T newEntity, DewPlayer owner, int level, HeroLoadoutData loadout, string skin, Action<T> beforePrepare) where T : Hero
    Parameters
    Type Name Description
    T newEntity
    DewPlayer owner
    int level
    HeroLoadoutData loadout
    string skin
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    PrepareAndSpawnStatusEffect_Imp<T>(T, Entity, Actor, CastInfo, Action<T>)

    Declaration
    public static T PrepareAndSpawnStatusEffect_Imp<T>(T newSe, Entity victim, Actor parent, CastInfo info, Action<T> beforePrepare) where T : StatusEffect
    Parameters
    Type Name Description
    T newSe
    Entity victim
    Actor parent
    CastInfo info
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    QuitApplication(bool)

    Declaration
    public static void QuitApplication(bool dontSave = false)
    Parameters
    Type Name Description
    bool dontSave

    RaycastAllUIElementsBelowCursor(out ListReturnHandle<RaycastResult>)

    Declaration
    public static List<RaycastResult> RaycastAllUIElementsBelowCursor(out ListReturnHandle<RaycastResult> handle)
    Parameters
    Type Name Description
    ListReturnHandle<RaycastResult> handle
    Returns
    Type Description
    System.Collections.Generic.List<T><RaycastResult>

    RaycastAllUIElementsBelowCursor(List<RaycastResult>)

    Declaration
    public static void RaycastAllUIElementsBelowCursor(List<RaycastResult> results)
    Parameters
    Type Name Description
    System.Collections.Generic.List<T><RaycastResult> results

    RaycastAllUIElementsBelowScreenPoint(Vector2, out ListReturnHandle<RaycastResult>)

    Declaration
    public static List<RaycastResult> RaycastAllUIElementsBelowScreenPoint(Vector2 screenPoint, out ListReturnHandle<RaycastResult> handle)
    Parameters
    Type Name Description
    UnityEngine.Vector2 screenPoint
    ListReturnHandle<RaycastResult> handle
    Returns
    Type Description
    System.Collections.Generic.List<T><RaycastResult>

    RaycastAllUIElementsBelowScreenPoint(Vector2, List<RaycastResult>)

    Declaration
    public static void RaycastAllUIElementsBelowScreenPoint(Vector2 screenPoint, List<RaycastResult> results)
    Parameters
    Type Name Description
    UnityEngine.Vector2 screenPoint
    System.Collections.Generic.List<T><RaycastResult> results

    RefreshRenderer()

    Declaration
    public static void RefreshRenderer()

    RemoveData(IDictionary<string, string>, string, string, string)

    Declaration
    public static bool RemoveData(this IDictionary<string, string> dict, string key0, string key1, string key2)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    string key1
    string key2
    Returns
    Type Description
    bool

    RemoveData(IDictionary<string, string>, string, string)

    Declaration
    public static bool RemoveData(this IDictionary<string, string> dict, string key0, string key1)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    string key1
    Returns
    Type Description
    bool

    RemoveData(IDictionary<string, string>, string)

    Declaration
    public static bool RemoveData(this IDictionary<string, string> dict, string key0)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    Returns
    Type Description
    bool

    ResolveLocalizedFormatArgs(string[])

    Declaration
    public static void ResolveLocalizedFormatArgs(string[] localizedFormatArgs)
    Parameters
    Type Name Description
    string[] localizedFormatArgs

    SelectBestIndexWithScore<T>(IList<T>, Func<T, int, float>, float, DewRandom)

    Item with best score will be returned. If fuzziness is set, score will be multiplied by a random value between (1+fuzziness) ~ (1-fuzziness)

    Declaration
    public static int SelectBestIndexWithScore<T>(IList<T> list, Func<T, int, float> scoreFunc, float fuzziness = 0, DewRandom random = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<T><T> list
    System.Func<T1, T2, TResult><T, int, float> scoreFunc
    float fuzziness
    DewRandom random
    Returns
    Type Description
    int
    Type Parameters
    Name Description
    T

    SelectBestIndexWithScore<T>(ReadOnlySpan<T>, Func<T, int, float>, float, DewRandom)

    Item with best score will be returned. If fuzziness is set, score will be multiplied by a random value between (1+fuzziness) ~ (1-fuzziness)

    Declaration
    public static int SelectBestIndexWithScore<T>(ReadOnlySpan<T> list, Func<T, int, float> scoreFunc, float fuzziness = 0, DewRandom random = null)
    Parameters
    Type Name Description
    System.ReadOnlySpan<T><T> list
    System.Func<T1, T2, TResult><T, int, float> scoreFunc
    float fuzziness
    DewRandom random
    Returns
    Type Description
    int
    Type Parameters
    Name Description
    T

    SelectBestWithScore<T>(HashSet<T>, Func<T, float>, float, DewRandom)

    Item with best score will be returned. If fuzziness is set, score will be multiplied by a random value between (1+fuzziness) ~ (1-fuzziness)

    Declaration
    public static T SelectBestWithScore<T>(HashSet<T> list, Func<T, float> scoreFunc, float fuzziness = 0, DewRandom random = null)
    Parameters
    Type Name Description
    System.Collections.Generic.HashSet<T><T> list
    System.Func<T, TResult><T, float> scoreFunc
    float fuzziness
    DewRandom random
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SelectBestWithScore<T>(IList<T>, Func<T, int, float>, float, DewRandom)

    Item with best score will be returned. If fuzziness is set, score will be multiplied by a random value between (1+fuzziness) ~ (1-fuzziness)

    Declaration
    public static T SelectBestWithScore<T>(IList<T> list, Func<T, int, float> scoreFunc, float fuzziness = 0, DewRandom random = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<T><T> list
    System.Func<T1, T2, TResult><T, int, float> scoreFunc
    float fuzziness
    DewRandom random
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SelectBestWithScore<T>(ReadOnlySpan<T>, Func<T, int, float>, float, DewRandom)

    Item with best score will be returned. If fuzziness is set, score will be multiplied by a random value between (1+fuzziness) ~ (1-fuzziness)

    Declaration
    public static T SelectBestWithScore<T>(ReadOnlySpan<T> list, Func<T, int, float> scoreFunc, float fuzziness = 0, DewRandom random = null)
    Parameters
    Type Name Description
    System.ReadOnlySpan<T><T> list
    System.Func<T1, T2, TResult><T, int, float> scoreFunc
    float fuzziness
    DewRandom random
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SelectRandomAliveHero(bool)

    Declaration
    public static Hero SelectRandomAliveHero(bool fallbackToDead = true)
    Parameters
    Type Name Description
    bool fallbackToDead
    Returns
    Type Description
    Hero

    SelectRandomWeightedIndexInParams(params float[])

    Declaration
    public static int SelectRandomWeightedIndexInParams(params float[] weights)
    Parameters
    Type Name Description
    float[] weights
    Returns
    Type Description
    int

    SelectRandomWeightedInList<T>(IList<T>, Func<T, float>, DewRandom)

    Declaration
    public static T SelectRandomWeightedInList<T>(IList<T> list, Func<T, float> weightGetter, DewRandom random = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<T><T> list
    System.Func<T, TResult><T, float> weightGetter
    DewRandom random
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SelectRandomWeightedInList<T>(ReadOnlySpan<T>, Func<T, float>)

    Declaration
    public static T SelectRandomWeightedInList<T>(ReadOnlySpan<T> list, Func<T, float> weightGetter)
    Parameters
    Type Name Description
    System.ReadOnlySpan<T><T> list
    System.Func<T, TResult><T, float> weightGetter
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SelectRandomWeightedInParams<T>(params (float, T)[])

    Declaration
    public static T SelectRandomWeightedInParams<T>(params (float, T)[] elements)
    Parameters
    Type Name Description
    (float, T)[] elements
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SelectRandomWeightedInReadOnlyList<T>(IReadOnlyList<T>, Func<T, float>)

    Without the postfix, you won't be able to feed in Lists because of ambiguity.

    Declaration
    public static T SelectRandomWeightedInReadOnlyList<T>(IReadOnlyList<T> list, Func<T, float> weightGetter)
    Parameters
    Type Name Description
    System.Collections.Generic.IReadOnlyList<T><T> list
    System.Func<T, TResult><T, float> weightGetter
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SetData<T>(IDictionary<string, string>, string, T)

    Declaration
    public static void SetData<T>(this IDictionary<string, string> dict, string key0, T value)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    T value
    Type Parameters
    Name Description
    T

    SetData<T>(IDictionary<string, string>, string, string, T)

    Declaration
    public static void SetData<T>(this IDictionary<string, string> dict, string key0, string key1, T value)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    string key1
    T value
    Type Parameters
    Name Description
    T

    SetData<T>(IDictionary<string, string>, string, string, string, T)

    Declaration
    public static void SetData<T>(this IDictionary<string, string> dict, string key0, string key1, string key2, T value)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    string key1
    string key2
    T value
    Type Parameters
    Name Description
    T

    SetUnscaledTimeUpdate(GameObject)

    Declaration
    public static void SetUnscaledTimeUpdate(GameObject gobj)
    Parameters
    Type Name Description
    UnityEngine.GameObject gobj

    ShowJsonWithEditor(string)

    Declaration
    public static void ShowJsonWithEditor(string json)
    Parameters
    Type Name Description
    string json

    SpawnEntity<T>(T, Vector3, Quaternion?, Actor, DewPlayer, int, Action<T>)

    Declaration
    public static T SpawnEntity<T>(T entity, Vector3 position, Quaternion? rotation, Actor parent, DewPlayer owner, int level, Action<T> beforeSpawn = null) where T : Entity
    Parameters
    Type Name Description
    T entity
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    Actor parent
    DewPlayer owner
    int level
    System.Action<T><T> beforeSpawn
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SpawnEntity<T>(Vector3, Quaternion?, Actor, DewPlayer, int, Action<T>)

    Declaration
    public static T SpawnEntity<T>(Vector3 position, Quaternion? rotation, Actor parent, DewPlayer owner, int level, Action<T> beforeSpawn = null) where T : Entity
    Parameters
    Type Name Description
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    Actor parent
    DewPlayer owner
    int level
    System.Action<T><T> beforeSpawn
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SpawnHero<T>(T, Vector3, Quaternion?, DewPlayer, int, HeroLoadoutData, string, Action<T>)

    Declaration
    public static T SpawnHero<T>(T hero, Vector3 position, Quaternion? rotation, DewPlayer owner, int level, HeroLoadoutData loadout, string skin, Action<T> beforeSpawn = null) where T : Hero
    Parameters
    Type Name Description
    T hero
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    DewPlayer owner
    int level
    HeroLoadoutData loadout
    string skin
    System.Action<T><T> beforeSpawn
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SpawnHero<T>(Vector3, Quaternion?, DewPlayer, int, HeroLoadoutData, string, Action<T>)

    Declaration
    public static T SpawnHero<T>(Vector3 position, Quaternion? rotation, DewPlayer owner, int level, HeroLoadoutData loadout, string skin, Action<T> beforeSpawn = null) where T : Hero
    Parameters
    Type Name Description
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    DewPlayer owner
    int level
    HeroLoadoutData loadout
    string skin
    System.Action<T><T> beforeSpawn
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    TryGetData<T>(IDictionary<string, string>, string, out T)

    Declaration
    public static bool TryGetData<T>(this IDictionary<string, string> dict, string key0, out T value)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    T value
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T

    TryGetData<T>(IDictionary<string, string>, string, string, out T)

    Declaration
    public static bool TryGetData<T>(this IDictionary<string, string> dict, string key0, string key1, out T value)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    string key1
    T value
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T

    TryGetData<T>(IDictionary<string, string>, string, string, string, out T)

    Declaration
    public static bool TryGetData<T>(this IDictionary<string, string> dict, string key0, string key1, string key2, out T value)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue><string, string> dict
    string key0
    string key1
    string key2
    T value
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T

    TryGetTypeFromShortName(string, out Type)

    Declaration
    public static bool TryGetTypeFromShortName(string typeName, out Type type)
    Parameters
    Type Name Description
    string typeName
    System.Type type
    Returns
    Type Description
    bool

    WaitForAggroedEnemiesRoutine()

    Wait until no enemies aggroed to any player exists.

    Declaration
    public static IEnumerator WaitForAggroedEnemiesRoutine()
    Returns
    Type Description
    System.Collections.IEnumerator

    WaitForClientsReadyRoutine(List<DewPlayer>)

    Wait until all connections are ready.

    Declaration
    public static IEnumerator WaitForClientsReadyRoutine(List<DewPlayer> players = null)
    Parameters
    Type Name Description
    System.Collections.Generic.List<T><DewPlayer> players
    Returns
    Type Description
    System.Collections.IEnumerator
    In This Article
    Back to top Shape of Dreams API Documentation