Temporary-ULTRAPORTAL icon

ULTRAPORTAL

A library for easily creating portals in mods.

Last updated 2 weeks ago
Total downloads 6362
Total rating 1 
Categories Libraries
Dependency string Temporary-ULTRAPORTAL-1.0.0
Dependants 1 other package depends on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100

README

ULTRAPORTALS

A library for easily creating portals in mods.

Usage

Creating a portal example

var entrancePortal = new PortalTransform(pos: new Vector3(0, 0, 0), euler: Vector3.zero, scale: Vector2.one * 15);
var exitPortal = new PortalTransform(pos: new Vector3(0, 10, 0), euler: Vector3.zero, scale: Vector2.one * 15);
var portalResult = PortalConstructor.MakePortal(new PortalConstructorArgs(entrance: entrancePortal, exit: exitPortal, doubleSided: true, makeGroup: true));

portalResult.portal.entryTravelFlags = PortalTravellerFlags.None;
portalResult.portal.exitTravelFlags = PortalTravellerFlags.None;

Creates a portal where the entrance is at (0, 0, 0) and the exit is (0, 10, 0) where the scale is (15, 15) and disallows any travelling.