Home
  • Manual
  • Node Index
  • API
  • Changelog
Search Results for

    Show / Hide Table of Contents
    • InsaneScatterbrain
      • AStarPathfinder
      • Calc
      • Color32EqualityComparer
      • EqualityComparer
      • RandomPathWalker
      • TrigMath
    • InsaneScatterbrain.DataStructures
      • Pair<T>
    • InsaneScatterbrain.DelaunatorSharp
      • DelaunatorNoAlloc
    • InsaneScatterbrain.Dependencies
      • DependencyContainer
      • DependencyNotFoundException
      • IDependencyContainer
    • InsaneScatterbrain.Editor.Services
      • Assets
    • InsaneScatterbrain.Editor.Updates
      • UpdateAction
      • Updater
    • InsaneScatterbrain.Extensions
      • ColorExtensions
      • ExceptionExtensions
      • FieldInfoExtensions
      • HashSetExtensions
      • IntExtensions
      • ListExtensions
      • RandomExtensions
      • SortedListExtensions
      • StackExtensions
      • Texture2DDrawingExtensions
      • Texture2DExtensions
      • TypeExtensions
      • Vector2Extensions
      • Vector2IntExtensions
      • Vector3Extensions
      • Vector3IntExtensions
    • InsaneScatterbrain.MapGraph
      • AddFloatsNode
      • AddFloatToVector2Node
      • AddFloatToVector3Node
      • AddIntsNode
      • AddIntToVector2IntNode
      • AddIntToVector3IntNode
      • AddRandomEdgesNode
      • AddVector2IntsNode
      • AddVector2sNode
      • AddVector3IntsNode
      • AddVector3sNode
      • ApplyMaskNode
      • Area
      • AreaExtractor
      • AreaGraph
      • AreaGraphBuilder
      • AreaGraphEdge
      • AreaGraphEdgePool
      • AreaGraphPool
      • AreaPool
      • AreasCentroidPointsNode
      • AreasSpecialBorderPointsNode
      • AreasToPointsNode
      • AStarPathsNode
      • BasicMathOperationNode<T>
      • BasicMathOperationNode<T1, T2, TOut>
      • BspLeafCenterPointsNode
      • BspNode
      • BspNodePool
      • BspTree
      • BspTreePool
      • CellularAutomataSmoothingNewNode
      • CellularAutomataSmoothingNode
      • ChangeTextureSizeNode
      • ClampFloatsNode
      • ClampIntsNode
      • CollectionPool<TCollection, TValue>
      • ConnectAreaGraphCentroidsNode
      • ConnectAreaGraphClosestBorderPointsNode
      • ConnectAreaGraphRandomPointsNode
      • ConnectedPointsToPointsNode
      • ConvertTextureToTilemapNode
      • CopyTilemapDataNode
      • CornerPointsNode
      • CurrentOrEmptyTextureNode
      • DataToTextureNode
      • DictionaryPool<TDictionary, TKey, TValue>
      • DivideFloatsNode
      • DivideIntsNode
      • DivideVector2ByFloatNode
      • DivideVector2IntByIntNode
      • DivideVector2IntsNode
      • DivideVector2sNode
      • DivideVector3ByFloatNode
      • DivideVector3IntByIntNode
      • DivideVector3IntsNode
      • DivideVector3sNode
      • DomainWarpFractalType
      • DomainWarpType
      • DrawAreasNode
      • DrawBorderNode
      • DrawCirclesNode
      • DrawConnectionsBiasedRandomWalkNode
      • DrawGridNode
      • DrawManhattanConnectionsNode
      • DrawNoiseThresholdNode
      • DrawOutlineNode
      • DrawPathsNode
      • DrawPointsNode
      • DrawRectsNode
      • DrawShortestPathNode
      • EmptyTextureNode
      • ExtractAreasNode
      • ExtractColorNode
      • ExtractPointsNode
      • ExtractPointsWithNeighboursNode
      • FastNoiseEnum
      • FlipTextureNode
      • FractalType
      • GameObjectsFromTextureFactory
      • GenerateAreaGraphNode
      • GenerateMstAreaGraphNode
      • GenerateRstAreaGraphNode
      • HexagonalGridOffsetType
      • InvertMaskNode
      • IObjectType<TEntry, TObject>
      • IObjectTypeEntry<T>
      • IObjectTypeSet<TType, TObject>
      • LinePathsNode
      • ListPool<TValue>
      • LoadTextureData
      • MapGraphGraph
      • MapGraphTilemapPrefab
      • Mask
      • MaskPool
      • MaxFloatsNode
      • MaxIntsNode
      • MergeAreasNode
      • MergeMasksNode
      • MergePathsNode
      • MergePointPairsNode
      • MergePointsNode
      • MergeTilemapsNode
      • MinFloatsNode
      • MinIntsNode
      • MultiplyFloatsNode
      • MultiplyIntsNode
      • MultiplyVector2ByFloatNode
      • MultiplyVector2IntByIntNode
      • MultiplyVector2IntsNode
      • MultiplyVector2sNode
      • MultiplyVector3ByFloatNode
      • MultiplyVector3IntByIntNode
      • MultiplyVector3IntsNode
      • MultiplyVector3sNode
      • NamedColor
      • NamedColorNode
      • NamedColorSet
      • NoiseNode
      • ObjectType<TEntry, TObject>
      • ObjectTypeEntry<T>
      • ObjectTypeSet<TType, TEntry, TObject>
      • ObjectTypeSetScriptableObject<TType, TEntry, TObject>
      • OpenObjectTypeSet<TType, TEntry, TObject>
      • Outliner
      • PerlinNoiseFillTextureNode
      • PointsToAreasNode
      • PoolInitializer
      • PowerNode
      • PrefabSet
      • PrefabType
      • PrefabTypeEntry
      • RandomBoolNode
      • RandomBspRoomsNode
      • RandomBspTreeNode
      • RandomColorNode
      • RandomExtensions
      • RandomFloatNode
      • RandomIntNode
      • RandomlyFillTextureNode
      • RandomlyStampTilemapsNode
      • RandomNode<T>
      • RandomNoiseNode
      • RandomPointsNode
      • RandomPointsPerAreaNode
      • RandomRectsNode
      • RandomRngStateNode
      • RandomVector2IntNode
      • RandomVector2Node
      • RandomVector3IntNode
      • RandomVector3Node
      • RandomWalkerNode
      • RandomWalkerPathsNode
      • RangeRandomNode<T>
      • RectCenterPointsNode
      • RectsToAreasNode
      • ReplaceColorNode
      • ReplaceGameObjectChildrenNode
      • ResizeTextureNode
      • RotateTextureNode
      • RotationalSymmetry
      • SaveData
      • SaveTextureData
      • ScaleTextureNode
      • ScaleTextureToNode
      • ScaleTextureVector2Node
      • ShiftTextureNode
      • SplitConnectionsManhattanNode
      • SquareRootNode
      • StackPool<T>
      • StampNode
      • SubtractFloatFromVector2Node
      • SubtractFloatFromVector3Node
      • SubtractFloatsNode
      • SubtractIntFromVector2IntNode
      • SubtractIntFromVector3IntNode
      • SubtractIntsNode
      • SubtractMaskNode
      • SubtractVector2IntsNode
      • SubtractVector2sNode
      • SubtractVector3IntsNode
      • SubtractVector3sNode
      • TextureData
      • TextureData.Color32ArrayFacade
      • TextureDataDrawingExtensions
      • TextureDataExtensions
      • TextureDataPool
      • TextureSizeNode
      • TextureToChildGameObjectsNode
      • TextureToDataNode
      • TextureToGameObjectsNode
      • TextureToMaskNode
      • TextureToNoiseDataNode
      • TextureToTilemapNode
      • TilemapData
      • TilemapDataPool
      • TilemapSet
      • TilemapToDataNode
      • TilemapToTextureNode
      • TilemapType
      • TilemapTypeEntry
      • Tileset
      • TileType
      • TileTypeEntry
      • TransparentColorNode
      • Vector2IntComparer
      • Vector2IntFromFloats
      • Vector2IntFromInts
      • Vector2IntToInts
      • Vector2IntToVector2
      • Vector3IntComparer
      • WaveformFunctionCollapseNode
    • InsaneScatterbrain.MapGraph.Editor
      • AboutWindow
      • AddRandomEdgesNodeView
      • ApplyMaskNodeView
      • AreaSpecialPointsNodeView
      • AStarPathsNodeView
      • CellularAutomataSmoothingNodeNewView
      • CellularAutomataSmoothingNodeView
      • CellularDistanceFunctionConstantNodeView
      • CellularReturnTypeConstantNodeView
      • ChangeTextureSizeNodeView
      • ConnectionsNodeView
      • CornerPointsNodeView
      • DataSetList<T>
      • DataSetListBase<T>
      • DomainWarpFractalTypeNodeView
      • DomainWarpTypeConstantNodeView
      • DrawAreasNodeView
      • DrawBorderNodeView
      • DrawCirclesNodeView
      • DrawConnectionsBiasedRandomWalkNodeView
      • DrawGridNodeView
      • DrawManhattanConnectionsNodeView
      • DrawNoiseThresholdNodeView
      • DrawOutlineNodeView
      • DrawPathsNodeView
      • DrawPointsNodeView
      • DrawRectsNodeView
      • DrawShortestPathConnectionsNodeView
      • EmptyTextureNodeView
      • EnumConstantNodeView<T>
      • ExtractAreasNodeView
      • ExtractColorNodeView
      • ExtractPointsNodeView
      • ExtractPointsWithNeighboursNodeView
      • FlipTextureNodeView
      • FractalTypeNodeView
      • GenerateAreaGraphNodeView
      • GenerateMstAreaGraphNodeView
      • GenerateRstAreaGraphNodeView
      • Initializer
      • InputParametersList
      • InvertMaskNodeView
      • LinePathsNodeView
      • ListBase
      • MapGraphAsset
      • MapGraphAssetUpdater
      • MapGraphCreateMenu
      • MapGraphEditor
      • MapGraphEditorInfo
      • MapGraphEditorSettingsWindow
      • MapGraphEditorSettingsWindowInitializer
      • MapGraphInitializer
      • MapGraphUpdater
      • MergeAreasNodeView
      • NamedColorNodeView
      • NamedColorSetEditor
      • NamedColorSetList
      • NewUpdatesWindow
      • NoiseNodeView
      • NoiseTypeNodeView
      • ObjectTypeEntryList<TType, TEntry, TObject>
      • ObjectTypeSetList<TType, TEntry, TObject>
      • OutputParametersList
      • ParametersList
      • PerlinNoiseFillTextureNodeView
      • PrefabSetEditor
      • PrefabTypeEntryList
      • PrefabTypeList
      • ProcessGraphNodeView
      • RandomBspRoomsNodeView
      • RandomBspTreeNodeView
      • RandomlyFillTextureNodeView
      • RandomlyStampTilemapsNodeView
      • RandomPointsNodeView
      • RandomPointsPerAreaNodeView
      • RandomRectsNodeView
      • RandomWalkerNodeView
      • RandomWalkerPathsNodeView
      • ReplaceColorNodeView
      • ResizeTextureNodeView
      • RotateTextureNodeView
      • RotationalSymmetryNodeView
      • RotationType3dConstantNodeView
      • ScaleTextureNodeView
      • ScaleTextureToNodeView
      • ScaleTextureVector2NodeView
      • ScriptGraphAssetUpdater
      • ScriptNodeViewExtensions
      • ShiftTextureNodeView
      • StampNodeView
      • TextureConstantNodeView
      • TextureToMaskNodeView
      • TilemapConstantNodeView
      • TilemapPrefabEditor
      • TilemapSetConstantNodeView
      • TilemapSetEditor
      • TilemapToTextureNodeView
      • TilemapTypeEntryList
      • TilemapTypeList
      • TilesetConstantNodeView
      • TilesetEditor
      • TileTypeEntryList
      • TileTypeList
      • TransparentColorNodeView
      • UpdateAction_1_10
      • UpdateAction_1_14
      • UpdateAction_1_15
      • UpdateAction_1_2
      • UpdateAction_1_26_1
      • UpdateChecker
      • WaveformFunctionCollapseNodeView
    • InsaneScatterbrain.Pooling
      • IPool
      • Pool<T>
      • PoolManager
    • InsaneScatterbrain.RandomNumberGeneration
      • Rng
      • RngState
    • InsaneScatterbrain.ScriptGraph
      • BoolParameterField
      • BoundsIntParameterField
      • BoundsParameterField
      • Color32ParameterField
      • ComponentDependency
      • ConstantNode
      • ConsumerNode
      • CopyData
      • CopyPaste
      • DataDependency
      • DataSet<T>
      • DataSetItem
      • DataSetScriptableObject<TItem, TOpenSet>
      • DataSetScriptableObject<TItem>
      • ExecutionGraph
      • ExecutionGraphBuilder
      • ExplicitInPortTypesAttribute
      • ExplicitOutPortTypesAttribute
      • ExplicitPortTypesAttribute
      • FloatParameterField
      • IConsumerNode
      • IDataSet
      • IDataSet<T>
      • IDataSetItem
      • IdDeduplicator
      • IInstanceProvider
      • IncompatiblePortTypeException
      • INode
      • InPort
      • InPortAttribute
      • InputNode
      • IntParameterField
      • IOpenDataSet<T>
      • IParameterField
      • IPool
      • IPoolInitializer
      • IPreparable
      • IProcessorNode
      • IProviderNode
      • IScriptGraphInstanceProvider
      • IScriptNode
      • NewInstanceProvider
      • NewScriptGraphInstanceProvider
      • NodeEdge
      • ObjectParameterField
      • OpenDataSet<T>
      • OutPort
      • OutPortAttribute
      • OutputNode
      • PairVector2IntParameterField
      • Pool<T>
      • PoolManager
      • PoolManagerInitializer
      • PoolManagerSingleton
      • Pools
      • PortAttribute
      • PortNotFoundException
      • ProcessGraphNode
      • ProcessorNode
      • ProviderNode
      • RectIntParameterField
      • RectParameterField
      • RequiredPortNotConnectedException
      • RngExtensions
      • ScriptGraphComponents
      • ScriptGraphEditorInfo
      • ScriptGraphGraph
      • ScriptGraphInput
      • ScriptGraphInput<T>
      • ScriptGraphInputBool
      • ScriptGraphInputBounds
      • ScriptGraphInputBoundsInt
      • ScriptGraphInputColor32
      • ScriptGraphInputFloat
      • ScriptGraphInputFloatAsInt
      • ScriptGraphInputInt
      • ScriptGraphInputObject
      • ScriptGraphInputRect
      • ScriptGraphInputRectInt
      • ScriptGraphInputString
      • ScriptGraphInputTexture2D
      • ScriptGraphInputTilemap
      • ScriptGraphInputTilemapSet
      • ScriptGraphInputTileset
      • ScriptGraphInputVector2
      • ScriptGraphInputVector2Int
      • ScriptGraphInputVector3
      • ScriptGraphInputVector3Int
      • ScriptGraphMonoBehaviour
      • ScriptGraphParameter
      • ScriptGraphParameters
      • ScriptGraphPool
      • ScriptGraphPoolManager
      • ScriptGraphPoolManagerSingleton
      • ScriptGraphPort
      • ScriptGraphProcessor
      • ScriptGraphRunner
      • ScriptNode
      • ScriptNodeAttribute
      • SeedType
      • StringParameterField
      • Vector2IntParameterField
      • Vector2ParameterField
      • Vector3IntParameterField
      • Vector3ParameterField
    • InsaneScatterbrain.ScriptGraph.Editor
      • BoolConstantNodeView
      • BoundsConstantNodeView
      • BoundsIntConstantNodeView
      • ColorConstantNodeView
      • ComponentDependencyListFactory
      • ConstantNodeView
      • ConstantNodeViewAttribute
      • DataDependencyListFactory
      • FloatConstantNodeView
      • GroupNodeView
      • InputNodeView
      • IntConstantNodeView
      • NodeDuplicator
      • NodeFactory
      • ObjectConstantNodeView
      • OutPortEdgeConnectListener
      • OutputNodeView
      • OutputParameterResultFormatter
      • OutputParameterResultWindow
      • RandomBspRoomsPreviewBehaviour
      • RectConstantNodeView
      • RectIntConstantNodeView
      • ScriptGraphContextMenu
      • ScriptGraphDebugger
      • ScriptGraphDependencyInstaller
      • ScriptGraphEditor
      • ScriptGraphInitializer
      • ScriptGraphInputEditor
      • ScriptGraphRunnerEditor
      • ScriptGraphSearchBar
      • ScriptGraphValidator
      • ScriptGraphView
      • ScriptGraphViewSelection
      • ScriptGraphViewWindow
      • ScriptNodeView
      • ScriptNodeViewAttribute
      • ScriptNodeViewFactory
      • ScriptNodeViewTypesRegistry
      • StringConstantNodeView
      • Urls
      • Vector2ConstantNodeView
      • Vector2IntConstantNodeView
      • Vector3ConstantNodeView
      • Vector3IntConstantNodeView
    • InsaneScatterbrain.ScriptGraph.Editor.NodeSearch
      • ConstantEntryRegistry
      • DefaultEntryRegistry
      • EntryData
      • EntryFactory
      • GraphEntryRegistry
      • IEntryRegistry
      • InputParametersEntryRegistry
      • ISearchFilter
      • NodeSearchWindow
      • NodeType
      • OutputParametersEntryRegistry
      • ParametersEntryRegistry
      • PortFilter
    • InsaneScatterbrain.Serialization
      • ArraySerializer<T>
      • BoundsIntSerializer
      • BoundsSerializer
      • DataBag
      • DefaultArraySerializer
      • IDeserializer
      • ISerializer
      • RectIntSerializer
      • RectSerializer
      • Serializer
      • Vector2IntSerializer
      • Vector3IntSerializer
    • InsaneScatterbrain.Services
      • Disposer
      • Rng
      • Texture2DFactory
      • Types
    • InsaneScatterbrain.Threading
      • IMainThreadCommand
      • IMainThreadCommandHandler
      • IMainThreadCoroutineCommand
      • IMainThreadCoroutineCommandHandler
      • MainThread
      • MainThreadCommand
      • MainThreadCommandHandler
      • MainThreadCoroutine
      • MainThreadCoroutineCommand
      • MainThreadCoroutineCommandHandler
      • MainThreadUpdater
    • InsaneScatterbrain.Versioning
      • IVersioned
      • SerializedVersion
      • VersionedMonoBehaviour
      • VersionedScriptableObject

    Class TextureData

    Contains texture data. This is used to be able to manipulate texture data without requiring access to the Unity API, which is not possible on any thread that is not the main thread.

    Inheritance
    object
    TextureData
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: InsaneScatterbrain.MapGraph
    Syntax
    public class TextureData

    Constructors

    TextureData()

    Declaration
    public TextureData()

    TextureData(int, int)

    Creates new texture data.

    Declaration
    [Obsolete("Please use the pool manager to get a TextureData instance. This constructor will probably be removed in version 2.0. Alternatively, use the parameterless constructor and call the Set method.")]
    public TextureData(int width, int height)
    Parameters
    Type Name Description
    int width

    The width.

    int height

    The height.

    Properties

    ColorCount

    Declaration
    public int ColorCount { get; }
    Property Value
    Type Description
    int

    Colors

    Declaration
    public TextureData.Color32ArrayFacade Colors { get; }
    Property Value
    Type Description
    TextureData.Color32ArrayFacade

    Height

    Gets the texture height.

    Declaration
    public int Height { get; }
    Property Value
    Type Description
    int

    this[int]

    Declaration
    public Color32 this[int index] { get; set; }
    Parameters
    Type Name Description
    int index
    Property Value
    Type Description
    UnityEngine.Color32

    Width

    Gets the texture width.

    Declaration
    public int Width { get; }
    Property Value
    Type Description
    int

    Methods

    Clone()

    Creates a new instance of this texture data.

    Declaration
    [Obsolete("Please use the overload that takes an instance of TextureData to clone into. This overload will likely be removed in 2.0.")]
    public TextureData Clone()
    Returns
    Type Description
    TextureData

    A clone of this texture data

    Clone(TextureData)

    Creates a new instance of this texture data.

    Declaration
    public void Clone(TextureData clone)
    Parameters
    Type Name Description
    TextureData clone

    The instance that will be used to clone this into.

    CreateFromTexture(TextureData, Texture2D)

    Creates texture data from texture.

    Declaration
    public static void CreateFromTexture(TextureData textureData, Texture2D texture)
    Parameters
    Type Name Description
    TextureData textureData

    The texturedata instance to fill with the texture's data.

    UnityEngine.Texture2D texture

    The texture.

    CreateFromTexture(Texture2D)

    Creates texture data from texture.

    Declaration
    public static TextureData CreateFromTexture(Texture2D texture)
    Parameters
    Type Name Description
    UnityEngine.Texture2D texture

    The texture.

    Returns
    Type Description
    TextureData

    The new texture data.

    GetColors()

    Declaration
    public IReadOnlyList<Color32> GetColors()
    Returns
    Type Description
    System.Collections.Generic.IReadOnlyList<T><UnityEngine.Color32>

    Reset()

    Declaration
    public void Reset()

    Resize(int, int)

    Resizes the texture to the given size.

    Declaration
    public void Resize(int width, int height)
    Parameters
    Type Name Description
    int width

    The new width.

    int height

    The new height.

    Set(int, int)

    Creates new texture data.

    Declaration
    public void Set(int width, int height)
    Parameters
    Type Name Description
    int width

    The width.

    int height

    The height.

    ToTexture2D()

    Creates a new texture from the texture data.

    Declaration
    public Texture2D ToTexture2D()
    Returns
    Type Description
    UnityEngine.Texture2D

    The new texture.

    Extension Methods

    TextureDataDrawingExtensions.DrawArea(TextureData, Area, Color32)
    TextureDataDrawingExtensions.DrawAreas(TextureData, IEnumerable<Area>, Color32)
    TextureDataDrawingExtensions.DrawCircles(TextureData, IEnumerable<Vector2Int>, int, Color32, List<Vector2Int>)
    TextureDataDrawingExtensions.DrawCircles(TextureData, IEnumerable<Vector2Int>, int, Color32)
    TextureDataDrawingExtensions.DrawLine(TextureData, Vector2Int, Vector2Int, Color, int)
    TextureDataDrawingExtensions.DrawLine(TextureData, Vector2Int, Vector2Int, Color)
    TextureDataDrawingExtensions.DrawLines(TextureData, Color, params Vector2Int[])
    TextureDataDrawingExtensions.DrawRect(TextureData, RectInt, Color)
    TextureDataDrawingExtensions.DrawRect(TextureData, Vector2Int, int, int, float, Color)
    TextureDataDrawingExtensions.DrawRectFill(TextureData, RectInt, Color)
    TextureDataDrawingExtensions.DrawRectFill(TextureData, Vector2Int, int, int, float, Color)
    TextureDataDrawingExtensions.DrawRects(TextureData, IEnumerable<RectInt>, Color)
    TextureDataDrawingExtensions.DrawRectsFill(TextureData, IEnumerable<RectInt>, Color)
    TextureDataDrawingExtensions.Fill(TextureData, Color32)
    TextureDataDrawingExtensions.FillPoints(TextureData, IEnumerable<Vector2Int>, Color32)
    TextureDataExtensions.Scale(TextureData, ref TextureData, int, int)
    In This Article
    Back to top Generated by DocFX