playMaker

Recent Posts

Pages: 1 ... 8 9 [10]
91
Hi,

You should not instantiate all your ennemies in a pool, instead you should ballpark how many ennemies can be seen and active at a time and that becomes your pool size.

then you take from the pool and if one more enemy is needed, then the pool will instantiate a new one and increase by one the pool count.

that's how you do it, you NEVER instantiate all your ennemies in one pool, that's now the purpose of a pool.

Does that make sense?

so, yeah, definitely use a pool, if you need more help on this, I can give you guidance.

Bye,

Jean
92
Hi,

It's a spam bot Broken Stylus... They get more and more sophisticated, not sure what can be done against these...

Bye,

Jean
93
Action Requests / Re: RigidBody properties
« Last post by jeanfabre on November 11, 2024, 06:21:32 AM »
Hi,

Maybe I don't understand but you actually can use GetProperty and SetProperty on any components really, so I don't see why not with RB2d and 3d?

Can you elaborate what doesn't work for you?

Bye,

Jean
94
Hi,

 woah, that's very interesting indeed! Sad it can't be done withing Unity directly...

Bye,

Jean

95
PlayMaker Help / Re: Hide and Show mouse cursor in real time
« Last post by jeanfabre on November 11, 2024, 04:55:24 AM »
Hi,

Let me know if the post above suits your needs, else I'll explain how to do it in PlayMaker.

Bye,

Jean
96
PlayMaker Help / Re: Convert Seconds To String - total minutes
« Last post by jeanfabre on November 11, 2024, 04:53:39 AM »
Hi,

yep, this is unfortunatly an issue indeed.

First option: use the ecosystem action "GetTimeSpanInfo", feed it seconds, and you get the total minutes as a float which you can then round to in, which gives you 61



Second option, I make a copy of the playmaker action on the ecosystem and add new entries that will give you the roundeddown version of these values.

Let me know if the second option suits you better, and I upload that action.

Bye,

Jean
97
PlayMaker Help / Re: "Get Event Sent by" problem
« Last post by jeanfabre on November 11, 2024, 04:17:25 AM »
Hi,

Odd, It seems that there is a bug somehow in your UI and pause handling.

How to you pause the game?

why does your game keep playing if you are paused?

if you hide the pause canvas, does it works again?

Yes, explicit Event properties works better and more reliably than "send By" because of the way events are send, if between the time you sent an event and the you receive, an fsm sent another one, then the sender is set to the last one.



Bye,

Jean
98
Sorry. I forgot to post the Unity Enum Drawer Context Menu Scroll Helper script.  :)
Call it whatever you want. This script:

Uses pynput to specifically listen for scroll events
Properly distinguishes between scroll directions using dy
Only activates when in Unity and a context menu is visible
Handles each scroll direction independently

playmaker_scroll_helper.py

Code: [Select]
from pynput import mouse
import win32api
import win32con
import ctypes
from ctypes import windll
import time

user32 = ctypes.windll.user32

def is_unity_window():
    hwnd = user32.GetForegroundWindow()
    class_name = ctypes.create_unicode_buffer(64)
    user32.GetClassNameW(hwnd, class_name, 64)
    return class_name.value == "UnityContainerWndClass"

def is_context_menu_visible():
    menu_hwnd = user32.FindWindowW("#32768", None)
    return menu_hwnd != 0

def simulate_up():
    win32api.keybd_event(win32con.VK_UP, 0, 0, 0)
    win32api.keybd_event(win32con.VK_UP, 0, win32con.KEYEVENTF_KEYUP, 0)

def simulate_down():
    win32api.keybd_event(win32con.VK_DOWN, 0, 0, 0)
    win32api.keybd_event(win32con.VK_DOWN, 0, win32con.KEYEVENTF_KEYUP, 0)

def on_scroll(x, y, dx, dy):
    if is_unity_window() and is_context_menu_visible():
        if dy > 0:
            simulate_up()
        elif dy < 0:
            simulate_down()

# Create and start the listener
def main():
    print("Unity Context Menu Scroll Helper")
    print("Running... Press Ctrl+C to stop")
   
    # Create the listener
    with mouse.Listener(on_scroll=on_scroll) as listener:
        try:
            listener.join()
        except KeyboardInterrupt:
            print("\nStopping scroll helper...")

