1
0
mirror of https://github.com/originalnicodr/CinematicUnityExplorer.git synced 2025-07-18 09:27:57 +08:00

Made the rest of the panels initialize correctly if UnityIGCSConnector failed to initialize, updated the readme with IGCDOF info, resized icon, Increased version number

This commit is contained in:
originalnicodr
2024-05-08 01:01:30 -03:00
parent 66773b300f
commit 54f20fde95
8 changed files with 40 additions and 10 deletions

View File

@ -1,7 +1,7 @@
# Cinematic Unity Explorer
<p align="center">
<img align="center" src="img/icon.png" width="300" height="300">
<img align="center" src="img/icon.jpg" width="300" height="300">
</p>
<p align="center">
@ -227,6 +227,29 @@ Alongside all of this, you can also open each character game object by clicking
- Added assignable hotkeys on the Options panel, all of which are displayed on the freecam panel.
- Made the mod UI scale with higher resolutions.
# IGCSDOF Support
The mod also supports [IGCSConnector](https://github.com/FransBouma/IgcsConnector/releases), and therefore [IGCSDOF](https://opm.fransbouma.com/igcsdof.htm), the best modded DOF available. This is an accumulated DOF solution similar to Forza Horizon's or other offline rendering software. This accumulated solution brings some advantages compared to real-time solutions, such as:
- Accurate near-plane bleed.
- Particle & alpha effects in DOF.
- Depth-accurate reflections.
- Layered defocusing of transparent and translucent materials.
![IGCSDOF demo](img/igcsdof_demo.gif)
[Before and after](https://framedsc.com/ReshadeGuides/Addons/MSADOF.htm#advantages) showing the advantages of accumulated DOFs over real-time DOFs.
You can download it, read how to install it, and how to use it [here](https://opm.fransbouma.com/igcsdof.htm).
>[!IMPORTANT]
> To be able to use IGCSDOF, besides following the instructions above, make sure to download [UnityIGCSConnector.dll](https://github.com/originalnicodr/CinematicUnityExplorer/releases/latest/download/UnityIGCSConnector.dll) and put it in the same folder as the games .exe.
> This is a necessary middleware so the Reshade add-on can communicate with the mod.
>[!IMPORTANT]
> Be sure to select `Classic (slower)` mode instead of `Fast`, as the latter one seems to render the image out of focus. However `Fast` might still work in some games.
Huge shout out to [etra0](https://github.com/etra0) for implementing this!
# Why a fork instead of making a new mod?
It wasn't the original intention to develop this fork to its current state. I just wanted to make it easier for me and my friends to take screenshots of Unity games and it rolled from there. It is in fact true that me modifying an already existing generic mod streamlined things instead of doing everything from zero, but it's also true that some of UnityExplorer vanilla functionality is useful for doing marketing-related stuff as well (as well as allowing some features to work by letting the user get their hands dirty, e.g. unlocking the gameplay freecam).

View File

@ -1,6 +1,6 @@
{
"name": "com.originalnicodr.cinematicunityexplorer",
"version": "1.0.0",
"version": "1.1.0",
"displayName": "CinematicUnityExplorer",
"description": "UnityExplorer fork focused on providing tools for creating marketing material for Unity games.",
"unity": "2017.1",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 MiB

After

Width:  |  Height:  |  Size: 42 KiB

BIN
img/icon_big.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

BIN
img/igcsdof_demo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 MiB

View File

@ -120,8 +120,9 @@ namespace CinematicUnityExplorer.Cinematic
delegates.Add(new SessionCallback(EndSession));
CameraStatus = initFunc((MoveCameraCallback)delegates[0], (SessionCallback)delegates[1], (SessionCallback)delegates[2]);
if (CameraStatus == IntPtr.Zero)
if (CameraStatus == IntPtr.Zero){
throw new InvalidDataException("IGCSDof returned an invalid pointer which means something went wrong");
}
isValid = true;
}

View File

@ -20,7 +20,7 @@ namespace UnityExplorer
public static class ExplorerCore
{
public const string NAME = "CinematicUnityExplorer";
public const string VERSION = "1.0.0";
public const string VERSION = "1.1.0";
public const string AUTHOR = "originalnicodr, Sinai, yukieiji";
public const string GUID = "com.originalnicodr.cinematicunityexplorer";

View File

@ -20,6 +20,12 @@ namespace UnityExplorer.UI.Panels
{
public FreeCamPanel(UIBase owner) : base(owner)
{
try {
connector = new();
}
catch (Exception ex) {
ExplorerCore.LogWarning($"Failed to initialize UnityIGCSConnector: {ex}");
}
}
public override string Name => "Freecam";
@ -79,12 +85,12 @@ namespace UnityExplorer.UI.Panels
private static FreecamCursorUnlocker freecamCursorUnlocker = null;
public static UnityIGCSConnector connector = new();
public static UnityIGCSConnector connector = null;
internal static void BeginFreecam()
{
inFreeCamMode = true;
connector.UpdateFreecamStatus(true);
connector?.UpdateFreecamStatus(true);
previousMousePosition = IInputManager.MousePosition;
@ -183,7 +189,7 @@ namespace UnityExplorer.UI.Panels
internal static void EndFreecam()
{
inFreeCamMode = false;
connector.UpdateFreecamStatus(false);
connector?.UpdateFreecamStatus(false);
if (usingGameCamera)
{
@ -261,7 +267,7 @@ namespace UnityExplorer.UI.Panels
if (positionInput.Component.isFocused)
return;
if (connector.IsActive)
if (connector != null && connector.IsActive)
return;
lastSetCameraPosition = ourCamera.transform.position;
@ -682,7 +688,7 @@ namespace UnityExplorer.UI.Panels
Transform transform = FreeCamPanel.ourCamera.transform;
if (!FreeCamPanel.blockFreecamMovementToggle.isOn && !FreeCamPanel.cameraPathMover.playingPath && !FreeCamPanel.connector.IsActive) {
if (!FreeCamPanel.blockFreecamMovementToggle.isOn && !FreeCamPanel.cameraPathMover.playingPath && FreeCamPanel.connector?.IsActive != true) {
ProcessInput();
}
@ -702,7 +708,7 @@ namespace UnityExplorer.UI.Panels
FreeCamPanel.followObjectLastRotation = FreeCamPanel.followObject.transform.rotation;
}
FreeCamPanel.connector.ExecuteCameraCommand(FreeCamPanel.ourCamera);
FreeCamPanel.connector?.ExecuteCameraCommand(FreeCamPanel.ourCamera);
FreeCamPanel.UpdatePositionInput();
}