LogicBlock 2 | Visual Script
... Prefab-Style Overrides ... Revert: Right-click any overridden field and choose Revert to Block Default (or set ... Separate Runs: Every call runs independently with its own Source, Target, and ...
by Fullscreen Studios
★★★★★ star rating
Price History +
Key Features
- Three reusable Block assets: Instruction Block, Condition Block and LogicBlock
- LogicBlock assets hold any number of named Instructions and Conditions lists
- Typed parameters with default values, read inside the Block through Parameters > Block Parameter
- Prefab-style parameter overrides per call, with Revert to Block Default
- Parameter types generated automatically for every Visual Script value, including your own types and third-party modules
- Run Block, Stop Block, Check Block and Is Block Running, plus Check Block as a Bool value
- Every call runs separately, so the same Block can run on many objects at once
- Pooled list copies: after the first few calls, running a Block makes no new copies
- Blocks can call other Blocks, with nested parameter values kept apart
- Move Instructions to Block: turn an Event's instructions into a Block in one step, with undo
- List notes and icons, shown in the inspector and in Run Block's list picker
- Block names in titles shown in the colour of their asset
- Changes made in Play Mode apply to the next run and are kept afterwards
- Uses Visual Script's own lists, windows, notes and icons
- C# scripting API
- 4 example scenes
- Full source code
- Documentation: https://fullscreen.no/docs/logicblock-2/
Requirements
- Visual Script 1.0.4 or newer
- Unity 6000.5 or newer
LogicBlock 2 – Reusable Logic for Visual Script
The same instructions end up in Event after Event: deal damage, open a door, play a hit effect. When something changes, you hunt down every copy and fix them one by one.
LogicBlock 2 turns Visual Script instruction lists and conditions into reusable assets. Put your logic in a Block, run it from any Event, and pass in values just like calling a function. Edit a Block once and every place that uses it updates automatically.
Built specifically for Visual Script, it uses the same lists, windows, notes, and icons, keeping the workflow you're already familiar with.
🧱 Three Block Assets
Create them from Create > Visual Script > LogicBlock:
- Instruction Block: One instruction list for a single reusable action, such as Deal Damage, Open Door, or Spawn Loot.
- Condition Block: One condition list for a reusable check, such as Can Attack? or Has Key?, using All (And) or Any (Or).
- LogicBlock: Any number of named instruction and condition lists in one asset, ideal for grouping a whole system like enemy behavior (Patrol, Chase, Attack, Flee).
🎛️ Parameters, Like a Function
Give a Block typed inputs with default values so one Block adapts to different callers.
- Built-In Types: Number, Integer, String, Bool, Color, Vector 2, Vector 3, Quaternion, Game Object, Material, Sprite, Texture, Audio Resource, Animation Clip, Scene, Scriptable Object, and more.
- Your Own Types: Visual Script Get values appear automatically in Add Parameter... with automatic code generation.
- Third-Party Modules: Get values from other packages work automatically once installed.
- Read Anywhere Inside the Block: Pick Parameters > Block Parameter in compatible fields, filtered automatically to types the field can read.
🔁 Prefab-Style Overrides
Each Run Block or Check Block exposes one field per parameter with prefab-style override behavior:
- Follows the Block: Unchanged fields inherit the Block's default and keep tracking changes to it.
- Changed in This Call: Overridden fields are highlighted with a blue bar and bold label.
- Revert: Right-click any overridden field and choose Revert to Block Default (or set it back to match the default).
▶️ Run, Check, and Stop
Everything you need to use Blocks from any Event:
- Run Block: Run an Instruction Block or LogicBlock list, either waiting for completion or running independently.
- Check Block: Evaluate a Condition Block or list as a condition, or as a Bool value to drive any Bool field.
- Stop Block: Stop active calls for a specific Source or stop All Calls.
- Is Block Running: True while a Block or list has an active call, great for run-once guards and toggles.
⚙️ Runs Anywhere, All at Once
Blocks run as isolated instances with pooled copies, safe nesting, and Play Mode edits.
- Separate Runs: Every call runs independently with its own Source, Target, and parameter values, even across dozens of enemies at once.
- Pooled Copies: Reuses pooled list copies after initial calls to avoid unnecessary allocations during gameplay.
- Safe Nesting: Blocks can call other Blocks without overwriting caller parameters, with a 32-level depth guard against accidental recursion.
- Play Mode Friendly: Edits made to Block assets in Play Mode apply to the next call and persist afterward.
📋 Named Lists in a LogicBlock
Group Instructions and Conditions lists inside one asset with custom notes, icons, and fast lazy loading.
- Add List: Create Instructions or Conditions lists using Visual Script's standard selector window.
- Rename, Notes & Clipboard: Right-click any list to rename, edit notes, copy, paste, or duplicate.
- Custom Icons: List note icons and colors carry over to the inspector and Run Block's list picker.
- Fast to Open: List contents are built lazily when expanded, keeping large LogicBlocks snappy to open.
🪄 Move Instructions to Block
Convert existing Event instructions into a Block in one step via Move Instructions to Block... on an Event component:
- New Block or New List: Output to a new Instruction Block or a new list inside an existing LogicBlock (with full Undo support).
- Smart Parameters: Scene object references become parameters automatically, and you can tick any other value to promote it to a parameter.
- Repeated Values Merged: Identical values used across multiple instructions consolidate into a single parameter.
💻 Scripting API
Run, check, and stop Blocks from C#, and embed Call and Arguments fields in your own components with prefab-style overrides intact.
🎮 Example Scenes
Four sample scenes (using URP materials) with on-scene notes showing key workflows:
- 1 Run Block: Three cubes sharing one Pop Instruction Block.
- 2 Parameters: Set Lamp called with different Color and Intensity overrides alongside default values.
- 3 Check Block: Using Is Lamp On inside an If condition to toggle a lamp and gate popping.
- 4 LogicBlock Lists: A Lamp Show LogicBlock (Red, Blue, Pulse, Reset) paired with Is Block Running and Stop Block.
📦 What's Included
- Full Source Code
- 4 Example Scenes
- Documentation
🔗 Links
🌐 Website | 📖 Documentation | 📚 Setup Guide | 💬 Discord