[go: up one dir, main page]

CN111124386A - Unity-based animation event processing method, device, equipment and storage medium - Google Patents

Unity-based animation event processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN111124386A
CN111124386A CN201911342082.7A CN201911342082A CN111124386A CN 111124386 A CN111124386 A CN 111124386A CN 201911342082 A CN201911342082 A CN 201911342082A CN 111124386 A CN111124386 A CN 111124386A
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.)
Granted
Application number
CN201911342082.7A
Other languages
Chinese (zh)
Other versions
CN111124386B (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

Images

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)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention discloses an animation event processing method, device, equipment and storage medium based on Unity. The method comprises the following steps: loading a Spine animation model containing a preset configuration conversion script when a running starting instruction is detected; loading an animation configuration object by using the configuration conversion script, and converting the animation configuration object into event time flow data adaptive 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 flow 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 events in the Spine animation model. By the technical scheme, the events in the Spine animation can be processed more conveniently in the Unity running process, and the processing efficiency of the events in the Spine animation in Unity is improved.

Description

Unity-based animation event processing method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to a game development technology, in particular to a Unity-based animation event processing method, a Unity-based animation event processing device, Unity-based animation event processing equipment and a Unity-based animation event processing storage medium.
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, animation is often produced by using a lightweight framework Spine, and the running of Spine animation is supported by an additionally introduced third-party plug-in library RunTime.
When using Spine in Unity, it is often necessary to trigger events on certain frames of Spine animation. Currently, the way to trigger events on certain frames of Spine animation is: in the Spine editor, an event is created on a frame of the event to be triggered, and then Spine animation is performed to export data to Unity. Namely, the processing operations related to the Spine animation in the Unity all need to be independently operated in the Spine editor, and then the operated data is imported into the Unity. If the events in the Spine animation need to be repeatedly processed, such as modified, added or deleted, the data need to be repeatedly exported to Unity, and the process is very complicated, and the events in the Spine animation cannot be processed during the Unity running process.
Disclosure of Invention
Embodiments of the present invention provide an animation event processing method, apparatus, device and storage medium based on Unity, so as to implement more convenient processing operation on events in a Spine animation in the Unity running process, and improve the processing efficiency of Spine animation events in Unity.
In a first aspect, an embodiment of the present invention provides a Unity-based animation event processing method, including:
loading a Spine animation model containing a preset configuration conversion script when a running starting instruction is detected;
loading an animation configuration object by using the configuration conversion script, and converting the animation configuration object into event time flow data adaptive 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 flow 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 events in the Spine animation model.
In a second aspect, an embodiment of the present invention further provides a Unity-based animation event processing apparatus, where the apparatus includes:
the Spine animation model loading module is used for loading a Spine animation model containing a preset configuration conversion script when an operation starting instruction is detected;
the event time flow data conversion module is used for loading an animation configuration object by using the configuration conversion script and converting the animation configuration object into event time flow data which is suitable for the Spine animation model, wherein 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 flow 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 events in the Spine animation model.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing 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 provided by any embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the Unity-based animation event processing method provided in 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 using the configuration conversion script, and converting the animation configuration object into event time flow data adaptive 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 flow 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 events in the Spine animation model. The method and the device have the advantages that in the Unity running process, the event configuration data of each animation in the Spine animation model, which are stored in the animation configuration object independent from the Spine animation model, are applied to the animation skeleton resource data of the Spine animation model through the self-defined configuration conversion script, so that the processing of the animation events in the Spine animation model is completed, the problem that the animation events cannot be processed in the Unity running process due to the fact that the animation events need to be processed in the Spine editor independently is solved, and convenience and processing efficiency of processing the events in the Spine animation in the Unity running process are improved.
Drawings
FIG. 1 is a flowchart of a Unity-based animation event processing method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a Unity-based animation event processing method according to a second embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a Unity-based animation event processing apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device in a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
The Unity-based animation event processing method provided by the embodiment can be applied to processing events in Spine animation in Unity, such as modification, addition or deletion, and is particularly applicable to processing events in Spine animation in the Unity running process. The method can be executed by a Unity-based animation event processing device, which can be implemented in a software and/or hardware manner, and the device can be integrated in an electronic device, such as a notebook computer, a desktop computer or a server, which is provided with a Unity development tool and in which a Spine framework is integrated. Referring to fig. 1, the method of the present embodiment specifically includes the following steps:
and S110, loading a Spine animation model containing a preset configuration conversion script when the operation starting instruction is detected.
The operation starting instruction is an instruction for triggering Unity to start operation, for example, a user clicks a relevant button for Unity to start operation, and an instruction generated after the button is triggered is an operation starting instruction. The configuration conversion script is a self-defined script used for analyzing configuration data related to the Spine animation model in Unity and converting the configuration data into data (namely event timeline) recognizable by the Spine animation model.
Specifically, edition of a Spine animation and Unity development in the related art are independent, in a Unity development process or a running process, if any event in the imported Spine animation is to be changed, operations in Unity must be suspended, the operation is transferred to a Spine editor for processing the Spine animation events, and the processed Spine animation is exported and imported to Unity after the processing is completed. This process is too cumbersome and affects the efficiency of the developer. In view of this, the embodiment of the present invention designs a configuration conversion script, and after the Unity detects that the execution start instruction starts to execute, the configuration conversion script is hung on the loaded Spine animation model.
If the loaded Spine animation model does not hang the configuration conversion script, the Spine animation model reads the event parameters of the animation events involved in the loaded Spine animation model through the initial animation bone resource data Skeletonasset created when the loaded Spine animation model is loaded, and triggers the subsequent animation events. However, in this embodiment, the configuration conversion script is hung on the loaded Spine animation model, and then the Spine animation model preferentially reads the animation event parameters and triggers the subsequent events according to the animation skeleton resource data processed by the configuration conversion script. The animation skeleton resource data processed by the configuration conversion script is obtained by parsing and converting the configuration data (i.e., event configuration data) related to the Spine animation model in Unity (see the following descriptions of S120 and S130). Therefore, in the Unity-based animation event processing method in the embodiment of the invention, in the Unity running process, 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, and the Unity running does not need to be suspended and switched to a 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 adaptive to the Spine animation model, wherein the animation configuration object stores event configuration data of each animation in the Spine animation model.
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 animation identification, event identification, frame identification corresponding to the event, and event parameters. The animation identifier, the event identifier, and the frame identifier respectively refer to information uniquely locating a certain frame in the animation, the event, and the animation, and may be a name, an abbreviation, a number, or the like. The event parameter refers to attribute information of the animation event. Event timeline data refers to event-triggered timeline data in a Spine animation model, and stores event information (such as event parameters) according to a time sequence.
Specifically, the embodiment of the present invention further designs an animation configuration object, which is used to specially store and manage event configuration data of a Spine animation model in Unity. In the Unity running process, after the Unity loads the Spine animation model, the configuration conversion script is triggered to execute. At this time, Unity loads the animation configuration object through the configuration conversion script and analyzes the animation configuration object to acquire the configuration data of each event therein. Then, the Unity further converts the obtained configuration data of each event into event timeline data adapted to the Spine animation model through a configuration conversion script.
Before said loading an animation configuration object using said configuration transformation 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 may update the stored data in the animation configuration object as needed, so that the animation configuration object includes event configuration data (i.e., target event configuration data) of the animation event to be processed (i.e., target animation event), and update of the animation configuration object is completed. Then, the animation configuration object transformed by the configuration transformation script is the updated animation configuration object, and the event timeline data eventtieline obtained in S120 contains the target event configuration data of the target animation event. The advantage of the setting is that the animation configuration object is updated in the Unity running process, so that the event in the Spine animation is processed in the Unity running process.
S130, applying the event time flow 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 events in the Spine animation model.
Specifically, after Unity obtains event time stream data by configuring a conversion script, the event time stream data can be directly applied to the animation skeleton resource data skeinetoneasset of the Spine animation model, and the updating of the animation skeleton resource data is completed. The Spine animation model reads the event parameters of each animation event and triggers the subsequent events by using the updated animation skeleton resource data. At this point, Unity completes the processing of animation events in the Spine animation model through the animation configuration objects therein.
According to the technical scheme, 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 using the configuration conversion script, and converting the animation configuration object into event time flow data adaptive 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 flow 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 events in the Spine animation model. The method and the device have the advantages that in the Unity running process, the Unity applies the event configuration data of each animation in the Spine animation model stored in the animation configuration object independent from the Spine animation model to the animation skeleton resource data of the Spine animation model through the self-defined configuration conversion script to complete the processing of the animation events in the Spine animation model, the problem that the animation events cannot be processed in the Unity running process due to the fact that the animation events need to be processed in the Spine editor independently is solved, and convenience and processing efficiency of processing the events in the Spine animation in the Unity running process are improved.
Example two
In this embodiment, based on the first embodiment, further optimization is performed on "updating the animation configuration object according to the target event configuration data of the target animation event to be processed". The same or corresponding terms as those in the above embodiments are not explained in detail herein.
Referring to fig. 2, the Unity-based animation event processing method provided in this embodiment includes:
s210, loading a Spine animation model containing a preset configuration conversion script when a running starting instruction is detected.
S220, acquiring the target event configuration data and determining the event processing type of the target animation event.
The event processing type is a type of processing operation performed on an animation event. Illustratively, the event processing type is an event modification type, an event addition type or an event deletion type. That is, in the Unity running process, the event parameters in the Spine animation can be modified, and the entire event can be added and deleted.
Specifically, before updating the animation configuration object, target event configuration data corresponding to the target animation event is obtained. Moreover, since different event processing types operate on data in the animation configuration object differently, the event processing type corresponding to the target animation event also needs to be acquired. The two types of data can be obtained through human-computer interaction operation in an interaction panel, or can be obtained through reading of a static configuration file.
Illustratively, obtaining the target event configuration data and determining the event handling type of the target animation event comprises: receiving the target event configuration data and the event processing type through an animation property panel. The animation property panel is a panel of various property information displayed by an observer in Unity, and allows 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 property panel, and the target event configuration data and the event processing type are acquired through the interactive operation result. For example, if a user needs to modify an event in a certain frame of animation, the user modifies an event parameter corresponding to a corresponding event in a corresponding frame through an animation property panel, the Unity receives the parameter information modified by the user, determines an event processing type as an event modification type, and sets target event configuration data as an animation identifier, a frame identifier, an event identifier, and each modified event parameter corresponding to a target animation event. If a user needs to add a new event into a certain frame of animation, the user selects a corresponding frame through an animation attribute panel and adds corresponding event parameters, the Unity receives parameter information added by the user, determines an event processing type as an event adding type, and sets target event configuration data as an animation identifier, a frame identifier, an event identifier and each newly added event parameter corresponding to a 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 deletion operation (such as clicking a deletion button and the like), the Unity receives a deletion instruction of the user operation, determines the event processing type as the event deletion type, and sets the target event configuration data as the original event configuration data corresponding to the target animation event to be deleted. The interactive panel can more conveniently determine the target event configuration data and the event processing type, so that the user experience is improved, and the efficiency of developers is improved.
And S230, updating the animation configuration object according to the target event configuration data and the event processing type.
Specifically, the target event configuration data is updated into the value animation configuration object according to the configuration data modification mode corresponding to the event processing type. For example, if the event processing type is an event modification type, the target event configuration data is used to replace the original event configuration data corresponding to the target animation event in the animation configuration object; if the event processing type is an event adding type, adding target event configuration data into the animation configuration object; and if the event processing type is an event deletion type, positioning and deleting the data item 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 animated configuration object is generated by inheriting a configuration resource class in Unity and is initialized with the initial animated skeletal resource data of the Spine animation model. Specifically, the animation configuration object in the present embodiment is used for storing resource data, so that an animation configuration class can be conveniently created by inheriting the configurable object of the configuration resource class scriptable 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 object of the customized animation configuration class in this embodiment is an array of the serialization class, and each array element stores event configuration data of one animation event. The data initialized by the animation configuration object is derived from the initial animation skeleton resource data of the Spine animation model, that is, before the animation configuration object is not updated due to animation event processing operation, each piece of event configuration data stored in the animation configuration object is the reference of each piece of basic event configuration data 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 adaptive to the Spine animation model.
And S250, applying the event time flow data 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 using the configuration conversion script, and converting the animation configuration object into event time stream data adaptive to the Spine animation model; and applying the event time flow data to the animation skeleton resource data of the Spine animation model by using the configuration conversion script. The animation configuration object is updated according to the processing operation of the animation event 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 the Unity-based animation event processing are further improved.
EXAMPLE III
The embodiment provides an animation event processing device based on Unity, and referring to fig. 3, the device specifically includes:
a Spine animation model loading module 310, configured to load a Spine animation model including a preset configuration conversion script when a running start instruction is detected;
an event time stream data conversion module 320, 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;
the animation event processing module 330 is configured to apply the event time stream data to the animation bone resource data of the Spine animation model by using the configuration conversion script, so as to complete processing of an 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 foregoing apparatus, the apparatus further includes an animation configuration object updating module, configured to:
and updating the animation configuration object according to the target event configuration data of the target animation event to be processed before loading the animation configuration object by using the configuration conversion script.
Further, the animation configuration object update module comprises:
the target event configuration data acquisition submodule is used for acquiring the target event configuration data and determining the event processing type of the target animation event;
and the animation configuration object updating submodule 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:
receiving the target event configuration data and the event processing type through an animation property 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 skeleton resource data of the Spine animation model.
By the aid of the Unity-based animation event processing device, the event configuration data of each animation in the Spine animation model stored in the animation configuration object independent from the Spine animation model are applied to the animation skeleton resource data of the Spine animation model through the self-defined configuration conversion script in the operation process of Unity, processing of animation events in the Spine animation model is completed, the problem that the animation events cannot be processed in the operation process of Unity due to the fact that the animation events need to be processed in a Spine editor is solved, and convenience and processing efficiency of processing the events in the Spine animation in the operation process of Unity are improved.
The Unity-based animation event processing device provided by the embodiment of the invention can execute the Unity-based animation event processing method 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 Unity-based animation event processing apparatus, the included units and modules are merely divided according to the functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
Example four
Referring to fig. 4, the present embodiment provides an electronic device 400, which includes: one or more processors 420; the storage device 410 is configured to store one or more programs, and when the one or more programs are executed by the one or more processors 420, the one or more processors 420 implement the Unity-based animation event processing method provided by the embodiment of the present invention, including:
loading a Spine animation model containing a preset configuration conversion script when a running starting instruction is detected;
loading an animation configuration object by using the configuration conversion script, and converting the animation configuration object into event time flow data adaptive 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 flow 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 events in the Spine animation model.
Of course, those skilled in the art will understand that the processor 420 may also implement the technical solution of the Unity-based animation event processing method provided in any embodiment of the present invention.
The electronic device 400 shown in fig. 4 is only an example and should not bring any limitation to the function and the scope of use of the 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 the processors 420 in the electronic device may be one or more, and one processor 420 is 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 apparatus may be connected by a bus or other means, and are exemplified by a bus 450 in fig. 4.
The storage device 410, which is a computer-readable storage medium, can be used for storing 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, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, 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 located remotely from the processor 420, which may be connected to the electronic device over 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 generate key signal inputs related to user settings and function control of the electronic apparatus. The output device 440 may include a display device such as a display screen.
EXAMPLE five
The present embodiments provide a storage medium containing computer-executable instructions which, when executed by a computer processor, perform a Unity-based animation event processing method, the method comprising:
loading a Spine animation model containing a preset configuration conversion script when a running starting instruction is detected;
loading an animation configuration object by using the configuration conversion script, and converting the animation configuration object into event time flow data adaptive 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 flow 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 events in the Spine animation model.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the Unity-based animation event processing method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied 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 (RAM), a FLASH Memory (FLASH), a hard disk, or an optical disk of a computer, and includes several instructions to enable an electronic device (which may be a personal computer, a server, or a network device) to execute the Unity-based animation event processing method provided in the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. 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, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A Unity-based animation event processing method is characterized by comprising the following steps:
loading a Spine animation model containing a preset configuration conversion script when a running starting instruction is detected;
loading an animation configuration object by using the configuration conversion script, and converting the animation configuration object into event time flow data adaptive 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 flow 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 events 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 corresponding to an event, and an event parameter.
3. The method of claim 1, prior to said loading an animated configuration object with the configuration transformation script, further comprising:
and updating the animation configuration object according to the target event configuration data of the target animation event to be processed.
4. The method of claim 3, wherein updating the animation configuration object according to the target event configuration data of the 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 obtaining the target event configuration data and determining the event processing type of the target animation event comprises:
receiving the target event configuration data and the event processing type through an animation property 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. The method of any of claims 1-6, wherein the animated configuration object is generated by inheriting a configuration resource class in Unity and is initialized with initial animated skeletal resource data of the Spine animation model.
8. A Unity-based animation event processing apparatus comprising:
the Spine animation model loading module is used for loading a Spine animation model containing a preset configuration conversion script when an operation starting instruction is detected;
the event time flow data conversion module is used for loading an animation configuration object by using the configuration conversion script and converting the animation configuration object into event time flow data which is suitable for the Spine animation model, wherein 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 flow 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 events in the Spine animation model.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a Unity-based animation event processing method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the Unity-based animation event processing method according to any one of claims 1 to 7.
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 true CN111124386A (en) 2020-05-08
CN111124386B 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)

