Nothing Special   »   [go: up one dir, main page]

CN111124386B - Animation event processing method, device, equipment and storage medium based on Unity - Google Patents

Animation event processing method, device, equipment and storage medium based on Unity Download PDF

Info

Publication number
CN111124386B
CN111124386B CN201911342082.7A CN201911342082A CN111124386B CN 111124386 B CN111124386 B CN 111124386B CN 201911342082 A CN201911342082 A CN 201911342082A CN 111124386 B CN111124386 B CN 111124386B
Authority
CN
China
Prior art keywords
animation
event
configuration
spine
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911342082.7A
Other languages
Chinese (zh)
Other versions
CN111124386A (en
Inventor
陈长鸿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Mihoyo Tianming Technology Co Ltd
Original Assignee
Shanghai Mihoyo Tianming Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Mihoyo Tianming Technology Co Ltd filed Critical Shanghai Mihoyo Tianming Technology Co Ltd
Priority to CN201911342082.7A priority Critical patent/CN111124386B/en
Publication of CN111124386A publication Critical patent/CN111124386A/en
Application granted granted Critical
Publication of CN111124386B publication Critical patent/CN111124386B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a storage medium for processing animation events based on Unity. The method comprises the following steps: loading a Spine animation model containing a preset configuration conversion script when detecting an operation starting instruction; loading an animation configuration object by utilizing the configuration conversion script, and converting the animation configuration object into event time stream data which is adapted to the Spine animation model, wherein the animation configuration object stores event configuration data of each animation in the Spine animation model; and applying the event time stream data to the animation skeleton resource data of the Spine animation model by using the configuration conversion script so as to complete the processing of the animation event in the Spine animation model. By the technical scheme, events in the Spine animation are processed more conveniently in the Unity running process, and the processing efficiency of the Spine animation events in the Unity is improved.

Description

Animation event processing method, device, equipment and storage medium based on Unity
Technical Field
The embodiment of the invention relates to a game development technology, in particular to a method, a device, equipment and a storage medium for processing animation events based on Unity.
Background
Unity is a multi-platform comprehensive game development tool that assists game developers in easily creating interactive content, which is a fully integrated professional game engine. In Unity, a lightweight framework Spine is often used to animate and support the running of Spine animation through an additionally introduced third party plug-in library RunTime.
When Spine is used in Unity, it is often necessary to trigger events on certain frames of Spine animation. At present, the way to trigger events on certain frames of a Spine animation is: in the Spine editor, events are created on frames of events to be triggered, and then the Spine animation is re-run with the export data into Unity. That is, in the Unity, processing operations related to the Spine animation are performed independently in the Spine editor, and then the data after the operations are imported into the Unity. If processing operations such as modification, addition or deletion are required to be repeated on events in the Spine animation, the data needs to be repeatedly exported to Unity, which is very cumbersome and results in that the events in the Spine animation cannot be processed during the Unity operation.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for processing animation events based on Unity, which are used for realizing more convenient processing operation on events in a Spine animation in the Unity operation process and improving the processing efficiency of the Spine animation events in the Unity.
In a first aspect, an embodiment of the present invention provides a method for processing an animation event based on Unity, including:
loading a Spine animation model containing a preset configuration conversion script when detecting an operation starting instruction;
loading an animation configuration object by utilizing the configuration conversion script, and converting the animation configuration object into event time stream data which is adapted to the Spine animation model, wherein the animation configuration object stores event configuration data of each animation in the Spine animation model;
and applying the event time stream data to the animation skeleton resource data of the Spine animation model by using the configuration conversion script so as to complete the processing of the animation event in the Spine animation model.
In a second aspect, an embodiment of the present invention further provides a Unity-based animation event processing device, where the device includes:
the Spine animation model loading module is used for loading a Spine animation model containing a preset configuration conversion script when detecting an operation starting instruction;
the event time stream data conversion module is used for loading an animation configuration object by utilizing the configuration conversion script and converting the animation configuration object into event time stream data which is adapted to the Spine animation model, wherein the event configuration data of each animation in the Spine animation model is stored in the animation configuration object;
and the animation event processing module is used for applying the event time stream data to the animation skeleton resource data of the Spine animation model by utilizing the configuration conversion script so as to complete the processing of the animation event in the Spine animation model.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for processing animation event based on Unity provided by any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements the animation event processing method based on Unity provided by any embodiment of the present invention.
According to the embodiment of the invention, when the operation starting instruction is detected, a Spine animation model containing a preset configuration conversion script is loaded; loading an animation configuration object by utilizing the configuration conversion script, and converting the animation configuration object into event time stream data which is adapted to the Spine animation model, wherein the animation configuration object stores event configuration data of each animation in the Spine animation model; and applying the event time stream data to the animation skeleton resource data of the Spine animation model by using the configuration conversion script so as to complete the processing of the animation event in the Spine animation model. In the running process of Unity, event configuration data of each animation in a Spine animation model stored in an animation configuration object independent of the Spine animation model is applied to animation skeleton resource data of the Spine animation model through a custom configuration conversion script, so that processing of animation events in the Spine animation model is completed, the problem that the animation events cannot be processed in the running process of Unity due to the fact that the animation events need to be independently processed in a Spine editor is solved, and convenience and processing efficiency of processing the events in the Spine animation in the running process of Unity are improved.
Drawings
FIG. 1 is a flow chart of a Unity-based animation event processing method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a Unity-based animation event processing method according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of a Unity-based animation event processing device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
The animation event processing method based on Unity provided by the embodiment can be suitable for processing events in the Spine animation in Unity, such as modification, addition or deletion, and is especially suitable for processing events in the Spine animation in the Unity running process. The method may be performed by a Unity-based animation event processing device, which may be implemented in software and/or hardware, and which may be integrated in an electronic device, such as a notebook, desktop, server, etc., in which a Unity development tool is installed and in which a Spine framework is integrated. Referring to fig. 1, the method of this embodiment specifically includes the following steps:
s110, loading a Spine animation model containing a preset configuration conversion script when detecting an operation starting instruction.
The operation start instruction is an instruction for triggering the Unity to start operation, for example, the user clicks a related button for starting operation of Unity, and an instruction generated after the button is triggered is the operation start instruction. The configuration conversion script is a custom script for analyzing the configuration data related to the Spine animation model in the Unity and converting the configuration data into data (namely event time stream data EventTimeline) identifiable by the Spine animation model.
Specifically, editing of the Spine animation and the Unity development are independent in the related art, if any event in the imported Spine animation is to be changed in the Unity development process or the running process, the operations in the Unity must be paused, the operations are transferred to a Spine editor to process the Spine animation event, and after the processing is completed, the processed Spine animation is exported and imported to the Unity. This process is cumbersome and affects the efficiency of the developer. In view of this, in the embodiment of the present invention, a configuration conversion script is designed, and after the Unity detects that the running start instruction starts to run, the configuration conversion script is hung up for the loaded Spine animation model.
If the loaded Spine animation model does not hang the configuration conversion script, the Spine animation model reads event parameters of an animation event related to the event parameters through initial animation skeleton resource data SkeletonAsset created when the Spine animation model is loaded, and triggers subsequent animation events. However, in this embodiment, the configuration conversion script is hung on the loaded Spine animation model, so that the Spine animation model may preferentially read animation event parameters and trigger subsequent events according to the animation skeleton resource data processed by the configuration conversion script. The configuration conversion script processes the skeletal animation resource data, which is obtained by parsing and converting the configuration data (i.e., event configuration data) related to the Spine animation model in the Unity (see the following descriptions of S120 and S130). Therefore, in the method for processing the animation event based on the Unity according to the embodiment of the invention, during the Unity operation, the corresponding animation event in the Spine animation model can be processed by processing the event configuration data (such as modifying, adding or deleting event parameters) corresponding to the Spine animation model in the Unity, without suspending the Unity operation and switching to the Spine editor.
S120, loading an animation configuration object by using the configuration conversion script, and converting the animation configuration object into event time stream data which is adapted to the Spine animation model, wherein the event configuration data of each animation in the Spine animation model is stored in the animation configuration object.
The animation configuration object is an object in Unity, and can generate a resource file to store event configuration data of each animation in the Spine animation model, namely, configuration data related to the Spine animation model in Unity. Illustratively, the event configuration data includes an animation identifier, an event identifier, a frame identifier corresponding to the event, and an event parameter. Animation identification, event identification, and frame identification refer to information that uniquely locates an animation, an event, and a frame in an animation, respectively, which may be a name, an abbreviation, or a number, etc. The event parameters refer to attribute information of the animation event. Event time stream data EventTimeline refers to time stream data for event triggering in the Spine animation model, and event information (such as event parameters and the like) is stored in time sequence.
Specifically, the embodiment of the invention also designs an animation configuration object to specially store and manage the event configuration data of the Spine animation model in the Unity. In the Unity running process, after the Unity loads the Spine animation model, the configuration conversion script is triggered to be executed. At this time, the Unity loads the animation configuration object through the configuration conversion script and parses it to obtain each event configuration data therein. Then, the Unity further converts the obtained event configuration data into event time stream data EventTimeline adapted to the Spine animation model through a configuration conversion script.
Illustratively, before said loading the animation configuration object with said configuration conversion script, further comprising: and updating the animation configuration object according to the target event configuration data of the target animation event to be processed. Specifically, if some animation events in the Spine animation model need to be processed, the Unity can enable the animation configuration object to contain event configuration data (i.e. target event configuration data) of the animation event to be processed (i.e. target animation event) by updating the stored data in the animation configuration object as required, so that the updating of the animation configuration object is completed. Then, the animation configuration object converted by the configuration conversion script is the updated animation configuration object, and the event time stream data EventTimeline obtained in S120 contains the target event configuration data of the target animation event. The advantage of this arrangement is that the animation configuration object is updated during the Unity operation, thereby enabling the processing of events in the Spine animation during the Unity operation.
S130, using the configuration conversion script to apply the event time stream data to the animation skeleton resource data of the Spine animation model so as to complete the processing of the animation event in the Spine animation model.
Specifically, after the Unity obtains the event time stream data through configuring the conversion script, the event time stream data can be directly applied to the animation skeleton resource data Skeletonasset of the Spine animation model to complete the updating of the animation skeleton resource data. The Spine animation model uses the updated animation skeleton resource data to read the event parameters of each animation event and trigger the subsequent events. So far, the Unity completes the processing of the animation event in the Spine animation model through the animation configuration object therein.
According to the technical scheme, when an operation starting instruction is detected, a Spine animation model containing a preset configuration conversion script is loaded; loading an animation configuration object by utilizing the configuration conversion script, and converting the animation configuration object into event time stream data which is adapted to the Spine animation model, wherein the animation configuration object stores event configuration data of each animation in the Spine animation model; and applying the event time stream data to the animation skeleton resource data of the Spine animation model by using the configuration conversion script so as to complete the processing of the animation event in the Spine animation model. The method and the device realize that in the running process of Unity, the Unity applies event configuration data of each animation in the Spine animation model stored in an animation configuration object independent of the Spine animation model to animation skeleton resource data of the Spine animation model through a custom configuration conversion script, so that the processing of animation events in the Spine animation model is completed, the problem that the animation events cannot be processed in the running process of Unity due to the fact that the animation events need to be independently processed in a Spine editor is solved, and the convenience and the processing efficiency for processing the events in the Spine animation in the running process of Unity are improved.
Example two
The present embodiment further optimizes "update the animation configuration object according to the target event configuration data of the target animation event to be processed" based on the above-described first embodiment. Wherein, the explanation of the same or corresponding terms as the above embodiments is not repeated herein.
Referring to fig. 2, the animation event processing method based on Unity provided in this embodiment includes:
s210, loading a Spine animation model containing a preset configuration conversion script when detecting an operation starting instruction.
S220, acquiring the target event configuration data and determining the event processing type of the target animation event.
The event processing type refers to the type of processing operation performed on the animation event. Illustratively, the event processing type is an event modification type, an event addition type, or an event deletion type. That is, during the Unity running process, the event in the Spine animation can be processed such as modifying the event parameters, adding and deleting the whole event, and the like.
Specifically, before updating the animation configuration object, the target event configuration data corresponding to the target animation event is obtained. Further, since different event processing types operate differently on data in the animation configuration object, it is also necessary to acquire an event processing type corresponding to the target animation event. The two types of data can be obtained through man-machine interaction operation in an interaction panel or can be obtained through static configuration files in a reading mode.
Illustratively, obtaining the target event configuration data and determining the event handling type of the target animation event comprises: the target event configuration data and the event handling type are received through an animation properties panel. Wherein the animation property panel is a panel of various property information displayed through an instror in Unity, which allows an interactive operation of property information modification with a user. Specifically, the processing operation of the animation event is interactively operated by the user through the animation attribute panel, and the target event configuration data and the event processing type are obtained through the interactive operation result. For example, if a user needs to modify an event in a frame of animation, the user modifies an event parameter corresponding to a corresponding event in a corresponding frame through an animation attribute panel, the Unity receives the parameter information modified by the user, determines the event processing type as the event modification type, and sets the target event configuration data as an animation identifier, a frame identifier, an event identifier and each event parameter modified corresponding to the target animation event. If the user needs to add a new event into a certain frame of animation, the user selects a corresponding frame through the animation attribute panel and adds corresponding event parameters, the Unity receives the newly added parameter information of the user, determines the event processing type as the event adding type, and sets the target event configuration data as an animation identifier, a frame identifier, an event identifier and newly added event parameters corresponding to the target animation event. If the user needs to delete the event in a certain frame of animation, the user selects the corresponding event in the corresponding frame through the animation attribute panel and performs deleting operation (such as clicking a deleting button, etc.), the Unity receives the deleting instruction operated by the user, determines the event processing type as the event deleting type, and sets the target event configuration data as the original event configuration data corresponding to the target animation event to be deleted. The method has the advantages that the target event configuration data and the event processing type can be determined more conveniently through the interactive panel, the user experience is improved, and the efficiency of developers is improved.
S230, updating the animation configuration object according to the target event configuration data and the event processing type.
Specifically, according to the configuration data modification mode corresponding to the event processing type, updating the target event configuration data into the value animation configuration object. For example, if the event processing type is an event modification type, replacing original event configuration data corresponding to the target animation event in the animation configuration object with the target event configuration data; the event processing type is an event adding type, and then adding target event configuration data into the animation configuration object; and if the event processing type is an event deleting type, positioning and deleting the data items of the target event configuration data in the animation configuration object according to the animation identifier, the frame identifier and the event identifier corresponding to the target animation event.
Illustratively, the animation configuration object is generated by inheriting the configuration resource class in Unity and is initialized by the initial animation skeletal resource data of the Spine animation model. Specifically, the animation configuration object in the present embodiment is for storing resource data, so that an animation configuration class can be conveniently created by inheriting the configuration resource class ScriptableObject in Unity, and the animation configuration object can be created by the animation configuration class. Based on the characteristics of the configuration resource class, the data stored in the animation configuration objects of the custom animation configuration class in this embodiment are all arrays of the serialization class, and each array element stores event configuration data of an animation event. The data initialized by the animation configuration object is derived from initial animation skeleton resource data of the Spine animation model, namely, before the animation configuration object is updated due to the animation event processing operation, each event configuration data stored in the animation configuration object is a reference of each event configuration data of each foundation in the initial animation skeleton resource data. The advantage of this arrangement is that the generation logic and flow of the animation configuration object are simplified, and the processing efficiency of the animation event is further improved.
S240, loading an animation configuration object by using the configuration conversion script, and converting the animation configuration object into event time stream data which is adapted to the Spine animation model.
S250, the event time stream data is applied to the animation skeleton resource data of the Spine animation model by using the configuration conversion script.
According to the technical scheme of the embodiment, the event processing type of the target animation event is determined by acquiring the target event configuration data; updating the animation configuration object according to the target event configuration data and the event processing type; loading an animation configuration object by utilizing the configuration conversion script, and converting the animation configuration object into event time stream data which is adapted to the Spine animation model; and applying the event time stream data to the animation skeleton resource data of the Spine animation model by using the configuration conversion script. The method and the device realize that the animation configuration object is updated according to the processing operation of the animation events in the Unity running process, so that the configuration conversion script applies the target event configuration data in the updated animation configuration object to the Spine animation model, and the convenience and the efficiency of processing the animation events based on Unity are further improved.
Example III
The present embodiment provides a Unity-based animation event processing device, referring to fig. 3, which specifically includes:
the Spine animation model loading module 310 is configured to load a Spine animation model including a preset configuration conversion script when detecting an operation start instruction;
the event time stream data conversion module 320 is configured to load an animation configuration object by using the configuration conversion script, and convert the animation configuration object into event time stream data adapted to the Spine animation model, where the animation configuration object stores event configuration data of each animation in the Spine animation model;
and the animation event processing module 330 is configured to apply the event time stream data to the animation skeleton resource data of the Spine animation model by using the configuration conversion script, so as to complete processing of the animation event in the Spine animation model.
Optionally, the event configuration data includes an animation identifier, an event identifier, a frame identifier corresponding to the event, and an event parameter.
Optionally, on the basis of the above device, the device further includes an animation configuration object update module, configured to:
before loading the animation configuration object by using the configuration conversion script, updating the animation configuration object according to target event configuration data of a target animation event to be processed.
Further, the animation configuration object update module includes:
a target event configuration data acquisition sub-module, configured to acquire the target event configuration data, and determine an event processing type of the target animation event;
and the animation configuration object updating sub-module is used for updating the animation configuration object according to the target event configuration data and the event processing type.
Further, the target event configuration data acquisition sub-module is specifically configured to:
the target event configuration data and the event handling type are received through an animation properties panel.
The event processing type is an event modification type, an event addition type or an event deletion type.
Optionally, the animation configuration object is generated by inheriting a configuration resource class in Unity and is initialized by the initial animation skeletal resource data of the Spine animation model.
According to the animation event processing device based on the Unity, in the running process of the Unity, event configuration data of each animation in the Spine animation model stored in an animation configuration object independent of the Spine animation model is applied to animation skeleton resource data of the Spine animation model through a custom configuration conversion script, so that processing of animation events in the Spine animation model is completed, the problem that animation events cannot be processed in the running process of the Unity due to the fact that the animation events need to be independently processed in a Spine editor is solved, and convenience and processing efficiency of processing the events in the Spine animation in the running process of the Unity are improved.
The animation event processing device based on Unity provided by the embodiment of the invention can execute the animation event processing method based on Unity provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the animation event processing device based on Unity, each unit and module included are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Example IV
Referring to fig. 4, the present embodiment provides an electronic device 400, which includes: one or more processors 420; the storage 410 is configured to store one or more programs, where the one or more programs are executed by the one or more processors 420, so that the one or more processors 420 implement the animation event processing method based on Unity provided by the embodiment of the present invention, and includes:
loading a Spine animation model containing a preset configuration conversion script when detecting an operation starting instruction;
loading an animation configuration object by utilizing the configuration conversion script, and converting the animation configuration object into event time stream data which is adapted to the Spine animation model, wherein the animation configuration object stores event configuration data of each animation in the Spine animation model;
and applying the event time stream data to the animation skeleton resource data of the Spine animation model by using the configuration conversion script so as to complete the processing of the animation event in the Spine animation model.
Of course, those skilled in the art will appreciate that the processor 420 may also implement the technical solution of the animation event processing method based on Unity provided in any embodiment of the present invention.
The electronic device 400 shown in fig. 4 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 4, the electronic device 400 includes a processor 420, a storage device 410, an input device 430, and an output device 440; the number of processors 420 in the electronic device may be one or more, one processor 420 being taken as an example in fig. 4; the processor 420, the storage device 410, the input device 430, and the output device 440 in the electronic device may be connected by a bus or other means, as exemplified by connection via a bus 450 in fig. 4.
The storage device 410 is used as a computer readable storage medium, and can be used to store software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the Unity-based animation event processing method in the embodiment of the present invention (for example, a Spine animation model loading module, an event time stream data conversion module, and an animation event processing module in the Unity-based animation event processing device).
The storage device 410 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, the storage 410 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, the storage 410 may further include memory remotely located relative to the processor 420, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 430 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the electronic device. The output 440 may include a display device such as a display screen.
Example five
The present embodiment provides a storage medium containing computer executable instructions, which when executed by a computer processor, are for performing a Unity-based animation event processing method, the method comprising:
loading a Spine animation model containing a preset configuration conversion script when detecting an operation starting instruction;
loading an animation configuration object by utilizing the configuration conversion script, and converting the animation configuration object into event time stream data which is adapted to the Spine animation model, wherein the animation configuration object stores event configuration data of each animation in the Spine animation model;
and applying the event time stream data to the animation skeleton resource data of the Spine animation model by using the configuration conversion script so as to complete the processing of the animation event in the Spine animation model.
Of course, the storage medium containing the computer executable instructions provided by the embodiments of the present invention is not limited to the above-described method operations, but may also perform the related operations in the animation event processing method based on Unity provided by any embodiment of the present invention.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk, or an optical disk of a computer, where the instructions include a number of instructions for causing an electronic device (which may be a personal computer, a server, or a network device, etc.) to execute the animation event processing method based on Unity provided by the embodiments of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (9)

1. A method for processing animation events based on Unity, comprising:
loading a Spine animation model containing a preset configuration conversion script when detecting an operation starting instruction;
loading an animation configuration object by utilizing the configuration conversion script, and converting the animation configuration object into event time stream data which is adapted to the Spine animation model, wherein the animation configuration object is generated by inheriting a configuration resource class in a Unity and is initialized by initial animation skeleton resource data of the Spine animation model, and the event configuration data of each animation in the Spine animation model is stored in the animation configuration object;
and applying the event time stream data to the animation skeleton resource data of the Spine animation model by using the configuration conversion script so as to complete the processing of the animation event in the Spine animation model.
2. The method of claim 1, wherein the event configuration data comprises an animation identifier, an event identifier, a frame identifier for the event, and an event parameter.
3. The method of claim 1, further comprising, prior to said loading an animated configuration object with said configuration conversion script:
and updating the animation configuration object according to the target event configuration data of the target animation event to be processed.
4. A method according to claim 3, wherein said updating said animation configuration object in accordance with target event configuration data of a target animation event to be processed comprises:
acquiring the target event configuration data and determining the event processing type of the target animation event;
and updating the animation configuration object according to the target event configuration data and the event processing type.
5. The method of claim 4, wherein the obtaining the target event configuration data and determining an event handling type of the target animation event comprises:
the target event configuration data and the event handling type are received through an animation properties panel.
6. The method of claim 4, wherein the event processing type is an event modification type, an event addition type, or an event deletion type.
7. An animation event processing device based on Unity, comprising:
the Spine animation model loading module is used for loading a Spine animation model containing a preset configuration conversion script when detecting an operation starting instruction;
the event time stream data conversion module is used for loading an animation configuration object by utilizing the configuration conversion script and converting the animation configuration object into event time stream data which is adapted to the Spine animation model, wherein the animation configuration object is generated by inheriting a configuration resource class in a Unity and is initialized by initial animation skeleton resource data of the Spine animation model, and the animation configuration object stores event configuration data of each animation in the Spine animation model;
and the animation event processing module is used for applying the event time stream data to the animation skeleton resource data of the Spine animation model by utilizing the configuration conversion script so as to complete the processing of the animation event in the Spine animation model.
8. An electronic device, the electronic device comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the Unity-based animation event processing method of any of claims 1-6.
9. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the Unity-based animation event processing method according to any of claims 1-6.
CN201911342082.7A 2019-12-23 2019-12-23 Animation event processing method, device, equipment and storage medium based on Unity Active CN111124386B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911342082.7A CN111124386B (en) 2019-12-23 2019-12-23 Animation event processing method, device, equipment and storage medium based on Unity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911342082.7A CN111124386B (en) 2019-12-23 2019-12-23 Animation event processing method, device, equipment and storage medium based on Unity

Publications (2)

Publication Number Publication Date
CN111124386A CN111124386A (en) 2020-05-08
CN111124386B true CN111124386B (en) 2023-08-29

Family

ID=70501457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911342082.7A Active CN111124386B (en) 2019-12-23 2019-12-23 Animation event processing method, device, equipment and storage medium based on Unity

Country Status (1)

Country Link
CN (1) CN111124386B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857690A (en) * 2020-07-29 2020-10-30 北京字节跳动网络技术有限公司 Animation effect debugging method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289834A (en) * 2011-08-30 2011-12-21 北京瑞信在线系统技术有限公司 Micro-animation editer and edition method thereof
CN109658484A (en) * 2018-12-21 2019-04-19 上海哔哩哔哩科技有限公司 A kind of Automatic Generation of Computer Animation method and Automatic Generation of Computer Animation system
CN110189404A (en) * 2019-05-31 2019-08-30 重庆大学 Virtual facial modeling method based on real human face image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289834A (en) * 2011-08-30 2011-12-21 北京瑞信在线系统技术有限公司 Micro-animation editer and edition method thereof
CN109658484A (en) * 2018-12-21 2019-04-19 上海哔哩哔哩科技有限公司 A kind of Automatic Generation of Computer Animation method and Automatic Generation of Computer Animation system
CN110189404A (en) * 2019-05-31 2019-08-30 重庆大学 Virtual facial modeling method based on real human face image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
贾飞鹏 ; 何冬冬 ; .基于Kinect的快速动画制作应用研究.赤峰学院学报(自然科学版).2017,(第20期),第43-45页. *

Also Published As

Publication number Publication date
CN111124386A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
TWI808393B (en) Page processing method, device, apparatus and storage medium
CN111045655B (en) Page rendering method and device, rendering server and storage medium
CN111666526B (en) Page generation method, device, equipment and storage medium
CN110244942B (en) Page generation method, device and system
US8910113B2 (en) Methods and systems for visual code refactoring
WO2018036342A1 (en) Csar-based template design visualization method and device
US20220391221A1 (en) Providing a different configuration of added functionality for each of the stages of predeployment, deployment, and post deployment using a layer of abstraction
US8839192B2 (en) System and method for presentation of cross organizational applications
KR20020035567A (en) Object property meta model emulator for legacy data structures
CN111814089A (en) Page rendering method and device, rendering server and storage medium
US20150007084A1 (en) Chaining applications
US8495566B2 (en) Widget combos: a widget programming model
CN111068328A (en) Game advertisement configuration table generation method, terminal device and medium
CN103744680A (en) Method and device for business process processing
CN108279882B (en) Framework generation method, device, equipment and computer readable medium
CN108108986B (en) Design method and device of customer relationship management system and electronic equipment
WO2023082654A1 (en) Method, apparatus and device for generating service interaction diagram, and storage medium
CN112988123A (en) DDD-oriented software design method and system
CN113326030A (en) Service request processing method and device
CN113360211A (en) Loading display method based on control and related equipment
CN111124386B (en) Animation event processing method, device, equipment and storage medium based on Unity
WO2021129812A1 (en) Method and system for running artificial intelligence application, and device
CN112068879A (en) Method and device for constructing client application development framework based on configuration
CN112181409A (en) Application construction method, application rendering method and device
CN111399931B (en) Method and terminal for exporting UI (user interface) resources by LayaAir engine

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant