Skip to content

[CAUTION] This repository is not actively maintained.

Notifications You must be signed in to change notification settings

Live2D/CubismViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Cubism DIY Viewer

Welcome to the Unity-based Cubism 3 do-it-yourself viewer. Came here looking for the official Live2D homepage? Go here.

Do-it-yourself!?

Instead of providing a complete solution like the 2.x viewers did, this project aims to serve as a starting point and to provide common functionality for making it easy to create a viewer tailored to your needs.

Want to preview models easily without access to Unity? Create a viewer with built-in functionality.

Need model related data in your app that you can't create in Cubism itself? Customize the viewer to create just the data you need.

Design

The viewer itself basically is a single MonoBehaviour. You customize the viewer by attaching other MonoBehaviours to it. As Plugin is a somewhat reserved term in Unity (and because I like Ruby), let's call such custom behaviours gems.

Built-in Gems

This project contains a few gems to get you started.

CameraControls

This gem allows you to move the canvas and zoom-in. Hotkeys default to Spacebar + Left Mouse Button + Drag for navigating the canvas, and Mouse Wheel Scroll Up/Down for zooming.

SimpleAnimator

This gem allows you to play back a single animation at a time.

TwoColorThemer

This gem allows you to quickly theme the viewer using a 2 color theme. The background color will be set to the primary color of the theme. You can register any number of UI elements you want themed, too, through the Inspector. Hotkey defaults to Left Control + T for switching between themes.

User Gems

Getting Started

First, you have to download a few files and get them into a Unity project:

  1. Download the latest SDK and import it into your project.
  2. Make sure to restart Unity.
  3. Download the latest Components for Unity into your project. Overwrite any previous SDK files with the new ones.
  4. Download/Clone this repository into your project.
  5. Copy the Mono System.Windows.Forms.dll into your project. (Check out ./Assets/Live2D/Cubism/Viewer/Plugins/System.Windows.Forms.txt for instructions).
  6. Set API Compability Level to .NET 2.0 (default is .NET 2.0 Subset) in the Player Settings.

From here things are easy because you do the rest completely inside the Unity Editor:

  1. Create an empty GameObject and add the CubismViewer component to it.
  2. Assign the Main Camera in your scene to the CubismViewer through the Inspector.
  3. Create an UI button and add the CubismViewer.ShowFileDialog method of the CubismViewer object to On Click ().
  4. Hit play, click the UI button. A file dialog should open.
  5. Select a model3.json file via the file dialog. The model should be displayed.
  6. Add gems to the CubismViewer object for additional functionality.

Contributing

Wrote a cool gem? We're looking forward to it. You can either submit its source code or a link (as Live2D Community or as pull requests).

Besides that, there are many other ways to contribute to the project, too: logging bugs, submitting pull requests on this GitHub, and reporting issues and making suggestions at Live2D Community.

Forking And Pull Requests

We very appreciate your pull requests whether they bring fixes, improvements, or even new features.
Note, however, that the wrapper is designed to be as lightweight and shallow as possible and should therefore only be subject to bug fixes and memory/performance improvements.
To keep the main repository as clean as possible, create a personal fork and feature branches there as needed.

Bugs

We are regularly checking issue-reports and feature requests at Live2D Community. Before filing a bug report, please do a search in Live2D Community to see if the issue-report or feature request has already been posted. If you find your issue already exists, make relevant comments and add your reaction.

Discussion Etiquette

Please limit the discussion to English and keep it professional and things on topic.

License

If you plan on using this project or parts of it for non-personal or non-in-house use, make sure to read the license carefully. Otherwise, you shouldn't have to worry to much as the license that applies to the source code in this project allows you to modify all sources without the need to submit any changes you made.

About

[CAUTION] This repository is not actively maintained.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages