ユーザ用ツール

サイト用ツール


この翻訳は元のページよりも更新日が古く、内容が古い可能性があります。 変更点を参照して下さい。
Language:

サイドバー

en:vci:sdk:effekseer:introduction

Effekseer (VCI support)



Importing from Effekseer to Unity


  1. Download the latest VCI UnityPackage and import it into the project.
  2. Create an effect in Effekseer, save the project, and export the effect file as [Default format].
  3. Drag and Drop the effect file and the data used for the effect on the [Assets] folder in Unity.
  4. Open and see the effect information on the Inspector and check that assets including textures are assigned properly.
    If they are not assigned, assign them manually.

Component Image



Effekseer Emitter

Property Feature
Effect Asset Assign the effect to play.
Play On Start If enabled, plays the effect when the VCI is spawned.
Is Looping If enabled, the effect will be looped.

Object configuration


  • Add the [Effeckseer Emitter] component on a GameObject that you want to add an effect to.
  • The object with the effect can be placed anywhere under a VCIObject.
  • [Effekseer Emitter] works by itself without [VCI SubItem] component.

Example: Playing effect with VCI script

Configuration of objects and components


VCI Script

main.lua
-- Effects are acquired by specifying a name of GameObject with the effect component.
-- Store the effect attached to the GameObject named "Effect" in a variable "eff"
local eff = vci.assets.GetEffekseerEmitter("Effect")
local toggle = false
 
function onUse(use)
    -- Play the effect when the SubItem is being Used
    if use == "SubItem" then
        -- Reverse the toggle
        toggle = not(toggle)
 
        if toggle == false then
            -- Play the effect stored in the eff
            eff._ALL_Play()
            --Print the effect name being played
            print("Played an effect"..eff.EffectName)
        end
 
        if toggle == true then
            -- Stop the effect stored in the eff
            eff._ALL_Stop()
            --Print the effect name being stopped
            print("Stopped an effect"..eff.EffectName)
        end
    end
end

Explanation

The basic way to use is to store the effect in a variable with vci.assets.GetEffekseerEmitter(“Name of an object with an effect attached”) and call the effect from the variable.
Refer to Effekseer (VCI script) for information on other VCI script.
The example can be used from EffectSample.


Specification

  • Distortion feature is turned off so it cannot be used.
  • Effekseer itself has a voice playback feature, but it cannot be used.

Other things to note

  • Things to pay attention to when importing VCI with Effekseer into Unity Editor
    • If a single effect contains multiple textures with the same name, they will be overwritten as they will be exported into the same folder. Try to specify different names for each texture.
  • Things to pay attention to when debugging in Unity Editor.
    • There is a bug that crashes Unity Editor when a reference to a single asset is set in two or more places in a single effect. If you want to use a single texture (or model) more than once in a single effect, please copy the asset before using them. This issue will be fixed in a future update.


en/vci/sdk/effekseer/introduction.txt · 最終更新: 2019/07/23 17:15 by h-eguchi

ページ用ツール