Cited By (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 重庆大学 A Virtual Face Modeling Method Based on Real Face Images

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 重庆大学 A Virtual Face Modeling Method Based on Real Face Images

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
贾飞鹏;何冬冬;: "基于Kinect的快速动画制作应用研究" *

Cited By (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

Also Published As

Publication number Publication date
CN111124386B (en) 2023-08-29

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
CN110244942B (en) Page generation method, device and system
WO2018036342A1 (en) Csar-based template design visualization method and device
US9471213B2 (en) Chaining applications
CN113574517A (en) Rule compiler engine apparatus, method, system, and medium for generating distributed systems
EP4009162A1 (en) Code change method and device
CN105700925A (en) APP interface implementation method and apparatus
CN114218052B (en) A method, device, equipment and storage medium for generating a business interaction diagram
US10459696B2 (en) Composable action flows
CN117453713A (en) SQL sentence generation method, device and storage medium for multi-type database
JP2018005933A (en) Method and apparatus for managing system specification
CN113918194A (en) A display method, device, electronic device and storage medium for page components
CN112558968B (en) Method, device, equipment and storage medium for generating resource tree view
CN111124386B (en) Animation event processing method, device, equipment and storage medium based on Unity
CN111399931B (en) Method and terminal for exporting UI (user interface) resources by LayaAir engine
JP2004362577A (en) Method and device for generating graphical user interface
CN117111894A (en) Method for converting data based on ETL module of low code development
CN115481343A (en) Target component generation method and device, storage medium and electronic device
CN113010159A (en) Script-based task processing method and device
CN111135570A (en) Unity-based element configuration method, device, equipment and storage medium
CN112231008A (en) Application module management method, device, storage medium and electronic device
CN116991355B (en) Method, system and device for supporting LED driving chip by modifying and iterating script
WO2025020555A9 (en) Plug-in configuration method and apparatus, and device and storage medium
CN116167342A (en) File generation method and device, electronic equipment and storage medium

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