はどはど/HADHAD
はどはど/HADHAD
OOneJS
Created by はどはど/HADHAD on 6/26/2024 in #general-discussion
ScriptLib and C# to TSDef Converter Without OneJS
I can view it now!
6 replies
OOneJS
Created by はどはど/HADHAD on 6/26/2024 in #general-discussion
ScriptLib and C# to TSDef Converter Without OneJS
Got it, thank you. I will check. By the way, I can't access the second link. Do I need to be a contributor?
6 replies
OOneJS
Created by はどはど/HADHAD on 6/26/2024 in #general-discussion
ScriptLib and C# to TSDef Converter Without OneJS
I initially attempted to retain only the 'Editor' directory from 'OneJS' and delete everything else, but it didn't work. It seems that it is tightly coupled with some parts of the 'Runtime', which is why it doesn't function properly. However, I haven't fully read through the source code yet.
6 replies
OOneJS
Created by はどはど/HADHAD on 6/18/2024 in #general-discussion
Questions About Using OneJS
This decision has raised new questions, so I plan to start a new thread as a separate topic.
19 replies
OOneJS
Created by はどはど/HADHAD on 6/18/2024 in #general-discussion
Questions About Using OneJS
Thank you. For the time being, I have decided to conduct operational verification with the minimum environment of Jint and the minimum environment of V1 as soon as the development environment for Switch is obtained.
19 replies
OOneJS
Created by はどはど/HADHAD on 6/18/2024 in #general-discussion
Questions About Using OneJS
Even when writing the Update Loop in the following way, is it still difficult to mitigate the impact on performance?
using System;
using UnityEngine;

public class DynamicMono : MonoBehaviour
{
public Action UpdateAction;

void Update()
{
UpdateAction?.Invoke();
}
}

public class DynamicScriptAdder : MonoBehaviour
{
public void AddDynamicScript(GameObject target, Action updateAction)
{
DynamicMono dynamicScript = target.AddComponent<DynamicMono>();
dynamicScript.UpdateAction = updateAction;
}
}
using System;
using UnityEngine;

public class DynamicMono : MonoBehaviour
{
public Action UpdateAction;

void Update()
{
UpdateAction?.Invoke();
}
}

public class DynamicScriptAdder : MonoBehaviour
{
public void AddDynamicScript(GameObject target, Action updateAction)
{
DynamicMono dynamicScript = target.AddComponent<DynamicMono>();
dynamicScript.UpdateAction = updateAction;
}
}
import * as e from "UnityEngine";

const targetObject = require("TargetObject") as e.GameObject;
const globals = require("Globals") as e.GameObject;

const dsa = globals.GetComponent("DynamicScriptAdder") as any;
dsa.AddDynamicScript(targetObject, () => {
// ...
});
import * as e from "UnityEngine";

const targetObject = require("TargetObject") as e.GameObject;
const globals = require("Globals") as e.GameObject;

const dsa = globals.GetComponent("DynamicScriptAdder") as any;
dsa.AddDynamicScript(targetObject, () => {
// ...
});
19 replies
OOneJS
Created by はどはど/HADHAD on 6/18/2024 in #general-discussion
Questions About Using OneJS
By the way, if Puerts becomes compatible with consoles, is there a possibility that it will be supported by OneJS as well?
19 replies
OOneJS
Created by はどはど/HADHAD on 6/18/2024 in #general-discussion
Questions About Using OneJS
I see, thank you. In that case, I will consider using V1 for my game development while trying to focus as much as possible on event-driven development, coroutines, and UniRX. However, will there be continuous updates for the version using Jint in future upgrades, or is there a plan to discontinue it?
19 replies
OOneJS
Created by はどはど/HADHAD on 6/18/2024 in #general-discussion
Questions About Using OneJS
What are other usage patterns, besides implementing in the Update Loop, that are likely to be affected in terms of performance when developing a game with V1?
19 replies
OOneJS
Created by はどはど/HADHAD on 6/18/2024 in #general-discussion
Questions About Using OneJS
Hmm... I see. In my game, I intended to write a large portion, including the game logic, in TypeScript while maintaining performance as much as possible. Given that V2 cannot fundamentally operate on consoles, does this mean that support for V2 on consumer games will not be considered in the future? Or, if there are any best practices for this, could you please share them?
19 replies
OOneJS
Created by はどはど/HADHAD on 6/18/2024 in #general-discussion
Questions About Using OneJS
OneJS isn't tested on the Switch. But I think OneJS V1 with Jint would probably work there as Jint is pure .Net. OneJS V2 using V8/QuickJS/NodeJS won't work on consoles.
Personally, I would be happy if V2 could be used when deploying to the Switch as well... Is it possible to transpile the TS files to C# in advance and then, when deploying to specific environments like the Switch, have the prepared C# files executed without going through Jint?
19 replies