Search Issue Tracker

Won't Fix

Votes

0

Found in

2021.3.43f1

2022.3.46f1

6000.0.19f1

Issue ID

UUM-79677

Regression

No

"Update() can not take parameters" error is thrown when implementing LateUpdate/Update/FixedUpdate with parameters in a ScriptableObject

--

-

Reproduction steps:
1. Open the attached “MonoMethodsSO” project
2. Observe the Console logs

Expected Result: No errors are thrown
Actual Result: “Script error (MyScriptableObject): Update() can not take parameters.” error is thrown

Reproducible with: 2021.3.43f1, 2022.3.46f1, 6000.0.19f1

Reproducible on: Windows 11 Pro, MacOS 14.6.1 (by reporter)
Not reproducible on: No other environments tested

  1. Resolution Note:

    This is expected behaviour, Update() shouldn't take parameters

Comments (1)

  1. raidofuwa

    Sep 27, 2024 20:25

    I understand this is "expected" behaviour, but have to be mentioned in ScriptableObject's reference page. I think that's what he is saying. It should be documented. There's no mention about Update method in ScriptableObject refernce nor Object reference page, so naturally, people will assume it's okay to define their own Update function on ScriptableObject (Unlike Monobehaviour, it doesn't recieve Update message...so, why should we care?). One line in the document, the page where the people naturally look up, prevent bug report like this. I think it benefits us all!!!!!!!!!!

    https://docs.unity3d.com/ja/2023.2/ScriptReference/Object.html
    https://docs.unity3d.com/ja/2023.2/ScriptReference/ScriptableObject.html

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.