if __name__ == "__main__":
    main()



99
SOLUTION: Mouse Wheel Scrolling for Unity Context Menus (Windows)

I've created a Python script that enables mouse wheel scrolling in Unity's context menus (including PlayMaker's enum/event selection dropdowns) on Windows. While this isn't a perfect solution to the enum drawer issue, it makes navigating large lists much more manageable.

What the Script Does:
- Enables mouse wheel scrolling in Unity's context menus
- Converts mouse wheel movements into Up/Down key presses
- Only activates when Unity is the active window and a context menu is open
- Works with PlayMaker's enum/event selection dropdowns
Code: [Select]
[url]unity_context_scroll_helper.py[/url]Technical Details:
The script uses pynput to detect mouse wheel events and simulates keyboard input:
- Upward scroll → Up arrow key press
- Downward scroll → Down arrow key press

Requirements:
- Python installed on Windows
- pynput library (install via: pip install pynput)
- win32api (install via: pip install pywin32)


While this isn't a complete solution to the enum drawer limitations, it at least makes navigating large lists more bearable on Windows by adding mouse wheel support. The script is particularly useful when dealing with large enum lists or event selections in PlayMaker.

Usage:
1. Install required Python libraries
2. Save the script and run it before opening Unity
3. Use mouse wheel to scroll through any context menu in Unity

This is a workaround while we wait for proper enum drawer improvements in Unity/PlayMaker. If anyone needs help with how to install python and run it I can maybe provide an auto hotkey version.
RECOMEND: Get a good mouse that can use fast scrolling. The Signature M650 features SmartWheel scrolling that delivers precision or speed. You can blast through the list at the speed of sound.
RANT: Oh unity dev team who can’t satisfy everyone. The post from this thread confirms they are rolling back functionality to keep us in a cave. Why roll with Unity 6 if 5 and below cant get right? $$$ https://discussions.unity.com/t/state-of-the-enhanced-contextual-menu-in-unity-6/1541613
Quote
Since then, priorities shifted, and the feature took a backseat.
Here are a bunch of links that better describe the WINDOWS issue with long context menus and lead to dead ends. This is leg work for someone how can articulate the problem. https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Enable-mouse-wheel-scrolling-in-context-menus/idi-p/3975539 https://discussions.unity.com/t/editors-inspector-dropdown-lists-scroll-very-slowly-with-no-mousewheel/238719 https://discussions.unity.com/t/editorguilayout-enumpopup-and-scrolling/598433/3 https://www.tenforums.com/customization/24404-windows-10-context-menus-have-huge-padding.html https://www.elevenforum.com/t/context-menu-text-size.23077/ https://www.elevenforum.com/t/how-to-reduce-expanded-context-menu-vertical-spacing-padding-and-dupe-entries.25950/
100
For any interested please note.

The issue seems to stem from Unity's use of the OS-native dropdown system (EditorGUI.EnumPopup and similar methods). This is deeply integrated into Unity's IMGUI system, which Playmaker uses. That’s why on a Mac you can use your mouse wheel to scroll through a large list. But on Windows it acts like a standard right click context menu should.

It’s not playmaker itself. The core issue I THINK is the actual enum/event selection dropdowns in Playmaker are still using the limited Windows-style dropdown UI.

The only temporary workaround handicap is to use some sort of Enum Attribute Organization. To catagorize items and use the arrow approach. For example fruit → apple, orange

public enum Item
{
    [InspectorName("Weapon/Melee/Sword")]
    Sword,
    [InspectorName("Weapon/Melee/Axe")]
    Axe,
    [InspectorName("Weapon/Ranged/Bow")]
    Bow,

https://discussions.unity.com/t/manage-lots-of-enum-choices-in-the-inspector/249118/1


Claude AI 3.5 Sonnet and Opus, Phind 405B, ChatGpt4o and Copilot all suggest some sort of Direct Unity Editor Modification (Risky but Effective) Or PlayMaker Source Modification (No Access) or Create a custom Unity package that replaces the default enum dropdown. I have tried with no success. This is where we'd need to dig into Unity's internal API and oh my god I have no idea where to start.
Pages: 1 ... 8 9 [10]